Coder Social home page Coder Social logo

Comments (10)

domisooo avatar domisooo commented on June 27, 2024 1

Taro 在 >= 3.6.0 版本中已经解决了 Dev 模式下引用 npm 包中组件挂载不上的问题

from taro-f2-react.

wanglihuaya avatar wanglihuaya commented on June 27, 2024

俺也一样

from taro-f2-react.

domisooo avatar domisooo commented on June 27, 2024

@EPSON-LEE @wanglihuaya
Hello,感谢问题反馈,经过测试 Taro 3.5.1 以下版本可用,发现是 Taro 升级后造成自定义组件中的 Canvas 组件没有成功挂载所致,建议可将问题提给 Taro

from taro-f2-react.

wanglihuaya avatar wanglihuaya commented on June 27, 2024

image
目前 创建canvas,没有res[0]

from taro-f2-react.

domisooo avatar domisooo commented on June 27, 2024

@wanglihuaya 原因是在 dev 开发模式下,taro-f2-react 中的 Canvas 未被成功挂载,在通过 createSelectorQuery 查找 f2Canvas 时未找到该组件,所以 res 实际返回为 null
刚才测试在 build 模式下也是正常的,只有在 dev 模式下有问题,

from taro-f2-react.

domisooo avatar domisooo commented on June 27, 2024

@wanglihuaya 建议先回退 Taro 版本

from taro-f2-react.

wanglihuaya avatar wanglihuaya commented on June 27, 2024

@wanglihuaya 原因是在 dev 开发模式下,taro-f2-react 中的 Canvas 未被成功挂载,在通过 createSelectorQuery 查找 f2Canvas 时未找到该组件,所以 res 实际返回为 null 刚才测试在 build 模式下也是正常的,只有在 dev 模式下有问题,

行 我试试build模式下,要不试试把代码中的res[0]都改为res?

from taro-f2-react.

wanglihuaya avatar wanglihuaya commented on June 27, 2024

@wanglihuaya 建议先回退 Taro 版本

目前也不是强依赖,项目中目前使用的是echarts,会有一些内存泄漏问题,导致小程序闪退,想试试 antv 好像也有问题

下面是一个代码片段
https://developers.weixin.qq.com/s/bGfkAGmc7BFL

手机预览下,应该都会崩掉

点击按钮 来回切换页面 进进出出
但是 开发者工具检测 Memory 内存又没 溢出

from taro-f2-react.

lhzbxx avatar lhzbxx commented on June 27, 2024

Taro 在 >= 3.6.0 版本中已经解决了 Dev 模式下引用 npm 包中组件挂载不上的问题

是某项配置的问题么?我在 Taro 3.6.2 中使用默认配置,Dev 模式下依旧存在该问题。

from taro-f2-react.

domisooo avatar domisooo commented on June 27, 2024

@lhzbxx
按照以下配置修改,看起来 Taro 新版本中 Dev 编译模式下是有 bug 的,先这样

{
  ...
  compiler: {
    type: 'webpack5',
    prebundle: {
      enable: false,
    },
  },
  ...
}
`

from taro-f2-react.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.