diff --git a/packages/frontend/src/components/TerminalTabBar.vue b/packages/frontend/src/components/TerminalTabBar.vue index acbd718..37a4220 100644 --- a/packages/frontend/src/components/TerminalTabBar.vue +++ b/packages/frontend/src/components/TerminalTabBar.vue @@ -35,7 +35,8 @@ const emit = defineEmits([ 'activate-session', 'close-session', 'open-layout-configurator', - 'request-add-connection-from-popup' // 新增:声明从弹窗发出的添加请求事件 + 'request-add-connection-from-popup', // 声明从弹窗发出的添加请求事件 + 'request-edit-connection-from-popup' // 新增:声明从弹窗发出的编辑请求事件 ]); const activateSession = (sessionId: string) => { @@ -72,6 +73,14 @@ const handleRequestAddFromPopup = () => { emit('request-add-connection-from-popup'); // 向上发出事件 }; +// 新增:处理从弹窗内部发出的编辑连接请求 +const handleRequestEditFromPopup = (connection: any) => { // 假设 WorkspaceConnectionList 传递了连接对象 + console.log('[TabBar] Received request-edit-connection from popup component for connection:', connection); + showConnectionListPopup.value = false; // 关闭弹窗 + // 向上发出事件,并携带连接信息 + emit('request-edit-connection-from-popup', connection); +}; + // 新增:处理打开布局配置器的事件 const openLayoutConfigurator = () => { console.log('[TabBar] Emitting open-layout-configurator event'); @@ -186,8 +195,9 @@ const toggleButtonTitle = computed(() => {
diff --git a/packages/frontend/src/views/WorkspaceView.vue b/packages/frontend/src/views/WorkspaceView.vue index 95b4c4a..fa7f29a 100644 --- a/packages/frontend/src/views/WorkspaceView.vue +++ b/packages/frontend/src/views/WorkspaceView.vue @@ -362,6 +362,7 @@ const handleCloseEditorTab = (tabId: string) => { @close-session="sessionStore.closeSession" @open-layout-configurator="handleOpenLayoutConfigurator" @request-add-connection-from-popup="handleRequestAddConnection" + @request-edit-connection-from-popup="handleRequestEditConnection" />