|
|
@ -5,24 +5,19 @@ import { toRef } from 'vue' |
|
|
|
import { $computed } from 'vue/macros' |
|
|
|
import { $computed } from 'vue/macros' |
|
|
|
import type { Ref } from 'vue' |
|
|
|
import type { Ref } from 'vue' |
|
|
|
import { useMetas } from '~/composables' |
|
|
|
import { useMetas } from '~/composables' |
|
|
|
import { ColumnInj, MetaInj, IsFormInj } from '~/context' |
|
|
|
import { ColumnInj, IsFormInj, MetaInj } from '~/context' |
|
|
|
import { provide, useProvideColumnCreateStore } from '#imports' |
|
|
|
import { provide, useProvideColumnCreateStore } from '#imports' |
|
|
|
|
|
|
|
|
|
|
|
interface Props { |
|
|
|
const props = defineProps<{ column: ColumnType & { meta: any }; required: boolean }>() |
|
|
|
required?: boolean |
|
|
|
|
|
|
|
column: ColumnType & { meta: any } |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const { column, required } = defineProps<Props>() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
provide(ColumnInj, column) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const isForm = inject(IsFormInj) |
|
|
|
const isForm = inject(IsFormInj) |
|
|
|
|
|
|
|
|
|
|
|
const props = defineProps<{ column: ColumnType & { meta: any } }>() |
|
|
|
const column = toRef(props, 'column') |
|
|
|
const column = toRef(column, 'column') |
|
|
|
|
|
|
|
provide(ColumnInj, column) |
|
|
|
provide(ColumnInj, column) |
|
|
|
|
|
|
|
|
|
|
|
const { metas } = useMetas() |
|
|
|
const { metas } = useMetas() |
|
|
|
|
|
|
|
|
|
|
|
const meta = inject(MetaInj) |
|
|
|
const meta = inject(MetaInj) |
|
|
|
|
|
|
|
|
|
|
|
const { isLookup, isBt, isRollup, isMm, isHm, isFormula, isCount } = useVirtualCell(column) |
|
|
|
const { isLookup, isBt, isRollup, isMm, isHm, isFormula, isCount } = useVirtualCell(column) |
|
|
|