|
|
@ -4,7 +4,7 @@ import { RelationTypes, UITypes, getSystemColumns, isVirtualCol } from 'nocodb-s |
|
|
|
import { notification } from 'ant-design-vue' |
|
|
|
import { notification } from 'ant-design-vue' |
|
|
|
import type { Permission } from '~/composables/useUIPermission/rolePermissions' |
|
|
|
import type { Permission } from '~/composables/useUIPermission/rolePermissions' |
|
|
|
import { computed, inject, onClickOutside, useDebounceFn } from '#imports' |
|
|
|
import { computed, inject, onClickOutside, useDebounceFn } from '#imports' |
|
|
|
import { ActiveViewInj, FieldsInj, IsFormInj, MetaInj } from '~/context' |
|
|
|
import { ActiveViewInj, IsFormInj, MetaInj } from '~/context' |
|
|
|
import { extractSdkResponseErrorMsg } from '~/utils' |
|
|
|
import { extractSdkResponseErrorMsg } from '~/utils' |
|
|
|
import MdiPlusIcon from '~icons/mdi/plus' |
|
|
|
import MdiPlusIcon from '~icons/mdi/plus' |
|
|
|
import MdiDragIcon from '~icons/mdi/drag-vertical' |
|
|
|
import MdiDragIcon from '~icons/mdi/drag-vertical' |
|
|
@ -35,18 +35,7 @@ const view = inject(ActiveViewInj) |
|
|
|
|
|
|
|
|
|
|
|
if (meta) useProvideColumnCreateStore(meta) |
|
|
|
if (meta) useProvideColumnCreateStore(meta) |
|
|
|
|
|
|
|
|
|
|
|
const { |
|
|
|
const { loadFormView, insertRow, formColumnData, formViewData, updateFormView } = useViewData(meta, view as any) |
|
|
|
loadData, |
|
|
|
|
|
|
|
paginationData, |
|
|
|
|
|
|
|
formattedData: data, |
|
|
|
|
|
|
|
loadFormView, |
|
|
|
|
|
|
|
insertRow, |
|
|
|
|
|
|
|
formColumnData, |
|
|
|
|
|
|
|
formViewData, |
|
|
|
|
|
|
|
changePage, |
|
|
|
|
|
|
|
updateRowProperty, |
|
|
|
|
|
|
|
updateFormView, |
|
|
|
|
|
|
|
} = useViewData(meta, view as any) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const { showAll, hideAll, saveOrUpdate } = useViewColumns(view, meta as any, false, async () => { |
|
|
|
const { showAll, hideAll, saveOrUpdate } = useViewColumns(view, meta as any, false, async () => { |
|
|
|
await loadFormView() |
|
|
|
await loadFormView() |
|
|
@ -59,8 +48,6 @@ const localColumns = ref<Record<string, any>>([]) |
|
|
|
|
|
|
|
|
|
|
|
const hiddenColumns = ref<Record<string, any>>([]) |
|
|
|
const hiddenColumns = ref<Record<string, any>>([]) |
|
|
|
|
|
|
|
|
|
|
|
const availableColumns = inject(FieldsInj, ref([])) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const draggableRef = ref() |
|
|
|
const draggableRef = ref() |
|
|
|
|
|
|
|
|
|
|
|
const editOrAddRef = ref() |
|
|
|
const editOrAddRef = ref() |
|
|
@ -79,8 +66,6 @@ const submitted = ref(false) |
|
|
|
|
|
|
|
|
|
|
|
const activeRow = ref('') |
|
|
|
const activeRow = ref('') |
|
|
|
|
|
|
|
|
|
|
|
const formView = ref({}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function updateView() { |
|
|
|
function updateView() { |
|
|
|
if ((formViewData.value?.subheading?.length || 0) > 255) { |
|
|
|
if ((formViewData.value?.subheading?.length || 0) > 255) { |
|
|
|
notification.error({ |
|
|
|
notification.error({ |
|
|
|