<template>
<div style="justify-content: center;align-items: center;flex-direction: row;">
<input ref="barcode" type="text" style="width: 500px;height: 100px;border-width: 2px;" @input="oninput" @blur="onblur" @return="onreturn" v-model="barcode">
</div>
</template>
<script>
export default {
data(){
return{
barcode:''
}
},methods:{
onLoad(p){
// this.$refs.barcode.focus()
},
oninput(e){
this.$refs.barcode.blur()
},onblur(e){
// this.alert('barcode的值:'+this.barcode)
this.log('barcode的值:'+this.barcode)
this.barcode=''
this.$refs.barcode.focus()
},onreturn(e){
// this.$refs.barcode.blur()
this.log('barcode的值:'+this.barcode)
this.barcode=''
this.$refs.barcode.focus()
}
}
}
</script>
<style scoped>
</style>