From 220ee2680dbf6d474017feea18ca63f788cd43e7 Mon Sep 17 00:00:00 2001 From: Zeeland <287017217@qq.com> Date: Mon, 31 Oct 2022 19:54:53 +0800 Subject: [PATCH 1/2] :fix: first enter the https://rymcu.com/open-data can not show the chart --- pages/open-data.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pages/open-data.vue b/pages/open-data.vue index 7ba5d18..c304a89 100644 --- a/pages/open-data.vue +++ b/pages/open-data.vue @@ -155,7 +155,9 @@ export default { }, mounted() { this.$store.commit("setActiveMenu", "open-data"); - this.initLastThirtyDaysCharts(this.lastThirtyDays) + setTimeout(() => { + this.initLastThirtyDaysCharts(this.lastThirtyDays) + }, 500); } } From a6f197930e701863bc0c031cc14fb9a41ee83a84 Mon Sep 17 00:00:00 2001 From: Zeeland <287017217@qq.com> Date: Tue, 1 Nov 2022 01:49:32 +0800 Subject: [PATCH 2/2] :fix: chart data will not displayed when first enter --- pages/admin/dashboard.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pages/admin/dashboard.vue b/pages/admin/dashboard.vue index 5228568..a404252 100644 --- a/pages/admin/dashboard.vue +++ b/pages/admin/dashboard.vue @@ -593,8 +593,11 @@ export default { }, mounted() { this.$store.commit("setActiveMenu", "admin-dashboard"); - this.initLastThirtyDaysCharts(this.lastThirtyDays) - this.initHistoryCharts(this.history) + setTimeout(() => { + this.initLastThirtyDaysCharts(this.lastThirtyDays) + this.initHistoryCharts(this.history) + }, 500); + } }