| | |
| | | return |
| | | } |
| | | if (val.length != this.lenCheck) { |
| | | console.log(val); |
| | | setTimeout(()=>{ |
| | | this.data = '' |
| | | this.$emit('input','') |
| | | },0) |
| | | },10) |
| | | } else { |
| | | this.$emit('input',val) |
| | | } |
| | |
| | | this.$emit('clickBtn'); |
| | | }, |
| | | inputVal() { |
| | | this.$emit('inputVal',[this.data,this.name]); |
| | | this.$emit('inputVal',{title:this.name,value:this.data}); |
| | | }, |
| | | scanCode() { |
| | | let _this = this |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success(res) { |
| | | _this.$parent.scanCode(res.result) |
| | | _this.data = res.result |
| | | console.log('扫到了'); |
| | | console.log(res); |
| | | _this.$emit('inputVal',{title:_this.name,value:_this.data}) |
| | | } |
| | | }) |
| | | } |