mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-09-25 01:39:57 +08:00
feat(core): Node中的instance初始为null,用于判断是否与组件产生关联
This commit is contained in:
parent
34bc223f02
commit
291de2005d
@ -49,7 +49,7 @@ class Node extends EventEmitter {
|
||||
[key: string]: any;
|
||||
};
|
||||
public events: EventConfig[] = [];
|
||||
public instance?: any = {};
|
||||
public instance?: any = null;
|
||||
public page?: Page;
|
||||
public parent?: Node;
|
||||
public app: TMagicApp;
|
||||
@ -78,7 +78,8 @@ class Node extends EventEmitter {
|
||||
if (
|
||||
this.instance &&
|
||||
!Object.isFrozen(this.instance) &&
|
||||
Object.getOwnPropertyDescriptor(this.instance, 'config')?.writable !== false
|
||||
Object.getOwnPropertyDescriptor(this.instance, 'config')?.writable !== false &&
|
||||
!this.instance.__isVue
|
||||
) {
|
||||
this.instance.config = data;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user