From ad7e1146d1cd5a900ea592d7c1f63bf7863f00e4 Mon Sep 17 00:00:00 2001 From: whycq <10027870+whycq@user.noreply.gitee.com> Date: 星期四, 18 八月 2022 13:59:09 +0800 Subject: [PATCH] # --- pages/basics/test.vue | 43 +++++++++++++++++++++++++++++++++++-------- 1 files changed, 35 insertions(+), 8 deletions(-) diff --git a/pages/basics/test.vue b/pages/basics/test.vue index 8944f00..d488476 100644 --- a/pages/basics/test.vue +++ b/pages/basics/test.vue @@ -20,7 +20,7 @@ <view class="square-content"> <view class="content-input"> <input readonly="value" v-model="locNo" type="text" placeholder="鎵爜 / 杈撳叆" - :focus="locNoFocus" > + :focus="locNoFocus" @input="nextInput('userIdFocus')"> <uni-icons type="closeempty" size="20" color="#dadada" @click="remove('locNo')"></uni-icons> </view> </view> @@ -33,7 +33,7 @@ <view class="square-content"> <view class="content-input"> <input v-model="userId" type="text" placeholder="鎵爜 / 杈撳叆" - :focus="userIdFocus"> + :focus="userIdFocus" @input="nextInput('barcodeFocus')"> <uni-icons type="closeempty" size="20" color="#dadada" @click="remove('userId')"></uni-icons> </view> </view> @@ -83,7 +83,7 @@ type: 'center', msgType: 'success', messageText: '杩欐槸涓�鏉℃垚鍔熸彁绀�', - staNoList:[1,2,3,4,5,6], + staNoList:[1,2,3,4,5,6,7,8], staNo:'', locNoFocus:true, userIdFocus:false, @@ -111,18 +111,44 @@ getUrl() { this.commonUrl = this.baseHttp + this.baseIP + ':' +this.basePORT + "/" +this.baseUrl }, + focuss(e) { + this[e] = false; + setTimeout(()=>{ + this[e] = true; + }, 100); + }, locNoFocuss() { - // #ifdef APP let that = this; that.locNoFocus = false; setTimeout(()=>{ - that.remove('locNo') that.locNoFocus = true; }, 100); - // #endif - }, - + userIdFocuss() { + let that = this; + that.userIdFocus = false; + setTimeout(()=>{ + that.userIdFocus = true; + }, 100); + }, + barcodeFocuss() { + let that = this; + that.barcodeFocus = false; + setTimeout(()=>{ + that.barcodeFocus = true; + }, 100); + }, + nextInput(type) { + this.focuss(type) + // switch (obj) { + // case 'locNo': + // this.userIdFocuss(); + // break; + // case 'userId': + // this.barcodeFocuss(); + // break; + // } + }, // 娓呯┖input remove(e) { this[e] = '' @@ -133,6 +159,7 @@ this.locNo = '' this.userId = '' this.barcode = '' + this.locNoFocuss() }, // 纭 confirm() { -- Gitblit v1.9.1