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'); } } );