You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
1.2 KiB

2 years ago
<template>
<uni-collapse>
<!-- :open="true" -->
1 year ago
<uni-collapse-item :show-animation="true" :title="scanTitle" :open="false">
2 years ago
<view class="content">
<!-- <view class="tit_bot_box">扫描目标库位</view> -->
<uni-easyinput ref='scanInput' v-model="locationCode" :focus="inputFocus" @confirm="getLocation"
@clear="clear" style='font-size: 18px;padding: 10rpx 20rpx;'>
</uni-easyinput>
</view>
</uni-collapse-item>
</uni-collapse>
</template>
<script>
export default {
name: 'winScanToLocation',
components: {},
props: {
scanTitle: {
type: String,
default: '扫描目标库位'
},
},
data() {
return {
locationCode: '',
inputFocus: true
}
},
created() {
},
methods: {
getLocation() {
if (this.locationCode == '') return;
this.$emit('getLocationCode', this.locationCode)
},
clearLocation() {
this.locationCode = '';
},
gotFocus() {
this.inputFocus = true;
this.$nextTick(r => {
this.inputFocus = true;
});
},
loseFocus() {
this.inputFocus = false;
this.$nextTick(r => {
this.inputFocus = false;
});
},
clear() {
this.$emit('clear')
}
}
}
</script>
<style>
</style>