|
|
@ -2,7 +2,7 @@ |
|
|
|
import type { SelectProps } from 'ant-design-vue' |
|
|
|
import type { SelectProps } from 'ant-design-vue' |
|
|
|
import type { ColumnType, LinkToAnotherRecordType } from 'nocodb-sdk' |
|
|
|
import type { ColumnType, LinkToAnotherRecordType } from 'nocodb-sdk' |
|
|
|
import { RelationTypes, UITypes, isVirtualCol } from 'nocodb-sdk' |
|
|
|
import { RelationTypes, UITypes, isVirtualCol } from 'nocodb-sdk' |
|
|
|
import { FieldsInj, computed, inject, ref, resolveComponent } from '#imports' |
|
|
|
import { MetaInj, FieldsInj, computed, inject, ref, resolveComponent } from '#imports' |
|
|
|
|
|
|
|
|
|
|
|
const { modelValue, isSort } = defineProps<{ |
|
|
|
const { modelValue, isSort } = defineProps<{ |
|
|
|
modelValue?: string |
|
|
|
modelValue?: string |
|
|
@ -11,6 +11,8 @@ const { modelValue, isSort } = defineProps<{ |
|
|
|
|
|
|
|
|
|
|
|
const emit = defineEmits(['update:modelValue']) |
|
|
|
const emit = defineEmits(['update:modelValue']) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const meta = inject(MetaInj, ref()) |
|
|
|
|
|
|
|
|
|
|
|
const fields = inject(FieldsInj, ref()) |
|
|
|
const fields = inject(FieldsInj, ref()) |
|
|
|
|
|
|
|
|
|
|
|
const localValue = computed({ |
|
|
|
const localValue = computed({ |
|
|
@ -19,9 +21,9 @@ const localValue = computed({ |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
const options = computed<SelectProps['options']>(() => |
|
|
|
const options = computed<SelectProps['options']>(() => |
|
|
|
fields.value |
|
|
|
meta.value?.columns |
|
|
|
?.filter((c: ColumnType) => { |
|
|
|
?.filter((c: ColumnType) => { |
|
|
|
if (c.uidt === UITypes.QrCode || c.uidt === UITypes.Barcode) { |
|
|
|
if (c.uidt === UITypes.QrCode || c.uidt === UITypes.Barcode || c.uidt === UITypes.ID) { |
|
|
|
return false |
|
|
|
return false |
|
|
|
} else if (isSort) { |
|
|
|
} else if (isSort) { |
|
|
|
/** ignore hasmany and manytomany relations if it's using within sort menu */ |
|
|
|
/** ignore hasmany and manytomany relations if it's using within sort menu */ |
|
|
|