{
field: 'operate',
title: __('Operate'),
table: table,
events: Table.api.events.operate,
formatter: function (value, row, index) {
var that = $.extend({}, this);
$(table).data("operate-del", null); // 列表页面隐藏 .编辑operate-edit - 删除按钮operate-del
that.table = table;
return Table.api.formatter.operate.call(that, value, row, index);
}
}
fastadmin单独控制编辑、删除按钮的展示和隐藏,也可以用于其他自定义按钮 ,代替原来formatter的位置
formatter: function(value, row, index){
var that = $.extend({}, this);
var table = $(that.table).clone(true);
if (row.order_status != 1){
$(table).data("operate-TDG", null);
}
that.table = table;
return Table.api.formatter.operate.call(that, value, row, index);
}