浏览代码

fix:K-form-design源码修改部分

lph 1 年之前
父节点
当前提交
0b02a87957

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

@@ -146,6 +146,8 @@
             v-model="options.dynamicKey"
             placeholder="动态数据变量名"
           />
+          <OptionsEdit v-show="options.dynamic" @setDynamicKey="setDynamicKey" :options="options" :selectItem="selectItem"></OptionsEdit>
+          
 
           <KChangeOption v-show="!options.dynamic" v-model="options.options" />
         </a-form-item>
@@ -570,7 +572,8 @@ import KChangeOption from "../../KChangeOption/index.vue";
 import kCheckbox from "../../KCheckbox/index.vue";
 import { pluginManager } from "../../../utils/index";
 import { getListName, getFormName } from "@/api/dragform/form";
-import {getUncommonTable} from '@/utils/other'
+import { getUncommonTable } from '@/utils/other';
+import OptionsEdit from '@/components/kFormDesign/OptionsEdit.vue'
 const Input = pluginManager.getComponent("input").component;
 const InputNumber = pluginManager.getComponent("number").component;
 const Rate = pluginManager.getComponent("rate").component;
@@ -598,7 +601,8 @@ export default {
     RadioItem,
     RadioButton,
     Textarea,
-    Select
+    Select,
+    OptionsEdit
   },
   data() {
     return {
@@ -703,6 +707,11 @@ export default {
     }
   },
   methods: {
+    setDynamicKey(key,sqlData) {
+      this.options.dynamicKey = key;
+      this.options.sqlData=sqlData
+      console.log(this.options.dynamicKey,key,111);
+    },
     /**
      * 判断是否已定义
      * @param {*} value

+ 1 - 0
ruoyi-ui/src/components/updateModule/k-form-design/packages/components/KFormItem/index.vue

@@ -219,6 +219,7 @@ export default {
       if (e && e.target) {
         value = e.target.value;
       }
+      console.log(this.record);
       // 传递change事件
       this.$emit("change", value, this.record.model);
     },