feat:adjust mvvm api
This commit is contained in:
@@ -230,6 +230,9 @@ export abstract class View implements Modeling {
|
||||
block(this)
|
||||
return this
|
||||
}
|
||||
in(group: Group) {
|
||||
group.addChild(this)
|
||||
}
|
||||
}
|
||||
|
||||
export interface StackConfig extends LayoutConfig {
|
||||
|
@@ -44,6 +44,7 @@ export abstract class ViewModel<M extends Object, V extends ViewHolder<M>> {
|
||||
attach(view: Group) {
|
||||
this.viewHolder.build(view)
|
||||
this.viewHolder.bind(this.state)
|
||||
this.onAttached(this.state, this.viewHolder)
|
||||
}
|
||||
|
||||
abstract onAttached(state: M, vh: V): void
|
||||
|
Reference in New Issue
Block a user