获取焦点优化

This commit is contained in:
2024-05-13 17:09:27 +08:00
parent b0b6916585
commit d2736c625d
8 changed files with 33 additions and 11 deletions

View File

@@ -18,8 +18,8 @@
</view>
<view class="filter_input_wraper">
<search-box
ref="scanChild"
v-model="val2"
:focused="true"
@handleChange="handleChange"
/>
</view>
@@ -112,6 +112,9 @@
created () {
this._queryRawFoilList()
},
mounted () {
this.$refs.scanChild.handleFocus()
},
methods: {
searchList () {
this.pkId = ''

View File

@@ -8,7 +8,7 @@
<span class="filter_label">木箱</span>
</view>
<view class="filter_input_wraper">
<search-box v-model="val1" :focused="true" @handleChange="handleChange1"
<search-box ref="scanChild" v-model="val1" @handleChange="handleChange1"
/>
</view>
</view>
@@ -44,6 +44,9 @@
disabled1: false
};
},
mounted () {
this.$refs.scanChild.handleFocus()
},
methods: {
handleChange1 (e) {
},

View File

@@ -20,8 +20,8 @@
</view>
<view class="filter_input_wraper">
<search-box
ref="scanChild"
v-model="val2"
:focused="true"
@handleChange="handleChange"
/>
</view>
@@ -126,6 +126,9 @@
created () {
// this._queryRawFoilList()
},
mounted () {
this.$refs.scanChild.handleFocus()
},
methods: {
searchList () {
this.pkId = ''

View File

@@ -9,8 +9,8 @@
</view>
<view class="filter_input_wraper">
<search-box
ref="scanChild"
v-model="val1"
:focused="true"
@handleChange="handleChange"
/>
</view>
@@ -77,6 +77,9 @@
disabled2: false
};
},
mounted () {
this.$refs.scanChild.handleFocus()
},
methods: {
handleChange (e) {
this._customerInfo(e)

View File

@@ -8,7 +8,7 @@
<span class="filter_label">木箱</span>
</view>
<view class="filter_input_wraper">
<search-box v-model="val1" :focused="true" @handleChange="handleChange1"
<search-box ref="scanChild" v-model="val1" @handleChange="handleChange1"
/>
</view>
</view>
@@ -44,6 +44,9 @@
disabled1: false
};
},
mounted () {
this.$refs.scanChild.handleFocus()
},
methods: {
handleChange1 (e) {
},

View File

@@ -8,7 +8,7 @@
<span class="filter_label">木箱</span>
</view>
<view class="filter_input_wraper">
<search-box v-model="val1" :focused="true" @handleChange="handleChange1"
<search-box ref="scanChild" v-model="val1" @handleChange="handleChange1"
/>
</view>
</view>
@@ -95,6 +95,9 @@
created () {
this._stivtQuery(this.val1, this.val2)
},
mounted () {
this.$refs.scanChild.handleFocus()
},
methods: {
handleChange1 (e) {
this._stivtQuery(e, this.val2)

View File

@@ -8,7 +8,7 @@
<span class="filter_label">木箱</span>
</view>
<view class="filter_input_wraper">
<search-box v-model="val1" :focused="true" @handleChange="handleChange1"
<search-box ref="scanChild" v-model="val1" @handleChange="handleChange1"
/>
</view>
</view>
@@ -84,6 +84,9 @@
this._virtualbillQuery(this.val1, this.val2)
this._virtualbillType()
},
mounted () {
this.$refs.scanChild.handleFocus()
},
methods: {
handleChange1 (e) {
this._virtualbillQuery(e, this.val2)

View File

@@ -9,7 +9,7 @@
</view>
<view class="filter_input_wraper">
<!-- <search-box v-model="val1" :focused="true" @handleChange="handleChange1" -->
<search-box v-model="val1" :focused="focusedStatus" @handleChange="handleChange1"
<search-box ref="scanChild" v-model="val1" @handleChange="handleChange1"
/>
</view>
</view>
@@ -77,7 +77,6 @@
},
data() {
return {
focusedStatus: true,
val1: '',
val2: '',
billCode: '',
@@ -90,6 +89,9 @@
this.billCode = option.billcode
this._virtualivtQuery()
},
mounted () {
this.$refs.scanChild.handleFocus()
},
methods: {
handleChange1 (e) {
this._virtualivtQuery()
@@ -109,7 +111,6 @@
this.net_weight_num = res.net_weight_num
},
async _virtualoutConfirm () {
this.focusedStatus = false
if (!this.dataList.length) {
return
}
@@ -124,7 +125,7 @@
title: res.message,
icon: 'none'
})
this.focusedStatus = true
this.$refs.scanChild.handleFocus()
} catch (e) {
this.disabled1 = false
}