no message

Former-commit-id: e53eb6f9a1aec5c29922346342f0f1490a8dee22
Former-commit-id: 5952c33f74a3221ffcdcd43d5e5fd785b8d37aef
Former-commit-id: f95df5675d25421fe527c4ac3b77140f24ab5341
This commit is contained in:
李杨
2018-02-22 18:01:26 +08:00
parent ce7000b81a
commit fc8667bd05
2 changed files with 63 additions and 16 deletions

View File

@@ -1,17 +1,22 @@
<template>
<Container>
<PageHeader
slot="header"
title="SVG图标组件">
</PageHeader>
<el-row>
<el-col class="icon-card" :span="4" v-for="(icon, index) in $IconSvg" :key="index">
<IconSvg class="icon" :name="icon"></IconSvg>
<div class="icon-title">
<span>{{icon}}</span>
</div>
</el-col>
</el-row>
<Container type="ghost">
<el-card class="dd-mb">
<PageHeader
slot="header"
title="SVG图标组件">
</PageHeader>
<el-row>
<el-col class="icon-card" :span="4" v-for="(icon, index) in $IconSvg" :key="index">
<IconSvg class="icon" :name="icon"></IconSvg>
<div class="icon-title">
<span>{{icon}}</span>
</div>
</el-col>
</el-row>
</el-card>
<el-card>
<Markdown url="/static/markdownFiles/article/组件 - 图标组件.md"></Markdown>
</el-card>
</Container>
</template>
@@ -23,16 +28,23 @@
align-items: center;
flex-direction: column;
height: 150px;
&:hover {
.icon {
transform: scale(1.1);
}
.icon-title {
color: $color-text-main;
}
}
}
.icon {
height: 80px;
width: 80px;
transition: all .3s;
}
.icon-title {
font-size: 12px;
margin-top: 10px;
span {
color: $color-text-sub;
}
color: $color-text-placehoder;
}
</style>

View File

@@ -0,0 +1,35 @@
## 参数
| 参数名 | 介绍 | 必选 | 值类型 | 可选值 | 默认值 |
| --- | --- | --- | --- | --- | --- |
| 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>
```
## 参考
演示图表来源 [http://iconfont.cn/ @小啊小二饼 《2.5D工作日记》](http://iconfont.cn/collections/detail?spm=a313x.7781069.1998910419.d9df05512&cid=8219)