当前第2页 返回上一页
父窗口打开layer弹出框时,添加end回调
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | addIndex = layer.open({
title : "编辑客户定单" ,
type : 2,
content : "${base}/order/projectEdit?projectId=" +data.project_id,
success : function (layero, addIndex){
setTimeout( function (){
layer.tips( '点击此处返回客户定单列表' , '.layui-layer-setwin .layui-layer-close' , {
tips: 3
});
},500);
}, end : function () {
var data1 = table.cache[ "test" ];
t.where = data1.field;
table.reload( 'test' ,t);
}
});
|
四 请求成功后刷新当前页面
1 2 3 4 5 6 7 8 9 10 11 | $.post( "${base}/order/SaveOrder" ,data.field,
function (res){
if (res.success){
parent.layer.msg( "保存成功!" ,{time:1000}, function (){
location.reload();
});
} else {
layer.msg(res.message);
}
});
|
五 关闭当前子页面
1 2 3 4 5 | $( "#closePage" ).click( function (){
var index = parent.layer.getFrameIndex(window.name);
parent.layer.close(index);
});
|
六 关闭当前页面后调用父页面方法
1 2 3 4 5 6 | function closePagetmp(id,num){
window.parent.showPBom(num,id);
var index = parent.layer.getFrameIndex(window.name);
parent.layer.close(index);
}
|
以上就是layui怎么刷新当前页面的详细内容,更多文章请关注木庄网络博客!
返回前面的内容
相关阅读 >>
layui组件有哪些
layui批量删除怎么刷新当前分页
layui怎么做图片在列表中显示
layui日期控件使用(实例)
layui icon是什么
layui事件监听的方法
layui框架分页设置详解
使用layui框架封装ajax模块的具体步骤
layui上传图片成功之后怎么预览成功的图片
layui框架使用收费吗
更多相关阅读请进入《layui》频道 >>
人民邮电出版社
本书对 Vue.js 3 技术细节的分析非常可靠,对于需要深入理解 Vue.js 3 的用户会有很大的帮助。——尤雨溪,Vue.js作者
转载请注明出处:木庄网络博客 » layui怎么刷新当前页面