bug:解决预览界面缩放异常的问题

This commit is contained in:
李帅武
2025-06-16 17:35:42 +08:00
parent 15f02c44c9
commit 5f4a03bf14

View File

@@ -96,11 +96,15 @@ export default {
this.bigScreenStyle.transform='scale('+scale.scalex+','+scale.scaley+')' this.bigScreenStyle.transform='scale('+scale.scalex+','+scale.scaley+')'
}, },
getScale(){ getScale(){
let width=this.dashboard.width; let width = this.dashboard.width
let height=this.dashboard.height; let height = this.dashboard.height
// 固定宽度比例
const scalex = window.innerWidth / width
// 高度按相同比例缩放,但允许超出屏幕高度
const scaley = scalex
return { return {
scalex:(window.innerWidth)/width, scalex,
scaley:(window.innerHeight)/height, scaley
} }
}, },
} }