update
This commit is contained in:
parent
c8a57c86f1
commit
9f8fa6268e
@ -1,12 +1,12 @@
|
|||||||
# vue-cli引用vant使用rem自适应 #
|
# vue-cli引用vant使用rem自适应 #
|
||||||
### 介绍 ###
|
## 介绍 ##
|
||||||
使用的node包管理器为yarn
|
使用的node包管理器为yarn
|
||||||
vue-cli版本4
|
vue-cli版本4
|
||||||
### 安装vant ###
|
## 安装vant ##
|
||||||
yarn add vant
|
yarn add vant
|
||||||
### 配置
|
## 配置 ##
|
||||||
由于rem是由首页脚本定义 所以不需要安装自动计算rem的插件
|
由于rem是由首页脚本定义 所以不需要安装自动计算rem的插件
|
||||||
安装babel-plugin-import实现按需加载
|
### 安装babel-plugin-import实现按需加载
|
||||||
配置babel
|
配置babel
|
||||||
.babelrc
|
.babelrc
|
||||||
```
|
```
|
||||||
@ -20,8 +20,7 @@ yarn add vant
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
安装postcss-pxtorem
|
### 安装postcss-pxtorem 这个是将px转为rem
|
||||||
这个是将px转为rem
|
|
||||||
在package.json配置
|
在package.json配置
|
||||||
"postcss": {
|
"postcss": {
|
||||||
"plugins": {
|
"plugins": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user