File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111 >
1212 <component
1313 :is =" component"
14- :key =" transValue "
14+ :key =" field.fieldname "
1515 class =" form-control"
1616 :placeholder =" `Add ${field.label}`"
1717 :value =" transValue"
18- @change ="
19- emitUpdate(field.fieldname, $event.value || $event.target.value)
18+ v-on ="
19+ textFields.includes(field.fieldtype)
20+ ? {
21+ blur: (event) =>
22+ emitUpdate(
23+ field.fieldname,
24+ event.value || event.target.value
25+ ),
26+ }
27+ : {
28+ change: (event) =>
29+ emitUpdate(
30+ field.fieldname,
31+ event.value || event.target.value
32+ ),
33+ }
2034 "
2135 />
2236 </div >
@@ -47,6 +61,8 @@ interface E {
4761const props = defineProps <P >();
4862const emit = defineEmits <E >();
4963
64+ const textFields = [" Long Text" , " Small Text" , " Text" ];
65+
5066const component = computed (() => {
5167 if (props .field .url_method ) {
5268 return h (Autocomplete , {
@@ -75,9 +91,7 @@ const component = computed(() => {
7591 },
7692 ],
7793 });
78- } else if (
79- [" Long Text" , " Small Text" , " Text" ].includes (props .field .fieldtype )
80- ) {
94+ } else if (textFields .includes (props .field .fieldtype )) {
8195 return h (FormControl , {
8296 type: " textarea" ,
8397 });
You can’t perform that action at this time.
0 commit comments