mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-15 02:38:16 +00:00
fix: 修复大纲树和组件面板来回点击异常
fix: 修复 onDockShow / onDockHide 事件
This commit is contained in:
parent
e18a3863cf
commit
8b9a6ecf5d
@ -206,9 +206,9 @@ const dockPane = Object.assign(skeleton.leftArea, {
|
|||||||
const f = (_: any, dock: any) => {
|
const f = (_: any, dock: any) => {
|
||||||
fn(dock);
|
fn(dock);
|
||||||
};
|
};
|
||||||
editor.on('skeleton.panel-dock.show', f);
|
editor.on('skeleton.panel-dock.active', f);
|
||||||
return () => {
|
return () => {
|
||||||
editor.removeListener('skeleton.panel-dock.show', f);
|
editor.removeListener('skeleton.panel-dock.active', f);
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@ -218,9 +218,9 @@ const dockPane = Object.assign(skeleton.leftArea, {
|
|||||||
const f = (_: any, dock: any) => {
|
const f = (_: any, dock: any) => {
|
||||||
fn(dock);
|
fn(dock);
|
||||||
};
|
};
|
||||||
editor.on('skeleton.panel-dock.hide', f);
|
editor.on('skeleton.panel-dock.unactive', f);
|
||||||
return () => {
|
return () => {
|
||||||
editor.removeListener('skeleton.panel-dock.hide', f);
|
editor.removeListener('skeleton.panel-dock.unactive', f);
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -162,6 +162,11 @@ export default class Panel implements IWidget {
|
|||||||
if (flag) {
|
if (flag) {
|
||||||
this._actived = true;
|
this._actived = true;
|
||||||
this.parent?.active(this);
|
this.parent?.active(this);
|
||||||
|
if (this.parent.name === 'leftFloatArea') {
|
||||||
|
this.skeleton.leftFixedArea.container.unactiveAll();
|
||||||
|
} else if (this.parent.name === 'leftFixedArea') {
|
||||||
|
this.skeleton.leftFloatArea.container.unactiveAll();
|
||||||
|
}
|
||||||
if (!this.inited) {
|
if (!this.inited) {
|
||||||
this.inited = true;
|
this.inited = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -79,6 +79,10 @@ export default class WidgetContainer<T extends WidgetItem = any, G extends Widge
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unactiveAll() {
|
||||||
|
Object.keys(this.maps).forEach(name => this.unactive(name));
|
||||||
|
}
|
||||||
|
|
||||||
add(item: T | G): T {
|
add(item: T | G): T {
|
||||||
item = this.handle(item);
|
item = this.handle(item);
|
||||||
const origin = this.get(item.name);
|
const origin = this.get(item.name);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user