update
This commit is contained in:
@@ -27,7 +27,12 @@ const props = defineProps({
|
||||
});
|
||||
|
||||
// 定义事件
|
||||
const emit = defineEmits(['activate-session', 'close-session', 'open-layout-configurator']); // 添加新事件
|
||||
const emit = defineEmits([
|
||||
'activate-session',
|
||||
'close-session',
|
||||
'open-layout-configurator',
|
||||
'request-add-connection-from-popup' // 新增:声明从弹窗发出的添加请求事件
|
||||
]);
|
||||
|
||||
const activateSession = (sessionId: string) => {
|
||||
if (sessionId !== props.activeSessionId) {
|
||||
@@ -57,6 +62,13 @@ const handlePopupConnect = (connectionId: number) => {
|
||||
showConnectionListPopup.value = false; // 关闭弹出窗口
|
||||
};
|
||||
|
||||
// 新增:处理从弹窗内部发出的添加连接请求
|
||||
const handleRequestAddFromPopup = () => {
|
||||
console.log('[TabBar] Received request-add-connection from popup component.');
|
||||
showConnectionListPopup.value = false; // 关闭弹窗
|
||||
emit('request-add-connection-from-popup'); // 向上发出事件
|
||||
};
|
||||
|
||||
// --- 新增:布局菜单处理 ---
|
||||
const toggleLayoutMenu = () => {
|
||||
console.log('Toggling layout menu visibility. Current state:', showLayoutMenu.value); // 添加日志
|
||||
@@ -151,6 +163,7 @@ const handleTogglePane = (paneName: PaneName) => {
|
||||
<WorkspaceConnectionListComponent
|
||||
@connect-request="handlePopupConnect"
|
||||
@open-new-session="handlePopupConnect"
|
||||
@request-add-connection="handleRequestAddFromPopup"
|
||||
class="popup-connection-list"
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user