UNPKG

weex-nuke

Version:

基于 Rax 、Weex 的高性能组件体系 ~~

26 lines (16 loc) 1.16 kB
# Icon - category: UI - chinese: 图标 - type: UI组件 --- ## 设计思路 Icon 组件 是对 Image 组件的一个封装,预置了4个尺寸的图片,方便我们在开发中使用方形的图片。 考虑到使用便捷性,还额外加入了 Iconfont 图标的支持, 查看 demo 可以找到所有内置 icon。 ## API | 参数 | 说明 | 类型 | 默认值 | | ------- | ------------------------------------------------------------------------- | -------- | -------- | | type | 新增 type 字段,标识是 iconfont 还是图片,可选 `image` `iconfont` | string | 'image' | | size | type = image 时有效,定义了 icon 的尺寸:'xs', 'small', 'medium', 'large' | string | 'medium' | | onPress | 当传入 name 时失效,Press事件 | Function | 无 | | src | 图片链接地址或 iconfont url | string | 无 | | name | iconfont name 值 | string | 无 |