|
@ -5,13 +5,9 @@ |
|
|
<view class="pop_tab"> |
|
|
<view class="pop_tab"> |
|
|
<view class="tab_info"> |
|
|
<view class="tab_info"> |
|
|
<view class="conbox"> |
|
|
<view class="conbox"> |
|
|
<textarea |
|
|
<textarea v-model="scanMsg" trim="all" maxlength="1000" style="margin-left: 5px;width: 90%;" |
|
|
v-model="scanMsg" trim="all" maxlength="1000" style="margin-left: 5px;width: 90%;" |
|
|
:placeholder="placeholderValue" :focus="boxfocus" @blur="handleBlur" @focus="handleFocus" |
|
|
:placeholder="placeholderValue" |
|
|
@input="handelScanMsg" ></textarea> |
|
|
:focus="boxfocus" |
|
|
|
|
|
@blur="handleBlur" |
|
|
|
|
|
@focus="handleFocus" |
|
|
|
|
|
@input="handelScanMsg" :cursor="cursorIndex" ></textarea> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<view class="uni-flex uni-row space-between u-col-center"> |
|
|
<view class="uni-flex uni-row space-between u-col-center"> |
|
@ -37,8 +33,7 @@ |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<u-line class='line_color' style='padding-top: 10rpx;padding-bottom: 20rpx;'></u-line> |
|
|
<u-line class='line_color' style='padding-top: 10rpx;padding-bottom: 20rpx;'></u-line> |
|
|
<scroll-view scroll-y="true" class="scroll-view" v-if="expand" |
|
|
<scroll-view scroll-y="true" class="scroll-view" v-if="expand" style="height: 70px;"> |
|
|
style="height: 70px;"> |
|
|
|
|
|
<view class="uni-flex u-col" v-for="(item,index) in scanList"> |
|
|
<view class="uni-flex u-col" v-for="(item,index) in scanList"> |
|
|
<view style="width: 100%;max-height: 100px;"> |
|
|
<view style="width: 100%;max-height: 100px;"> |
|
|
<view class="uni-flex u-row space-between u-col-center" @click="showItem(item)"> |
|
|
<view class="uni-flex u-row space-between u-col-center" @click="showItem(item)"> |
|
@ -139,7 +134,7 @@ |
|
|
}, |
|
|
}, |
|
|
clearScanValue() { |
|
|
clearScanValue() { |
|
|
this.scanMsg = '' |
|
|
this.scanMsg = '' |
|
|
this.cursorIndex =0 |
|
|
// this.cursorIndex = 0 |
|
|
this.getfocus(); |
|
|
this.getfocus(); |
|
|
}, |
|
|
}, |
|
|
clickScanMsg() { |
|
|
clickScanMsg() { |
|
@ -153,8 +148,10 @@ |
|
|
// mask: true |
|
|
// mask: true |
|
|
// }) |
|
|
// }) |
|
|
let that = this; |
|
|
let that = this; |
|
|
let index = that.scanMsg.indexOf('\n'); |
|
|
// if(index==-1){ |
|
|
if (index >= 0) { |
|
|
// that.scanMsg =that.scanMsg + "\n"; |
|
|
|
|
|
// } |
|
|
|
|
|
if (that.scanMsg.includes('\n')) { |
|
|
// that.scanMsg = 'HPQ;V1.0;ICE115F11161AG;PP20230427000027;B20230427002;Q50'; |
|
|
// that.scanMsg = 'HPQ;V1.0;ICE115F11161AG;PP20230427000027;B20230427002;Q50'; |
|
|
setTimeout(() => { |
|
|
setTimeout(() => { |
|
|
that.losefocus(); |
|
|
that.losefocus(); |
|
@ -191,12 +188,11 @@ |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
}, 500); |
|
|
}, 200); |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
handleFocus(){ |
|
|
handleFocus() {}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
handleBlur() { |
|
|
handleBlur() { |
|
|
// setTimeout(res=>{ |
|
|
// setTimeout(res=>{ |
|
@ -216,14 +212,13 @@ |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
clear() { |
|
|
clear() { |
|
|
if(this.clearResult) |
|
|
if (this.clearResult) { |
|
|
{ |
|
|
this.scanMsg = "" |
|
|
this.cursorIndex = 0; |
|
|
// this.cursorIndex = 0; |
|
|
this.scanMsg = '' |
|
|
|
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
iconClick(type) { |
|
|
iconClick(type) { |
|
|
this.$emit("clearResult", this.scanMsgk); |
|
|
this.$emit("clearResult", this.scanMsg); |
|
|
}, |
|
|
}, |
|
|
expands() { |
|
|
expands() { |
|
|
this.expand = !this.expand; |
|
|
this.expand = !this.expand; |
|
|