fix types

This commit is contained in:
kakkokari-gtyih 2025-09-13 18:50:36 +09:00
parent a8aeddfaf4
commit 548496e6ba
2 changed files with 3 additions and 4 deletions

View File

@ -20,10 +20,8 @@ export function useMkSelect<
: (TItemsValue | TInitialValue)
>(opts: {
items: TItemsInput;
initialValue?: TInitialValue & (
OptionValue extends TItemsValue
? OptionValue
: TItemsValue extends TInitialValue
initialValue?: (OptionValue extends TItemsValue ? OptionValue : TInitialValue) & (
TItemsValue extends TInitialValue
? unknown
: { 'Error: Type of initialValue must include all types of items': TItemsValue }
);

View File

@ -842,6 +842,7 @@ import FormSlot from '@/components/form/slot.vue';
import { i18n } from '@/i18n.js';
import { instance } from '@/instance.js';
import { deepClone } from '@/utility/clone.js';
import type { MkSelectItem, GetMkSelectValueTypesFromDef } from '@/components/MkSelect.vue';
const emit = defineEmits<{
(ev: 'update:modelValue', v: any): void;