kongdeqiang
5 天以前 28ccfbfc51068a663a80764e14074df5edf2b5ba
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
            }
        }
    }
}