公告板
版本库
filestore
活动
搜索
登录
main
/
test
平台软件组组件测试
概况
操作记录
提交次数
目录
文档
派生
对比
blame
|
历史
|
原始文档
chart字体自适应
whyczyk
2021-03-04
c84d328cb6448786aee00f1b0684aaa07186e410
[test.git]
/
src
/
assets
/
js
/
chartFontsize.js
1
2
3
4
5
6
export const chartFontsize = (res) => {
let clientWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
if (!clientWidth) return;
let fontSize = clientWidth / 1920;
return res * fontSize;
}