VUE使用Swiper组件,组件中嵌套Echarts图,Echarts的点击事件不生效问题解决
1.解决方案
在Swiper的配置项中添加以下属性(实测,已解决)
options: { loop: false, simulateTouch: true, autoplay: { delay: 10000, disableOnInteraction: true }, touchStartPreventDefault: false, // 添加这个属性 默认不阻止事件 }
官方是这么介绍的
阻止touchstart (mousedown)的默认事件,设置为false则不阻止。
touchStartPreventDefault信息

VUE使用Swiper组件,组件中嵌套Echarts图,Echarts的点击事件不生效问题解决
浙公网安备 33010602011771号