ZaiZai 1 năm trước cách đây
mục cha
commit
76096dfcd1

+ 9 - 2
src/components/table-form/modules/components.vue

@@ -46,6 +46,11 @@ const objsData = ref('')
 
 //渲染完成
 onMounted(()=> {
+    if (props.multiple) {
+        typeName.value = 'multiple_select'
+    } else {
+        typeName.value = props.type
+    }
     if (!isNullES(props.objs)) {
         objsData.value = JSON.stringify(props.objs)
     }
@@ -54,9 +59,11 @@ onMounted(()=> {
 
 //匹配组件类型
 const name = ref('')
+const typeName = ref('')
 const typeObj = {
     text: '输入框',
     select: '下拉框',
+    multiple_select: '多选下拉框',
     select_option: '下拉框选项',
     textarea: '多行输入框',
     checkbox_group: '多选框组',
@@ -74,8 +81,8 @@ const typeObj = {
     echart: '图表组件',
 }
 const matchingType = () => {
-    if (isNullES(props.type)) return
-    name.value = typeObj[props.type]
+    if (isNullES(typeName.value)) return
+    name.value = typeObj[typeName.value]
 }
 
 //判断插槽是否有内容

+ 14 - 14
src/views/project/list/set-input.vue

@@ -166,21 +166,21 @@ const dialogSubmit = async () => {
 const typeObj = {
     text: 'input',
     select: 'select',
-    select_option: '下拉框选项',
+    multiple_select: 'selectBox',
     textarea: 'textarea',
-    checkbox_group: '多选框组',
-    form_checkbox: '多选框组合',
-    checkbox: '多选框',
-    radio_group: '单选框组',
-    radio: '单选框',
-    date: '日期框',
-    time: '时间框',
-    datetime: '日期时间框',
-    datetimerange: '日期时间范围框',
-    dap_site_data: '远程搜索框',
-    strength_search: '设计强度搜索框',
-    upload: '图片展示以及上传框',
-    echart: '图表组件',
+    checkbox_group: 'checkbox',
+    form_checkbox: 'checkbox',
+    checkbox: 'checkbox',
+    radio_group: 'radio',
+    radio: 'radio',
+    date: 'date',
+    time: 'date',
+    datetime: 'date',
+    datetimerange: 'daterange',
+    dap_site_data: 'searchSelect',
+    strength_search: 'strengthSearch',
+    upload: 'img',
+    echart: 'echart',
 }
 const setDomData = (item) => {
     //formModel.value.name = key