From 5050b42e880beb308e51ec40d4f9bc8f643e264d Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期一, 15 八月 2022 08:17:21 +0800
Subject: [PATCH] #

---
 pages/basics/test.vue |   26 ++++++++++++++++++++++----
 1 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/pages/basics/test.vue b/pages/basics/test.vue
index 75c4653..8944f00 100644
--- a/pages/basics/test.vue
+++ b/pages/basics/test.vue
@@ -19,7 +19,8 @@
 				</view>
 				<view class="square-content">
 					<view class="content-input">
-						<input readonly="value" v-model="locNo" type="text" placeholder="鎵爜 / 杈撳叆" >
+						<input readonly="value" v-model="locNo" type="text" placeholder="鎵爜 / 杈撳叆" 
+						:focus="locNoFocus" >
 						<uni-icons type="closeempty" size="20" color="#dadada" @click="remove('locNo')"></uni-icons>
 					</view>
 				</view>
@@ -31,7 +32,8 @@
 				</view>
 				<view class="square-content">
 					<view class="content-input">
-						<input v-model="userId" type="text" placeholder="鎵爜 / 杈撳叆">
+						<input v-model="userId" type="text" placeholder="鎵爜 / 杈撳叆"
+						:focus="userIdFocus">
 						<uni-icons type="closeempty" size="20" color="#dadada" @click="remove('userId')"></uni-icons>
 					</view>
 				</view>
@@ -43,7 +45,8 @@
 				</view>
 				<view class="square-content">
 					<view class="content-input">
-						<input v-model="barcode" type="text" placeholder="鎵爜 / 杈撳叆">
+						<input v-model="barcode" type="text" placeholder="鎵爜 / 杈撳叆"
+						:focus="barcodeFocus">
 						<uni-icons type="closeempty" size="20" color="#dadada" @click="remove('barcode')"></uni-icons>
 					</view>
 				</view>
@@ -81,7 +84,10 @@
 				msgType: 'success',
 				messageText: '杩欐槸涓�鏉℃垚鍔熸彁绀�',
 				staNoList:[1,2,3,4,5,6],
-				staNo:''
+				staNo:'',
+				locNoFocus:true,
+				userIdFocus:false,
+				barcodeFocus:false
 			}
 		},
 		mounted(){
@@ -105,6 +111,18 @@
 			getUrl() {
 				this.commonUrl = this.baseHttp + this.baseIP + ':' +this.basePORT + "/" +this.baseUrl
 			},
+			locNoFocuss() {
+				// #ifdef APP
+				let that = this;
+				that.locNoFocus = false;
+				setTimeout(()=>{
+					that.remove('locNo')
+					that.locNoFocus = true;
+				}, 100);
+				// #endif
+				
+			},
+			
 			// 娓呯┖input
 			remove(e) {
 				this[e] = ''

--
Gitblit v1.9.1