This repository was archived by the owner on Jun 27, 2023. It is now read-only.
File tree 5 files changed +18
-1
lines changed
5 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ import {
58
58
InputBase ,
59
59
email ,
60
60
pattern ,
61
+ ColorInput ,
61
62
} from ' ../../src' ;
62
63
63
64
export default defineComponent ({
@@ -142,6 +143,11 @@ export default defineComponent({
142
143
label: ' Custom Field' ,
143
144
name: ' customField1' ,
144
145
}),
146
+ new ColorInput ({
147
+ label: ' Color' ,
148
+ name: ' color' ,
149
+ value: ' #4DBA87' ,
150
+ }),
145
151
],
146
152
});
147
153
function handleSubmit(values ) {
Original file line number Diff line number Diff line change @@ -4,7 +4,8 @@ import App from './App.vue';
4
4
import './styles/main.scss' ;
5
5
6
6
import { createDynamicForms } from '../../src' ;
7
- //import { createDynamicForms } from '../../dist/as-dynamic-forms.esm';
7
+
8
+ // import { createDynamicForms } from '../../dist/as-dynamic-forms.esm';
8
9
9
10
const VueDynamicForms = createDynamicForms ( {
10
11
autoValidate : true ,
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ import {
37
37
email ,
38
38
pattern ,
39
39
TextAreaInput ,
40
+ ColorInput ,
40
41
} from ' ../../src' ;
41
42
42
43
export default defineComponent ({
@@ -89,6 +90,10 @@ export default defineComponent({
89
90
cols: 20 ,
90
91
rows: 5 ,
91
92
}),
93
+ new ColorInput ({
94
+ label: ' Color' ,
95
+ value: ' #4DBA87' ,
96
+ }),
92
97
],
93
98
});
94
99
function handleSubmit(values ) {
Original file line number Diff line number Diff line change @@ -135,6 +135,7 @@ export default defineComponent({
135
135
case ' email' :
136
136
case ' password' :
137
137
case ' url' :
138
+ case ' color' :
138
139
component = h (TextInput , attributes .value );
139
140
break ;
140
141
case ' select' :
Original file line number Diff line number Diff line change @@ -91,6 +91,10 @@ export class RadioInput extends InputBase<boolean> {
91
91
type = 'radio' ;
92
92
}
93
93
94
+ export class ColorInput extends InputBase < string > {
95
+ type = 'color' ;
96
+ }
97
+
94
98
export class FormControl < T > extends InputBase < T > {
95
99
valid = true ;
96
100
invalid = false ;
You can’t perform that action at this time.
0 commit comments