diff --git a/frontend/src/views/switchQuantity/index.vue b/frontend/src/views/switchQuantity/index.vue index 9f7ac2e..5f9fc27 100644 --- a/frontend/src/views/switchQuantity/index.vue +++ b/frontend/src/views/switchQuantity/index.vue @@ -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 {