[Doc] new theme

This commit is contained in:
陈嘉涵
2019-05-15 20:53:04 +08:00
parent 3cae4288f2
commit d0f4169c86
130 changed files with 1460 additions and 1147 deletions
+12 -11
View File
@@ -1,4 +1,4 @@
## Toast
# Toast
### Install
@@ -8,16 +8,15 @@ import { Toast } from 'vant';
Vue.use(Toast);
```
### Usage
## Usage
#### Text
### Text
```javascript
Toast('Some messages');
```
#### Loading
### Loading
```javascript
Toast.loading({
@@ -26,16 +25,14 @@ Toast.loading({
});
```
#### Success/Fail
### Success/Fail
```javascript
Toast.success('Success');
Toast.fail('Fail');
```
#### Advanced Usage
### Advanced Usage
```javascript
const toast = Toast.loading({
@@ -57,7 +54,8 @@ const timer = setInterval(() => {
}, 1000);
```
#### $toast Method
### $toast Method
After import the Toast component, the $toast method is automatically mounted on Vue.prototype, making it easy to call within a vue component.
```js
@@ -68,7 +66,8 @@ export default {
}
```
#### Singleton
### Singleton
Toast use singleton mode by default, if you need to pop multiple Toast at the same time, you can refer to the following example
```js
@@ -81,6 +80,8 @@ toast1.clear();
toast2.clear();
```
## API
### Methods
| Methods | Attribute | Return value | Description |