mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +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;
|
opened = true;
|
||||||
zIndex.value = ++globalZIndex;
|
zIndex.value = ++globalZIndex;
|
||||||
|
|
||||||
|
emit('open');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const close = () => {
|
const close = () => {
|
||||||
if (opened) {
|
if (opened) {
|
||||||
opened = false;
|
opened = false;
|
||||||
|
emit('close');
|
||||||
emit('update:show', false);
|
emit('update:show', false);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -211,10 +214,8 @@ export default defineComponent({
|
|||||||
(value) => {
|
(value) => {
|
||||||
if (value) {
|
if (value) {
|
||||||
open();
|
open();
|
||||||
emit('open');
|
|
||||||
} else {
|
} else {
|
||||||
close();
|
close();
|
||||||
emit('close');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user