Browse Source

fix(gui-v2): order & meta input style

pull/3030/head
Wing-Kam Wong 2 years ago
parent
commit
975ccc7332
  1. 19
      packages/nc-gui-v2/components/smartsheet/Form.vue

19
packages/nc-gui-v2/components/smartsheet/Form.vue

@ -144,7 +144,7 @@ function onMove(event: any) {
} else if (newIndex === 0) {
element.order = (localColumns.value[1]?.order || 0) / 2
} else {
element.order = (localColumns.value[newIndex - 1]?.order || 0) + (localColumns.value[newIndex + 1].order || 0) / 2
element.order = ((localColumns.value[newIndex - 1]?.order || 0) + (localColumns.value[newIndex + 1].order || 0)) / 2
}
saveOrUpdate(element, newIndex)
}
@ -503,28 +503,33 @@ onMounted(async () => {
<SmartsheetCell v-model="formState[element.title]" class="nc-input" :column="element" :edit-enabled="true" />
</a-form-item>
<div v-if="activeRow === element.title">
<a-form-item class="my-0 w-1/2">
<a-input
v-model:value="element.label"
size="large"
class="form-meta-input !bg-[#dbdbdb]"
:placeholder="$t('msg.info.formInput')"
@change="updateColMeta(element)"
>
</a-input>
</a-form-item>
<a-form-item class="mt-2 mb-0 w-1/2">
<a-input
v-model:value="element.description"
class="nc-input"
class="form-meta-input !bg-[#dbdbdb]"
:placeholder="$t('msg.info.formHelpText')"
size="large"
@change="updateColMeta(element)"
/>
</a-form-item>
<div>
<a-switch
v-model:checked="element.required"
class="mb-2"
class="my-2"
:checked-children="$t('general.required')"
un-checked-children="Not Required"
@change="updateColMeta(element)"
/>
</div>
</div>
<span class="text-gray-500">{{ element.description }}</span>
</div>
</template>
@ -591,4 +596,8 @@ onMounted(async () => {
.nc-input {
@apply w-full !bg-white rounded px-2 py-2 min-h-[40px] mt-2 mb-2 flex align-center border-solid border-1 border-primary;
}
.form-meta-input::placeholder {
@apply text-[#3d3d3d] italic;
}
</style>

Loading…
Cancel
Save