fix: bug
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m4s

This commit is contained in:
sexygoat
2026-05-11 15:51:50 +08:00
parent 766497dc31
commit 1990a3ccba
40 changed files with 832 additions and 127 deletions

View File

@@ -146,9 +146,7 @@
set: (value) => emit('update:modelValue', value)
})
const currentModeValue = computed<0 | 1>(() =>
Number(props.currentMode) === 1 ? 1 : 0
)
const currentModeValue = computed<0 | 1>(() => (Number(props.currentMode) === 1 ? 1 : 0))
const availableCards = computed(() => props.cards || [])
@@ -157,7 +155,9 @@
const syncFormState = () => {
form.switch_mode = currentModeValue.value
const selectedStillExists = availableCards.value.some((card) => card.iot_card_id === form.iot_card_id)
const selectedStillExists = availableCards.value.some(
(card) => card.iot_card_id === form.iot_card_id
)
if (!selectedStillExists) {
form.iot_card_id = availableCards.value[0]?.iot_card_id
}