Commit c4d45e4db1396139d48a28e12fcc08d0e5fd5323
Merge branch 'fix/DEFECT-1340' into 'main_dev'
fix: DEFECT-1340修复控制组件状态回显异常 See merge request yunteng/thingskit-front!639
Showing
3 changed files
with
3 additions
and
3 deletions
... | ... | @@ -28,7 +28,7 @@ |
28 | 28 | const { data = {} } = message; |
29 | 29 | const [latest] = data[attribute] || []; |
30 | 30 | const [_, value] = latest; |
31 | - currentValue.value = !!value; | |
31 | + currentValue.value = isNaN(value as unknown as number) ? false : !!Number(value); | |
32 | 32 | }; |
33 | 33 | |
34 | 34 | useDataFetch(props, updateFn); | ... | ... |
... | ... | @@ -37,7 +37,7 @@ |
37 | 37 | const { data = {} } = message; |
38 | 38 | const [latest] = data[attribute] || []; |
39 | 39 | const [_, value] = latest; |
40 | - checked.value = !!value; | |
40 | + checked.value = isNaN(value as unknown as number) ? false : !!Number(value); | |
41 | 41 | }; |
42 | 42 | |
43 | 43 | useDataFetch(props, updateFn); | ... | ... |
... | ... | @@ -27,7 +27,7 @@ |
27 | 27 | const { data = {} } = message; |
28 | 28 | const [latest] = data[attribute] || []; |
29 | 29 | const [_, value] = latest; |
30 | - currentValue.value = !!value; | |
30 | + currentValue.value = isNaN(value as unknown as number) ? false : !!Number(value); | |
31 | 31 | }; |
32 | 32 | |
33 | 33 | useDataFetch(props, updateFn); | ... | ... |