Browse Source

k-form-design 修改

Zn 1 year ago
parent
commit
21f19e51a8

+ 2 - 2
ruoyi-ui/src/components/updateModule/k-form-design/packages/components/KFormDesign/index.vue

@@ -274,7 +274,7 @@ export default {
   },
   methods: {
     generateKey(list, index) {
-      console.log('generateKey');
+      // console.log('generateKey');
       // 生成key值
       const key = list[index].type + "_" + new Date().getTime();
       this.$set(list, index, {
@@ -491,7 +491,7 @@ export default {
 
     handleSave() {
       // 保存函数
-      console.log(this.data)
+      // console.log(this.data)
       this.$emit("save", JSON.stringify(this.data));
     },
     getValue() {

+ 7 - 4
ruoyi-ui/src/components/updateModule/k-form-design/packages/components/KFormDesign/module/formItemProperties.vue

@@ -50,9 +50,6 @@
           </el-select>
         </a-form-item>
        
-        
-
-
         <!-- input type start -->
         <a-form-item v-if="selectItem.type === 'input'" label="输入框type">
           <Input v-model="options.type" placeholder="请输入" />
@@ -685,8 +682,12 @@ export default {
   },
   computed: {
     options() {
+      if(!this.selectItem.tableName){
+        this.formList.listName = [];
+      }
       return this.selectItem.options || {};
-    }
+    },
+
   },
   props: {
     selectItem: {
@@ -720,6 +721,7 @@ export default {
         ... this.$store.state.user.dataSource,
         'tableName':this.selectItem.tableName
       }
+      
       getListName(par2).then(res=>{
         this.formList.listName = res.map(item => {
           return {
@@ -733,5 +735,6 @@ export default {
   mounted() {
     this.getFormList();
   },
+  
 };
 </script>