diff --git a/packages/nc-gui-v2/components/cell/Currency.vue b/packages/nc-gui-v2/components/cell/Currency.vue index 71c1e639d0..b9984f8499 100644 --- a/packages/nc-gui-v2/components/cell/Currency.vue +++ b/packages/nc-gui-v2/components/cell/Currency.vue @@ -3,7 +3,7 @@ import { computed, inject, ref, useVModel } from '#imports' import { ColumnInj, EditModeInj } from '~/context' interface Props { - modelValue: number + modelValue: number | null } const props = defineProps() diff --git a/packages/nc-gui-v2/components/cell/DatePicker.vue b/packages/nc-gui-v2/components/cell/DatePicker.vue index ee373db17b..d69202b6ee 100644 --- a/packages/nc-gui-v2/components/cell/DatePicker.vue +++ b/packages/nc-gui-v2/components/cell/DatePicker.vue @@ -2,14 +2,13 @@ import dayjs from 'dayjs' import { ColumnInj, ReadonlyInj } from '~/context' +interface Props { + modelValue: string | null +} const { modelValue } = defineProps() const emit = defineEmits(['update:modelValue']) -interface Props { - modelValue: string -} - const columnMeta = inject(ColumnInj, null) const readOnlyMode = inject(ReadonlyInj, false) diff --git a/packages/nc-gui-v2/components/cell/DateTimePicker.vue b/packages/nc-gui-v2/components/cell/DateTimePicker.vue index 68f4a9087a..038e218c95 100644 --- a/packages/nc-gui-v2/components/cell/DateTimePicker.vue +++ b/packages/nc-gui-v2/components/cell/DateTimePicker.vue @@ -2,14 +2,14 @@ import dayjs from 'dayjs' import { ReadonlyInj } from '~/context' +interface Props { + modelValue: string | null +} + const { modelValue } = defineProps() const emit = defineEmits(['update:modelValue']) -interface Props { - modelValue: string -} - const { isMysql } = useProject() const readOnlyMode = inject(ReadonlyInj, false) diff --git a/packages/nc-gui-v2/components/cell/Duration.vue b/packages/nc-gui-v2/components/cell/Duration.vue index 5ef2e9a2e3..aa888120cd 100644 --- a/packages/nc-gui-v2/components/cell/Duration.vue +++ b/packages/nc-gui-v2/components/cell/Duration.vue @@ -4,7 +4,7 @@ import { ColumnInj } from '~/context' import { convertDurationToSeconds, convertMS2Duration, durationOptions } from '~/utils' interface Props { - modelValue: number | string + modelValue: number | string | null } const { modelValue } = defineProps() diff --git a/packages/nc-gui-v2/components/cell/Float.vue b/packages/nc-gui-v2/components/cell/Float.vue index 6e029c67de..16ba6db0f9 100644 --- a/packages/nc-gui-v2/components/cell/Float.vue +++ b/packages/nc-gui-v2/components/cell/Float.vue @@ -3,7 +3,7 @@ import { inject, ref, useVModel } from '#imports' import { EditModeInj } from '~/context' interface Props { - modelValue: number + modelValue: number | null } interface Emits { diff --git a/packages/nc-gui-v2/components/cell/JsonEditableCell.vue b/packages/nc-gui-v2/components/cell/JsonEditableCell.vue index acf815fc54..f92bd346ca 100644 --- a/packages/nc-gui-v2/components/cell/JsonEditableCell.vue +++ b/packages/nc-gui-v2/components/cell/JsonEditableCell.vue @@ -4,7 +4,7 @@ import { computed, inject } from '#imports' import { EditModeInj } from '~/context' interface Props { - modelValue: string | Record + modelValue: string | Record | null isForm: boolean } diff --git a/packages/nc-gui-v2/components/cell/MultiSelect.vue b/packages/nc-gui-v2/components/cell/MultiSelect.vue index 12260eb12f..f43f62fc8f 100644 --- a/packages/nc-gui-v2/components/cell/MultiSelect.vue +++ b/packages/nc-gui-v2/components/cell/MultiSelect.vue @@ -3,7 +3,7 @@ import { computed, inject } from '#imports' import { ColumnInj, EditModeInj } from '~/context' interface Props { - modelValue: string + modelValue: string | null } const { modelValue } = defineProps() diff --git a/packages/nc-gui-v2/components/cell/Percent.vue b/packages/nc-gui-v2/components/cell/Percent.vue index 746e86739c..4b25a11f50 100644 --- a/packages/nc-gui-v2/components/cell/Percent.vue +++ b/packages/nc-gui-v2/components/cell/Percent.vue @@ -4,7 +4,7 @@ import { ColumnInj } from '~/context' import { getPercentStep, isValidPercent, renderPercent } from '@/utils/percentUtils' interface Props { - modelValue: number | string + modelValue: number | string | null } const { modelValue } = defineProps() diff --git a/packages/nc-gui-v2/components/cell/Rating.vue b/packages/nc-gui-v2/components/cell/Rating.vue index fe4b782d64..cc23e23db1 100644 --- a/packages/nc-gui-v2/components/cell/Rating.vue +++ b/packages/nc-gui-v2/components/cell/Rating.vue @@ -8,7 +8,7 @@ import MdiThumbUpIcon from '~icons/mdi/thumb-up' import MdiFlagIcon from '~icons/mdi/flag' interface Props { - modelValue?: number + modelValue?: number | null readOnly?: boolean } diff --git a/packages/nc-gui-v2/components/cell/SingleSelect.vue b/packages/nc-gui-v2/components/cell/SingleSelect.vue index c63efc7d2d..2511d3404a 100644 --- a/packages/nc-gui-v2/components/cell/SingleSelect.vue +++ b/packages/nc-gui-v2/components/cell/SingleSelect.vue @@ -3,7 +3,7 @@ import { computed, inject } from '#imports' import { ColumnInj, EditModeInj } from '~/context' interface Props { - modelValue: string + modelValue: string | null } const { modelValue } = defineProps() diff --git a/packages/nc-gui-v2/components/cell/TimePicker.vue b/packages/nc-gui-v2/components/cell/TimePicker.vue index 1e2fa406d0..ec36b5774a 100644 --- a/packages/nc-gui-v2/components/cell/TimePicker.vue +++ b/packages/nc-gui-v2/components/cell/TimePicker.vue @@ -2,14 +2,14 @@ import dayjs from 'dayjs' import { ReadonlyInj } from '~/context' +interface Props { + modelValue: string | null +} + const { modelValue } = defineProps() const emit = defineEmits(['update:modelValue']) -interface Props { - modelValue: string -} - const { isMysql } = useProject() const readOnlyMode = inject(ReadonlyInj, false) diff --git a/packages/nc-gui-v2/components/cell/Url.vue b/packages/nc-gui-v2/components/cell/Url.vue index ca15fb0b11..97d9c5fe19 100644 --- a/packages/nc-gui-v2/components/cell/Url.vue +++ b/packages/nc-gui-v2/components/cell/Url.vue @@ -4,7 +4,7 @@ import { ColumnInj, EditModeInj } from '~/context' import { isValidURL } from '~/utils' interface Props { - modelValue: string + modelValue: string | null } const { modelValue: value } = defineProps() diff --git a/packages/nc-gui-v2/components/cell/YearPicker.vue b/packages/nc-gui-v2/components/cell/YearPicker.vue index a167dab5ed..1b8133bfca 100644 --- a/packages/nc-gui-v2/components/cell/YearPicker.vue +++ b/packages/nc-gui-v2/components/cell/YearPicker.vue @@ -2,14 +2,14 @@ import dayjs from 'dayjs' import { ReadonlyInj } from '~/context' +interface Props { + modelValue: number | string | null +} + const { modelValue } = defineProps() const emit = defineEmits(['update:modelValue']) -interface Props { - modelValue: number -} - const readOnlyMode = inject(ReadonlyInj, false) let isYearInvalid = $ref(false)