From 3aa77fee66247d217c4373ee3786589e2fd741eb Mon Sep 17 00:00:00 2001 From: Qiuxia Fan Date: Tue, 22 Mar 2022 16:55:59 +0800 Subject: [PATCH] fix dashboard id --- src/store/modules/dashboard.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/store/modules/dashboard.ts b/src/store/modules/dashboard.ts index 9eae03d2..c1a0afe6 100644 --- a/src/store/modules/dashboard.ts +++ b/src/store/modules/dashboard.ts @@ -406,16 +406,14 @@ export const dashboardStore = defineStore({ this.currentDashboard.entity, this.currentDashboard.name, ].join("_"); + this.currentDashboard.id = json.id; if (this.currentDashboard.id) { sessionStorage.removeItem(key); this.dashboards = this.dashboards.filter( (d: DashboardItem) => d.id !== this.currentDashboard.id ); } - this.dashboards.push({ - ...this.currentDashboard, - id: json.id, - }); + this.dashboards.push(this.currentDashboard); const l = { id: json.id, configuration: c }; sessionStorage.setItem(key, JSON.stringify(l));