轮播图结构是a标签包含img,在pc端,当用鼠标滑动图片时,会自动打开a标签的链接?是不是这两个插件冲突? 还是说 在滑动时 派发了click事件?
2 回答
芜湖不芜
TA贡献1796条经验 获得超7个赞
_initScroll () { //这是注册的better-scroll this.slider = new BScroll(this.$refs.slider, { scrollX: true, scrollY: false, snap: true, momentum: false, snapLoop: this.loop, snapThreshold: 0.3, snapSpeed: 400 })
import fastclick from 'fastclick' //注册的fastclick fastclick.attach(document.body) |
侃侃无极
TA贡献2051条经验 获得超10个赞
解决了,应该是谷歌浏览器最新特性的问题,Unable to preventDefault inside passive event listener due to target being treated as passive
添加回答
举报
0/150
提交
取消