Files
mes-ui-d2/static/md/组件 - 图标组件.md
李杨 65ec820e68 no message
Former-commit-id: 28ec2beb0befdc6a796458fbcc1a0c3786fb8d62
Former-commit-id: 82768e538a271a2354616cd01f84fd73631a62b2
Former-commit-id: 450e74928f5d6bdba20e01ce57bebdfde0d512a1
2018-03-21 20:29:50 +08:00

783 B

参数

参数名 介绍 必选 值类型 可选值 默认值
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 中文网

fontawesome.com