Showing
1 changed file
with
6 additions
and
3 deletions
| ... | ... | @@ -14,7 +14,7 @@ |
| 14 | 14 | import { BasicModal, useModal } from '/@/components/Modal'; |
| 15 | 15 | import { getDeviceAttrs } from '/@/api/device/deviceManager'; |
| 16 | 16 | import { DeviceRecord } from '/@/api/device/model/deviceModel'; |
| 17 | - import { isArray, isNull, isObject } from '/@/utils/is'; | |
| 17 | + import { isArray, isNull, isNullOrUnDef, isObject } from '/@/utils/is'; | |
| 18 | 18 | import { useGlobSetting } from '/@/hooks/setting'; |
| 19 | 19 | import { ModeSwitchButton, EnumTableCardMode } from '/@/components/Widget'; |
| 20 | 20 | import { toRaw } from 'vue'; |
| ... | ... | @@ -285,7 +285,7 @@ |
| 285 | 285 | |
| 286 | 286 | const formatValue = (item: SocketInfoDataSourceItemType) => { |
| 287 | 287 | return item.type === DataTypeEnum.BOOL |
| 288 | - ? !isNull(item.value) | |
| 288 | + ? !isNullOrUnDef(item.value) | |
| 289 | 289 | ? !!Number(item.value) |
| 290 | 290 | ? item.boolOpen |
| 291 | 291 | : item.boolClose |
| ... | ... | @@ -400,7 +400,10 @@ |
| 400 | 400 | > |
| 401 | 401 | <div class="font-medium truncate">{{ item.value[key].name }}</div> |
| 402 | 402 | <div class="flex-auto font-bold text-lg text-left ml-4 truncate"> |
| 403 | - <Tooltip :title="formatValue(item)" placement="topLeft"> | |
| 403 | + <Tooltip | |
| 404 | + :title="formatValue(item.value[key] as SocketInfoDataSourceItemType)" | |
| 405 | + placement="topLeft" | |
| 406 | + > | |
| 404 | 407 | <span> |
| 405 | 408 | {{ formatValue(item.value[key] as SocketInfoDataSourceItemType) }} |
| 406 | 409 | </span> | ... | ... |