소스 검색

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')
         this.dom = echarts.init(this.$refs.dom, 'tdTheme')
         console.log(option, 'option')
         console.log(option, 'option')
         this.dom.setOption(option)
         this.dom.setOption(option)