feature:代码初始化。

This commit is contained in:
tianyongbao
2024-04-19 09:36:13 +08:00
commit 2f89616d14
454 changed files with 111421 additions and 0 deletions

20
src/rem.js Normal file
View File

@@ -0,0 +1,20 @@
/*
* @Description:
* @Version: 1.0.0
* @Author: fujingwen
* @Date: 2023-02-17 10:10:24
* @FilePath: /RuoYi-Cloud-Vue3/src/rem.js
*/
;(function (doc, win) {
const docEl = doc.documentElement
const resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize'
const recalc = function () {
const clientWidth = docEl.clientWidth
if (!clientWidth) return
docEl.style.fontSize = clientWidth / 19.2 + 'px'
}
if (!doc.addEventListener) return
recalc()
win.addEventListener(resizeEvt, recalc, false)
doc.addEventListener('DOMContentLoaded', recalc, false)
})(document, window)