forked from Mirrors/elk
fix: close
This commit is contained in:
parent
fcad412663
commit
9bc5c1c648
1 changed files with 3 additions and 1 deletions
|
@ -49,7 +49,7 @@ const props = withDefaults(defineProps<Props>(), {
|
|||
|
||||
const emit = defineEmits<{
|
||||
/** v-model dialog visibility */
|
||||
(event: 'close',): void
|
||||
(event: 'close'): void
|
||||
}>()
|
||||
|
||||
const visible = defineModel<boolean>({ required: true })
|
||||
|
@ -77,6 +77,8 @@ defineExpose({
|
|||
|
||||
/** close the dialog */
|
||||
function close() {
|
||||
if (!visible.value)
|
||||
return
|
||||
visible.value = false
|
||||
emit('close')
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue