feat(core): Node中的instance初始为null,用于判断是否与组件产生关联
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user