update
This commit is contained in:
@@ -35,7 +35,8 @@ const emit = defineEmits([
|
|||||||
'activate-session',
|
'activate-session',
|
||||||
'close-session',
|
'close-session',
|
||||||
'open-layout-configurator',
|
'open-layout-configurator',
|
||||||
'request-add-connection-from-popup' // 新增:声明从弹窗发出的添加请求事件
|
'request-add-connection-from-popup', // 声明从弹窗发出的添加请求事件
|
||||||
|
'request-edit-connection-from-popup' // 新增:声明从弹窗发出的编辑请求事件
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const activateSession = (sessionId: string) => {
|
const activateSession = (sessionId: string) => {
|
||||||
@@ -72,6 +73,14 @@ const handleRequestAddFromPopup = () => {
|
|||||||
emit('request-add-connection-from-popup'); // 向上发出事件
|
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 = () => {
|
const openLayoutConfigurator = () => {
|
||||||
console.log('[TabBar] Emitting open-layout-configurator event');
|
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">
|
<div class="flex-grow overflow-y-auto border border-border rounded">
|
||||||
<WorkspaceConnectionListComponent
|
<WorkspaceConnectionListComponent
|
||||||
@connect-request="handlePopupConnect"
|
@connect-request="handlePopupConnect"
|
||||||
@open-new-session="handlePopupConnect"
|
@open-new-session="handlePopupConnect"
|
||||||
@request-add-connection="handleRequestAddFromPopup"
|
@request-add-connection="handleRequestAddFromPopup"
|
||||||
|
@request-edit-connection="handleRequestEditFromPopup"
|
||||||
class="popup-connection-list"
|
class="popup-connection-list"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -362,6 +362,7 @@ const handleCloseEditorTab = (tabId: string) => {
|
|||||||
@close-session="sessionStore.closeSession"
|
@close-session="sessionStore.closeSession"
|
||||||
@open-layout-configurator="handleOpenLayoutConfigurator"
|
@open-layout-configurator="handleOpenLayoutConfigurator"
|
||||||
@request-add-connection-from-popup="handleRequestAddConnection"
|
@request-add-connection-from-popup="handleRequestAddConnection"
|
||||||
|
@request-edit-connection-from-popup="handleRequestEditConnection"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 移除 :class 绑定 -->
|
<!-- 移除 :class 绑定 -->
|
||||||
|
|||||||
Reference in New Issue
Block a user