zhengnaiwen_citu 2 hete
szülő
commit
7e2dfc1beb

+ 3 - 0
src/views/dataBook/components/mGraph.vue

@@ -319,6 +319,9 @@ export default {
         })
         this.$nextTick(() => {
           this.$refs.graphRef.setOptions(this.graphOptions, async (graphInstance) => {
+            if (!this.$refs.graphRef.setJsonData) {
+              return
+            }
             this.$refs.graphRef.setJsonData(data, async (_graphInstance) => {
               await _graphInstance.setZoom(75)
               successCallback()

+ 3 - 0
src/views/dataBook/components/mGraphList.vue

@@ -102,6 +102,9 @@ export default {
         }
         this.isEmpty = false
         this.$nextTick(() => {
+          if (!this.$refs.graphRef || !this.$refs.graphRef.setJsonData) {
+            return
+          }
           this.$refs.graphRef.setJsonData(data, async (_graphInstance) => {
             this.loading = false
           })