mirror of
https://gitee.com/anji-plus/report.git
synced 2026-02-02 09:27:47 +08:00
bug:解决预览界面缩放异常的问题
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user