This repository was archived by the owner on Jun 27, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +770
-646
lines changed Expand file tree Collapse file tree 6 files changed +770
-646
lines changed Original file line number Diff line number Diff line change @@ -61,14 +61,14 @@ import {
6161 ColorInput ,
6262 NumberInput ,
6363 CustomInput ,
64+ BindingObject ,
6465} from ' ../../src' ;
6566/* } from '../../dist/as-dynamic-forms.esm'; */
6667export default defineComponent ({
6768 name: ' app' ,
6869 setup() {
6970 const title = ref (' Vue Dynamic Forms' );
7071 const formValues = reactive ({});
71-
7272 const emailValidator: FormValidation = {
7373 validator: email ,
7474 text: ' Email format is incorrect' ,
@@ -96,6 +96,7 @@ export default defineComponent({
9696 ' awesomeness' ,
9797 ' color' ,
9898 ' customField1' ,
99+ ' customStyles' ,
99100 ],
100101 fields: {
101102 name: {
@@ -108,6 +109,16 @@ export default defineComponent({
108109 label: ' Email' ,
109110 type: ' email' ,
110111 validations: [emailValidator ],
112+ /* customClass: 'active text-red', */
113+ customClass: {
114+ active: true ,
115+ ' text-blue' : true ,
116+ },
117+ /* customClass: {
118+ active: true,
119+ 'text-blue': true,
120+ }, */
121+ /* customClass: ['active', 'text-red'], */
111122 } as EmailInput ,
112123 password: {
113124 label: ' Password' ,
@@ -189,6 +200,14 @@ export default defineComponent({
189200 type: ' color' ,
190201 value: ' #4DBA87' ,
191202 } as ColorInput ,
203+ customStyles: {
204+ label: ' Custom Styles' ,
205+ type: ' text' ,
206+ required: true ,
207+ customStyles: {
208+ border: ' 1px solid teal' ,
209+ },
210+ } as TextInput ,
192211 },
193212 });
194213
Original file line number Diff line number Diff line change @@ -11,6 +11,10 @@ const VueDynamicForms = createDynamicForms({
1111 autoValidate : true ,
1212 form : {
1313 customClass : 'plugin-options-class-added' ,
14+ customStyles : {
15+ display : 'flex' ,
16+ flexDirection : 'column' ,
17+ } ,
1418 method : 'POST' ,
1519 netlify : false ,
1620 netlifyHoneypot : null ,
You can’t perform that action at this time.
0 commit comments