fix
This commit is contained in:
parent
9634c1ccdb
commit
652b830f62
|
@ -85,11 +85,11 @@ const props = defineProps<{
|
||||||
large?: boolean;
|
large?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const model = defineModel<MODELT & (
|
type ModelTChecked = MODELT extends GetMkSelectValueTypesFromDef<ITEMS>
|
||||||
MODELT extends GetMkSelectValueTypesFromDef<ITEMS>
|
? unknown
|
||||||
? unknown
|
: 'Error: The type of model does not match the type of items.';
|
||||||
: 'Error: The type of model does not match the type of items.'
|
|
||||||
)>({ required: true });
|
const model = defineModel<ModelTChecked>({ required: true });
|
||||||
|
|
||||||
const { autofocus } = toRefs(props);
|
const { autofocus } = toRefs(props);
|
||||||
const focused = ref(false);
|
const focused = ref(false);
|
||||||
|
@ -177,7 +177,7 @@ function show() {
|
||||||
text: option.label,
|
text: option.label,
|
||||||
active: computed(() => model.value === option.value),
|
active: computed(() => model.value === option.value),
|
||||||
action: () => {
|
action: () => {
|
||||||
model.value = option.value as MODELT;
|
model.value = option.value as ModelTChecked;
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -186,7 +186,7 @@ function show() {
|
||||||
text: item.label,
|
text: item.label,
|
||||||
active: computed(() => model.value === item.value),
|
active: computed(() => model.value === item.value),
|
||||||
action: () => {
|
action: () => {
|
||||||
model.value = item.value as MODELT;
|
model.value = item.value as ModelTChecked;
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue