javascript - 为什么 vue-lazyload 会同时监听 'wheel' 、 'touchmove' 和 'scroll' 事件?
问题描述
vue-lazyload 的默认监听事件包括 'scroll'、'wheel'、'mousewheel'、'resize'、'animationend'、'transitionend' 和 'touchmove'。
var DEFAULT_EVENTS = ['scroll', 'wheel', 'mousewheel', 'resize', 'animationend', 'transitionend', 'touchmove'];
当 'wheel' 或 'touchmove' 发射时,'scroll' 也会发射。监听“滚动”事件时是否有必要监听“轮子”和“触摸移动”?
解决方案
推荐阅读
- apache-kafka - 无法以 KafkaNull 作为值发送消息
- python - BeautifulSoup,选择要提取的文本
- python - 使用 Dash 生成多个绘图
- python-3.x - 如何使用 Python 3 中的类来增加程序的功能?
- python-3.x - 连接重复列包含相同值的时间序列数据框
- docker - Pytorch 错误:Jupyter Notebook 中的“收到无效的参数组合”
- java - javafx.fxml.LoadException:文件路径错误
- php - Magento 2 Theme 硬编码谷歌地图 api url
- docker - Wercker 的 internal/docker-build 因上下文属性而失败
- php - Imagick 和连字