1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-16 20:15:28 +02:00
This commit is contained in:
syuilo
2026-04-27 14:46:57 +09:00
parent f98394fc60
commit 036b8ea320
5 changed files with 33 additions and 13 deletions

View File

@@ -234,7 +234,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<script lang="ts">
import { computed, defineAsyncComponent, inject, nextTick, onBeforeUnmount, onMounted, ref, useTemplateRef, unref, watch, shallowRef, reactive, isRef } from 'vue';
import type { MenuItem, InnerMenuItem, MenuPending, MenuAction, MenuSwitch, MenuRadio, MenuRadioOption, MenuParent } from '@/types/menu.js';
import type { MenuItem, InnerMenuItem, MenuPending, MenuAction, MenuSwitch, MenuRadio, MenuRadioOption, MenuParent, MenuDivider } from '@/types/menu.js';
import type { Keymap } from '@/utility/hotkey.js';
import MkSwitchButton from '@/components/MkSwitch.button.vue';
import * as os from '@/os.js';
@@ -339,7 +339,11 @@ function onItemMouseLeave() {
}
async function showRadioOptions(item: MenuRadio, ev: MouseEvent | PointerEvent | KeyboardEvent) {
const children: MenuItem[] = item.options.map<MenuRadioOption>(def => {
const children: MenuItem[] = item.options.map<MenuRadioOption | MenuDivider>(def => {
if (def.type === 'divider') {
return { type: 'divider' };
}
return {
type: 'radioOption',
text: def.label,