You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
但是结合了自定义目录树后,在1000条的数据量下,滚动或点击或执行其他 spreadsheet 方法时,控制台会提示 [Violation] Added non-passive event listener to a scroll-blocking 'wheel' event. Consider marking event handler as 'passive' to make the page more responsive.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
根据编辑模式的 demo,给了 handleScroll
![image](https://user-images.githubusercontent.com/94883874/223372557-caf0daa6-3c5e-4c87-91ec-81ea89694258.png)
但是结合了自定义目录树后,在1000条的数据量下,滚动或点击或执行其他 spreadsheet 方法时,控制台会提示 [Violation] Added non-passive event listener to a scroll-blocking 'wheel' event. Consider marking event handler as 'passive' to make the page more responsive.
![image](https://user-images.githubusercontent.com/94883874/223373115-b4a1dd00-b6b2-4a69-972c-026cfeace7a3.png)
根据网上其他的解决这个问题的办法是给一个 { passive: true } 参数,但是 s2.on() 不接这个参数
![image](https://user-images.githubusercontent.com/94883874/223373716-e8851ca1-bd30-41e1-a08f-8ee89f183033.png)
![image](https://user-images.githubusercontent.com/94883874/223373840-80a6648f-7cb5-4137-a43c-9e785ecdbe65.png)
如果我直接注释掉 handleScroll,在滚动的时候就不会有卡顿,但是点击进行编辑的时候依然会有,请问这有什么好的办法能解决这个问题?
Beta Was this translation helpful? Give feedback.
All reactions