Skip to content

Commit d8f67b2

Browse files
ice201508Jiuling.Lei
andauthored
main_fix-endpoint-analysis-tag-refresh-blank (#1431)
Co-authored-by: Jiuling.Lei <[email protected]>
1 parent 27095bc commit d8f67b2

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

frontend/src/components/shared/RepoTabs.vue

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
:appEndpoint="appEndpoint"
6363
:appStatus="appStatus"
6464
:modelId="modelId"
65-
:private="private"
65+
:private="isPrivate"
6666
:endpointReplica="endpointReplica"
6767
:clusterId="repoDetail.clusterId"
6868
:sku="sku"
@@ -160,7 +160,7 @@
160160
<!-- analysis -->
161161
<template
162162
#analysis
163-
v-if="(repoType === 'endpoint' || repoType === 'space') && repoTab.tab === 'analysis'"
163+
v-if="(repoType === 'endpoint' || repoType === 'space') && currentTab === 'analysis'"
164164
>
165165
<InstanceAnalysis
166166
:repoType="repoType"
@@ -174,7 +174,7 @@
174174
<!-- logs -->
175175
<template
176176
#logs
177-
v-if="(repoType === 'endpoint' || repoType === 'notebook') && repoTab.tab === 'logs'"
177+
v-if="(repoType === 'endpoint' || repoType === 'notebook') && currentTab === 'logs'"
178178
>
179179
<EndpointLogs
180180
v-if="repoType === 'endpoint'"
@@ -370,6 +370,12 @@
370370
const { repoTab, setRepoTab } = useRepoTabStore()
371371
const router = useRouter()
372372
const route = useRoute()
373+
374+
// 计算当前激活的 tab,优先使用 route.query,确保与 Vue Router 状态同步
375+
const currentTab = computed(() => {
376+
return route.query.tab || repoTab.tab || props.defaultTab || 'summary'
377+
})
378+
373379
const framework = computed(() => {
374380
const tags = props.repoDetail.tags || []
375381
const frameworkTag = tags.find((tag) => tag.category === 'framework')

frontend/src/components/shared/TabContainer.vue

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
:label="$t('all.analysis')"
2222
name="analysis"
2323
class="min-h-[300px]"
24-
lazy
2524
>
2625
<slot name="analysis"></slot>
2726
</el-tab-pane>
@@ -64,7 +63,6 @@
6463
:label="$t('all.logs')"
6564
name="logs"
6665
class="min-h-[300px]"
67-
lazy
6866
>
6967
<slot name="logs"></slot>
7068
</el-tab-pane>
@@ -75,7 +73,6 @@
7573
:label="$t('billing.billing')"
7674
name="billing"
7775
class="min-h-[300px]"
78-
lazy
7976
>
8077
<slot name="billing"></slot>
8178
</el-tab-pane>

0 commit comments

Comments
 (0)