postcss-pxtorem和amfe-flexible安装 npm install postcss-pxtorem@5.0.0 -D npm install amfe-flexible --save main.js中引用amfe-flexible import "amfe-flexible"; 根文件目录创建vue.config.js文件,添加如下配置: module.exports = { plugins:{ 'postcss-pxtorem':{ rootValue:37.5, propList:['*'] } } }