Showing
1 changed file
with
9 additions
and
1 deletions
| ... | ... | @@ -115,6 +115,14 @@ |
| 115 | 115 | |
| 116 | 116 | const { hasBatchDelete, handleDeleteOrBatchDelete, selectionOptions, resetSelectedRowKeys } = |
| 117 | 117 | useBatchDelete(deleteScriptManage, handleSuccess, setProps); |
| 118 | + selectionOptions.rowSelection.getCheckboxProps = (record: Recordable) => { | |
| 119 | + // Demo:status为1的选择框禁用 | |
| 120 | + if (record.status === 1) { | |
| 121 | + return { disabled: true }; | |
| 122 | + } else { | |
| 123 | + return { disabled: false }; | |
| 124 | + } | |
| 125 | + }; | |
| 118 | 126 | |
| 119 | 127 | nextTick(() => { |
| 120 | 128 | setProps(selectionOptions); |
| ... | ... | @@ -147,7 +155,7 @@ |
| 147 | 155 | if (record) { |
| 148 | 156 | openModal(true, { |
| 149 | 157 | isUpdate: false, |
| 150 | - record, | |
| 158 | + record: record.id, | |
| 151 | 159 | isTest: true, |
| 152 | 160 | isText: 'test', |
| 153 | 161 | isTitle: 'test', | ... | ... |