fix: modal init state

This commit is contained in:
三咲智子 2022-11-24 19:48:31 +08:00
parent 00c9314580
commit 5788a12d59
No known key found for this signature in database
GPG key ID: 69992F2250DFD93E
2 changed files with 2 additions and 2 deletions

View file

@ -3,7 +3,7 @@ const { modelValue } = defineModel<{
modelValue: boolean
}>()
let init = $ref(modelValue || false)
let init = $ref(modelValue)
watchOnce(modelValue, () => {
init = true
})

View file

@ -39,7 +39,7 @@ const transform = computed(() => {
}
})
let init = $ref(false)
let init = $ref(modelValue)
watchOnce(modelValue, () => {
init = true
})