table的权限自定义按钮怎么判断
https://doc.buildadmin.com/senior/web/baTable.html#自定义表格行侧边按钮 这个吗
权限判断 不是这个
display 和 disabled 不就是了?
const optButtons: OptButton[] = defaultOptButtons(['edit', 'delete']) const examine: OptButton = { render: 'basicButton', name: 'examine', title: '审核', text: '审核', type: 'primary', icon: '', display: (row: TableRow, field: TableColumn) => { let result = false if (row.status == '0' && baTable.auth('examine')) { result = true } return result }, click: (row: TableRow, field: TableColumn) => { baTable.table.loading = true if (baTable.form.operate) { baTable.form.submitLoading } examinePost({ ids: [row.id] }) .then((res) => { onAllRefresh('examine') }) .finally(() => { baTable.table.loading = false baTable.form.submitLoading = false }) }, }
https://doc.buildadmin.com/senior/web/baTable.html#自定义表格行侧边按钮 这个吗
权限判断 不是这个
display 和 disabled 不就是了?
- 1
前往