封装一个echart字体大小自适应函数
// 自适应echart字体大小
export const fontSize = (res) => {
let clientWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
if (!clientWidth) return;
let fontSize = clientWidth / 2560;
return res * fontSize;
};
本文来自博客园,作者:RHCHIK,转载请注明原文链接:https://www.cnblogs.com/suihung/p/16805081.html