From 4127378f844261ae33ee0181397bf9b16d67a569 Mon Sep 17 00:00:00 2001 From: Peter Olu Date: Tue, 10 May 2022 05:19:05 +0100 Subject: [PATCH] dynamic tab type --- src/store/modules/dashboard.ts | 2 +- src/views/dashboard/controls/Tab.vue | 8 ++++---- src/views/dashboard/panel/Tool.vue | 23 +++++++++++------------ 3 files changed, 16 insertions(+), 17 deletions(-) diff --git a/src/store/modules/dashboard.ts b/src/store/modules/dashboard.ts index 7abade17..fca35e5f 100644 --- a/src/store/modules/dashboard.ts +++ b/src/store/modules/dashboard.ts @@ -212,7 +212,7 @@ export const dashboardStore = defineStore({ setCurrentTabItems(items: LayoutConfig[]) { this.currentTabItems = items; }, - setCurrentTabName(name: string) { + setCurrentTabType(name: string) { this.currentTabName = name }, removeTab(item: LayoutConfig) { diff --git a/src/views/dashboard/controls/Tab.vue b/src/views/dashboard/controls/Tab.vue index b69f7a35..c8ca8963 100644 --- a/src/views/dashboard/controls/Tab.vue +++ b/src/views/dashboard/controls/Tab.vue @@ -19,7 +19,7 @@ limitations under the License. --> v-for="(child, idx) in data.children || []" :key="idx" :class="{ active: activeTabIndex === idx }" - @click="clickTabs($event, idx, child.name, child)" + @click="clickTabs($event, idx, child)" >