This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
export function getFontSize(size) {
const screenWidth = window.innerWidth; // 获取屏幕宽度
if (screenWidth > 1920) {
// 如果屏幕宽度大于等于 1920,字体大小为 16 像素
return 12;
} else {
// 否则根据屏幕宽度动态计算字体大小
return Math.round(screenWidth / size);
}