浏览代码

bug 修复

lilei 4 年之前
父节点
当前提交
c6be95f058
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      src/components/Echarts/pie.vue

+ 4 - 0
src/components/Echarts/pie.vue

@@ -173,6 +173,10 @@ export default {
             }
           ]
         }
+        // 已创建的先销毁
+        if (this.dom) {
+          this.dom.dispose()
+        }
         this.dom = echarts.init(this.$refs.dom, 'tdTheme')
         console.log(option, 'option')
         this.dom.setOption(option)