mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-05 19:41:42 +08:00
fix(Popup): missing open、close event in some cases (#9065)
This commit is contained in:
parent
1b84a9166d
commit
2b0fdc4e26
@ -110,12 +110,15 @@ export default defineComponent({
|
||||
|
||||
opened = true;
|
||||
zIndex.value = ++globalZIndex;
|
||||
|
||||
emit('open');
|
||||
}
|
||||
};
|
||||
|
||||
const close = () => {
|
||||
if (opened) {
|
||||
opened = false;
|
||||
emit('close');
|
||||
emit('update:show', false);
|
||||
}
|
||||
};
|
||||
@ -211,10 +214,8 @@ export default defineComponent({
|
||||
(value) => {
|
||||
if (value) {
|
||||
open();
|
||||
emit('open');
|
||||
} else {
|
||||
close();
|
||||
emit('close');
|
||||
}
|
||||
}
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user