11<template >
22 <el-dialog
3- :title ="
4- isEdit
5- ? $t('common.param.editParam')
6- : $t('common.param.addParam')
7- "
3+ :title =" isEdit ? $t('common.param.editParam') : $t('common.param.addParam')"
84 v-model =" dialogVisible"
95 :close-on-click-modal =" false"
106 :close-on-press-escape =" false"
@@ -59,13 +55,13 @@ const currentRow = computed(() => {
5955 input_type: ' TextInput' ,
6056 label: row .label || row .name ,
6157 default_value: row .default_value ,
62- required: row .required != undefined ? row .required : row .is_required
58+ required: row .required != undefined ? row .required : row .is_required ,
6359 }
6460 case ' select' :
6561 if (
6662 check_field (
6763 [' field' , ' input_type' , ' label' , ' required' , ' option_list' ],
68- currentItem .value
64+ currentItem .value ,
6965 )
7066 ) {
7167 return currentItem .value
@@ -81,7 +77,7 @@ const currentRow = computed(() => {
8177 ? row .option_list
8278 : row .optionList .map ((o : any ) => {
8379 return { key: o , value: o }
84- })
80+ }),
8581 }
8682
8783 case ' date' :
@@ -94,9 +90,9 @@ const currentRow = computed(() => {
9490 ' required' ,
9591 ' attrs.format' ,
9692 ' attrs.value-format' ,
97- ' attrs.type'
93+ ' attrs.type' ,
9894 ],
99- currentItem .value
95+ currentItem .value ,
10096 )
10197 ) {
10298 return currentItem .value
@@ -110,14 +106,19 @@ const currentRow = computed(() => {
110106 attrs: {
111107 format: ' YYYY-MM-DD HH:mm:ss' ,
112108 ' value-format' : ' YYYY-MM-DD HH:mm:ss' ,
113- type: ' datetime'
114- }
109+ type: ' datetime' ,
110+ },
115111 }
116112 default :
117113 return currentItem .value
118114 }
119115 } else {
120- return { input_type: ' TextInput' , required: false , attrs: { maxlength: 200 , minlength: 0 }, show_default_value: true }
116+ return {
117+ input_type: ' TextInput' ,
118+ required: false ,
119+ attrs: { maxlength: 200 , minlength: 0 },
120+ show_default_value: true ,
121+ }
121122 }
122123})
123124const currentIndex = ref (null )
@@ -129,6 +130,9 @@ const inputTypeList = ref([
129130 { label: t (' dynamicsForm.input_type_list.RadioCard' ), value: ' RadioCardConstructor' },
130131 { label: t (' dynamicsForm.input_type_list.DatePicker' ), value: ' DatePickerConstructor' },
131132 { label: t (' dynamicsForm.input_type_list.SwitchInput' ), value: ' SwitchInputConstructor' },
133+ { label: t (' dynamicsForm.input_type_list.RadioRow' ), value: ' RadioRowConstructor' },
134+ { label: t (' dynamicsForm.input_type_list.TextareaInput' ), value: ' TextareaInputConstructor' },
135+ { label: t (' dynamicsForm.input_type_list.MultiRow' ), value: ' MultiRowConstructor' },
132136])
133137
134138const dialogVisible = ref <boolean >(false )
0 commit comments