修改印花页面衣服加载不成功导致印花位置不对问题
This commit is contained in:
@@ -330,7 +330,7 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
init(){
|
async init(){
|
||||||
this.designOpenrtion = true
|
this.designOpenrtion = true
|
||||||
let designItemDetail = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designItemDetail))
|
let designItemDetail = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designItemDetail))
|
||||||
this.currentFullBodyView = designItemDetail.currentFullBodyView?designItemDetail.currentFullBodyView:designItemDetail.designItemUrl
|
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.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))
|
if(this.$parent.elementsList)this.designList = JSON.parse(JSON.stringify(this.$parent.printsList))
|
||||||
let skecth = new Image
|
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
|
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){
|
if(this.exhibitionOpenrtionList.overall.length > 0){
|
||||||
let str = 'overall'
|
let str = 'overall'
|
||||||
this.exhibitionOpenrtionList[str].forEach((item,index)=>{
|
this.exhibitionOpenrtionList[str].forEach((item,index)=>{
|
||||||
|
|||||||
Reference in New Issue
Block a user