layui 弹窗open关闭 回调函数
可在layui表格关闭时加入的操作
layui.use(['layer','table'], function(){
var layer = layui.layer;
var table = layui.table;
layer.open({
title: '详细信息',
type: 1,
skin: 'layui-layer-rim', //加上边框
area: ['70%', '78%'], //宽高
content: $('#freightDirectiontb'),//dom标签
success:function(layero, index){
table.render({
elem : '#freightDirectiontb',
cols : [ [ {
title : '序号',
type : 'numbers',
align: 'center'
}, {
field : 'goodsName',
title : '货物名称',
width: 120,
align: 'center'
}] ],
response:{
statusName:'code',
statusCode:'200',
msgName:'msg',
count:'count',
data:'data'
},
page : true,
limit : 10,
data : data,
});
},
end: function(){
$('#popup').html('<table class="layui-table" id="freightDirectiontb" style="width: 100%"></table>')
}
});
});
利用end:function 回调可以设置在layui 弹窗关闭时做出一些操作