ant desgin vue中table复选框根据状态disabled置灰

vue

当状态为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;

}

})

}

}

以上是 ant desgin vue中table复选框根据状态disabled置灰 的全部内容, 来源链接: utcz.com/z/379295.html

回到顶部