zhifu gao
2024-04-26 1cdb3cc28d4d89a576cc06e5cd8eb80da1f3a3aa
1
2
3
4
5
6
7
8
9
10
11
12
export default {
    install (Vue) {
        // px 转 rem
        Vue.prototype.pxTorem = (px, needUnit) => {
            if (needUnit) {
                return px / 19.2 + 'rem'
            } else {
                return px / 19.2
            }
        }
    }
}