Browse Source

数字输入框bug

luolei 5 years ago
parent
commit
1de604ed9b
3 changed files with 0 additions and 6 deletions
  1. 0 2
      src/common/Input.vue
  2. 0 2
      src/common/MultiLineInput.vue
  3. 0 2
      src/common/OptionInp.vue

+ 0 - 2
src/common/Input.vue

@@ -48,9 +48,7 @@
       changeVal(e){
         this.borColor = true;
         if(this.item.controlType==7){//数字键盘
-          if(+e.target.value.length>10){
             this.val = e.target.value=e.target.value.replace(/^\.$/,'').slice(0,10)
-          }
         }
         // document.activeElement.scrollIntoViewIfNeeded(true);
         this.borColor = false;

+ 0 - 2
src/common/MultiLineInput.vue

@@ -76,9 +76,7 @@ export default {
       let tmpTxt = '',arr=this.tmpArr
       // document.activeElement.scrollIntoViewIfNeeded(true);
       if(type == 'number'){
-        if(+e.currentTarget.value.length>10){
           e.currentTarget.value = e.currentTarget.value.replace(/^\.$/,'').slice(0,10)
-        }
       }
       arr[num]=e.currentTarget.value
       tmpTxt=arr.join('/')

+ 0 - 2
src/common/OptionInp.vue

@@ -40,9 +40,7 @@ import $ from 'jquery';
     methods:{
       changeVal(e){
         if(this.msg.type=='number'){//数字键盘
-          if(+e.target.value.length>10){
             this.txt = e.target.value=e.target.value.replace(/^\.$/,'').slice(0,10)
-          }
         }
         const newData = Object.assign({},this.part,{value:this.txt});
         this.$emit("updata",newData);