docs: add function component style guide (#11003)

This commit is contained in:
neverland
2022-09-02 23:24:27 +08:00
committed by GitHub
parent 1837ed712f
commit 3e039b02b5
5 changed files with 42 additions and 0 deletions
@@ -216,6 +216,8 @@ import { ImagePreview } from 'vant';
import 'vant/es/image-preview/style';
```
你可以在项目的入口文件或公共模块中引入以上组件的样式,这样在业务代码中使用组件时,便不再需要重复引入样式了。
> 提示:在单个项目中不应该同时使用「全量引入」和「按需引入」,否则会导致代码重复、样式错乱等问题。
## 在框架中使用