Merge branch '2.x' into dev

This commit is contained in:
chenjiahan
2020-11-08 17:02:26 +08:00
12 changed files with 137 additions and 54 deletions
+2
View File
@@ -58,6 +58,8 @@ Icon uses font file in `yzcdn.cn` by defaultif you want to use the local font
import 'vant/lib/icon/local.css';
```
> Tips: Starting from version 2.10.13, Vant will use local font files in woff2 format by default
### Add custom iconfont
```css
+2
View File
@@ -60,6 +60,8 @@ Icon 组件默认引用有赞 CDN 提供的字体文件,并通过网络下载
import 'vant/lib/icon/local.css';
```
> Tips: 从 2.10.13 版本开始,Vant 会默认使用 woff2 格式的本地字体文件,只有在不支持 woff2 字体的低端浏览器上才会加载有赞 CDN 的网络图标。
### 自定义图标
如果需要在现有 Icon 的基础上使用更多图标,可以引入第三方 iconfont 对应的字体文件和 CSS 文件,之后就可以在 Icon 组件中直接使用。