大家经常会遇到这种情况,使用module弹出自定义组件,module的好处就不多说了。主要特点是:用到的时候加载
比如:我要添加信息,弹出一个自定义添加界面,添加完成后,我想立即刷新父窗体 ,看到刚添加的结果。这种情况可以使用
this.parentApplication.moduleLoader.child.getAllPlan();
getAllPlan():是module(父窗体的public方法,用来刷新父窗体的)
同样,也可以把子窗体的值传到module(父窗体中)
this.parentApplication.moduleLoader.child.userID=子窗体要传父窗体的值;
userID:是module(父窗体的public属性);
注意:我是在Application里使用 moduleLoader标签,请根据自己情况适当修改