ECharts Tooltip 不显示问题 - Vue Ref vs 普通变量 #13901
Unanswered
trry-hub
asked this question in
Help/Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Vue version
3.5.21
Link to minimal reproduction
https://github.com/trry-hub/issues/tree/echarts
Steps to reproduce
问题描述
在 Vue 3 + ECharts 项目中,当使用 Vue 的
ref()
来存储 ECharts 实例时,图表的 tooltip 无法正常显示。但使用普通变量存储 ECharts 实例时,tooltip 可以正常工作。What is expected?
两种方法都应该能够正常显示 tooltip,当鼠标悬停在图表上时应该显示相应的数据信息。
What is actually happening?
环境信息
复现步骤
方法一:使用普通变量(tooltip 正常工作)
方法二:使用 Vue ref(tooltip 不工作)
System Info
Any additional comments?
实际行为
可能的原因分析
临时解决方案
目前使用普通变量而非 Vue ref 来存储 ECharts 实例可以避免此问题。
Beta Was this translation helpful? Give feedback.
All reactions