|
|
@@ -47,12 +47,18 @@ const styleMap = useWidgetStyle({
|
|
|
})
|
|
|
|
|
|
const imageProps = computed(() => {
|
|
|
- const { openScale, scale = 256, width, height } = props
|
|
|
+ const { openScale, scale = 256, width, height, rotate } = props
|
|
|
const s = openScale ? scale / 256 : 1
|
|
|
+ const { x = width / 2, y = height / 2 } = rotate
|
|
|
|
|
|
return {
|
|
|
- width: `${width * s}px`,
|
|
|
- height: `${height * s}px`
|
|
|
+ width: `${width}px`,
|
|
|
+ height: `${height}px`,
|
|
|
+ style: {
|
|
|
+ // 设置缩放中心
|
|
|
+ transformOrigin: `${x}px ${y}px`,
|
|
|
+ transform: `scale(${s})`
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
|