add bar code
This commit is contained in:
parent
a2b981a72e
commit
3b23ffaf0c
25
src/App.vue
25
src/App.vue
|
@ -1134,43 +1134,23 @@ export default {
|
|||
],
|
||||
onConfirm: payload => {
|
||||
_this.flag = true
|
||||
//console.log('eeeee', payload);
|
||||
const type = payload.find(p => p.name === 'type')?.value
|
||||
_this.imageType = type
|
||||
//console.log('type', type)
|
||||
_this.gageImage()
|
||||
_this.startTimer()
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
startTimer() {
|
||||
this.count = 9
|
||||
this.timer = setInterval(() => {
|
||||
// 强制Vue重新计算computed属性
|
||||
this.count--
|
||||
if(this.count <= 0) {
|
||||
this.clearTimer()
|
||||
}
|
||||
}, 1000);
|
||||
},
|
||||
clearTimer() {
|
||||
clearInterval(this.timer)
|
||||
this.timer = null
|
||||
this.count = ''
|
||||
this.flag = false
|
||||
},
|
||||
gageImage() {
|
||||
const imageFileDom = document.querySelector('#image')
|
||||
imageFileDom.click(function(event){
|
||||
event.stopPropagation()
|
||||
})
|
||||
imageFileDom.click()
|
||||
},
|
||||
getSelectQrCode() {
|
||||
const imageFileDom = document.querySelector('#qrCode')
|
||||
imageFileDom.click()
|
||||
},
|
||||
selectImage(event) {
|
||||
event.stopPropagation()
|
||||
let _this = this
|
||||
//console.log(event.target.files[0])
|
||||
const imageFileDom = document.querySelector('#image')
|
||||
|
@ -1192,7 +1172,6 @@ export default {
|
|||
imageFileDom.value = ''
|
||||
}
|
||||
}
|
||||
this.clearTimer()
|
||||
},
|
||||
selectQrCode(event) {
|
||||
let _this = this
|
||||
|
|
Loading…
Reference in New Issue
Block a user