仪表盘
版本库
文件存储
活动
搜索
登录
devadmin
/
jc-hydropower-station-web
分支自
client/jc-hydropower-station-web
概况
提交次数
目录
文档
分支
对比
blame
|
历史
|
原始文档
feat:增加温度系统界面
web
2025-03-21
de1de0e73bd260cb1babe7b15c9e943a381009de
[~devadmin/jc-hydropower-station-web.git]
/
src
/
utils
/
rem.js
1
2
3
4
5
6
7
8
function resize () {
const baseFontSize = 16
const windowWidth = document.documentElement.clientWidth;
const newVal = Math.round((windowWidth / 1920) * baseFontSize)
document.documentElement.style.fontSize = `${newVal}px`;
}
window.addEventListener('resize', resize);