[Doc] add some english documents (#220)
* [bugfix] Checkbox border render error in weixin browser * [bugfix] TreeSelect dependency path error * [bugfix] Swipe should clear autoplay timer when destroyed
This commit is contained in:
@@ -0,0 +1,89 @@
|
||||
## Button
|
||||
|
||||
### Install
|
||||
``` javascript
|
||||
import { Button } from 'vant';
|
||||
|
||||
Vue.component(Button.name, Button);
|
||||
```
|
||||
|
||||
### Usage
|
||||
|
||||
#### Type
|
||||
|
||||
:::demo Type
|
||||
```html
|
||||
<van-button type="default">Default</van-button>
|
||||
<van-button type="primary">Primary</van-button>
|
||||
<van-button type="danger">Danger</van-button>
|
||||
```
|
||||
:::
|
||||
|
||||
#### Size
|
||||
|
||||
:::demo Size
|
||||
```html
|
||||
<van-button size="large">Large</van-button>
|
||||
<van-button size="normal">Normal</van-button>
|
||||
<van-button size="small">Small</van-button>
|
||||
<van-button size="mini">Mini</van-button>
|
||||
```
|
||||
:::
|
||||
|
||||
#### Disabled
|
||||
|
||||
:::demo Disabled
|
||||
```html
|
||||
<van-button disabled>Diabled</van-button>
|
||||
```
|
||||
:::
|
||||
|
||||
#### Loading
|
||||
|
||||
:::demo Loading
|
||||
```html
|
||||
<van-button loading></van-button>
|
||||
<van-button loading type="primary"></van-button>
|
||||
```
|
||||
:::
|
||||
|
||||
#### Custom Tag
|
||||
Use `tag` prop to custom button tag
|
||||
|
||||
:::demo Custom Tag
|
||||
```html
|
||||
<van-button tag="a" href="https://www.youzan.com" target="_blank">
|
||||
Button
|
||||
</van-button>
|
||||
```
|
||||
:::
|
||||
|
||||
#### Action Button
|
||||
|
||||
:::demo Action Button
|
||||
```html
|
||||
<van-button type="primary" bottom-action>Text</van-button>
|
||||
|
||||
<van-row>
|
||||
<van-col span="12">
|
||||
<van-button bottom-action>Text</van-button>
|
||||
</van-col>
|
||||
<van-col span="12">
|
||||
<van-button type="primary" bottom-action>Text</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
```
|
||||
:::
|
||||
|
||||
### API
|
||||
|
||||
| Attribute | Description | Type | Default | Accepted Values |
|
||||
|-----------|-----------|-----------|-------------|-------------|
|
||||
| type | Type | `String` | `default` | `primary` `danger` |
|
||||
| size | Size | `String` | `normal` | `large` `small` `mini` |
|
||||
| tag | Tag | `String` | `button` | - |
|
||||
| nativeType | Native Type Attribute | `String` | `''` | - |
|
||||
| diabled | Whether disable button | `Boolean` | `false` | - |
|
||||
| loading | Whether show loading status | `Boolean` | `false` | - |
|
||||
| block | Whether to set display block | `Boolean` | `false` | - |
|
||||
| bottomAction | Whether to be action button | `Boolean` | `false` | - |
|
||||
Reference in New Issue
Block a user