element-plus [Component] [input-number] Element Plus 的 el-input-number 组件出现 [Violation] Added non-passive event listener to a scroll-blocking '< some>' event. Consider marking event handler as 'passive' to make the page more responsive. See < URL> 这样的警告

hjzp0vay  于 8个月前  发布在  其他
关注(0)|答案(2)|浏览(140)

Bug Type: Component

Environment

  • Vue Version: 3.4.15
  • Element Plus Version: 2.6.0
  • Browser / OS: chrome
  • Build Tool: Vite

Reproduction

  • el-input-number

Element Plus Playground

Steps to reproduce

页面上存在el-input-number时

What is Expected?

没有警告

What is actually happening?

F12调试会发现警告:[Violation] Added non-passive event listener to a scroll-blocking event. Consider marking event handler as 'passive' to make the page more responsive. See

Additional comments

(empty)

qnyhuwrf

qnyhuwrf1#

具体警告为:[Violation] Added non-passive event listener to a scroll-blocking 'wheel' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952
应该是源码中的@wheel改为@wheel.passive?

2ul0zpep

2ul0zpep2#

我也遇到了这个错误

相关问题