Browse Source

去除空格输入

yangc 8 years ago
parent
commit
ec769698d0
1 changed files with 2 additions and 0 deletions
  1. 2 0
      components/applyPurchase/PublishApply.vue

+ 2 - 0
components/applyPurchase/PublishApply.vue

@@ -354,6 +354,7 @@
         }
       },
       onCodeChange: function () {
+        this.applyObj.code = this.applyObj.code.trim()
         if ((/[^\x00-\xff]/g).test(this.applyObj.code)) {
           let chineseIndex = -1
           for (let i = 0; i < this.applyObj.code.length; i++) {
@@ -370,6 +371,7 @@
         }
       },
       onBrandChange: function () {
+        this.applyObj.brand = this.applyObj.brand.trim()
         if ((/[^\x00-\xff]/g).test(this.applyObj.brand)) {
           let chineseIndex = -1
           for (let i = 0; i < this.applyObj.brand.length; i++) {