Button 按钮
常用操作按钮
基础用法
使用color、type属性来定义 Button 的样式。
禁用状态
使用 disabled 属性来控制按钮是否为禁用。 该属性值为 Boolean 类型。
设置尺寸
使用 size 属性来定义按钮的具体尺寸。
Button API
Button 属性
| 属性名 | 说明 | 类型 | 可选值 | 默认值 |
|---|---|---|---|---|
| color | 按钮背景色(支持渐变) | string | ----------------- | --- |
| type | 按钮类型(insert: 内部动效) | string | insert/line | default |
| direction | 配合 insert 使用,控制动效的移动方向 | string | top/ bottom/ left/ right | bottom |
| disabled | 按钮是否为禁用状态 | boolean | false/ true | false |
| size | 设置按钮尺寸 | string | large/default/small | default |