vue 移动适配

npm install postcss-pxtorem --save-dev  //项目下安装postcss-pxtorem

npm install --save lib-flexible 或 npm i -S amfe-flexible    //项目下安装lib-flexible

min.js下引入 

import 'lib-flexible'

postcss.config文件下

module.exports = {

  plugins: {

    'autoprefixer': {

      browsers: ['Android >= 4.0', 'iOS >= 7']

    },

    'postcss-pxtorem': {

      rootValue: 37.5,

      propList: ['*']

    }

  }

}

你可能感兴趣的:(vue 移动适配)