This commit is contained in:
syuilo 2021-10-22 06:23:23 +09:00
parent 90b62a3e95
commit 9d11c29c3b
6 changed files with 75 additions and 12 deletions

View file

@ -372,12 +372,17 @@ export async function openEmojiPicker(src?: HTMLElement, opts, initialTextarea:
});
}
export function popupMenu(items: any[] | Ref<any[]>, src?: HTMLElement, options?: { align?: string; viaKeyboard?: boolean }) {
export function popupMenu(items: any[] | Ref<any[]>, src?: HTMLElement, options?: {
align?: string;
width?: number;
viaKeyboard?: boolean;
}) {
return new Promise((resolve, reject) => {
let dispose;
popup(import('@client/components/ui/popup-menu.vue'), {
items,
src,
width: options?.width,
align: options?.align,
viaKeyboard: options?.viaKeyboard
}, {