From 2b0fdc4e26c8d8f0d741b66ebc9a2ecaa46d755e Mon Sep 17 00:00:00 2001 From: neverland Date: Mon, 19 Jul 2021 15:06:14 +0800 Subject: [PATCH] =?UTF-8?q?fix(Popup):=20missing=20open=E3=80=81close=20ev?= =?UTF-8?q?ent=20in=20some=20cases=20(#9065)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/popup/Popup.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/popup/Popup.tsx b/src/popup/Popup.tsx index 5a9062ebe..343d4e5c3 100644 --- a/src/popup/Popup.tsx +++ b/src/popup/Popup.tsx @@ -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'); } } );