Button 按钮
常用的操作按钮。
何时使用
按钮用于开始一个即时操作。
基本使用
不同尺寸
禁用状态
圆角按钮
圆形按钮
朴素按钮
加载状态
图标按钮
Button参数
| 参数 | 类型 | 默认 | 说明 |
|---|---|---|---|
| size | ButtonSizeType | -- | 尺寸 |
| type | ButtonType | -- | 类型 |
| plain | boolean | false | 是否为朴素按钮 |
| round | boolean | false | 是否为圆角按钮 |
| circle | boolean | false | 是否为圆形按钮 |
| disabled | boolean | false | 是否为禁用状态 |
| autofocus | boolean | false | 原生 autofocus 属性 |
| native-type | ButtonNativeType | button | 原生 type 属性 |
| loading | boolean | false | 是否为加载状态 |
| icon | string | -- | 图标类名 |
Button类型定义
ButtonType
ts
export type ButtonType = 'primary'
| 'success'
| 'warning'
| 'danger'
| 'info'
| 'text'ButtonSizeType
ts
export type ButtonSizeType = 'large' | 'default' | 'small'ButtonNativeType
ts
export type ButtonNativeType = 'button' | 'submit' | 'reset'Button插槽
| 插槽名 | 说明 |
|---|---|
| icon | 自定义图标组件 |