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

@@ -942,14 +942,10 @@ var Panel = /** @class */ (function () {
Panel.prototype.getInitData = function () {
return this.__data__;
};
Panel.prototype.__init__ = function (frame, data) {
Panel.prototype.__init__ = function (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__);
};
Panel.prototype.__onCreate__ = function () {
this.onCreate();
@@ -963,7 +959,10 @@ var Panel = /** @class */ (function () {
Panel.prototype.__onHidden__ = function () {
this.onHidden();
};
Panel.prototype.__build__ = function () {
Panel.prototype.__build__ = function (frame) {
this.__root__.width = frame.width;
this.__root__.height = frame.height;
this.__root__.children.length = 0;
this.build(this.__root__);
};
Panel.prototype.__response__ = function (viewIds, callbackId) {
@@ -1143,7 +1142,7 @@ var Panel = /** @class */ (function () {
__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([
@@ -1173,7 +1172,7 @@ var Panel = /** @class */ (function () {
__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([

View File

@@ -713,14 +713,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();
@@ -734,7 +730,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) {
@@ -837,7 +836,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([
@@ -867,7 +866,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([

View File

@@ -2172,14 +2172,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();
@@ -2193,7 +2189,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) {
@@ -2296,7 +2295,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([
@@ -2326,7 +2325,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([