#
whycq
2022-08-15 502fd61b98b1d834cc3d10847443a7e432d3b2b3
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" @input="nextInput('locNo')">
                  <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,20 @@
         getUrl() {
            this.commonUrl = this.baseHttp + this.baseIP + ':' +this.basePORT + "/" +this.baseUrl
         },
         locNoFocuss() {
            let that = this;
            that.locNoFocus = false;
            setTimeout(()=>{
               that.remove('locNo')
               that.locNoFocus = true;
            }, 100);
         },
         nextInput(e) {
            switch (e) {
            }
         },
         // 清空input
         remove(e) {
            this[e] = ''
@@ -115,6 +135,7 @@
            this.locNo = ''
            this.userId = ''
            this.barcode = ''
            this.locNoFocuss()
         },
         // 确认
         confirm() {