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