[Violation] Added non-passive event listener to a scroll-blocking ‘mousewheel‘ event VUE控制台警告
使用vue elementUI 时 控制台警告:[Violation] Added non-passive event listener to a scroll-blocking ‘mousewheel’ event. Consider marking event handler as ‘passive’ to make the page more responsive. See https://
·
使用vue elementUI 时 控制台警告:
[Violation] Added non-passive event listener to a scroll-blocking ‘mousewheel’ event. Consider marking event handler as ‘passive’ to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952
译文:
[违规]添加非被动事件监听到滚动阻止’鼠标滚轮’事件。 考虑将事件处理程序标记为“被动的”,以使页面响应更快。
虽然只是警告,但是控制台多了还是不爽
解决方案:
1、npm i default-passive-events -S
2、main.js中加入:import ‘default-passive-events’
完美解决
还在烦恼找不到免费好看的电脑桌面吗?点我或者去主页,教你如何自己写一个电脑桌面
如果文章对您有所帮助,请帮我点个免费的赞,拒绝白嫖从我做起,我是七月、期待您的关注
更多推荐
已为社区贡献1条内容
所有评论(0)