fastadmin列表获取选中项
var ids = Table.api.selectedids(table);
获取table页面返回数据
// 初始化表格
table.bootstrapTable({
url: $.fn.bootstrapTable.defaults.extend.index_url,
pk: 'id',
sortName: 'id',
fixedColumns: true,
fixedRightNumber: 1,
responseHandler: function(res) { // 处理后端返回的数据 var status = res.status; // 获取其他字段// 返回处理后的数据 return { total: res.total, rows: res.rows }; },
打开窗口
Fast.api.open("notification/complaint/edit1", "编辑", {
shadeClose: true,
shade: [0.5,'#393D49'],
area: ['100%','100%'],
callback:function(value){
return false;
// 在这里可以接收弹出层中使用`Fast.api.close(data)`进行回传数据
}
});
确认弹窗
layer.confirm('确定提交选中的 1 项?!', {
btn: ['确定', '取消'],
cancel: function(index, layero) {
//点击右上角叉号执行
console.log(111)
}
},function (index) {
//点击确认执行
Layer.close(index); //关闭弹窗
},function (){
//点击取消执行
console.log(333)
})