layui 关闭弹窗 表格页码获取
关闭当前弹窗:
获取当前页面id:
let currPageIndex = layer.index;
添加或编辑操作结束后调用:
let style = '#layui-layer' + currPageIndex + ' .layui-layer-close';
$(style).click();
获取当前表格页码:
$(".layui-laypage-skip").find("input").val()
弹窗关闭后刷新表格
if(layEvent === 'edit'){ // 编辑摄像头 layer.load(); //loadings var id = data.id var url = "{:url('camera/editCamera')}" $.get(url,{id:id},function(data){ if(data.status == 0){ layer.msg(data.message,{icon: 5}); layer.closeAll('loading'); return; } layer.open({ title:'编辑摄像头', type: 1, scrollbar: true, skin: 'layui-layer-rim', //加上边框 area: ['60%', '50%'], //宽高 content: data, end: function (){ table.reload('menulist', { url: "{:url('camera/getCameraList')}" ,page: { curr: 1 } }); } }); layer.closeAll('loading'); //关闭loading }) }