2017-11-06 19:22:02 +08:00
|
|
|
<script>
|
|
|
|
var iconList = require('examples/icon.json');
|
|
|
|
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
icons: iconList
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
.demo-icon .source > i {
|
|
|
|
color: #8492a6;
|
|
|
|
margin: 0 20px;
|
|
|
|
font-size: 1.5em;
|
|
|
|
vertical-align: middle;
|
|
|
|
}
|
|
|
|
|
|
|
|
.demo-icon .source > button {
|
|
|
|
margin: 0 20px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.page-component .content > ul.icon-list {
|
|
|
|
overflow: hidden;
|
|
|
|
list-style: none;
|
|
|
|
padding: 0;
|
|
|
|
border: solid 1px #eaeefb;
|
|
|
|
border-radius: 4px;
|
|
|
|
}
|
|
|
|
.icon-list li {
|
|
|
|
float: left;
|
|
|
|
width: 16.66%;
|
|
|
|
text-align: center;
|
|
|
|
height: 120px;
|
|
|
|
line-height: 120px;
|
|
|
|
color: #666;
|
|
|
|
font-size: 13px;
|
|
|
|
transition: color .15s linear;
|
2017-12-03 18:03:06 +08:00
|
|
|
|
2017-11-06 19:22:02 +08:00
|
|
|
border-right: 1px solid #eee;
|
|
|
|
border-bottom: 1px solid #eee;
|
|
|
|
margin-right: -1px;
|
|
|
|
margin-bottom: -1px;
|
2017-12-03 18:03:06 +08:00
|
|
|
|
2017-11-06 19:22:02 +08:00
|
|
|
@utils-vertical-center;
|
2017-12-03 18:03:06 +08:00
|
|
|
|
2017-11-06 19:22:02 +08:00
|
|
|
& span {
|
|
|
|
display: inline-block;
|
|
|
|
line-height: normal;
|
|
|
|
vertical-align: middle;
|
|
|
|
font-family: 'Helvetica Neue',Helvetica,'PingFang SC','Hiragino Sans GB','Microsoft YaHei',SimSun,sans-serif;
|
|
|
|
color: #99a9bf;
|
|
|
|
}
|
|
|
|
& i {
|
|
|
|
display: block;
|
|
|
|
font-size: 24px;
|
|
|
|
margin-bottom: 15px;
|
|
|
|
color: #8492a6;
|
|
|
|
}
|
|
|
|
&:hover {
|
|
|
|
color: rgb(92, 182, 255);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
|
|
|
|
## Icon
|
|
|
|
|
2017-11-11 06:04:58 +08:00
|
|
|
Element proporciona un conjunto de iconos propios.
|
2017-11-06 19:22:02 +08:00
|
|
|
|
2017-11-11 06:04:58 +08:00
|
|
|
### Uso básico
|
2017-11-06 19:22:02 +08:00
|
|
|
|
2017-11-11 06:04:58 +08:00
|
|
|
Simplemente asigna el nombre de la clase a `el-icon-iconName`.
|
2017-11-06 19:22:02 +08:00
|
|
|
|
|
|
|
:::demo
|
|
|
|
|
|
|
|
```html
|
|
|
|
<i class="el-icon-edit"></i>
|
|
|
|
<i class="el-icon-share"></i>
|
|
|
|
<i class="el-icon-delete"></i>
|
|
|
|
<el-button type="primary" icon="el-icon-search">Search</el-button>
|
|
|
|
|
|
|
|
```
|
|
|
|
:::
|
|
|
|
|
2017-11-11 06:04:58 +08:00
|
|
|
### Iconos
|
2017-11-06 19:22:02 +08:00
|
|
|
|
|
|
|
<ul class="icon-list">
|
|
|
|
<li v-for="name in icons" :key="name">
|
|
|
|
<span>
|
|
|
|
<i :class="'el-icon-' + name"></i>
|
|
|
|
{{'el-icon-' + name}}
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
</ul>
|