Просмотр исходного кода

修复无vModel组件在复制时报错问题

wu 3 месяцев назад
Родитель
Сommit
ab807b0a07
2 измененных файлов с 6 добавлено и 5 удалено
  1. 4 3
      src/components/Generator/index/Home.vue
  2. 2 2
      src/utils/request.js

+ 4 - 3
src/components/Generator/index/Home.vue

@@ -248,7 +248,7 @@ export default {
     }
   },
   created() {
-    
+
     if (this.relationList && this.relationList.length) {
       this.relationData = deepClone(this.relationList)
     }
@@ -613,11 +613,11 @@ export default {
       if (config.layout === 'colFormItem') {
         if (!this.$store.getters.hasTable) {
           // 分割线和按钮不加vModel
-          if (noVModelList.indexOf(config.jnpfKey) > -1) return
+          if (noVModelList.indexOf(config.jnpfKey) > -1) return item;
           item.__vModel__ = ''
           item.__vModelName__ = `COL_${this.idGlobal}`
         } else {
-          if (noVModelList.indexOf(config.jnpfKey) > -1) return
+          if (noVModelList.indexOf(config.jnpfKey) > -1) return item;
           item.__vModel__ = ''
           item.__vModelName__ = ''
         }
@@ -634,6 +634,7 @@ export default {
       if (Array.isArray(config.children)) {
         config.children = config.children.map((childItem) => this.createIdAndKey(childItem))
       }
+      console.log(item)
       return item
     },
     AssembleFormData() {

Разница между файлами не показана из-за своего большого размера
+ 2 - 2
src/utils/request.js