# Icon 图标
# 使用指南
import Icon from '@hips/uni-ui/lib/icon';
export default {
components: {
'hips-icon': Icon,
},
};
1
2
3
4
5
6
7
2
3
4
5
6
7
# 跨平台支持
微信小程序 | 支付宝小程序 | 钉钉小程序 | 百度小程序 | 头条小程序 | QQ 小程序 |
---|---|---|---|---|---|
✔️ | - | - | - | - | - |
# 代码演示
# 基础用法
<hips-icon name="add-o" />
1
# 设置大小
<hips-icon name="add-o" size="80" />
1
# 设置颜色
<hips-icon name="add-o" color="red" />
1
# API
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
name | 图标名称 | String | - |
size | 图标大小 | String | Number | 32 |
color | 图标颜色 | String | #333333 |
注意
size 使用 rpx
作为单位