|
|
@ -4,7 +4,7 @@ import { ColumnInj, IsFormInj, ReadonlyInj, getMdiIcon, inject } from '#imports' |
|
|
|
interface Props { |
|
|
|
interface Props { |
|
|
|
// If the previous cell value was a text, the initial checkbox value is a string type |
|
|
|
// If the previous cell value was a text, the initial checkbox value is a string type |
|
|
|
// otherwise it can be either a boolean, or a string representing a boolean, i.e '0' or '1' |
|
|
|
// otherwise it can be either a boolean, or a string representing a boolean, i.e '0' or '1' |
|
|
|
modelValue?: boolean | string | '0' | '1' |
|
|
|
modelValue?: boolean | string | number | '0' | '1' |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
interface Emits { |
|
|
|
interface Emits { |
|
|
@ -16,7 +16,7 @@ const props = defineProps<Props>() |
|
|
|
const emits = defineEmits<Emits>() |
|
|
|
const emits = defineEmits<Emits>() |
|
|
|
|
|
|
|
|
|
|
|
let vModel = $computed({ |
|
|
|
let vModel = $computed({ |
|
|
|
get: () => !!props.modelValue && props.modelValue !== '0', |
|
|
|
get: () => !!props.modelValue && props.modelValue !== '0' && props.modelValue !== 0, |
|
|
|
set: (val) => emits('update:modelValue', val), |
|
|
|
set: (val) => emits('update:modelValue', val), |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|