feat:adjust the inject timing of panel's initData
This commit is contained in:
@@ -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([
|
||||
|
@@ -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([
|
||||
|
@@ -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([
|
||||
|
2
doric-js/index.d.ts
vendored
2
doric-js/index.d.ts
vendored
@@ -446,7 +446,7 @@ declare module 'doric/lib/src/widget/layouts' {
|
||||
space?: number;
|
||||
gravity?: Gravity;
|
||||
}
|
||||
export class VLayout extends LinearLayout implements VLayout {
|
||||
export class VLayout extends LinearLayout implements IVLayout {
|
||||
}
|
||||
export interface IHLayout extends IView {
|
||||
space?: number;
|
||||
|
@@ -81,14 +81,10 @@ export 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();
|
||||
@@ -102,7 +98,10 @@ export 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) {
|
||||
@@ -205,7 +204,7 @@ export class Panel {
|
||||
__decorate([
|
||||
NativeCall,
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [Object, String]),
|
||||
__metadata("design:paramtypes", [String]),
|
||||
__metadata("design:returntype", void 0)
|
||||
], Panel.prototype, "__init__", null);
|
||||
__decorate([
|
||||
@@ -235,7 +234,7 @@ __decorate([
|
||||
__decorate([
|
||||
NativeCall,
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", []),
|
||||
__metadata("design:paramtypes", [Object]),
|
||||
__metadata("design:returntype", void 0)
|
||||
], Panel.prototype, "__build__", null);
|
||||
__decorate([
|
||||
|
2
doric-js/lib/src/widget/layouts.d.ts
vendored
2
doric-js/lib/src/widget/layouts.d.ts
vendored
@@ -14,7 +14,7 @@ export interface IVLayout extends IView {
|
||||
space?: number;
|
||||
gravity?: Gravity;
|
||||
}
|
||||
export declare class VLayout extends LinearLayout implements VLayout {
|
||||
export declare class VLayout extends LinearLayout implements IVLayout {
|
||||
}
|
||||
export interface IHLayout extends IView {
|
||||
space?: number;
|
||||
|
@@ -88,14 +88,10 @@ export abstract class Panel {
|
||||
}
|
||||
|
||||
@NativeCall
|
||||
private __init__(frame: Frame, data?: string) {
|
||||
private __init__(data?: string) {
|
||||
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__)
|
||||
}
|
||||
|
||||
@NativeCall
|
||||
@@ -119,7 +115,10 @@ export abstract class Panel {
|
||||
}
|
||||
|
||||
@NativeCall
|
||||
private __build__() {
|
||||
private __build__(frame: Frame) {
|
||||
this.__root__.width = frame.width
|
||||
this.__root__.height = frame.height
|
||||
this.__root__.children.length = 0
|
||||
this.build(this.__root__)
|
||||
}
|
||||
|
||||
|
@@ -39,7 +39,7 @@ export interface IVLayout extends IView {
|
||||
gravity?: Gravity
|
||||
}
|
||||
|
||||
export class VLayout extends LinearLayout implements VLayout {
|
||||
export class VLayout extends LinearLayout implements IVLayout {
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user