Browse Source

输入框禁止输入空格

lxf 2 years ago
parent
commit
7440c372d2
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/components/byForm/index.vue

+ 1 - 1
src/components/byForm/index.vue

@@ -28,7 +28,7 @@
       >
       >
         <el-input
         <el-input
           v-if="i.type == 'input'"
           v-if="i.type == 'input'"
-          v-model="formData[i.prop]"
+          v-model.trim="formData[i.prop]"
           :placeholder="i.placeholder || '请输入'"
           :placeholder="i.placeholder || '请输入'"
           @input="(e) => commonsEmit(e, i)"
           @input="(e) => commonsEmit(e, i)"
           :type="i.itemType ? i.itemType : 'text'"
           :type="i.itemType ? i.itemType : 'text'"