|
|
@ -1,7 +1,7 @@ |
|
|
|
<script setup lang="ts"> |
|
|
|
<script setup lang="ts"> |
|
|
|
import { onMounted } from '@vue/runtime-core' |
|
|
|
import { onMounted } from '@vue/runtime-core' |
|
|
|
import type { ColumnType, LinkToAnotherRecordType, TableType } from 'nocodb-sdk' |
|
|
|
import type { ColumnType, LinkToAnotherRecordType, TableType } from 'nocodb-sdk' |
|
|
|
import { isLinksOrLTAR, isSystemColumn } from 'nocodb-sdk' |
|
|
|
import { isLinksOrLTAR, isSystemColumn, isVirtualCol } from 'nocodb-sdk' |
|
|
|
import { getRelationName } from './utils' |
|
|
|
import { getRelationName } from './utils' |
|
|
|
import { MetaInj, inject, ref, storeToRefs, useColumnCreateStoreOrThrow, useMetas, useProject, useVModel } from '#imports' |
|
|
|
import { MetaInj, inject, ref, storeToRefs, useColumnCreateStoreOrThrow, useMetas, useProject, useVModel } from '#imports' |
|
|
|
|
|
|
|
|
|
|
@ -64,6 +64,12 @@ const onRelationColChange = () => { |
|
|
|
vModel.value.fk_lookup_column_id = columns?.[0]?.id |
|
|
|
vModel.value.fk_lookup_column_id = columns?.[0]?.id |
|
|
|
onDataTypeChange() |
|
|
|
onDataTypeChange() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const cellIcon = (column: ColumnType) => |
|
|
|
|
|
|
|
h(isVirtualCol(column) ? resolveComponent('SmartsheetHeaderVirtualCellIcon') : resolveComponent('SmartsheetHeaderCellIcon'), { |
|
|
|
|
|
|
|
columnMeta: column, |
|
|
|
|
|
|
|
}) |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
<template> |
|
|
|
<template> |
|
|
@ -94,6 +100,7 @@ const onRelationColChange = () => { |
|
|
|
@change="onDataTypeChange" |
|
|
|
@change="onDataTypeChange" |
|
|
|
> |
|
|
|
> |
|
|
|
<a-select-option v-for="(column, index) of columns" :key="index" :value="column.id"> |
|
|
|
<a-select-option v-for="(column, index) of columns" :key="index" :value="column.id"> |
|
|
|
|
|
|
|
<component :is="cellIcon(column)" :column-meta="column" /> |
|
|
|
{{ column.title }} |
|
|
|
{{ column.title }} |
|
|
|
</a-select-option> |
|
|
|
</a-select-option> |
|
|
|
</a-select> |
|
|
|
</a-select> |
|
|
|