fix types
This commit is contained in:
parent
a8aeddfaf4
commit
548496e6ba
|
@ -20,10 +20,8 @@ export function useMkSelect<
|
||||||
: (TItemsValue | TInitialValue)
|
: (TItemsValue | TInitialValue)
|
||||||
>(opts: {
|
>(opts: {
|
||||||
items: TItemsInput;
|
items: TItemsInput;
|
||||||
initialValue?: TInitialValue & (
|
initialValue?: (OptionValue extends TItemsValue ? OptionValue : TInitialValue) & (
|
||||||
OptionValue extends TItemsValue
|
TItemsValue extends TInitialValue
|
||||||
? OptionValue
|
|
||||||
: TItemsValue extends TInitialValue
|
|
||||||
? unknown
|
? unknown
|
||||||
: { 'Error: Type of initialValue must include all types of items': TItemsValue }
|
: { 'Error: Type of initialValue must include all types of items': TItemsValue }
|
||||||
);
|
);
|
||||||
|
|
|
@ -842,6 +842,7 @@ import FormSlot from '@/components/form/slot.vue';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { instance } from '@/instance.js';
|
import { instance } from '@/instance.js';
|
||||||
import { deepClone } from '@/utility/clone.js';
|
import { deepClone } from '@/utility/clone.js';
|
||||||
|
import type { MkSelectItem, GetMkSelectValueTypesFromDef } from '@/components/MkSelect.vue';
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(ev: 'update:modelValue', v: any): void;
|
(ev: 'update:modelValue', v: any): void;
|
||||||
|
|
Loading…
Reference in New Issue