修改控制回显

This commit is contained in:
jingna 2026-06-26 13:55:09 +08:00
parent 1eb94aed9b
commit 226b788afc

View File

@ -12,7 +12,7 @@ const inputStates = computed(() => {
}
return Array.from({ length: 12 }, (_, i) => {
const key = `di${i + 1}`
return state.realtime!.switch[key] === 1
return state.realtime!.switch[key] === 1 ? 1 : 0
})
})
@ -22,7 +22,7 @@ const outputStates = computed(() => {
}
return Array.from({ length: 12 }, (_, i) => {
const key = `do${i + 1}`
return state.realtime!.switch[key] === 1
return state.realtime!.switch[key] === 1 ? 1 : 0
})
})
function formatTime(dateStr: string): string {