feat(components): [image] fix #8919 bug (#8920)

Co-authored-by: wanyiding <wanyiding@tuhu.cn>
This commit is contained in:
Lucuai
2022-07-26 17:53:35 +08:00
committed by GitHub
parent b888046ad4
commit 8411ecc93a
2 changed files with 2 additions and 0 deletions

View File

@@ -63,5 +63,6 @@ export const imageEmits = {
error: (evt: Event) => evt instanceof Event,
switch: (val: number) => isNumber(val),
close: () => true,
show: () => true,
}
export type ImageEmits = typeof imageEmits

View File

@@ -207,6 +207,7 @@ function clickHandler() {
prevOverflow = document.body.style.overflow
document.body.style.overflow = 'hidden'
showViewer.value = true
emit('show')
}
function closeViewer() {