Преглед изворни кода

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

wu пре 3 месеци
родитељ
комит
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