mirror of
https://github.com/HangarMC/Hangar.git
synced 2025-03-07 15:31:00 +08:00
fix: modelValue is nullable
This commit is contained in:
parent
2851e25f56
commit
658aebcc4d
@ -4,14 +4,14 @@ import { type ValidationRule } from "@vuelidate/core";
|
|||||||
import { useValidation } from "~/lib/composables/useValidationHelpers";
|
import { useValidation } from "~/lib/composables/useValidationHelpers";
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(e: "update:modelValue", value: boolean | boolean[]): void;
|
(e: "update:modelValue", value: boolean | boolean[] | undefined): void;
|
||||||
}>();
|
}>();
|
||||||
const internalVal = computed({
|
const internalVal = computed({
|
||||||
get: () => props.modelValue,
|
get: () => props.modelValue,
|
||||||
set: (val) => emit("update:modelValue", val),
|
set: (val) => emit("update:modelValue", val),
|
||||||
});
|
});
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
modelValue: boolean | boolean[];
|
modelValue?: boolean | boolean[];
|
||||||
label?: string;
|
label?: string;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
errorMessages?: string[];
|
errorMessages?: string[];
|
||||||
|
Loading…
Reference in New Issue
Block a user