Commit 91b32b01fdbf3096a67d1a53340001be1e92cfc1
Merge branch 'ft_local_dev' into 'main'
fix:修改设备配置default不能删除和编辑 See merge request huang/yun-teng-iot-front!336
Showing
1 changed file
with
6 additions
and
1 deletions
| ... | ... | @@ -61,6 +61,9 @@ |
| 61 | 61 | auth: 'api:yt:deviceProfile:update', |
| 62 | 62 | icon: 'clarity:note-edit-line', |
| 63 | 63 | onClick: handleEdit.bind(null, record), |
| 64 | + ifShow: () => { | |
| 65 | + return record.name !== 'default' ? true : false; | |
| 66 | + }, | |
| 64 | 67 | }, |
| 65 | 68 | { |
| 66 | 69 | label: '导出', |
| ... | ... | @@ -78,7 +81,7 @@ |
| 78 | 81 | confirm: handleDeleteOrBatchDelete.bind(null, record), |
| 79 | 82 | }, |
| 80 | 83 | ifShow: () => { |
| 81 | - return record.default === false; | |
| 84 | + return record.default === false && record.name !== 'default'; | |
| 82 | 85 | }, |
| 83 | 86 | }, |
| 84 | 87 | ]" |
| ... | ... | @@ -171,6 +174,8 @@ |
| 171 | 174 | // Demo:status为1的选择框禁用 |
| 172 | 175 | if (record.default === true) { |
| 173 | 176 | return { disabled: true }; |
| 177 | + } else if (record.name == 'default') { | |
| 178 | + return { disabled: true }; | |
| 174 | 179 | } else { |
| 175 | 180 | return { disabled: false }; |
| 176 | 181 | } | ... | ... |