-
Notifications
You must be signed in to change notification settings - Fork 19.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] 在uni-app中使用render.js渲染了echarts,在PC端点击事件是正常的,在移动端点击事件失效了。 #17933
Comments
@mambaneverout It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗 TRANSLATEDTITLE [Bug] eCharts were rendered using the render .js in uni-app, and click events were normal on PC and disabled on mobile. BODY Versione.g. 5.4.0 Link to Minimal Reproductionhttps://github.com/MambaNeverOut/echarts-bug-demo Steps to Reproduce
Current BehaviorAfter the chart is initialized on the mobile terminal, the click event is bound to the chart. But the click event is not triggered when the chart is clicked. Expected BehaviorI hope that after the chart is initialized on the mobile side, the bound click event can run normally Environment- OS: Windows 10 64-bit system
-Browser: Chrome
- Framework: Vue@2 Any additional comments?No response |
把这里 https://github.com/MambaNeverOut/echarts-bug-demo/blob/master/components/echarts/echarts.vue#L45 试试。不过随便在移动端打开了个页面测试了下,好像能触发点击事件,但不太容易点到。后面会看看具体什么情况。 |
这行代码需要怎么处理去尝试,我没明白 |
使用echarts 散点图,在PC端,鼠标移入后的效果是这样,在移动端鼠标点击也可以实现同样的效果 |
这个是用了第三方扩展吗?是的话到相应项目下开 issue |
@mambaneverout 不好意思,好像打漏字了🤣。我上面是说把这行代码删掉,不把 chart 放到 data 函数中去,防止其被深度代理。另外我不太熟悉这个框架,用单纯 html +js 去渲染图表的话在移动端是正常的。所以你看下删除那行怎么样,如果不行有可能是框架导致的,用 vConsole 看看是不是有什么报错信息可用。 |
我删除试过了,还是不行。 |
echarts没有适配uniapp,官方给的解决方案只针对原生小程序。应该是你这个封装的echarts.vue组件有问题吧。 |
我也遇到了这个问题 |
ecomfe/zrender#1024 |
Version
e.g. 5.4.0
Link to Minimal Reproduction
https://github.com/MambaNeverOut/echarts-bug-demo
Steps to Reproduce
Current Behavior
移动端初始化图表后,为图表绑定了点击事件。但是在点击图表的时候并没有触发这个点击事件。
Expected Behavior
希望可以在移动端初始化图表以后,绑定的点击事件可以正常运行
Environment
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: