|
|
@ -1,6 +1,6 @@ |
|
|
|
<script setup lang="ts"> |
|
|
|
<script setup lang="ts"> |
|
|
|
import type { ColumnReqType, ColumnType } from 'nocodb-sdk' |
|
|
|
import type { ColumnReqType, ColumnType } from 'nocodb-sdk' |
|
|
|
import { ColumnInj, IsFormInj, IsKanbanInj, inject, provide, ref, toRef, useUIPermission } from '#imports' |
|
|
|
import { ColumnInj, IsFormInj, IsKanbanInj, IsLockedInj, inject, provide, ref, toRef, useUIPermission } from '#imports' |
|
|
|
|
|
|
|
|
|
|
|
interface Props { |
|
|
|
interface Props { |
|
|
|
column: ColumnType |
|
|
|
column: ColumnType |
|
|
@ -18,6 +18,8 @@ const isDropDownOpen = ref(false) |
|
|
|
|
|
|
|
|
|
|
|
const isKanban = inject(IsKanbanInj, ref(false)) |
|
|
|
const isKanban = inject(IsKanbanInj, ref(false)) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const isLocked = inject(IsLockedInj, ref(false)) |
|
|
|
|
|
|
|
|
|
|
|
const column = toRef(props, 'column') |
|
|
|
const column = toRef(props, 'column') |
|
|
|
|
|
|
|
|
|
|
|
const { isUIAllowed } = useUIPermission() |
|
|
|
const { isUIAllowed } = useUIPermission() |
|
|
@ -39,7 +41,7 @@ const closeAddColumnDropdown = () => { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const openHeaderMenu = () => { |
|
|
|
const openHeaderMenu = () => { |
|
|
|
if (!isForm.value && isUIAllowed('edit-column')) { |
|
|
|
if (!isLocked.value && !isForm.value && isUIAllowed('edit-column')) { |
|
|
|
editColumnDropdown.value = true |
|
|
|
editColumnDropdown.value = true |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -57,7 +59,7 @@ const openHeaderMenu = () => { |
|
|
|
<div |
|
|
|
<div |
|
|
|
v-if="column" |
|
|
|
v-if="column" |
|
|
|
class="name pl-1 !truncate" |
|
|
|
class="name pl-1 !truncate" |
|
|
|
:class="{ 'cursor-pointer pt-0.25': !isForm && isUIAllowed('edit-column') && !hideMenu }" |
|
|
|
:class="{ 'cursor-pointer pt-0.25': !isForm && isUIAllowed('edit-column') && !hideMenu && !isLocked }" |
|
|
|
style="white-space: pre-line" |
|
|
|
style="white-space: pre-line" |
|
|
|
:title="column.title" |
|
|
|
:title="column.title" |
|
|
|
> |
|
|
|
> |
|
|
|