From 6dd2e9fc0b1eeea6b5f04ccac93ccfab658f976d Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Thu, 4 Jul 2024 13:14:49 +0900 Subject: refactor(frontend): refactor popup api and make sure call dispose callback Close #14122 --- packages/frontend/src/widgets/WidgetNotifications.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'packages/frontend/src/widgets/WidgetNotifications.vue') diff --git a/packages/frontend/src/widgets/WidgetNotifications.vue b/packages/frontend/src/widgets/WidgetNotifications.vue index 4b3265dab7..773c078b49 100644 --- a/packages/frontend/src/widgets/WidgetNotifications.vue +++ b/packages/frontend/src/widgets/WidgetNotifications.vue @@ -54,7 +54,7 @@ const { widgetProps, configure, save } = useWidgetPropsManager(name, ); const configureNotification = () => { - os.popup(defineAsyncComponent(() => import('@/components/MkNotificationSelectWindow.vue')), { + const { dispose } = os.popup(defineAsyncComponent(() => import('@/components/MkNotificationSelectWindow.vue')), { excludeTypes: widgetProps.excludeTypes, }, { done: async (res) => { @@ -62,7 +62,8 @@ const configureNotification = () => { widgetProps.excludeTypes = excludeTypes; save(); }, - }, 'closed'); + closed: () => dispose(), + }); }; defineExpose({ -- cgit v1.2.3-freya