修改印花页面衣服加载不成功导致印花位置不对问题

This commit is contained in:
X1627315083
2025-02-12 10:53:46 +08:00
parent 709c0b5d0a
commit 96d05a59b0

View File

@@ -330,7 +330,7 @@ export default defineComponent({
},
},
methods: {
init(){
async init(){
this.designOpenrtion = true
let designItemDetail = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designItemDetail))
this.currentFullBodyView = designItemDetail.currentFullBodyView?designItemDetail.currentFullBodyView:designItemDetail.designItemUrl
@@ -348,12 +348,16 @@ export default defineComponent({
if(this.$parent.exhibitionList.print)this.designOpenrtionList = JSON.parse(JSON.stringify(this.$parent.exhibitionList.print))
if(this.$parent.elementsList)this.designList = JSON.parse(JSON.stringify(this.$parent.printsList))
let skecth = new Image
skecth.onload=()=>{
this.sketch.width = skecth.width/10+'rem'
this.sketch.height = skecth.height/10+'rem'
skecth.remove()
}
skecth.src = this.current.undividedLayer || this.current.path
await new Promise((resolve, reject) => {
skecth.onload=()=>{
this.sketch.width = skecth.width/10+'rem'
this.sketch.height = skecth.height/10+'rem'
skecth.remove()
resolve()
}
})
if(this.exhibitionOpenrtionList.overall.length > 0){
let str = 'overall'
this.exhibitionOpenrtionList[str].forEach((item,index)=>{