1. The warning message is as follows:
In the vue+element project, solve the passive warning problem under chrome
element-ui.common.js?5c96:9972 [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
Two, problem solving
- installation
default-passive-events
yarn add default-passive-events
- It can be introduced in main.js
import "default-passive-events"; //添加事件管理者'passive',来阻止'touchstart'事件,让页面更加流畅。 解决chrome下的warning问题
Reference: https://www.jianshu.com/p/23850d4cade8