Added non-passive event listener to a scroll-blocking . Consider marking event handler as ‘passive‘

卢鸿博
2023-12-01

警告:[Violation]Added non-passive event listener to a scroll-blocking <某些> 事件. Consider marking event handler as 'passive' to make the page more responsive. See <URL>

 

解决:

1.使用npm管理器下载default-passive-events依赖包

  npm i default-passive-events -S

2.入口文件main.js引入

  import 'default-passive-events'

 类似资料:

相关阅读

相关文章

相关问答