Browse Source

隐藏软件盘

hella_vue3
lijuncheng 7 months ago
parent
commit
068bd7c003
  1. 22
      src/mycomponents/scan/winComScan.vue
  2. 4
      src/pages/putaway/job/putawayDetail.vue

22
src/mycomponents/scan/winComScan.vue

@ -5,7 +5,7 @@
<view class="pop_tab"> <view class="pop_tab">
<view class="tab_info"> <view class="tab_info">
<view class="conbox"> <view class="conbox">
<textarea v-model="scanMsg" trim="all" maxlength="1000" style="margin-left: 5px;width: 90%;" <textarea inputmode="none" v-model="scanMsg" trim="all" maxlength="1000" style="margin-left: 5px;width: 90%;"
:focus="boxfocus" :placeholder="placeholderValue" @focus="getfocus" @blur="losefocus" :focus="boxfocus" :placeholder="placeholderValue" @focus="getfocus" @blur="losefocus"
@input="handelScanMsg" :cursor="cursorIndex" ></textarea> @input="handelScanMsg" :cursor="cursorIndex" ></textarea>
</view> </view>
@ -90,7 +90,7 @@
return { return {
// scanMsg: "HPQ;V1.0;ICE115F11161AG;PP20230427000027;B20230427002;Q100", // scanMsg: "HPQ;V1.0;ICE115F11161AG;PP20230427000027;B20230427002;Q100",
scanMsg: "", scanMsg: "",
boxfocus: true, boxfocus: false,
placeholderValue: '', placeholderValue: '',
scanResult: {}, scanResult: {},
scanList: [], scanList: [],
@ -100,6 +100,8 @@
} }
}, },
mounted() { mounted() {
this.boxfocus =true;
uni.hideKeyboard();
// #ifdef H5 // #ifdef H5
if (document.querySelector('textarea') != null) { if (document.querySelector('textarea') != null) {
@ -107,7 +109,9 @@
} }
// #endif // #endif
// #ifdef APP-PLUS // #ifdef APP-PLUS
this.hide()
// //
// this.hide()
// uni.onKeyboardHeightChange(res => { // uni.onKeyboardHeightChange(res => {
// console.log(res.height) // console.log(res.height)
// if(res.height>0){ // if(res.height>0){
@ -146,11 +150,11 @@
var interval = setInterval(function() { var interval = setInterval(function() {
uni.hideKeyboard(); // uni.hideKeyboard(); //
console.log('刷新') console.log('刷新')
}, 60); }, 5);
setTimeout(() => { setTimeout(() => {
clearInterval(interval); clearInterval(interval);
console.log('停止刷新') console.log('停止刷新')
}, 2000); }, 1000);
}, },
getValue() { getValue() {
return this.scanMsg return this.scanMsg
@ -214,14 +218,12 @@
}, },
getfocus() { getfocus() {
let that = this; let that = this;
that.boxfocus = true;
this.$nextTick(r => { this.$nextTick(r => {
that.boxfocus = true; that.boxfocus = true;
}); });
}, },
losefocus() { losefocus() {
let that = this; let that = this;
that.boxfocus = false;
this.$nextTick(r => { this.$nextTick(r => {
that.boxfocus = false; that.boxfocus = false;
}); });
@ -271,6 +273,14 @@
} }
</script> </script>
<script module="textarea" lang="renderjs">
export default {
mounted() {
document.querySelector('textarea').setAttribute('inputmode', 'none')
},
}
</script>
<style scoped lang="scss"> <style scoped lang="scss">
</style> </style>

4
src/pages/putaway/job/putawayDetail.vue

@ -76,10 +76,9 @@
} from '@/common/detail.js'; } from '@/common/detail.js';
import winScanButton from '@/mycomponents/scan/winScanButton.vue' import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import locationCompare from '@/mycomponents/location/locationCompare.vue'
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue" import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import comDetailCard from "@/mycomponents/detail/comDetailCard.vue" import comDetailCard from "@/mycomponents/detail/comDetailCard.vue"
import locationCompare from '@/pages/putaway/coms/locationCompare.vue' import locationCompare from '@/mycomponents/location/locationCompare.vue'
import jobTop from '@/mycomponents/job/jobTop.vue' import jobTop from '@/mycomponents/job/jobTop.vue'
@ -89,7 +88,6 @@
winScanPackAndLocation, winScanPackAndLocation,
locationCompare, locationCompare,
comDetailCard, comDetailCard,
locationCompare,
jobTop jobTop
}, },
data() { data() {

Loading…
Cancel
Save