feat:modular add provider

This commit is contained in:
pengfei.zhou
2021-05-14 13:14:54 +08:00
committed by osborn
parent eb7fc6c137
commit 67f3f354af
11 changed files with 79 additions and 6 deletions

View File

@@ -185,10 +185,14 @@ export abstract class View implements Modeling {
nativeViewModel: NativeViewModel = {
id: this.viewId,
type: this.constructor.name,
type: this.viewType(),
props: this.__dirty_props__,
}
viewType() {
return this.constructor.name
}
onPropertyChanged(propKey: string, oldV: Model, newV: Model): void {
if (newV instanceof Function) {
newV = this.callback2Id(newV)

View File

@@ -191,10 +191,14 @@ export abstract class View implements Modeling {
nativeViewModel: NativeViewModel = {
id: this.viewId,
type: this.constructor.name,
type: this.viewType(),
props: this.__dirty_props__,
}
viewType() {
return this.constructor.name
}
onPropertyChanged(propKey: string, oldV: Model, newV: Model): void {
if (newV instanceof Function) {
newV = this.callback2Id(newV)