移除控制台日志语句
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user