src/utils/rem.js @@ -10,3 +10,10 @@ export const pxToRem = width => { return width * 0.1 + 'rem' } // 不带单位的px转rem export const pxToRemNum = width => { const scale = document.documentElement.clientWidth / 192 return width * 0.1 * scale }