黄琪勇 пре 1 година
родитељ
комит
45090191cc
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      src/libs/rem.ts

+ 1 - 1
src/libs/rem.ts

@@ -3,7 +3,7 @@ const baseSize = 10 //  rem 比例
 const doc = document.documentElement
 function refreshRem() {
    const width = doc.getBoundingClientRect().width
-   doc.style.fontSize = baseSize * Math.min(width / baseWidth, 1) + "px"
+   doc.style.fontSize = baseSize * (width / baseWidth) + "px"
 }
 refreshRem()
 window.addEventListener("resize", refreshRem)