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] :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); + } }