diff --git a/.gitignore b/.gitignore index 4b58f23..532150a 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,4 @@ pnpm-debug.log* /demoDist.zip /demo/ /demo.zip +/test-results.xml diff --git a/src/App.vue b/src/App.vue index 09b8a0d..cb5d422 100644 --- a/src/App.vue +++ b/src/App.vue @@ -25,12 +25,12 @@ export default { }); }, isWizardSelected() { - return this.form === forms["Showcase"]; + return this.form === forms["Wizard"]; } }, data() { return { - form: forms["5 Sicherheitsregeln"] + form: forms["Showcase"] } }, created() { diff --git a/src/components/FormFields/FormField.vue b/src/components/FormFields/FormField.vue index 7c5e9c2..5c0238c 100644 --- a/src/components/FormFields/FormField.vue +++ b/src/components/FormFields/FormField.vue @@ -11,7 +11,8 @@ + :autocomplete="(ui.options ||{}).autocomplete || 'on'" + :style="cssStyle"/> @@ -99,6 +100,13 @@ export default { default: return defaultField; } + }, + cssStyle() { + if (this.ui.options?.textAlign) { + return 'text-align: ' + this.ui.options?.textAlign; + } else { + return ''; + } } }, } diff --git a/src/exampleSchemas/showcase/ui.json b/src/exampleSchemas/showcase/ui.json index 3f0079d..25c794f 100644 --- a/src/exampleSchemas/showcase/ui.json +++ b/src/exampleSchemas/showcase/ui.json @@ -100,7 +100,10 @@ }, { "type": "Control", - "scope": "#/properties/recurrence_interval" + "scope": "#/properties/recurrence_interval", + "options": { + "textAlign": "right" + } } ] }, diff --git a/src/schemas/ui/control.schema.json b/src/schemas/ui/control.schema.json index 1f0e1d3..7133264 100644 --- a/src/schemas/ui/control.schema.json +++ b/src/schemas/ui/control.schema.json @@ -144,6 +144,11 @@ "autocomplete": { "type": "string", "description": "Specifies what should be autocompleted by the browser. Possible values are listed here: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#values" + }, + "textAlign": { + "type": "string", + "enum": ["left", "right", "center", "start", "end"], + "description": "Set the text-align of input fields" } } },