feat: 接入大屏修复bug

This commit is contained in:
fyy
2025-07-10 17:52:54 +08:00
parent 0d2a4db6a6
commit b1d0c117fc
60 changed files with 6394 additions and 20 deletions

View File

@@ -0,0 +1,12 @@
function setRootFontSize(): void {
const baseWidth = 1920 // 设计稿宽度
const baseFontSize = 16 // 设计稿根字体
const screenWidth = window.innerWidth
const fontSize = (screenWidth / baseWidth) * baseFontSize
document.documentElement.style.fontSize = fontSize + 'px'
}
setRootFontSize()
window.addEventListener('resize', setRootFontSize)
export default setRootFontSize