mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-01 02:37:46 +08:00
feat(components): [el-image-viewer] emit close event (#3129)
This commit is contained in:
parent
88e193ce96
commit
4e19718553
@ -100,7 +100,7 @@ export default defineComponent({
|
||||
default: 2000,
|
||||
},
|
||||
},
|
||||
emits: ['error', 'switch'],
|
||||
emits: ['error', 'switch', 'close'],
|
||||
setup(props, { emit }) {
|
||||
const { t } = useLocaleInject()
|
||||
// init here
|
||||
@ -261,6 +261,7 @@ export default defineComponent({
|
||||
function closeViewer() {
|
||||
document.body.style.overflow = prevOverflow
|
||||
showViewer.value = false
|
||||
emit('close')
|
||||
}
|
||||
|
||||
function switchViewer(val) {
|
||||
|
Loading…
Reference in New Issue
Block a user