plainheart commented on issue #16659:
URL: https://github.com/apache/echarts/issues/16659#issuecomment-1064006630
Don't worry. You may still use `this.heatmap_chart = echarts.init()` to
mount the echarts instance to `this`. Just please don't put it in `data` block
to avoid making echarts instance reactive.
```vue
data() {
return {
// DON'T declare here!
// heatmap_chart: null
}
},
mounted() {
// Mount this echarts instance on current vue instance using `this`
this.heatmap_chart = echarts.init();
},
beforeUnmount() {
// destroy echarts instance
this.heatmap_chart && this.heatmap_chart.dispose();
}
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]