Parcourir la source

优化单行输入组件API接入

yangfan il y a 2 mois
Parent
commit
e642d76a21

+ 2 - 1
src/components/Generator/components/NewInput/index.vue

@@ -36,7 +36,8 @@ export default {
   mounted() {},
   methods: {
     getChange(val) {
-      if (this.$attrs.isScan) {
+      console.log(this.$attrs)
+      if (this.$attrs.propsUrl) {
         this.$emit('change', val)
       }
     }

+ 3 - 1
src/components/Generator/index/RightComponents/ComInput.vue

@@ -153,7 +153,7 @@
     <el-form-item label="开启扫码">
       <el-switch v-model="activeData.isScan" />
     </el-form-item>
-    <template v-if="activeData.isScan">
+    <template>
       <el-form-item label="" label-width="40px">
         <el-radio-group v-model="activeData.__config__.dataType" size="small" style="text-align: center" @change="dataTypeChange">
           <!--          <el-radio-button label="static">静态数据</el-radio-button>-->
@@ -438,6 +438,8 @@ export default {
         this.getAllVarList()
         this.getAllapiVarList()
         this.varTypeList = [
+          { value: 1, label: '默认值' },
+          { value: 2, label: '系统全局变量', children: this.sysVarList || [] },
           { value: 3, label: '表单全局变量', children: this.allVarList || [] },
           { value: 4, label: 'api全局变量', children: this.apiVarList || [] }
         ]