小程序·使用echarts不跟随父元素滑动的问题

刚添加echarts的时候:

小程序·使用echarts不跟随父元素滑动的问题

 

 

 滚动页面的时候:

小程序·使用echarts不跟随父元素滑动的问题

 

 

1. 当时百度了很多办法有大神说是因为echarts的默认触碰值的问题

bindtouchstart="touchStart"

bindtouchmove="touchMove"

bindtouchend="touchEnd" 

去掉这几个默认的方法就行了 但是在我这并不适用

2.使用disable-scroll="true"

在界面的遮罩层添加disable-scroll="true" 在我这也不适用

3.查看canvas的层级是否使用了height="100%",position定位 只要是canvas的父级元素都不能添加

检查元素发现没有使用这些样式 最后发现在page上设置了height="100%" 这个需要注意下

传送门:https://blog.csdn.net/xd_yangxiaoromg/article/details/88258744?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.nonecase&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.nonecase

 

上一篇:MLX90614温度传感器的SMBUS协议学习


下一篇:关于this.nextTick最讲的透的一篇文章