|
|
@ -7,6 +7,7 @@ interface Props { |
|
|
|
required?: boolean | number |
|
|
|
required?: boolean | number |
|
|
|
hideMenu?: boolean |
|
|
|
hideMenu?: boolean |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const props = defineProps<Props>() |
|
|
|
const props = defineProps<Props>() |
|
|
|
|
|
|
|
|
|
|
|
const hideMenu = toRef(props, 'hideMenu') |
|
|
|
const hideMenu = toRef(props, 'hideMenu') |
|
|
@ -34,6 +35,12 @@ const closeAddColumnDropdown = () => { |
|
|
|
columnOrder.value = null |
|
|
|
columnOrder.value = null |
|
|
|
editColumnDropdown.value = false |
|
|
|
editColumnDropdown.value = false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const openHeaderMenu = () => { |
|
|
|
|
|
|
|
if (!isForm && isUIAllowed('edit-column')) { |
|
|
|
|
|
|
|
editColumnDropdown.value = true |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
<template> |
|
|
|
<template> |
|
|
@ -47,20 +54,15 @@ const closeAddColumnDropdown = () => { |
|
|
|
class="name cursor-pointer" |
|
|
|
class="name cursor-pointer" |
|
|
|
style="white-space: nowrap" |
|
|
|
style="white-space: nowrap" |
|
|
|
:title="column.title" |
|
|
|
:title="column.title" |
|
|
|
@dblclick="editColumnDropdown = true" |
|
|
|
@dblclick="openHeaderMenu" |
|
|
|
>{{ column.title }}</span |
|
|
|
>{{ column.title }}</span> |
|
|
|
> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span v-if="(column.rqd && !column.cdf) || required" class="text-red-500"> *</span> |
|
|
|
<span v-if="(column.rqd && !column.cdf) || required" class="text-red-500"> *</span> |
|
|
|
|
|
|
|
|
|
|
|
<template v-if="!hideMenu"> |
|
|
|
<template v-if="!hideMenu"> |
|
|
|
<div class="flex-1" /> |
|
|
|
<div class="flex-1" /> |
|
|
|
|
|
|
|
|
|
|
|
<LazySmartsheetHeaderMenu |
|
|
|
<LazySmartsheetHeaderMenu v-if="!isForm && isUIAllowed('edit-column')" @add-column="addField" @edit="openHeaderMenu" /> |
|
|
|
v-if="!isForm && isUIAllowed('edit-column')" |
|
|
|
|
|
|
|
@add-column="addField" |
|
|
|
|
|
|
|
@edit="editColumnDropdown = true" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<a-dropdown |
|
|
|
<a-dropdown |
|
|
|