实现 A页面通过window.open打开一个B页面,B页面提交过后,希望局部刷新A页面。
A页面方法
mounted(){
window['updateList'] = ()=>{
this.getList()
}
},
B页面方法
//通过window.opener调用A页面刷新数据
window.opener.updateList();
实现 A页面通过window.open打开一个B页面,B页面提交过后,希望局部刷新A页面。
A页面方法
mounted(){
window['updateList'] = ()=>{
this.getList()
}
},
B页面方法
//通过window.opener调用A页面刷新数据
window.opener.updateList();