|
@ -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,14 +100,18 @@ |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
mounted() { |
|
|
mounted() { |
|
|
|
|
|
this.boxfocus =true; |
|
|
|
|
|
uni.hideKeyboard(); |
|
|
|
|
|
|
|
|
// #ifdef H5 |
|
|
// #ifdef H5 |
|
|
if (document.querySelector('textarea') != null) { |
|
|
if (document.querySelector('textarea') != null) { |
|
|
document.querySelector('textarea').setAttribute('inputmode', 'none') |
|
|
document.querySelector('textarea').setAttribute('inputmode', 'none') |
|
|
} |
|
|
} |
|
|
// #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> |