码迷,mamicode.com
首页 > 微信 > 详细

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

时间:2020-06-10 13:24:08      阅读:294      评论:0      收藏:0      [点我收藏+]

标签:detail   start   滑动   ble   chart   程序   src   har   none   

刚添加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

 

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

标签:detail   start   滑动   ble   chart   程序   src   har   none   

原文地址:https://www.cnblogs.com/cntt/p/13084170.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!