fastadmin 按钮状态切换(隐藏或则显示)
{ field: 'buttons', width: "120px", title: __('按钮组'), table: table, events: Table.api.events.operate, buttons: [ { name: 'detail', text: __('弹出窗口打开'), title: __('弹出窗口打开'), classname: 'btn btn-xs btn-primary btn-dialog', icon: 'fa fa-list', url: 'example/bootstraptable/detail', /*******************状态切换开始*******************/ hidden:function(value,row){ console.log(row); if (row.name ==='details'){ return true; } }, /*******************状态切换结束**********************/ callback: function (data) { Layer.alert("接收到回传数据:" + JSON.stringify(data), {title: "回传数据"}); }, visible: function (row) { //返回true时按钮显示,返回false隐藏 return true; } },
}