gaochangfeng
2024-04-11 fce4e1d1b48f23cd8332e60afce3df8d6209a6a7
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
            }
        }
    }
}