| | |
| | | type="scan" |
| | | size="16" |
| | | color="#a6a6a6" |
| | | @click="scanCode" |
| | | > |
| | | </uni-icons> |
| | | <input class="p-input" |
| | |
| | | return |
| | | } |
| | | if (val.length != this.lenCheck) { |
| | | console.log(val); |
| | | setTimeout(()=>{ |
| | | this.data = '' |
| | | this.$emit('input','') |
| | |
| | | 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.data = res.result |
| | | _this.$emit('inputVal',{title:_this.name,value:_this.data}) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |