add bar code
This commit is contained in:
parent
3b23ffaf0c
commit
dce43668b3
29
src/App.vue
29
src/App.vue
|
@ -1145,10 +1145,7 @@ export default {
|
||||||
const imageFileDom = document.querySelector('#image')
|
const imageFileDom = document.querySelector('#image')
|
||||||
imageFileDom.click()
|
imageFileDom.click()
|
||||||
},
|
},
|
||||||
getSelectQrCode() {
|
|
||||||
const imageFileDom = document.querySelector('#qrCode')
|
|
||||||
imageFileDom.click()
|
|
||||||
},
|
|
||||||
selectImage(event) {
|
selectImage(event) {
|
||||||
event.stopPropagation()
|
event.stopPropagation()
|
||||||
let _this = this
|
let _this = this
|
||||||
|
@ -1173,29 +1170,7 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
selectQrCode(event) {
|
|
||||||
let _this = this
|
|
||||||
//console.log('cododododo')
|
|
||||||
const imageFileDom = document.querySelector('#qrCode')
|
|
||||||
const file = event.target.files[0]//imageFileDom.files![0]!
|
|
||||||
const fileReader = new FileReader()
|
|
||||||
fileReader.readAsDataURL(file)
|
|
||||||
fileReader.onload = function () {
|
|
||||||
// 计算宽高
|
|
||||||
const image = new Image()
|
|
||||||
const value = fileReader.result
|
|
||||||
image.src = value
|
|
||||||
image.onload = function () {
|
|
||||||
_this.instance.command.executeImage({
|
|
||||||
value,
|
|
||||||
width: image.width,
|
|
||||||
height: image.height,
|
|
||||||
field: _this.imageType
|
|
||||||
})
|
|
||||||
imageFileDom.value = ''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
executeInsertElementList() {
|
executeInsertElementList() {
|
||||||
this.instance.command.executeInsertElementList([
|
this.instance.command.executeInsertElementList([
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user