Skip to content
New issue

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

微信开发者工具 Swiper 组件造成浏览器产生大量警告并拖慢运行速度(windows系统下 未修复) #11365

Closed
zhejilifang opened this issue Feb 28, 2022 · 4 comments
Labels
F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x
Projects

Comments

@zhejilifang
Copy link

相关平台

H5

复现仓库

https://github.com/kong-dev/taro-bug
浏览器版本: 开发者工具版本 1.05.2110290
使用框架: React

复现步骤

Taro 3.3.16 H5 环境 Swiper 组件。

修改 Taro-component 库 Swiper 组件中创建 SwiperJS 的 options:在 observerUpdate 回调中添加一条日志,运行代码后会发现快速的不断打印该日志。(提供的仓库中偷懒没有依赖本地 Taro-component 库,可以手动修改一下 node_modules/@tarojs/components/dist/esm-es5/taro-swiper-core_2.entry.js 中的代码来添加日志)

这个问题导致了我的实际项目中浏览器报大量的 Added non-passive event listener to a scroll-blocking event 警告,并且拖慢运行速度,几分钟后页面就会卡死无响应。

开发者工具版本 1.05.2110290

期望结果

不要在这个回调中重建 swiper loop

实际结果

依旧大量生成警告 导致无法调试

环境信息

👽 Taro v3.3.16


  Taro CLI 3.3.16 environment info:
    System:
      OS: Windows 10
    Binaries:
      Node: 14.16.0 - D:\Node\nodejs\node.EXE
      npm: 7.7.4 - D:\Node\nodejs\npm.CMD

补充信息

参考 #9962 windows下依旧有此问题存在

@taro-bot2 taro-bot2 bot added F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x labels Feb 28, 2022
@github-actions
Copy link
Contributor

等待热心的小伙伴解决问题中..., 有一些相关的 issues 可能帮助到你!

Thank you so much!

@NoirVoider
Copy link

同样遇到了, 开启 Disable cache , Swiper item 里的图片 每隔不到一秒都会重新请求加载

@vini123
Copy link

vini123 commented Sep 15, 2022 via email

@ZakaryCode
Copy link
Contributor

fix in #13054

H5 automation moved this from 组件 to Done Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x
Projects
Archived in project
H5
  
Done
Development

No branches or pull requests

4 participants