docs: add advanced usage guide

This commit is contained in:
chenjiahan
2020-10-24 17:20:04 +08:00
parent b1183b99d3
commit 000ea342a8
5 changed files with 131 additions and 115 deletions

View File

@@ -122,30 +122,3 @@ Vue.use(Vant);
```
> If you configured babel-plugin-import, you won't be allowed to import all components.
## Other
### Rem units
Vant use `px` as size units by defaultyou can use tools such as `postcss-pxtorem` to transform units to `rem`.
- [postcss-pxtorem](https://github.com/cuth/postcss-pxtorem)
- [lib-flexible](https://github.com/amfe/lib-flexible)
#### PostCSS Config
postcss config example:
```js
module.exports = {
plugins: {
autoprefixer: {
browsers: ['Android >= 4.0', 'iOS >= 8'],
},
'postcss-pxtorem': {
rootValue: 37.5,
propList: ['*'],
},
},
};
```