| | |
| | | <uni-icons class="p-icon" |
| | | type="scan" |
| | | size="16" |
| | | color="#b9b9b9" |
| | | v-show="data.length" |
| | | @click="clear"> |
| | | color="#a6a6a6" |
| | | @click="scanCode" |
| | | > |
| | | </uni-icons> |
| | | <input class="p-input" |
| | | type="text" |
| | |
| | | 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}) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | |
| | | align-items: center; |
| | | min-height: 50px; |
| | | background-color: #fff; |
| | | margin-right: 8px; |
| | | } |
| | | .put { |
| | | display: flex; |
| | |
| | | align-items: center; |
| | | justify-content: center; |
| | | border-radius: 5px; |
| | | margin-right: 32rpx; |
| | | color: #606266; |
| | | } |
| | | .p-input { |
| | |
| | | margin-right: 4px; |
| | | } |
| | | .inner3 { |
| | | width: 100px; |
| | | width: 90px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |