mpvue-echarts icon indicating copy to clipboard operation
mpvue-echarts copied to clipboard

chart.clear()和chart.dispose()方法会报错

Open SmithBox opened this issue 6 years ago • 1 comments

setTimeout(() => { console.log(chart) chart.clear() }, 5000) 图表初始化后,调用clear或者dispose方法会报错Cannot read property 'hide' of undefined;at pages/loginOut/index onShow function;at setTimeout callback function TypeError: Cannot read property 'hide' of undefined. 其中clear会清除图表后报错,dispose不会清除图表,使用mpvue官方demo也会如此

SmithBox avatar Nov 12 '18 09:11 SmithBox

echarts的小程序版本不会报错,mpvue版本会报错,我看了下好像是this指向问题,求解决。。。

SmithBox avatar Nov 13 '18 02:11 SmithBox