From 51beb7249fbb65961a738c1378feb19979bc7b90 Mon Sep 17 00:00:00 2001 From: Lykin <137850705+tiny-craft@users.noreply.github.com> Date: Wed, 25 Dec 2024 11:04:36 +0800 Subject: [PATCH] fix: reset sub tab to `status` page --- frontend/src/components/content/ContentPane.vue | 4 ++-- frontend/src/stores/tab.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/content/ContentPane.vue b/frontend/src/components/content/ContentPane.vue index 2c6e3ff..26e473b 100644 --- a/frontend/src/components/content/ContentPane.vue +++ b/frontend/src/components/content/ContentPane.vue @@ -70,7 +70,7 @@ const isBlankValue = computed(() => { }) const selectedSubTab = computed(() => { - const { subTab = 'status' } = tabStore.currentTab || {} + const { subTab = BrowserTabType.Status } = tabStore.currentTab || {} return subTab }) @@ -104,7 +104,7 @@ watch( }" :value="selectedSubTab" class="content-sub-tab" - default-value="status" + :default-value="BrowserTabType.Status.toString()" pane-class="content-sub-tab-pane" placement="top" tab-style="padding-left: 10px; padding-right: 10px;" diff --git a/frontend/src/stores/tab.js b/frontend/src/stores/tab.js index 1ab2dda..f451d07 100644 --- a/frontend/src/stores/tab.js +++ b/frontend/src/stores/tab.js @@ -180,7 +180,7 @@ const useTabStore = defineStore('tab', { }) { let tabIndex = findIndex(this.tabList, { name: server }) if (tabIndex === -1) { - subTab = subTab || BrowserTabType.KeyDetail + subTab = subTab || BrowserTabType.Status const tabItem = new TabItem({ name: server, title: server,