Skip to content

Commit 6a14535

Browse files
authored
ui: fix tab name in query params (apache#11590)
1 parent 7c7497c commit 6a14535

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

ui/src/components/view/ResourceView.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,17 @@
3333
:is="tabs[0].component"
3434
:resource="resource"
3535
:loading="loading"
36-
:tab="tabs[0].name" />
36+
:tab="tabName(tabs[0])" />
3737
</keep-alive>
3838
<a-tabs
3939
v-else
4040
style="width: 100%; margin-top: -12px"
4141
:animated="false"
42-
:activeKey="activeTab || tabs[0].name"
42+
:activeKey="activeTab || tabName(tabs[0])"
4343
@change="onTabChange" >
44-
<template v-for="tab in tabs" :key="tab.name">
44+
<template v-for="tab in tabs" :key="tabName(tab)">
4545
<a-tab-pane
46-
:key="tab.name"
46+
:key="tabName(tab)"
4747
:tab="$t('label.' + tabName(tab))"
4848
v-if="showTab(tab)">
4949
<keep-alive>
@@ -183,12 +183,12 @@ export default {
183183
return
184184
}
185185
if (!this.historyTab || !this.$route.meta.tabs || this.$route.meta.tabs.length === 0) {
186-
this.activeTab = this.tabs[0].name
186+
this.activeTab = this.tabName(this.tabs[0])
187187
return
188188
}
189-
const tabIdx = this.$route.meta.tabs.findIndex(tab => tab.name === this.historyTab)
189+
const tabIdx = this.$route.meta.tabs.findIndex(tab => this.tabName(tab) === this.historyTab)
190190
if (tabIdx === -1) {
191-
this.activeTab = this.tabs[0].name
191+
this.activeTab = this.tabName(this.tabs[0])
192192
} else {
193193
this.activeTab = this.historyTab
194194
}

0 commit comments

Comments
 (0)