[Doc] new theme

This commit is contained in:
陈嘉涵
2019-05-15 20:53:04 +08:00
parent 3cae4288f2
commit d0f4169c86
130 changed files with 1460 additions and 1147 deletions
+10 -6
View File
@@ -1,15 +1,16 @@
## Icon
# Icon
### Install
``` javascript
import { Icon } from 'vant';
Vue.use(Icon);
```
### Usage
## Usage
#### Basic Usage
### Basic Usage
Use `name` prop to set icon name or icon URL
@@ -18,21 +19,22 @@ Use `name` prop to set icon name or icon URL
<van-icon name="https://b.yzcdn.cn/vant/icon-demo-1126.png" />
```
#### Show Info
### Show Info
```html
<van-icon name="chat" info="9" />
<van-icon name="chat" info="99+" />
```
#### Use local font file
### 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/icon/local.css';
```
#### Add custom iconfont
### Add custom iconfont
```css
@font-face {
@@ -53,6 +55,8 @@ import 'vant/lib/icon/local.css';
<van-icon class-prefix="my-icon" name="extra" />
```
## API
### Props
| Attribute | Description | Type | Default |