element-ui遇到得坑一:Added non-passive event listener to a scroll-blocking 'mousewheel' event. Consider marking handler as 'passive' to make the page more responsive


字面大概意思:在滾動阻止的“ mousewheel”事件中添加了非被動事件偵聽器。 考慮將處理程序標記為“被動”以使頁面更具響應性。
chrome 瀏覽器檢測機制,給予指定屬性冒事性能就更好。沒法驗證。

解決目的:強迫症晚期看不慣 debug 時候有任何的 warning....

解決方法:

npm i default-passive-events -S

或者

yarn add default-passive-events

安裝之后在 main.js 內引入即可

npm


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM