mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-13 04:03:07 +00:00
fix: performance issues when focusing node
This commit is contained in:
parent
268fbe949b
commit
bcaad576b3
@ -399,10 +399,7 @@ export function leafWrapper(Comp: types.IBaseRenderComponent, {
|
||||
|
||||
/** 监听参数变化 */
|
||||
initOnPropsChangeEvent(leaf = this.leaf): void {
|
||||
const dispose = leaf?.onPropChange?.((propChangeInfo: PropChangeOptions) => {
|
||||
if (!this.autoRepaintNode) {
|
||||
return;
|
||||
}
|
||||
const handlePropsChange = debounce((propChangeInfo: PropChangeOptions) => {
|
||||
const {
|
||||
key,
|
||||
newValue = null,
|
||||
@ -450,6 +447,12 @@ export function leafWrapper(Comp: types.IBaseRenderComponent, {
|
||||
|
||||
this.judgeMiniUnitRender();
|
||||
});
|
||||
const dispose = leaf?.onPropChange?.((propChangeInfo: PropChangeOptions) => {
|
||||
if (!this.autoRepaintNode) {
|
||||
return;
|
||||
}
|
||||
handlePropsChange(propChangeInfo);
|
||||
});
|
||||
|
||||
dispose && this.disposeFunctions.push(dispose);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user