实现的效果类似点击一下,有小弹窗快捷回复
{ field: 'buttons', "90px", title: "回复", table: table, operate: false, buttons: [ { name: 'reject', text: __('回复'), title: __('回复'), classname: 'btn btn-xs btn-success btn-refund', icon: "fa fa-check-square-o", visible: function (row) { // console.log(row) //返回true时按钮显示,返回false隐藏 if (row.reply_content) { return false } return true; } } ], events: { 'click .btn-refund': function (e, value, row) { Layer.prompt({ title: "请输入回复内容", formType: 2, area: ['200px', '100px'] //自定义文本域宽高 }, function (value) { Fast.api.ajax({ url: "party/voice/answer/ids/" + row.id, data: { answer: value }, }, function (data, ret) { Layer.closeAll(); $(".btn-refresh").trigger("click"); }); }); return false; } }, formatter: Table.api.formatter.buttons },