ppts:图片样式 裁剪逻辑样式修改
This commit is contained in:
parent
da1c80406f
commit
8e72b50c68
|
@ -154,15 +154,13 @@ 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) - (left * (100 / width))) + '%' ,
|
width: bottomWidth / width * 100 + '%' ,
|
||||||
height: bottomHeight / height * 100 + '%',
|
height: bottomHeight / height * 100 + '%',
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -540,6 +538,7 @@ const edgePoints = [
|
||||||
|
|
||||||
img {
|
img {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
max-width: none !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -183,6 +183,7 @@ const handleClip = (data: ImageClipedEmitData | null) => {
|
||||||
}
|
}
|
||||||
img {
|
img {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
max-width: none !important; // 防止图片被压缩
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.color-mask {
|
.color-mask {
|
||||||
|
|
Loading…
Reference in New Issue