Add context to ViewModel

This commit is contained in:
pengfei.zhou
2020-09-21 15:58:45 +08:00
committed by osborn
parent 0f9bed3734
commit e0358a3f81
7 changed files with 11 additions and 2 deletions

View File

@@ -2695,6 +2695,7 @@ class VMPanel extends Panel {
build(root) {
this.vh = new (this.getViewHolderClass());
this.vm = new (this.getViewModelClass())(this.getState(), this.vh);
this.vm.context = this.context;
this.vm.attach(root);
}
}