木箱扫码

This commit is contained in:
2023-08-17 16:33:52 +08:00
parent 8b5d490595
commit b2dba7b4b0
5 changed files with 36 additions and 9 deletions

View File

@@ -9,7 +9,7 @@
</view>
<view class="filter_input_wraper">
<search-box-mx :focused="focused" @inputDel="inputDel" @inputScan="inputScan" @toPhone="toPhone">
<input type="text" v-model="val1" class="filter_input search_input" :focus="focused" @input="onKeyInput($event)" @blur="onBlur" @focus="focused = true">
<input type="text" onkeyup="value=value.replace(/[^\w\.\/]/ig,'')" v-model="val1" class="filter_input search_input" :focus="focused" @input="onKeyInput($event)" @blur="onBlur" @focus="onFocus">
</search-box-mx>
</view>
</view>
@@ -146,7 +146,7 @@
}
},
onKeyInput ($event) {
if ($event.target.value.length < 5) {
if ($event.target.value.length !== 14) {
this.$nextTick(function(){
this.val1 = ''
uni.hideKeyboard()
@@ -155,6 +155,12 @@
}
this._boxQuery(this.val1)
},
onFocus () {
this.focused = true
setTimeout(() => {
uni.hideKeyboard()
}, 300)
},
onBlur () {
this.focused = false
},