|
|
@ -97,11 +97,11 @@ onMounted(() => { |
|
|
|
|
|
|
|
|
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<div |
|
|
|
<div |
|
|
|
class="w-[400px] max-h-[95vh] bg-gray-50 shadow-lg p-6 overflow-auto !border" |
|
|
|
class="w-[400px] bg-gray-50 shadow p-4 overflow-auto border" |
|
|
|
:class="{ '!w-[600px]': formState.uidt === UITypes.Formula }" |
|
|
|
:class="{ '!w-[600px]': formState.uidt === UITypes.Formula }" |
|
|
|
@click.stop |
|
|
|
@click.stop |
|
|
|
> |
|
|
|
> |
|
|
|
<a-form v-if="formState" v-model="formState" name="column-create-or-edit" layout="vertical"> |
|
|
|
<a-form v-if="formState" v-model="formState" no-style name="column-create-or-edit" layout="vertical"> |
|
|
|
<div class="flex flex-col gap-2"> |
|
|
|
<div class="flex flex-col gap-2"> |
|
|
|
<a-form-item :label="$t('labels.columnName')" v-bind="validateInfos.title"> |
|
|
|
<a-form-item :label="$t('labels.columnName')" v-bind="validateInfos.title"> |
|
|
|
<a-input ref="antInput" v-model:value="formState.title" class="nc-column-name-input" @input="onAlter(8)" /> |
|
|
|
<a-input ref="antInput" v-model:value="formState.title" class="nc-column-name-input" @input="onAlter(8)" /> |
|
|
@ -138,6 +138,7 @@ onMounted(() => { |
|
|
|
v-model:value="formState" |
|
|
|
v-model:value="formState" |
|
|
|
/> |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div |
|
|
|
<div |
|
|
|
v-if="!isVirtualCol(formState.uidt)" |
|
|
|
v-if="!isVirtualCol(formState.uidt)" |
|
|
|
class="text-xs cursor-pointer text-grey nc-more-options mb-1 mt-4 flex items-center gap-1 justify-end" |
|
|
|
class="text-xs cursor-pointer text-grey nc-more-options mb-1 mt-4 flex items-center gap-1 justify-end" |
|
|
@ -147,18 +148,22 @@ onMounted(() => { |
|
|
|
<component :is="advancedOptions ? MdiMinusIcon : MdiPlusIcon" /> |
|
|
|
<component :is="advancedOptions ? MdiMinusIcon : MdiPlusIcon" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div class="overflow-hidden" :class="advancedOptions ? 'h-min mb-2' : 'h-0'"> |
|
|
|
<Transition name="layout" mode="out-in"> |
|
|
|
<a-checkbox |
|
|
|
<div v-if="advancedOptions" class="overflow-hidden"> |
|
|
|
v-if="formState.meta && columnToValidate.includes(formState.uidt)" |
|
|
|
<a-checkbox |
|
|
|
v-model:checked="formState.meta.validate" |
|
|
|
v-if="formState.meta && columnToValidate.includes(formState.uidt)" |
|
|
|
class="ml-1 mb-1" |
|
|
|
v-model:checked="formState.meta.validate" |
|
|
|
> |
|
|
|
class="ml-1 mb-1" |
|
|
|
<span class="text-[10px] text-gray-600"> |
|
|
|
> |
|
|
|
{{ `Accept only valid ${formState.uidt}` }} |
|
|
|
<span class="text-[10px] text-gray-600"> |
|
|
|
</span> |
|
|
|
{{ `Accept only valid ${formState.uidt}` }} |
|
|
|
</a-checkbox> |
|
|
|
</span> |
|
|
|
<SmartsheetColumnAdvancedOptions v-model:value="formState" /> |
|
|
|
</a-checkbox> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<SmartsheetColumnAdvancedOptions v-model:value="formState" /> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</Transition> |
|
|
|
|
|
|
|
|
|
|
|
<a-form-item> |
|
|
|
<a-form-item> |
|
|
|
<div class="flex justify-end gap-1 mt-4"> |
|
|
|
<div class="flex justify-end gap-1 mt-4"> |
|
|
|
<a-button html-type="button" @click="emit('cancel')"> |
|
|
|
<a-button html-type="button" @click="emit('cancel')"> |
|
|
|