fix: alert emit close event (#497)

This commit is contained in:
zazzaz 2020-10-29 13:34:51 +08:00 committed by GitHub
parent a934fb76ff
commit 0132bf5790
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -68,7 +68,7 @@ export default defineComponent({
validator: (value: string): boolean => ['light', 'dark'].indexOf(value) > -1,
},
},
emits: ['click'],
emits: ['close'],
setup(props, ctx) {
// state
const visible = ref(true)
@ -82,7 +82,7 @@ export default defineComponent({
// methods
const close = evt => {
visible.value = false
ctx.emit('click', evt)
ctx.emit('close', evt)
}
return {