Files
mes-ui-d2/static/markdownFiles/article/组件 - 图标组件.md
李杨 2cdb105e7b no message
Former-commit-id: a50511cb36f6ab3960e5a66b0fd3f952717bd030
Former-commit-id: 7852addc7f9d39775fee6494e7b2088cb84de5d2
Former-commit-id: e91aa14f694da2d585e26aed228d82fa4ab06798
2018-02-22 18:29:54 +08:00

39 lines
783 B
Markdown

## 参数
| 参数名 | 介绍 | 必选 | 值类型 | 可选值 | 默认值 |
| --- | --- | --- | --- | --- | --- |
| name | 图标名称 | 非 | String | font-awesome 所有图标名 | font-awesome |
## 使用方法
基本
```
// 这样用没有毛病 但是也没什么用
<Icon></Icon>
// 指定图标名称
<Icon name="github"></Icon>
// 设置行内样式
<Icon name="github" style="font-size: 100px;"></Icon>
// 设置 class
<Icon name="github" class="icon-class-demo"></Icon>
```
这个组件只是简化了写法而已
```
<Icon name="github"></Icon>
// 等同于
<i class="fa fa-github" aria-hidden="true"></i>
```
## 参考
图标索引
[Font Awesome 中文网](http://www.fontawesome.com.cn/faicons/)
[fontawesome.com](https://fontawesome.com/icons?d=gallery)