Button 按钮
基础用法
使用type、round、circle来定义按钮样式
loading
禁用状态
使用disabled属性设置按钮禁用
loading
按钮图标
直接将图标嵌入按钮
loading
加载状态
使用loading属性使按钮变为加载状态(按钮加载时会变为禁用)
loading
改变大小
通过设置size属性来改变按钮大小
loading
回到顶部
通过 toTop 属性为按钮设置回到顶部功能, 通过绑定 target 属性可以滚动到具有指定 id 的元素顶部
loading
Button API
Button Attributes
| 属性名 | 说明 | 类型 | 默认值 |
|---|---|---|---|
| type | 按钮的类型 | 'primary' | 'success' | 'warning' | 'error' | 'default' | success |
| nativeType | 原生type属性 | 'button' | 'submit' | 'reset' | button |
| toTop | 是否触发回到顶部 | boolean | false |
| target | 触发回到顶部的目标元素id、window或者document | string | window |
| size | 按钮尺寸 | string | 'large' | 'medium' | 'small' | 32 |
| color | 颜色 | string | #bebe |
| round | 圆角 | boolean | false |
| circle | 圆形 | boolean | false |
| disabled | 禁用 | boolean | false |
| loading | 加载中 | boolean | false |
