add bar code
This commit is contained in:
parent
dcdaf3f919
commit
eaa19b0629
18
src/App.vue
18
src/App.vue
|
@ -239,12 +239,12 @@ import TheWelcome from './components/TheWelcome.vue'
|
||||||
</div>
|
</div>
|
||||||
<div class="menu-item__image" @click="getSelectImage">
|
<div class="menu-item__image" @click="getSelectImage">
|
||||||
<i title="图片"></i>
|
<i title="图片"></i>
|
||||||
<input @change="selectImage" type="file" id="image" accept=".png, .jpg, .jpeg, .svg, .gif">
|
<input @change.stop="selectImage" type="file" id="image" accept=".png, .jpg, .jpeg, .svg, .gif">
|
||||||
</div>
|
</div>
|
||||||
<div class="menu-item__code" @click="getSelectQrCode">
|
<!-- <div class="menu-item__code" @click="getSelectQrCode">
|
||||||
<i title="二维码"></i>
|
<i title="二维码"></i>
|
||||||
<input @change="selectQrCode" type="file" id="qrCode" accept=".png, .jpg, .jpeg, .svg, .gif">
|
<input @change="selectQrCode" type="file" id="qrCode" accept=".png, .jpg, .jpeg, .svg, .gif">
|
||||||
</div>
|
</div> -->
|
||||||
<div class="menu-item__hyperlink" @click="executeHyperlink">
|
<div class="menu-item__hyperlink" @click="executeHyperlink">
|
||||||
<i title="超链接"></i>
|
<i title="超链接"></i>
|
||||||
</div>
|
</div>
|
||||||
|
@ -539,6 +539,7 @@ export default {
|
||||||
imageType: '',
|
imageType: '',
|
||||||
id: 0,
|
id: 0,
|
||||||
code:'',
|
code:'',
|
||||||
|
flag: false,
|
||||||
options: {
|
options: {
|
||||||
margins: [100, 120, 100, 120],
|
margins: [100, 120, 100, 120],
|
||||||
watermark: {
|
watermark: {
|
||||||
|
@ -1103,6 +1104,7 @@ export default {
|
||||||
getSelectImage() {
|
getSelectImage() {
|
||||||
//const imageFileDom = document.querySelector('#image')
|
//const imageFileDom = document.querySelector('#image')
|
||||||
//imageFileDom.click()
|
//imageFileDom.click()
|
||||||
|
if(this.flag == true) return
|
||||||
let _this = this
|
let _this = this
|
||||||
new Dialog({
|
new Dialog({
|
||||||
title: '图片类型',
|
title: '图片类型',
|
||||||
|
@ -1130,27 +1132,28 @@ export default {
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
onConfirm: payload => {
|
onConfirm: payload => {
|
||||||
|
_this.flag = true
|
||||||
//console.log('eeeee', payload);
|
//console.log('eeeee', payload);
|
||||||
const type = payload.find(p => p.name === 'type')?.value
|
const type = payload.find(p => p.name === 'type')?.value
|
||||||
_this.imageType = type
|
_this.imageType = type
|
||||||
//console.log('type', type)
|
//console.log('type', type)
|
||||||
//setTimeout('_this.gageImage()', 500)
|
_this.gageImage()
|
||||||
|
|
||||||
//_this.instance.command.executeInsertElementList([blockElement])
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
gageImage() {
|
gageImage() {
|
||||||
const imageFileDom = document.querySelector('#image')
|
const imageFileDom = document.querySelector('#image')
|
||||||
imageFileDom.click()
|
imageFileDom.click(function(event){
|
||||||
|
event.stopPropagation()
|
||||||
|
})
|
||||||
},
|
},
|
||||||
getSelectQrCode() {
|
getSelectQrCode() {
|
||||||
const imageFileDom = document.querySelector('#qrCode')
|
const imageFileDom = document.querySelector('#qrCode')
|
||||||
imageFileDom.click()
|
imageFileDom.click()
|
||||||
},
|
},
|
||||||
selectImage(event) {
|
selectImage(event) {
|
||||||
console.log(this.imageType);
|
|
||||||
let _this = this
|
let _this = this
|
||||||
//console.log(event.target.files[0])
|
//console.log(event.target.files[0])
|
||||||
const imageFileDom = document.querySelector('#image')
|
const imageFileDom = document.querySelector('#image')
|
||||||
|
@ -1172,6 +1175,7 @@ export default {
|
||||||
imageFileDom.value = ''
|
imageFileDom.value = ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.flag = false
|
||||||
},
|
},
|
||||||
selectQrCode(event) {
|
selectQrCode(event) {
|
||||||
let _this = this
|
let _this = this
|
||||||
|
|
Loading…
Reference in New Issue
Block a user