table.on('toolbar(currentTableFilter)', function (obj) {
if (obj.event === 'add') {
let index = layer.open({
title: '添加行业',
type: 2,
shade: 0.2,
maxmin: true,
shadeClose: true,
area: ['100%', '100%'],
content: '/admin/Industry/Saveinfo',
});
$(window).on("resize", function () {
layer.full(index);
});
}
else if (obj.event === 'delete') {
let checkStatus = table.checkStatus('currentTableId')
, data = checkStatus.data;
let id='';
for(let i in data)
{
id+=data[i].id+','
}
layer.confirm('真的删除行么',function(index){
delajax(id,function (data) {
if (data.status) {
layer.msg('删除成功!', {icon: 1, time: 1000},function () {
$(".layui-form-checked").not('.header').parents('tr').remove();
});
}else{
layer.msg(data.msg, {
icon: 2,
time: 3000
});
}
})
})
// layer.alert(JSON.stringify(data));
}
});
关键是是这句
$(".layui-form-checked").not('.header').parents('tr').remove();