no message

Former-commit-id: 020127d139b09b4071c7ee901ff8ccf51676ae50
Former-commit-id: e1cd79a1b4b217c49d5cacf534f5681d8647d465
Former-commit-id: 1730e133f70a7f2d44eb9cd26cbe58e169fba5ba
This commit is contained in:
李杨
2018-02-22 18:04:46 +08:00
parent fc8667bd05
commit 1d8fb02b37
2 changed files with 4 additions and 24 deletions

View File

@@ -15,7 +15,7 @@
</el-row>
</el-card>
<el-card>
<Markdown url="/static/markdownFiles/article/组件 - 图标组件.md"></Markdown>
<Markdown url="/static/markdownFiles/article/组件 - 图标组件 - svg.md"></Markdown>
</el-card>
</Container>
</template>

View File

@@ -2,34 +2,14 @@
| 参数名 | 介绍 | 必选 | 值类型 | 可选值 | 默认值 |
| --- | --- | --- | --- | --- | --- |
| name | 图标名称 | 非 | String | font-awesome 所有图标名 | font-awesome |
| name | 图标名称 | 非 | String | 放在 src/assets/icons/svg 中的 .svg 文件名 | 空 |
## 使用方法
基本
```
// 这样用没有毛病 但是也没什么用
<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>
<IconSvg name="your-svg-file-name"></IconSvg>
```
## 参考
演示图来源 [http://iconfont.cn/ @小啊小二饼 《2.5D工作日记》](http://iconfont.cn/collections/detail?spm=a313x.7781069.1998910419.d9df05512&cid=8219)
演示图来源 [iconfont.cn @小啊小二饼 《2.5D工作日记》](http://iconfont.cn/collections/detail?spm=a313x.7781069.1998910419.d9df05512&cid=8219)