From 48dabe68c1e1f06c44201c724e60924445168c29 Mon Sep 17 00:00:00 2001 From: dataeaseShu <106045316+dataeaseShu@users.noreply.github.com> Date: Thu, 13 Apr 2023 18:48:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=87=AA=E5=8A=A8=E5=88=B7=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/canvas/customComponent/UserView.vue | 5 +++++ frontend/src/components/widget/deWidget/DeTabs.vue | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/canvas/customComponent/UserView.vue b/frontend/src/components/canvas/customComponent/UserView.vue index 86dfaba760..f42553a851 100644 --- a/frontend/src/components/canvas/customComponent/UserView.vue +++ b/frontend/src/components/canvas/customComponent/UserView.vue @@ -322,6 +322,7 @@ export default { curFields: [], isFirstLoad: true, // 是否是第一次加载 refId: null, + getDataLoading: false, chart: BASE_CHART_STRING, requestStatus: 'success', message: null, @@ -491,6 +492,7 @@ export default { handler: function(val1, val2) { if (isChange(val1, val2) && !this.isFirstLoad) { this.getData(this.element.propValue.viewId) + this.getDataLoading = true } }, deep: true @@ -747,6 +749,7 @@ export default { }, getData(id, cache = true, dataBroadcast = false) { if (id) { + if (this.getDataLoading) return this.requestStatus = 'waiting' this.message = null @@ -845,6 +848,8 @@ export default { } this.isFirstLoad = false return true + }).finally(() => { + this.getDataLoading = false }) } }, diff --git a/frontend/src/components/widget/deWidget/DeTabs.vue b/frontend/src/components/widget/deWidget/DeTabs.vue index 3ef69c5547..2818d54a5b 100644 --- a/frontend/src/components/widget/deWidget/DeTabs.vue +++ b/frontend/src/components/widget/deWidget/DeTabs.vue @@ -423,7 +423,7 @@ export default { try { const targetRef = _this.$refs['canvasTabRef-' + _this.activeTabName] if (targetRef) { - targetRef[0].restore() + targetRef[0]?.restore() } _this.$refs[this.activeTabName][0].resizeChart() } catch (e) { @@ -528,7 +528,7 @@ export default { _this.activeTabName = _this.element.options.tabList[nowIndex].name const targetRef = _this.$refs['canvasTabRef-' + _this.activeTabName] if (targetRef) { - targetRef[0].restore() + targetRef[0]?.restore() } }); }, switchTime)