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

Merge pull request !220 from shuaiwu95/pr-branch-bug
This commit is contained in:
Foming
2025-06-17 08:52:20 +00:00
committed by Gitee

View File

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