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