2.0.0 • Published 6 years ago
nuke-round-button v2.0.0
Button
- category: UI
- chinese: 按钮
- type: UI 组件
设计思路
千牛定制的圆角按钮,自带渐变色,包含 primary, warning, disabled 3 种展现。
API
Button
属性 | 说明 | 类型 | 默认值 |
---|---|---|---|
type | 按钮的强调程度类型,可选:normal(普通) primary (重要) | string | normal |
shape | normal , warning (警告) | string | normal |
size | 设置按钮大小,可选:medium large | string | medium |
disabled | 设置按钮禁用状态 | boolean | false |
onPress | 点击 press 事件的 handler | function | 无 |
onLongpress | 长按事件的 handler( 仅 native 生效) | function | 无 |
rect | 是否直角 | boolean | false |
block | 以 block 的方式展现 | boolean | false |
请注意:onLongpress
中,p
小写,且该事件仅 native 生效
Button.Group
属性配置 | 说明 | 类型 | 默认值 |
---|---|---|---|
rect | 是否直角,所有子级 button 都会直角 | boolean | false |
block | 以 block 的方式展现 | boolean | false |