移除控制台日志语句

This commit is contained in:
2025-10-20 10:59:56 +08:00
parent 8c6eadd7f3
commit 0aecb2dec4
6 changed files with 70 additions and 17 deletions

View File

@@ -14,11 +14,12 @@ export class LayoutManager {
* 构造函数
* @param {Object} store - Pinia store实例
*/
constructor(store) {
constructor(store, onLayoutApplied = null) {
this.store = store;
this.container = ref(null);
this.layoutPersistence = null;
this.resizeHandlers = null;
this.onLayoutApplied = onLayoutApplied;
}
/**
@@ -29,9 +30,11 @@ export class LayoutManager {
// 直接传入store对象让LayoutPersistence能够访问最新的面板数据
// 创建布局持久化实例
// 优化LayoutPersistence构造函数已简化只需要store对象和storageKey
// 传递onLayoutApplied回调以便在布局应用完成后通知调用方
this.layoutPersistence = new LayoutPersistence(
this.store,
'dockPanelLayout'
'dockPanelLayout',
this.onLayoutApplied
);
// 创建调整大小处理器
@@ -226,10 +229,11 @@ export class LayoutManager {
/**
* 创建LayoutManager的Vue组合式函数
* @param {Object} store - Pinia store实例
* @param {Function} onLayoutApplied - 布局应用完成后的回调函数
* @returns {Object} LayoutManager实例及相关方法
*/
export function useLayoutManager(store) {
const layoutManager = new LayoutManager(store);
export function useLayoutManager(store, onLayoutApplied = null) {
const layoutManager = new LayoutManager(store, onLayoutApplied);
onMounted(() => {
layoutManager.initialize();