修复移动端bug

This commit is contained in:
X1627315083
2024-08-12 17:14:59 +08:00
parent ec24805e99
commit 3eb8754e0c
2 changed files with 65 additions and 6 deletions

View File

@@ -318,13 +318,16 @@ export default defineComponent({
this.sketch.height = skecth.height/10+'rem'
skecth.remove()
}
if(this.exhibitionOpenrtionList.overall.length > 0){
if(this.exhibitionOpenrtionList.overall.length > 0 && !this.overallSingle){
let str = 'overall'
this.exhibitionOpenrtionList[str].forEach((item,index)=>{
this.setTemplate(item,index,str)
})
}else if(!this.overallSingle){
let str = 'overall'
this.setOverallPosition(0,str)
}
if(this.exhibitionOpenrtionList.single.length > 0){
if(this.exhibitionOpenrtionList.single.length > 0 && this.overallSingle){
let str = 'single'
this.exhibitionOpenrtionList[str].forEach((item,index)=>{
this.setTemplate(item,index,str)
@@ -664,6 +667,32 @@ export default defineComponent({
designOpenrtionBtn:false
}
},
setOverallPosition(index,str){
nextTick(()=>{
let sketch = document.getElementsByClassName("designOpenrtion_modal")[0]?.getElementsByClassName('designOpenrtion_sketch')[0]
this.printStyleList[str][index]={
centers:{
left:0,
top:0,
},
style:{
left:sketch.offsetWidth / 2 +'px',
top:sketch.offsetHeight / 2 +'px',
right:"auto",
bottom:"auto",
width:'auto',
height:'auto',
zIndex:1
},
transform:{
// scale:scale<.2?.2:scale,//0.2-3
rotateZ:0,
},
designOpenrtionBtn:false
}
})
},
computeZindex(resolve,prints){
prints.sort((a, b) => {
var a_num = a.priority;