feat:adjust the inject timing of panel's initData

This commit is contained in:
pengfei.zhou
2020-03-19 13:35:04 +08:00
committed by osborn
parent 08454d53ea
commit 2b62e8bd3b
18 changed files with 87 additions and 65 deletions

View File

@@ -2230,14 +2230,10 @@ class Panel {
getInitData() {
return this.__data__;
}
__init__(frame, data) {
__init__(data) {
if (data) {
this.__data__ = JSON.parse(data);
}
this.__root__.width = frame.width;
this.__root__.height = frame.height;
this.__root__.children.length = 0;
this.build(this.__root__);
}
__onCreate__() {
this.onCreate();
@@ -2251,7 +2247,10 @@ class Panel {
__onHidden__() {
this.onHidden();
}
__build__() {
__build__(frame) {
this.__root__.width = frame.width;
this.__root__.height = frame.height;
this.__root__.children.length = 0;
this.build(this.__root__);
}
__response__(viewIds, callbackId) {
@@ -2354,7 +2353,7 @@ class Panel {
__decorate$2([
NativeCall,
__metadata$2("design:type", Function),
__metadata$2("design:paramtypes", [Object, String]),
__metadata$2("design:paramtypes", [String]),
__metadata$2("design:returntype", void 0)
], Panel.prototype, "__init__", null);
__decorate$2([
@@ -2384,7 +2383,7 @@ __decorate$2([
__decorate$2([
NativeCall,
__metadata$2("design:type", Function),
__metadata$2("design:paramtypes", []),
__metadata$2("design:paramtypes", [Object]),
__metadata$2("design:returntype", void 0)
], Panel.prototype, "__build__", null);
__decorate$2([

File diff suppressed because one or more lines are too long