Commit 8e29b503fe78d4acc11aa45f7a4683d07875cbdd
1 parent
e17515bb
fix: 修复数据流转mqtt clientId自定义无效问题和编辑会修改问题
Showing
1 changed file
with
6 additions
and
1 deletions
| ... | ... | @@ -234,7 +234,9 @@ |
| 234 | 234 | } |
| 235 | 235 | } |
| 236 | 236 | }; |
| 237 | + const isEdit = ref(false); | |
| 237 | 238 | const setStepTwoFieldsValueFunc = (v, v1, v2) => { |
| 239 | + isEdit.value = true; | |
| 238 | 240 | setFieldsValue(v); |
| 239 | 241 | setFieldsValue({ |
| 240 | 242 | name: v1, |
| ... | ... | @@ -346,8 +348,11 @@ |
| 346 | 348 | } |
| 347 | 349 | if (sonValues.configuration.clientId?.length > 0) { |
| 348 | 350 | //则是自己输入 |
| 349 | - } else { | |
| 351 | + } else if (!sonValues.configuration.clientId) { | |
| 350 | 352 | //clientId 从uuid里切片8位 |
| 353 | + } else { | |
| 354 | + } | |
| 355 | + if (!isEdit.value && !sonValues.configuration.clientId) { | |
| 351 | 356 | sonValues.configuration.clientId = buildUUID().slice(0, 8); |
| 352 | 357 | } |
| 353 | 358 | Object.assign(sonValues.configuration, credentialsV); | ... | ... |