This commit is contained in:
syuilo
2023-01-06 10:11:47 +09:00
parent d25f214a09
commit 9aececc921
3 changed files with 22 additions and 2 deletions

View File

@@ -515,6 +515,7 @@ export function popupMenu(items: MenuItem[] | Ref<MenuItem[]>, src?: HTMLElement
align?: string;
width?: number;
viaKeyboard?: boolean;
onClosing?: () => void;
}) {
return new Promise((resolve, reject) => {
let dispose;
@@ -529,6 +530,9 @@ export function popupMenu(items: MenuItem[] | Ref<MenuItem[]>, src?: HTMLElement
resolve();
dispose();
},
closing: () => {
if (options?.onClosing) options.onClosing();
},
}).then(res => {
dispose = res.dispose;
});