Compare commits

..

No commits in common. "045bc5e1989d057b7689763f044a8e8095b722d1" and "97f55ca3333ede03db0a0e5fbee60f86340b7148" have entirely different histories.

2 changed files with 4 additions and 4 deletions

View File

@ -154,13 +154,15 @@ const topImgWrapperPositionStyle = computed(() => {
const topImgPositionStyle = computed(() => { const topImgPositionStyle = computed(() => {
const bottomWidth = imgPosition.value.width const bottomWidth = imgPosition.value.width
const bottomHeight = imgPosition.value.height const bottomHeight = imgPosition.value.height
console.log("底层图片位置大小(遮罩区域图片)", imgPosition.value)
const { top, left, width, height } = topImgWrapperPosition.value const { top, left, width, height } = topImgWrapperPosition.value
console.log("width", ((bottomWidth / width * 100) - (left * (100 / width))) + '%')
console.log("height", bottomHeight / height * 100 + '%')
return { return {
left: -left * (100 / width) + '%', left: -left * (100 / width) + '%',
top: -top * (100 / height) + '%', top: -top * (100 / height) + '%',
width: bottomWidth / width * 100 + '%' , width: ((bottomWidth / width * 100) - (left * (100 / width))) + '%' ,
height: bottomHeight / height * 100 + '%', height: bottomHeight / height * 100 + '%',
} }
}) })
@ -538,7 +540,6 @@ const edgePoints = [
img { img {
position: absolute; position: absolute;
max-width: none !important;
} }
} }
} }

View File

@ -183,7 +183,6 @@ const handleClip = (data: ImageClipedEmitData | null) => {
} }
img { img {
position: absolute; position: absolute;
max-width: none !important; //
} }
} }
.color-mask { .color-mask {