|
|
@ -6,16 +6,22 @@ import { |
|
|
|
ColumnInj, |
|
|
|
ColumnInj, |
|
|
|
EditColumnInj, |
|
|
|
EditColumnInj, |
|
|
|
EditModeInj, |
|
|
|
EditModeInj, |
|
|
|
|
|
|
|
IsLockedInj, |
|
|
|
ReadonlyInj, |
|
|
|
ReadonlyInj, |
|
|
|
computed, |
|
|
|
computed, |
|
|
|
inject, |
|
|
|
inject, |
|
|
|
|
|
|
|
isDateMonthFormat, |
|
|
|
isDrawerOrModalExist, |
|
|
|
isDrawerOrModalExist, |
|
|
|
|
|
|
|
onClickOutside, |
|
|
|
|
|
|
|
onMounted, |
|
|
|
|
|
|
|
onUnmounted, |
|
|
|
parseProp, |
|
|
|
parseProp, |
|
|
|
ref, |
|
|
|
ref, |
|
|
|
|
|
|
|
useGlobal, |
|
|
|
|
|
|
|
useI18n, |
|
|
|
useSelectedCellKeyupListener, |
|
|
|
useSelectedCellKeyupListener, |
|
|
|
watch, |
|
|
|
watch, |
|
|
|
} from '#imports' |
|
|
|
} from '#imports' |
|
|
|
import { isDateMonthFormat } from '~/utils' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
interface Props { |
|
|
|
interface Props { |
|
|
|
modelValue?: string | null |
|
|
|
modelValue?: string | null |
|
|
@ -197,12 +203,15 @@ const updateOpen = (next: boolean) => { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const cellClickHook = inject(CellClickHookInj, null) |
|
|
|
const cellClickHook = inject(CellClickHookInj, null) |
|
|
|
|
|
|
|
|
|
|
|
const cellClickHandler = () => { |
|
|
|
const cellClickHandler = () => { |
|
|
|
open.value = (active.value || editable.value) && !open.value |
|
|
|
open.value = (active.value || editable.value) && !open.value |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
onMounted(() => { |
|
|
|
onMounted(() => { |
|
|
|
cellClickHook?.on(cellClickHandler) |
|
|
|
cellClickHook?.on(cellClickHandler) |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
onUnmounted(() => { |
|
|
|
onUnmounted(() => { |
|
|
|
cellClickHook?.on(cellClickHandler) |
|
|
|
cellClickHook?.on(cellClickHandler) |
|
|
|
}) |
|
|
|
}) |
|
|
|