fix
This commit is contained in:
@@ -69,6 +69,7 @@
|
||||
<img crossOrigin="anonymous" :src="item?.path" :style="{transform:`rotateZ(${item.pattern?.transform?.rotateZ}deg)`}" class="designOpenrtion_imgItme" draggable="false">
|
||||
</div>
|
||||
</div>
|
||||
<!-- <img :src="selectDetail.path" alt="" class="designOpenrtion_sketch" ref="sketchImg"> -->
|
||||
<img :src="selectDetail?.undividedLayer?selectDetail.undividedLayer:selectDetail.path" alt="" class="designOpenrtion_sketch" ref="sketchImg">
|
||||
<div class="designOpenrtion_btn">
|
||||
<ul v-if="overallSingle" v-for="item,index in printStyleList[type][stateOverallSingle]" :key="item" :class="{active:item?.pattern.designOpenrtionBtn?item?.pattern.designOpenrtionBtn:false}" class="designOpenrtion_Mousingle" :style="item?.pattern.style" @mousedown.stop="itemMoveMousedown(index,getMousePosition($event,false))" @touchstart.passive="itemMoveMousedown(index,getMousePosition($event,true))">
|
||||
@@ -357,10 +358,26 @@ export default defineComponent({
|
||||
editPrintElementData.overallSingle = state
|
||||
}
|
||||
}
|
||||
img.src = editPrintElementData.selectDetail.undividedLayer
|
||||
// undividedLayer
|
||||
//计算宽高使用editPrintElementData.selectDetail.path
|
||||
// img.src = editPrintElementData.selectDetail.path
|
||||
img.src = editPrintElementData.selectDetail.undividedLayer?editPrintElementData.selectDetail.undividedLayer:editPrintElementData.selectDetail.path
|
||||
})
|
||||
}
|
||||
watch(()=>editPrintElementData.selectDetail?.id,(newVal)=>{
|
||||
// watch(()=>editPrintElementData.selectDetail?.id,(newVal)=>{
|
||||
// if(!newVal)return
|
||||
// editPrintElementData.printStyleList[props.type] = {
|
||||
// single:[],
|
||||
// overall:[],
|
||||
// }
|
||||
// setPosition()
|
||||
// },{immediate: true,})
|
||||
watch(()=>editPrintElementData.currentPrintElement,(newVal)=>{
|
||||
if(newVal){
|
||||
addPrintELement(newVal)
|
||||
}
|
||||
})
|
||||
watch(()=>((editPrintElementData.selectDetail?.undividedLayer || editPrintElementData.selectDetail?.id)),(newVal)=>{
|
||||
if(!newVal)return
|
||||
editPrintElementData.printStyleList[props.type] = {
|
||||
single:[],
|
||||
@@ -368,11 +385,6 @@ export default defineComponent({
|
||||
}
|
||||
setPosition()
|
||||
},{immediate: true,})
|
||||
watch(()=>editPrintElementData.currentPrintElement,(newVal)=>{
|
||||
if(newVal){
|
||||
addPrintELement(newVal)
|
||||
}
|
||||
})
|
||||
//设置移动
|
||||
const itemMoveMousedown = (index:number,event:any)=>{
|
||||
if (event.target.tagName === 'IMG' || event.target.nodeName === 'IMG')return
|
||||
|
||||
Reference in New Issue
Block a user