update
This commit is contained in:
@@ -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(() => {
|
||||
<div class="flex-grow overflow-y-auto border border-border rounded">
|
||||
<WorkspaceConnectionListComponent
|
||||
@connect-request="handlePopupConnect"
|
||||
@open-new-session="handlePopupConnect"
|
||||
@open-new-session="handlePopupConnect"
|
||||
@request-add-connection="handleRequestAddFromPopup"
|
||||
@request-edit-connection="handleRequestEditFromPopup"
|
||||
class="popup-connection-list"
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user