uu
This commit is contained in:
parent
6452e107ce
commit
1717b647f1
@ -40,7 +40,7 @@
|
||||
</view>
|
||||
</tpx-dialog>
|
||||
|
||||
<view v-for="(url, index) in imageUrl">
|
||||
<view v-for="(url, index) in canvImages">
|
||||
<create-image-data-bycanvas :ref="`curCanvas${index}`"></create-image-data-bycanvas>
|
||||
</view>
|
||||
|
||||
@ -57,6 +57,10 @@ export default {
|
||||
|
||||
},
|
||||
computed: {
|
||||
// !!!注意 canvas预览图 必须用不同变量,否则获取不到imgdata
|
||||
canvImages(){
|
||||
return [...this.imageUrl]
|
||||
}
|
||||
},
|
||||
components: {
|
||||
RenderTemplate, RenderTemplate, CreateImageDataBycanvas
|
||||
@ -106,7 +110,7 @@ export default {
|
||||
async confirmPrint(){
|
||||
this.imageUrl.map(async (url, index)=> {
|
||||
// !!!注意:必须修改。 canvas渲染的图必须修改url,否则渲染不出来
|
||||
url = `${url}?t=${new Date().valueOf()}`
|
||||
url = `${url}?t=${new Date().valueOf()}`
|
||||
let imgRes = await this.$refs[`curCanvas${index}`][0].renderCanvasImg(url, this.paperWidth)
|
||||
let res = await this.$refs.curPrint.callPrint({
|
||||
imgRes,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user