|
|
@ -8,6 +8,7 @@ import { |
|
|
|
inject, |
|
|
|
inject, |
|
|
|
parseProp, |
|
|
|
parseProp, |
|
|
|
useSelectedCellKeyupListener, |
|
|
|
useSelectedCellKeyupListener, |
|
|
|
|
|
|
|
useProject, |
|
|
|
} from '#imports' |
|
|
|
} from '#imports' |
|
|
|
|
|
|
|
|
|
|
|
interface Props { |
|
|
|
interface Props { |
|
|
@ -26,10 +27,7 @@ const emits = defineEmits<Emits>() |
|
|
|
|
|
|
|
|
|
|
|
const active = inject(ActiveCellInj, ref(false)) |
|
|
|
const active = inject(ActiveCellInj, ref(false)) |
|
|
|
|
|
|
|
|
|
|
|
let vModel = $computed<boolean>({ |
|
|
|
const { isMssql } = useProject() |
|
|
|
get: () => !!props.modelValue && props.modelValue !== '0' && props.modelValue !== 0, |
|
|
|
|
|
|
|
set: (val: boolean) => emits('update:modelValue', val), |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const column = inject(ColumnInj) |
|
|
|
const column = inject(ColumnInj) |
|
|
|
|
|
|
|
|
|
|
@ -48,6 +46,11 @@ const checkboxMeta = $computed(() => { |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let vModel = $computed<boolean | number>({ |
|
|
|
|
|
|
|
get: () => !!props.modelValue && props.modelValue !== '0' && props.modelValue !== 0, |
|
|
|
|
|
|
|
set: (val: any) => emits('update:modelValue', isMssql(column?.value?.base_id) ? +val : val), |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
function onClick(force?: boolean, event?: MouseEvent) { |
|
|
|
function onClick(force?: boolean, event?: MouseEvent) { |
|
|
|
if ( |
|
|
|
if ( |
|
|
|
(event?.target as HTMLElement)?.classList?.contains('nc-checkbox') || |
|
|
|
(event?.target as HTMLElement)?.classList?.contains('nc-checkbox') || |
|
|
|