最近使用fastadmin,在项目中需要删除自带的编辑按钮,没找到删除,找到隐藏。
代码如下:
{
field: 'operate',
title: __('Operate'),
table: table,
events: Table.api.events.operate,
// formatter: Table.api.formatter.operate
//隐藏编辑按钮
formatter: function (value, row, index) {
var that = $.extend({}, this);
var table = $(that.table).clone(true);
$(table).data("operate-edit", null);
that.table = table;
return Table.api.formatter.operate.call(that, value, row, index);
}
}
本文分享了在FastAdmin项目中如何通过修改代码来隐藏默认的编辑按钮,提供了一段具体的实现代码,对于想要定制化操作界面的开发者来说非常实用。
660

被折叠的 条评论
为什么被折叠?



