diff --git a/ui/src/components/resource_mapping/index.vue b/ui/src/components/resource_mapping/index.vue index 5796d92bd79..e14537fcdd5 100644 --- a/ui/src/components/resource_mapping/index.vue +++ b/ui/src/components/resource_mapping/index.vue @@ -93,12 +93,7 @@ - + { } }) -const supportDependency = computed(() => { - if (currentSourceType.value === 'MODEL') { - return false - } - if (currentSourceType.value === 'TOOL' && currentSource.value.tool_type !== 'WORKFLOW') { - return false - } - return true -}) - const showWorkspace = computed(() => (user.isPE() || user.isEE()) && route.path.includes('shared')) const currentTab = ref('dependency') // 'dependency' 代表“我依赖的”, 'dependent' 代表“依赖我的” @@ -593,7 +578,10 @@ const open = (source: string, data: any) => { currentSourceId.value = data.id currentSource.value = data - if (!supportDependency.value) { + // 根据资源类型设置默认 tab + if (currentSourceType.value === 'MODEL') { + currentTab.value = 'dependent' + } else if (currentSourceType.value === 'TOOL' && data.tool_type !== 'WORKFLOW') { currentTab.value = 'dependent' } else { currentTab.value = 'dependency'