Files
supplier-dispatch-h5/node_modules/.cache/babel-loader/eb9571ed5b0c11c5c7930b0a483f79f42dc397858b9646c689a51aafe9c914e0.json
2023-08-11 10:45:20 +08:00

1 line
1.9 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{"ast":null,"code":"const baseSize = 37.5; //跟postcss.config.js中rootValue的值是一致的\n// 设置 rem 函数\nfunction setRem() {\n // 当前页面宽度相对于 375 宽的缩放比例,可根据自己需要修改。 vantUI使用的是375px页面宽这里使用375px\n const scale = document.documentElement.clientWidth / 375;\n // 设置页面根节点字体大小 最高为两倍图 即设计稿为750\n document.documentElement.style.fontSize = baseSize * Math.min(scale, 2) + 'px';\n}\n// 初始化\nsetRem();\n// 改变窗口大小时重新设置 rem\nwindow.onresize = function () {\n setRem();\n};","map":{"version":3,"names":["baseSize","setRem","scale","document","documentElement","clientWidth","style","fontSize","Math","min","window","onresize"],"sources":["E:/work/sino/sino-h5/src/utils/rem.js"],"sourcesContent":["const baseSize = 37.5 //跟postcss.config.js中rootValue的值是一致的\r\n// 设置 rem 函数\r\nfunction setRem () {\r\n // 当前页面宽度相对于 375 宽的缩放比例,可根据自己需要修改。 vantUI使用的是375px页面宽这里使用375px\r\n const scale = document.documentElement.clientWidth / 375\r\n // 设置页面根节点字体大小 最高为两倍图 即设计稿为750\r\n document.documentElement.style.fontSize = (baseSize * Math.min(scale, 2)) + 'px'\r\n}\r\n// 初始化\r\nsetRem()\r\n// 改变窗口大小时重新设置 rem\r\nwindow.onresize = function () {\r\n setRem()\r\n}\r\n"],"mappings":"AAAA,MAAMA,QAAQ,GAAG,IAAI,EAAC;AACtB;AACA,SAASC,MAAMA,CAAA,EAAI;EACjB;EACA,MAAMC,KAAK,GAAGC,QAAQ,CAACC,eAAe,CAACC,WAAW,GAAG,GAAG;EACxD;EACAF,QAAQ,CAACC,eAAe,CAACE,KAAK,CAACC,QAAQ,GAAIP,QAAQ,GAAGQ,IAAI,CAACC,GAAG,CAACP,KAAK,EAAE,CAAC,CAAC,GAAI,IAAI;AAClF;AACA;AACAD,MAAM,CAAC,CAAC;AACR;AACAS,MAAM,CAACC,QAAQ,GAAG,YAAY;EAC5BV,MAAM,CAAC,CAAC;AACV,CAAC"},"metadata":{},"sourceType":"script","externalDependencies":[]}