ant desgin vue中table复选框根据状态disabled置灰
当状态为1或者2的时候,就不能再发起流程,需要置灰复选框
<a-table :columns="columns" :data-source="tableData" :row-key="(record) => record.id" :pagination="pagination" :loading="loading" :scroll="scroll" tableLayout="fixed" class="table-wrapper" :row-selection="{ onSelect: onSelect, getCheckboxProps: getCheckboxProps }" > </a-table>
methods: { getCheckboxProps(record) { console.log(record.status, 'status'); return ({ props: { //当状态是1或者2的时候执行disable disabled: record.status === 1 || record.status === 2; } }) } }