We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
微信小程序
小程序基础库: 2.14.0 使用框架: React
页面中写两个swiper, 然后进入子页面再返回, 滑动第一个swiper, 第一个swiper空白,第二个正常
正常使用
页面报错,第一个swiper空白,第二个正常信息如下: TypeError: Cannot read property '$$' of undefined
TypeError: Cannot read property '$$' of undefined
👽 Taro v3.0.3 Taro CLI 3.0.3 environment info: System: OS: macOS 10.15.7 Shell: 3.2.57 - /bin/bash Binaries: Node: 12.16.3 - /usr/local/bin/node Yarn: 1.22.4 - /usr/local/bin/yarn npm: 6.14.8 - /usr/local/bin/npm npmPackages: @tarojs/cli: 3.0.17 => 3.0.17 @tarojs/components: 3.0.17 => 3.0.17 @tarojs/mini-runner: 3.0.17 => 3.0.17 @tarojs/react: 3.0.17 => 3.0.17 @tarojs/runtime: 3.0.17 => 3.0.17 @tarojs/taro: 3.0.17 => 3.0.17 @tarojs/webpack-runner: 3.0.17 => 3.0.17 babel-preset-taro: 3.0.17 => 3.0.17 eslint-config-taro: 3.0.17 => 3.0.17 react: ^16.10.0 => 16.14.0
taro请以项目内版本为准
The text was updated successfully, but these errors were encountered:
补充信息如下: 1, 详细报错信息:
[渲染层错误] TypeError: Cannot read property '$$' of undefined at HTMLElement._attached.d._touchstartHandlerForDevtools (http://127.0.0.1:64072/__pageframe__/__dev__/WAWebview.js:2:1307014) [渲染层错误] SystemError (webviewScriptError) Cannot read property '$$' of undefined TypeError: Cannot read property '$$' of undefined at HTMLElement._attached.d._touchstartHandlerForDevtools (http://127.0.0.1:64072/__pageframe__/__dev__/WAWebview.js:2:1307014) [渲染层错误] Uncaught
2, 截图:
Sorry, something went wrong.
使用的Hooks
Hooks
经测试,是因为在swiper的onChange事件中使用useState引起的。 因为自定义了swiper下边的指示器, 所以必须调用useState的set, 造成界面重新渲染, 然后就会报以上错误
swiper
onChange
useState
set
从报错堆栈上看,是微信渲染层的错误。提供一个完整可复现的 demo 看看吧。
非常感谢您的回复, 不过由于是沟通就可以解决的问题, 后边让修改了设计图, 不自定义指示器了, 所以问题就没有了. 刚单独写了示例, 也无法复现了, 可能和使用时的场景有关, 也可能与升级了taro版本到3.0.18有关, 非常感谢!
3.0.18
No branches or pull requests
相关平台
微信小程序
小程序基础库: 2.14.0
使用框架: React
复现步骤
页面中写两个swiper, 然后进入子页面再返回, 滑动第一个swiper, 第一个swiper空白,第二个正常
期望结果
正常使用
实际结果
页面报错,第一个swiper空白,第二个正常信息如下:
TypeError: Cannot read property '$$' of undefined
环境信息
补充信息
taro请以项目内版本为准
The text was updated successfully, but these errors were encountered: