Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions frontend/src/components/shared/RepoTabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
:appEndpoint="appEndpoint"
:appStatus="appStatus"
:modelId="modelId"
:private="private"
:private="isPrivate"
:endpointReplica="endpointReplica"
:clusterId="repoDetail.clusterId"
:sku="sku"
Expand Down Expand Up @@ -160,7 +160,7 @@
<!-- analysis -->
<template
#analysis
v-if="(repoType === 'endpoint' || repoType === 'space') && repoTab.tab === 'analysis'"
v-if="(repoType === 'endpoint' || repoType === 'space') && currentTab === 'analysis'"
>
<InstanceAnalysis
:repoType="repoType"
Expand All @@ -174,7 +174,7 @@
<!-- logs -->
<template
#logs
v-if="(repoType === 'endpoint' || repoType === 'notebook') && repoTab.tab === 'logs'"
v-if="(repoType === 'endpoint' || repoType === 'notebook') && currentTab === 'logs'"
>
<EndpointLogs
v-if="repoType === 'endpoint'"
Expand Down Expand Up @@ -370,6 +370,12 @@
const { repoTab, setRepoTab } = useRepoTabStore()
const router = useRouter()
const route = useRoute()

// 计算当前激活的 tab,优先使用 route.query,确保与 Vue Router 状态同步
const currentTab = computed(() => {
return route.query.tab || repoTab.tab || props.defaultTab || 'summary'
})

const framework = computed(() => {
const tags = props.repoDetail.tags || []
const frameworkTag = tags.find((tag) => tag.category === 'framework')
Expand Down
3 changes: 0 additions & 3 deletions frontend/src/components/shared/TabContainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
:label="$t('all.analysis')"
name="analysis"
class="min-h-[300px]"
lazy
>
<slot name="analysis"></slot>
</el-tab-pane>
Expand Down Expand Up @@ -64,7 +63,6 @@
:label="$t('all.logs')"
name="logs"
class="min-h-[300px]"
lazy
>
<slot name="logs"></slot>
</el-tab-pane>
Expand All @@ -75,7 +73,6 @@
:label="$t('billing.billing')"
name="billing"
class="min-h-[300px]"
lazy
>
<slot name="billing"></slot>
</el-tab-pane>
Expand Down