|
|
|
@ -10,10 +10,13 @@ const props = defineProps<{ column: ColumnType & { meta: any }; required: boolea
|
|
|
|
|
const hideMenu = toRef(props, 'hideMenu') |
|
|
|
|
|
|
|
|
|
const meta = inject(MetaInj) |
|
|
|
|
|
|
|
|
|
const isForm = inject(IsFormInj, ref(false)) |
|
|
|
|
|
|
|
|
|
const column = toRef(props, 'column') |
|
|
|
|
|
|
|
|
|
const { isUIAllowed } = useUIPermission() |
|
|
|
|
|
|
|
|
|
provide(ColumnInj, column) |
|
|
|
|
|
|
|
|
|
// instantiate column update store |
|
|
|
@ -28,7 +31,7 @@ useProvideColumnCreateStore(meta as Ref<TableType>, column)
|
|
|
|
|
|
|
|
|
|
<template v-if="!hideMenu"> |
|
|
|
|
<div class="flex-1" /> |
|
|
|
|
<SmartsheetHeaderMenu v-if="!isForm" /> |
|
|
|
|
<SmartsheetHeaderMenu v-if="!isForm && isUIAllowed('edit-column')" /> |
|
|
|
|
</template> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|