This commit is contained in:
kakkokari-gtyih 2025-09-06 13:42:32 +09:00
parent 9634c1ccdb
commit 652b830f62
1 changed files with 7 additions and 7 deletions

View File

@ -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;
}, },
}); });
} }