This commit is contained in:
Baobhan Sith
2025-04-21 01:09:31 +08:00
parent 7cc48ee529
commit ee97fd3ad7
2 changed files with 37 additions and 28 deletions
@@ -1,4 +1,4 @@
import { ref, computed, readonly, watch } from 'vue';
import { ref, computed, readonly, watch, nextTick } from 'vue'; // Import nextTick
import { defineStore } from 'pinia';
import { useI18n } from 'vue-i18n';
import { useSessionStore } from './session.store'; // 导入会话 Store
@@ -157,7 +157,13 @@ export const useFileEditorStore = defineStore('fileEditor', () => {
// sessionId: sessionId, // 记录来源会话
};
tabs.value.set(tabId, newTab);
setActiveTab(tabId); // 激活新标签页
// setActiveTab(tabId); // 移除同步激活
// 使用 nextTick 延迟激活,给 DOM 更新留出时间
nextTick(() => {
setActiveTab(tabId);
});
// 不再在这里触发弹窗
// popupTrigger.value++;