Commit c537b246 authored by 朱国瑞's avatar 朱国瑞

兼容优化

parent 96056b49
...@@ -26,7 +26,7 @@ class DevicePixelRatio { ...@@ -26,7 +26,7 @@ class DevicePixelRatio {
_correct() { _correct() {
let t = this; let t = this;
//页面devicePixelRatio(设备像素比例)变化后,计算页面body标签zoom修改其大小,来抵消devicePixelRatio带来的变化。 //页面devicePixelRatio(设备像素比例)变化后,计算页面body标签zoom修改其大小,来抵消devicePixelRatio带来的变化。
document.getElementById('main').style.zoom = 1 / window.devicePixelRatio; document.getElementById('main').style.zoom = 1.25 / window.devicePixelRatio;
} }
//监听页面缩放 //监听页面缩放
_watch() { _watch() {
......
...@@ -106,7 +106,7 @@ export default { ...@@ -106,7 +106,7 @@ export default {
height: 100%; height: 100%;
} }
.pc { .pc {
height: 100vh; height: calc(var(--vh, 1vh) * 100);
align-items: center; align-items: center;
.main_content { .main_content {
width: 375px; width: 375px;
......
...@@ -685,7 +685,7 @@ export default { ...@@ -685,7 +685,7 @@ export default {
height: 100%; height: 100%;
} }
.pc { .pc {
height: 100vh; height: calc(var(--vh, 1vh) * 100);
align-items: center; align-items: center;
.main_content { .main_content {
width: 375px; width: 375px;
...@@ -874,8 +874,8 @@ export default { ...@@ -874,8 +874,8 @@ export default {
position: fixed; position: fixed;
left: 0; left: 0;
top: 0; top: 0;
width: 100vw; width: 100%;
height: calc(var(--vh, 1vh) * 100); height: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment