优化大屏的UI布局

This commit is contained in:
lyswhut
2022-03-11 21:36:33 +08:00
parent 377f665361
commit fc72d99ab3
7 changed files with 32 additions and 22 deletions
+11
View File
@@ -560,3 +560,14 @@ export const saveStrToFile = (path, str) => new Promise((resolve, reject) => {
const fileNameRxp = /[\\/:*?#"<>|]/g
export const filterFileName = name => name.replace(fileNameRxp, '')
export const getFontSizeWithScreen = (screenWidth = window.innerWidth) => {
return screenWidth <= 1440
? 16
: screenWidth <= 1920
? 18
: screenWidth <= 2560
? 20
: screenWidth <= 2560 ? 20 : 22
}