Merge remote-tracking branch 'origin/StableVersion' into develop

This commit is contained in:
X1627315083
2024-08-13 09:36:32 +08:00
15 changed files with 305 additions and 131 deletions

View File

@@ -468,6 +468,7 @@ export default defineComponent({
// return this.setGradientAngle(gradient)
return (gradient)=>{
let gradientStr = ''
if(!gradient.gradientList)return
gradient.gradientList.sort((a, b) => {
let aArr = a.left.split('%')[0]
let bArr = b.left.split('%')[0]
@@ -917,7 +918,7 @@ export default defineComponent({
this.colorList[this.selectIndex].gradient = JSON.parse(JSON.stringify(this.gradient))
}else{
this.selectColor = {rgba:this.colorList[this.selectIndex].gradient.gradientList[0].rgba}
this.colorList[this.selectIndex].gradient = {}
this.colorList[this.selectIndex].gradient = null
}
let colorList =this.colorList.filter((v) => v && Object.keys(v).length)
},

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;

View File

@@ -98,7 +98,7 @@
<img crossOrigin="anonymous" :src="item?.path" :style="{transform:`rotateZ(${printStyleList[index]?.transform?.rotateZ}deg)`}" class="designOpenrtionMobile_imgItme" draggable="false">
</div>
</div>
<img :src="operationCurrent?.undividedLayer?operationCurrent.undividedLayer:operationCurrent.path" alt="" class="designOpenrtion_sketch">
<img :src="operationCurrent?.undividedLayer?operationCurrent.undividedLayer:operationCurrent.path" alt="" class="designOpenrtionMobile_sketch">
<div class="designOpenrtionMobile_btn">
<ul v-if="overallSingle" v-for="item,index in printStyleList[stateOverallSingle]" :key="item" :class="{active:item?.designOpenrtionBtn?item?.designOpenrtionBtn:false}" class="designOpenrtionMobile_Mousingle" :style="item.style" @touchstart.stop="itemMoveMousedown(index,$event)">
<li class="designOpenrtionMobile_btn_top" @touchstart.stop="itemSizeMousedown('top',$event)"></li>
@@ -309,7 +309,7 @@ export default defineComponent({
if(this.$parent.elementsList)this.designList = JSON.parse(JSON.stringify(this.$parent.printsList))
if(this.overallSingle == false && this.designOpenrtionList.length > 0){
this.designOpenrtionList[0].checked = true
}else{
}else if(this.overallSingle == false && this.designOpenrtionList.length == 0){
this.setpitch(this.designList[0],0)
}
let skecth = new Image
@@ -319,13 +319,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)
@@ -668,7 +671,34 @@ export default defineComponent({
},
designOpenrtionBtn:false
}
},
setOverallPosition(index,str){
nextTick(()=>{
let sketch = document.getElementsByClassName("designOpenrtionMobile_modal")[0]?.getElementsByClassName('designOpenrtionMobile_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;