rem自適應(yīng)布局插件配置
vue-cli插件配置
插件:lib-flexible
- 下載:
npm install lib-flexible --save - 在
main.js中引入并全局注冊(cè)

image.png
import flexible from 'lib-flexible'
Vue.use(flexible)
vscode插件配置
- 下載插件: px to rem

image.png
- 根據(jù)文檔進(jìn)行配置
vscode:文件→首選項(xiàng)→設(shè)置在用戶設(shè)置中進(jìn)行設(shè)置

image.png

image.png
- px to rem,rem to px快捷鍵換算
選中需要換算的值:Alt+z