This commit is contained in:
X1627315083
2024-01-10 09:34:32 +08:00
parent fd4ed51bf5
commit 59c5e59347
25 changed files with 64 additions and 76 deletions

View File

@@ -4,7 +4,7 @@
class="layout_modal"
v-model:visible="layout"
:footer="null"
width="110rem"
width="65%"
:maskClosable="false"
:centered="true"
:closable="false"
@@ -28,7 +28,7 @@
</div>
<div class="layout_centent" :class="{active:flex_direction}" id="layoutCentent">
<div v-for="item,index in layoutList" :key="item" :class="moodbClassName[index]" class="modal_imgItem" v-layout="index" @touchstart="setpitch(item,index)" ref="content" >
<img crossOrigin="anonymous" :src="item.imgUrl" :style="{'transform':'translate(-50%, -50%) scale('+item.zoom+')'}" draggable="false" v-modelImg>
<img crossOrigin="anonymous" :src="item.imgUrl" :style="{'zoom':item.zoom}" draggable="false" v-modelImg>
<ul v-show="item.setPitch" class="layout_btn" >
<li class="layout_btn_top" v-compile.stop="'top'"></li>
<li class="layout_btn_bottom" v-compile.stop="'bottom'"></li>
@@ -502,7 +502,7 @@ export default defineComponent({
//移动图片
translate:{
mounted (el,layout:any,binding) {
el.ontouchstart = (e:any)=>{
el.addEventListener('touchstart',(e:any)=>{
e.stopPropagation()
let elParent = el.parentNode.parentNode
el.style.left = (el.offsetLeft+2)/(elParent.offsetWidth)*100+'%'
@@ -525,7 +525,6 @@ export default defineComponent({
el.previousSibling.style.left = left
elParent.firstChild.style.top = top
elParent.firstChild.style.left = left
if(el.offsetLeft <=0){
el.style.left = 0+'%'
el.previousSibling.style.left = 0+'%'
@@ -564,7 +563,7 @@ export default defineComponent({
})
});
}
})
},
},
modelImg:{
@@ -786,8 +785,8 @@ export default defineComponent({
.layout_centent{
display: flex;
// height: 55%;
width: 49rem;
height: calc(49rem*0.614);
height: 35rem;
width: 57rem;
// height: 60%;
flex-direction: column;
flex-wrap: wrap;