Showing
1 changed file
with
9 additions
and
1 deletions
| @@ -115,6 +115,14 @@ | @@ -115,6 +115,14 @@ | ||
| 115 | 115 | ||
| 116 | const { hasBatchDelete, handleDeleteOrBatchDelete, selectionOptions, resetSelectedRowKeys } = | 116 | const { hasBatchDelete, handleDeleteOrBatchDelete, selectionOptions, resetSelectedRowKeys } = |
| 117 | useBatchDelete(deleteScriptManage, handleSuccess, setProps); | 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 | nextTick(() => { | 127 | nextTick(() => { |
| 120 | setProps(selectionOptions); | 128 | setProps(selectionOptions); |
| @@ -147,7 +155,7 @@ | @@ -147,7 +155,7 @@ | ||
| 147 | if (record) { | 155 | if (record) { |
| 148 | openModal(true, { | 156 | openModal(true, { |
| 149 | isUpdate: false, | 157 | isUpdate: false, |
| 150 | - record, | 158 | + record: record.id, |
| 151 | isTest: true, | 159 | isTest: true, |
| 152 | isText: 'test', | 160 | isText: 'test', |
| 153 | isTitle: 'test', | 161 | isTitle: 'test', |