--wip-- [skip ci]

This commit is contained in:
Philipp Lang 2023-12-24 22:41:19 +01:00
parent e2fb3aa227
commit a3f62dabc9
2 changed files with 7 additions and 3 deletions

View File

@ -10,8 +10,9 @@
style="--primary: yellow; --secondary: green; --font: #ff6600; --circle: #111111" style="--primary: yellow; --secondary: green; --font: #ff6600; --circle: #111111"
value='{"sections": [ value='{"sections": [
{"name": "Personal", "intro": "Jaöaöd", "fields": [ {"name": "Personal", "intro": "Jaöaöd", "fields": [
{"name": "Vorname", "columns": {"mobile": 2, "tablet": 3, "desktop": 6}, "default": "", "required": true}, {"name": "Vorname", "type": "text", "columns": {"mobile": 2, "tablet": 3, "desktop": 6}, "default": "", "required": true},
{"name": "Nachname", "columns": {"mobile": 2, "tablet": 3, "desktop": 6}, "default": "", "required": true} {"name": "Geschlecht", "type": "select", "columns": {"mobile": 2, "tablet": 3, "desktop": 6}, "default": null, "required": true, "options": ["A","Bb","Cc"]},
{"name": "Nachname", "type": "text", "columns": {"mobile": 2, "tablet": 3, "desktop": 6}, "default": "", "required": true}
]}, ]},
{"name": "Veranstaltung", "intro": "Jaöaöd", "fields": [ {"name": "Veranstaltung", "intro": "Jaöaöd", "fields": [
]}, ]},

View File

@ -107,7 +107,10 @@ const v = computed(() => JSON.parse(props.value));
const {back, next, backable, nextable} = useNav(active, v.value.sections.length); const {back, next, backable, nextable} = useNav(active, v.value.sections.length);
function resolveComponentName(field) { function resolveComponentName(field) {
return FieldText; return {
text: FieldText,
select: FieldSelect,
}[field.type];
} }
function generateDefaultValues() { function generateDefaultValues() {