[Improvement] Support local font file (#408)
This commit is contained in:
@@ -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 default,if you want to use the local font file,please import the following css file.
|
||||
|
||||
```js
|
||||
import 'vant/lib/vant-css/icon-local.css';
|
||||
```
|
||||
|
||||
### API
|
||||
|
||||
| Attribute | Description | Type | Default | Accepted Values |
|
||||
|
||||
@@ -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
|
||||
|
||||
| 参数 | 说明 | 类型 | 默认值 | 可选值 |
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user