mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-15 14:00:35 +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 {
|
initOnPropsChangeEvent(leaf = this.leaf): void {
|
||||||
const dispose = leaf?.onPropChange?.((propChangeInfo: PropChangeOptions) => {
|
const handlePropsChange = debounce((propChangeInfo: PropChangeOptions) => {
|
||||||
if (!this.autoRepaintNode) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const {
|
const {
|
||||||
key,
|
key,
|
||||||
newValue = null,
|
newValue = null,
|
||||||
@ -450,6 +447,12 @@ export function leafWrapper(Comp: types.IBaseRenderComponent, {
|
|||||||
|
|
||||||
this.judgeMiniUnitRender();
|
this.judgeMiniUnitRender();
|
||||||
});
|
});
|
||||||
|
const dispose = leaf?.onPropChange?.((propChangeInfo: PropChangeOptions) => {
|
||||||
|
if (!this.autoRepaintNode) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
handlePropsChange(propChangeInfo);
|
||||||
|
});
|
||||||
|
|
||||||
dispose && this.disposeFunctions.push(dispose);
|
dispose && this.disposeFunctions.push(dispose);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user