From 7ac480e5291b251754c35c04c23472c6d835a384 Mon Sep 17 00:00:00 2001 From: xiaowen <372193233@qq.com> Date: Thu, 2 Dec 2021 17:26:59 +0800 Subject: [PATCH] cxw-010203 --- src/utils/rem/index.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/utils/rem/index.js b/src/utils/rem/index.js index 7c25bc1..f0950b3 100644 --- a/src/utils/rem/index.js +++ b/src/utils/rem/index.js @@ -1,3 +1,11 @@ +/* + * @Author: your name + * @Date: 2021-10-26 11:23:45 + * @LastEditTime: 2021-12-02 17:16:22 + * @LastEditors: your name + * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE + * @FilePath: /data-show/src/utils/rem/index.js + */ // rem等比适配配置文件 // 基准大小 const baseSize = 16 @@ -8,10 +16,10 @@ function setRem() { const scale = w / 1920 if (w >= 1920) { document.documentElement.style.fontSize = baseSize + 'px'; - } else if (1500 < w && w < 1920) { + } else if (1440 < w && w < 1920) { document.documentElement.style.fontSize = baseSize * Math.min(scale, 2) + 'px' } else { - document.documentElement.style.fontSize = baseSize * 1500 / 1920 + 'px'; + document.documentElement.style.fontSize = baseSize * 1440 / 1920 + 'px'; } } // 初始化