You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2021/03/01 06:55:09 UTC

[GitHub] [echarts] zhangqiangzgz commented on issue #14339: vue3项目点击图例报错后图例点击交互无法正常使用

zhangqiangzgz commented on issue #14339:
URL: https://github.com/apache/echarts/issues/14339#issuecomment-787700803


   参考#14342回复,目前这个问题解决了。
   问题原因:vue3项目中echarts.init()创建的实例定义为响应式。经过测试,vue2的写法在data中定义chartInstance或者vue3的写法通过ref定义chartInstance,都会出现该问题。
   问题解决:
   vue3中echarts.init()创建的实例定义为普通非响应式变量,例如let chartInstance = echars.init()
   另外,
   vue3项目中通过reactive定义chartInstance,不会出现该问题。
   vue2项目中可以在data中定义chartInstance,然后this.chartInstance = echarts.init(),不会出现该问题。


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org