[new feature] Button: add loading-type prop

This commit is contained in:
陈嘉涵
2019-05-03 08:42:52 +08:00
parent 7f0615a503
commit 1616f60a31
7 changed files with 27 additions and 5 deletions
+7 -1
View File
@@ -44,7 +44,12 @@ Vue.use(Button);
```html
<van-button loading type="primary" />
<van-button loading type="primary" loading-text="Loading..." />
<van-button
loading
type="danger"
loading-type="spinner"
loading-text="Loading..."
/>
```
#### Shape
@@ -79,6 +84,7 @@ Vue.use(Button);
| disabled | Whether to disable button | `Boolean` | `false` |
| loading | Whether show loading status | `Boolean` | `false` |
| loading-text | Loading text | `String` | - |
| loading-type | Loading type, can be set to `spinner` | `String` | `circular` |
| loading-size | Loading icon size | `String` | `20px` |
| url | Link URL | `String` | - |
| to | Target route of the link, same as to of `vue-router` | `String | Object` | - |