File tree Expand file tree Collapse file tree 1 file changed +11
-15
lines changed Expand file tree Collapse file tree 1 file changed +11
-15
lines changed Original file line number Diff line number Diff line change @@ -182,25 +182,21 @@ https://google.com/
182182
183183 methods: {
184184 testClick (helpText , event ) {
185- console .log (helpText, event );
185+ // console.log(helpText, event);
186186 },
187187 getIcon (field , getValueFromOption ) {
188188 let fieldType = getValueFromOption (field, " type" );
189189 let fieldOptions = getValueFromOption (field, " fieldOptions" );
190-
191- if (fieldType === " input" ) {
192- switch (fieldOptions .inputType ) {
193- case " email" :
194- return " at" ;
195- case " number" :
196- return " calculator" ;
197- case " date" :
198- return " calendar-alt" ;
199- case " color" :
200- return " palette" ;
201- default :
202- return " file-alt" ;
203- }
190+ let icons = {
191+ email: " at" ,
192+ number: " calculator" ,
193+ date: " calendar-alt" ,
194+ color: " palette"
195+ };
196+ if (fieldType === " input" && typeof icons[fieldOptions .inputType ] !== undefined ) {
197+ return icons[fieldOptions .inputType ];
198+ } else {
199+ return " file-alt" ;
204200 }
205201 }
206202 },
You can’t perform that action at this time.
0 commit comments