diff --git a/packages/vant/src/utils/mount-component.ts b/packages/vant/src/utils/mount-component.ts index 052342f35..f0cad1e60 100644 --- a/packages/vant/src/utils/mount-component.ts +++ b/packages/vant/src/utils/mount-component.ts @@ -16,10 +16,13 @@ export function usePopupState() { const open = (props: Record) => { extend(state, props); + // for transition nextTick(() => toggle(true)); }; - const close = () => toggle(false); + const close = () => { + nextTick(() => toggle(false)); + }; useExpose({ open, close, toggle });