[Improvement] Support local font file (#408)

This commit is contained in:
neverland
2017-12-11 15:38:01 +08:00
committed by GitHub
parent 92d513d2eb
commit 6b7740b742
8 changed files with 71 additions and 17 deletions
+7
View File
@@ -16,6 +16,13 @@ View all usable icons on the right.
<van-icon name="success" />
```
#### Use local font file
Icon uses font file in `yzcdn.cn` by defaultif you want to use the local font fileplease import the following css file.
```js
import 'vant/lib/vant-css/icon-local.css';
```
### API
| Attribute | Description | Type | Default | Accepted Values |
+8
View File
@@ -16,6 +16,14 @@ Vue.component(Icon.name, Icon);
<van-icon name="success" />
```
#### 使用本地字体文件
Icon 组件默认引用 `yzcdn.cn` 域名下的字体文件,如果想要使用本地字体文件,请引入下面的 css 文件
```js
import 'vant/lib/vant-css/icon-local.css';
```
### API
| 参数 | 说明 | 类型 | 默认值 | 可选值 |
+1
View File
@@ -5,6 +5,7 @@ import routes from './router.config';
import Vant, { Lazyload } from 'packages';
import VantDoc from 'vant-doc';
import 'packages/vant-css/src/index.css';
import 'packages/vant-css/src/icon-local.css';
import 'vant-doc/src/helper/touch-simulator';
Vue.use(Vant);