Skip to content

Commit c29fc68

Browse files
committed
improve visual
1 parent 01aea24 commit c29fc68

File tree

3 files changed

+40
-41
lines changed

3 files changed

+40
-41
lines changed

src/app/src/components/content/ContentEditorForm.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ async function setJSON(document: DatabasePageItem) {
100100
</script>
101101

102102
<template>
103-
<div class="p-4">
103+
<div class="pt-2 pb-4 px-4">
104104
<FormSchemaBased
105105
v-model="contentJSON"
106106
:collection-name="collection!.name"

src/app/src/components/shared/form/FormPanelInput.vue

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,3 @@
1-
<template>
2-
<UFormField
3-
:name="formItem.id"
4-
:label="label"
5-
:ui="{
6-
root: 'w-full',
7-
label: 'text-xs font-semibold tracking-tight',
8-
container: 'mt-1',
9-
}"
10-
>
11-
<UInput
12-
:id="formItem.id"
13-
v-model="model"
14-
:placeholder="placeholder"
15-
:type="inputType"
16-
class="w-full"
17-
/>
18-
</UFormField>
19-
</template>
20-
211
<script setup lang="ts">
222
import { titleCase } from 'scule'
233
import type { FormItem, FormTree } from '../../../types'
@@ -111,3 +91,22 @@ function applyValueById(tree: FormTree, id: string, value: unknown): FormTree {
11191
return result
11292
}
11393
</script>
94+
95+
<template>
96+
<UFormField
97+
:name="formItem.id"
98+
:label="label"
99+
:ui="{
100+
root: 'w-full mt-2',
101+
label: 'text-xs font-semibold tracking-tight',
102+
}"
103+
>
104+
<UInput
105+
:id="formItem.id"
106+
v-model="model"
107+
:placeholder="placeholder"
108+
:type="inputType"
109+
class="w-full"
110+
/>
111+
</UFormField>
112+
</template>

src/app/src/components/shared/form/FormPanelSection.vue

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
<script lang="ts" setup>
2+
import type { FormItem, FormTree } from '../../../types'
3+
import type { PropType } from 'vue'
4+
import { computed } from 'vue'
5+
6+
const props = defineProps({
7+
formItem: {
8+
type: Object as PropType<FormItem>,
9+
required: true,
10+
},
11+
})
12+
13+
const form = defineModel({ type: Object as PropType<FormTree>, default: () => ({}) })
14+
15+
const childrenCount = computed(() => {
16+
if (!props.formItem.children) return 0
17+
return Object.keys(props.formItem.children).length
18+
})
19+
</script>
20+
121
<template>
222
<UCollapsible
323
v-if="formItem.children"
@@ -46,23 +66,3 @@
4666
:form-item="formItem"
4767
/>
4868
</template>
49-
50-
<script lang="ts" setup>
51-
import type { FormItem, FormTree } from '../../../types'
52-
import type { PropType } from 'vue'
53-
import { computed } from 'vue'
54-
55-
const props = defineProps({
56-
formItem: {
57-
type: Object as PropType<FormItem>,
58-
required: true,
59-
},
60-
})
61-
62-
const form = defineModel({ type: Object as PropType<FormTree>, default: () => ({}) })
63-
64-
const childrenCount = computed(() => {
65-
if (!props.formItem.children) return 0
66-
return Object.keys(props.formItem.children).length
67-
})
68-
</script>

0 commit comments

Comments
 (0)