扫码枪多次扫码用空格分开
// 监听输入框值,清空累加值
changeThing (val) {
let _this = this
if (!(val)) {
_this.oldValue = ''
_this.inputValue = ''
}
},
// 此处为输入框enter事件
doSearchs ($event) {
let _this = this
let oldValue = _this.oldValue
_this.oldValue = $event.target.value
if (!(oldValue)) {
_this.inputValue = _this.oldValue
} else {
// 清空字符串中的空格,方便相加
_this.inputValue += ' ' + _this.oldValue.replace(/\s*/g, '').substr(oldValue.replace(/\s*/g, '').length)
}
this.searchForm.waybillNo = _this.inputValue
},