|
发表于 2017-11-24 16:42:03
|
显示全部楼层
母页面在modelload事件中发起数据改变事件监听:
- Model.prototype.modelLoad = function(event) {
- justep.Shell.on("userDataChanged", this.userDataChanged, this);
- };
- Model.prototype.modelUnLoad = function(event) {
- justep.Shell.off("userDataChanged", this.userDataChanged);
- };
- Model.prototype.userDataChanged = function(event) {
- this.comp("userData").refreshData();
- };
复制代码
然后在子页面中在提交数据后发起一个数据改变事件userDataChanged:
- Model.prototype.saveBtnClick = function(event) {
- this.comp("userData").saveData({
- "onSuccess":function(){
- ILayer.ShowMsg("保存成功");
- justep.Shell.fireEvent("userDataChanged");
- justep.Shell.closePage();
- }
- });
- };
复制代码 |
|