更改全局监听 code配置,改变tab切换逻辑

This commit is contained in:
2026-05-09 18:23:25 +08:00
parent fa590f1e27
commit d1ef004100
2 changed files with 33 additions and 3 deletions

View File

@@ -2044,6 +2044,16 @@ const loadWorkflowFromDsl = (dsl: any) => {
ElMessage.error('工作流加载失败');
}
};
// 监听创作模式变化,自动切换左侧 Tab
watch(isCreationMode, (newValue) => {
if (newValue) {
// 进入创作模式,切换到"工作空间"Tab
leftPanelTab.value = 'workspace';
} else {
// 退出创作模式,切换到"当前选中"Tab
leftPanelTab.value = 'selected';
}
});
onMounted(async () => {
await getList();
await nextTick();