mirror of https://github.com/nocodb/nocodb
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
946 B
36 lines
946 B
<script setup lang="ts"> |
|
import type { ColumnType, TableType } from 'nocodb-sdk' |
|
import type { Ref } from 'vue' |
|
import { inject } from 'vue' |
|
import { ColumnInj, IsFormInj, MetaInj } from '~/context' |
|
import { useProvideColumnCreateStore } from '#imports' |
|
|
|
const { column } = defineProps<{ column: ColumnType & { meta: any } }>() |
|
|
|
const meta = inject(MetaInj) |
|
|
|
const isForm = inject(IsFormInj) |
|
|
|
provide(ColumnInj, column) |
|
|
|
// instantiate column update store |
|
useProvideColumnCreateStore(meta as Ref<TableType>, column) |
|
</script> |
|
|
|
<template> |
|
<div class="flex align-center w-full"> |
|
<SmartsheetHeaderCellIcon v-if="column" /> |
|
<span v-if="column" class="name" style="white-space: nowrap" :title="column.title">{{ column.title }}</span> |
|
|
|
<div class="flex-1" /> |
|
<SmartsheetHeaderMenu v-if="!isForm" /> |
|
</div> |
|
</template> |
|
|
|
<style scoped> |
|
.name { |
|
max-width: calc(100% - 40px); |
|
overflow: hidden; |
|
text-overflow: ellipsis; |
|
} |
|
</style>
|
|
|