element-plus / element-plus

🎉 A Vue.js 3 UI Library made by Element team
https://element-plus.org
MIT License
24.68k stars 16.86k forks source link

My project will have mousewheel passive warning???? #2016

Closed yang867381349 closed 2 years ago

yang867381349 commented 3 years ago

我的项目在使用了element-plus ^1.0.2-beta.33 出现了警告的问题。具体警告如下:

警告:

[Violation] Added non-passive event listener to a scroll-blocking 'mousewheel' event. Consider marking event handler as 'passive' to make the page more responsive.

但我都在网上查了好久都说是element-ui 导致的。但我不确定? element-plus 还会不会存在这个问题?

所以我只能发布小小的问题来咨询一下各位是如何解决的?

我已使用 $ npm install default-passive-events 给出的基本解决方法。可未能解决我现在的问题。

element-bot commented 3 years ago

Translation of this issue:

My project uses element plus ^ 1.0.2-beta.33 There's a warning problem. Specific warnings are as follows:

Warning:

[Violation] Added non-passive event listener to a scroll-blocking 'mousewheel' event. Consider marking event handler as 'passive' to make the page more responsive.

But I've looked it up on the Internet for a long time and said that it was caused by element UI. But I'm not sure? Will this problem still exist in element plus? So I can only issue a small question to ask you how to solve it?

I have used the basic solution given by $ NPM install default passive events . But it doesn't solve my problem.

jw-foss commented 3 years ago

Which component?

element-bot commented 3 years ago

Hello @yang867381349. Please provide an online reproduction demo by clicking this link or a minimal GitHub repository.

你好 @yang867381349, 请提供一个可复现问题的链接以便于我们帮你排查问题。可以通过点击 此处 创建或者提供一个最小化的 GitHub 仓库。

nabaonan commented 3 years ago

同样有这个问题,我用了default-passive-events插件,其他组件库比如antd vue都已经没有了,但是element-plus依然存在

yang867381349 commented 3 years ago

el-table 这个组件存在的问题?

yang867381349 commented 3 years ago

哪个组件?

el-table 这个组件存在的问题?

ghost commented 3 years ago

使用el-table组件时出现相同问题,使用default-passive-events插件无效,在el-table可以水平滚动时出现warning same problem with el-table component, 'default-passive-events' plugin not working, and chrome warning when el-table can scroll horizontally

yys-0505 commented 3 years ago

image Same issue under Chrome, related to el-table. May need to pass { passive: true } to addEventListener

linuxzha commented 3 years ago

Same issue on el-table

ooowennn commented 3 years ago

问题同上

mxp131011 commented 3 years ago

我也有相同问题

jiangjunfeng98 commented 3 years ago

Can fix this problem? Maybe just change the El table addEventListener

jiangjunfeng98 commented 3 years ago

Hello @yang867381349. Please provide an online reproduction demo by clicking this link or a minimal GitHub repository.

你好 @yang867381349, 请提供一个可复现问题的链接以便于我们帮你排查问题。可以通过点击 此处 创建或者提供一个最小化的 GitHub 仓库。

https://codepen.io/510879374/pen/RwgbXXg

image

Google Chrome 版本 92.0.4515.131(正式版本) (x86_64)

mxp131011 commented 3 years ago

@jiangjunfeng98 image 在官方例子中复现,只要有固定列就会有此问题,用的是:Microsoft Edge

jiangjunfeng98 commented 3 years ago

@jiangjunfeng98 image 在官方例子中复现,只要有固定列就会有此问题,用的是:Microsoft Edge

实际使用都有,官网上的demo 正常,不知道他们是不是做了什么处理

macOS 11.5.2 Google Chrome 版本 92.0.4515.131(正式版本) (x86_64)

DFNJKD-98 commented 3 years ago
HaoAurora commented 3 years ago

也遇到了同样的问题,请问有最终解决方案了吗

atpsoul commented 2 years ago

我这边也有这样的问题。 这是官方文档跳转到playground的例子,打开控制台,f5刷新一下就会出现。 el-table相关问题

lyudongzhou commented 2 years ago

一样的警告

mayangyang1 commented 2 years ago

一样的问题

lsguang0 commented 2 years ago

Why not fix it?????

jw-foss commented 2 years ago

@lsguang0 PR is always welcomed

FarAwayShe commented 2 years ago

有解决方法吗

syrm-ll commented 2 years ago

[Violation]Added non-passive event listener to a scroll-blocking 'mousewheel' event. Consider marking event handler as 'passive' to make the page more responsive.

一年了 还没修复吗...