```
{
field: 'buttons',
width: "120px",
title: __('回復'),
table: table,
events: Table.api.events.operate,
buttons: [{
name: 'detail',
text: __('回復'),
title: __('回復'),
classname: 'btn btn-xs btn-success btn-dialog',
icon: "fa fa-check-square-o",
url: 'party/voice/answer',
callback: function (data) {
Layer.alert("接收到回傳數據:" + JSON.stringify(data), {
title: "回傳數據"
});
},
visible: function (row) {
//重點在這
//返回true時按鈕顯示,返回false隱藏
if (row.reply_content) {
return false;
}
return true;
}
},
],
formatter: Table.api.formatter.buttons
},
```