//默认设计稿的宽度
const designWidth = 3840
//默认设计稿的高度
const designHeight = 2160

let styleUtil = {
  // px转vw
  px2vw: function (_px) {
    return ((_px * 100.0*4) / designWidth).toFixed(3) + 'vw'
  },
  // px转vh
  px2vh: function (_px) {
    return ((_px * 100.0*4) / designHeight).toFixed(3) + 'vh'
  }
}

export default styleUtil
