feature: Binary mode added

This commit is contained in:
Paul Valerie GOMA 2025-07-23 12:39:02 +02:00
parent 288008e5d9
commit 9af82a2bd0

View File

@ -25,7 +25,11 @@ const typeMessage = computed(() => {
else return undefined else return undefined
}); });
const binary = computed(() => Array.isArray(props.modelValue) ? undefined : props.modelValue) const binary = computed(() => {
if (typeof props.binary === 'boolean') return props.binary;
return typeof props.modelValue === 'boolean';
});
const labelState = computed(() => { const labelState = computed(() => {
if((!!props.errorMessage || props.type === 'error') && !props.disabled) return 'error'; if((!!props.errorMessage || props.type === 'error') && !props.disabled) return 'error';