feat: add onEnvChanged

This commit is contained in:
pengfei.zhou
2021-07-07 12:44:40 +08:00
committed by osborn
parent 70bde4fba9
commit 0c10b513b9
13 changed files with 109 additions and 46 deletions

View File

@@ -39,7 +39,10 @@ export abstract class Panel {
onDestroy() { }
onShow() { }
onHidden() { }
onEnvChanged() {
this.__root__.children.length = 0
this.build(this.__root__)
}
abstract build(rootView: Group): void
private __data__?: object
@@ -126,6 +129,11 @@ export abstract class Panel {
this.build(this.__root__)
}
@NativeCall
private __onEnvChanged__() {
this.onEnvChanged()
}
@NativeCall
private __response__(viewIds: string[], callbackId: string) {
const v = this.retrospectView(viewIds)