|
|
@ -5,7 +5,7 @@ |
|
|
|
<view class="pop_tab"> |
|
|
|
<view class="tab_info"> |
|
|
|
<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" |
|
|
|
@input="handelScanMsg" :cursor="cursorIndex" ></textarea> |
|
|
|
</view> |
|
|
@ -90,7 +90,7 @@ |
|
|
|
return { |
|
|
|
// scanMsg: "HPQ;V1.0;ICE115F11161AG;PP20230427000027;B20230427002;Q100", |
|
|
|
scanMsg: "", |
|
|
|
boxfocus: true, |
|
|
|
boxfocus: false, |
|
|
|
placeholderValue: '', |
|
|
|
scanResult: {}, |
|
|
|
scanList: [], |
|
|
@ -100,14 +100,18 @@ |
|
|
|
} |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
|
|
|
|
this.boxfocus =true; |
|
|
|
uni.hideKeyboard(); |
|
|
|
|
|
|
|
// #ifdef H5 |
|
|
|
if (document.querySelector('textarea') != null) { |
|
|
|
document.querySelector('textarea').setAttribute('inputmode', 'none') |
|
|
|
} |
|
|
|
// #endif |
|
|
|
// #ifdef APP-PLUS |
|
|
|
this.hide() |
|
|
|
// |
|
|
|
// this.hide() |
|
|
|
// uni.onKeyboardHeightChange(res => { |
|
|
|
// console.log(res.height) |
|
|
|
// if(res.height>0){ |
|
|
@ -146,11 +150,11 @@ |
|
|
|
var interval = setInterval(function() { |
|
|
|
uni.hideKeyboard(); //隐藏软键盘 |
|
|
|
console.log('刷新') |
|
|
|
}, 60); |
|
|
|
}, 5); |
|
|
|
setTimeout(() => { |
|
|
|
clearInterval(interval); |
|
|
|
console.log('停止刷新') |
|
|
|
}, 2000); |
|
|
|
}, 1000); |
|
|
|
}, |
|
|
|
getValue() { |
|
|
|
return this.scanMsg |
|
|
@ -214,14 +218,12 @@ |
|
|
|
}, |
|
|
|
getfocus() { |
|
|
|
let that = this; |
|
|
|
that.boxfocus = true; |
|
|
|
this.$nextTick(r => { |
|
|
|
that.boxfocus = true; |
|
|
|
}); |
|
|
|
}, |
|
|
|
losefocus() { |
|
|
|
let that = this; |
|
|
|
that.boxfocus = false; |
|
|
|
this.$nextTick(r => { |
|
|
|
that.boxfocus = false; |
|
|
|
}); |
|
|
@ -271,6 +273,14 @@ |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|
<script module="textarea" lang="renderjs"> |
|
|
|
export default { |
|
|
|
mounted() { |
|
|
|
document.querySelector('textarea').setAttribute('inputmode', 'none') |
|
|
|
}, |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|
<style scoped lang="scss"> |
|
|
|
|
|
|
|
</style> |