fix: 修复多选框只能单选的bug

This commit is contained in:
xiaojunnuo
2026-03-17 13:33:12 +08:00
parent 50db6f0765
commit 12700e1754
2 changed files with 44 additions and 43 deletions

View File

@@ -61,7 +61,7 @@ const props = defineProps<
watches?: string[];
search?: boolean;
pager?: boolean;
multi?: boolean;
mode?: string;
} & ComponentPropsType
>();
@@ -70,7 +70,8 @@ const emit = defineEmits<{
}>();
function updateValue(value: any) {
if (props.multi) {
debugger;
if (props.mode === "tags" || props.mode === "multiple") {
emit("update:value", value);
} else {
const last = value?.[value.length - 1];