feat(Toast): change default duration to 2s (#4886)

This commit is contained in:
neverland 2019-10-31 11:33:04 +08:00 committed by GitHub
parent f856bcae74
commit 02e84d1e15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -147,7 +147,7 @@ Toast.resetDefaultOptions('loading');
| forbidClick | Whether to forbid click background | *boolean* | `false` | - |
| closeOnClick | Whether to close after clicked | *boolean* | `false` | 2.1.5 |
| loadingType | Loading icon type, can be set to `spinner` | *string* | `circular` | - |
| duration | Toast duration(ms), won't disappear if value is 0 | *number* | `3000` | - |
| duration | Toast duration(ms), won't disappear if value is 0 | *number* | `2000` | - |
| className | Custom className | *any* | - | - |
| onOpened | Callback function after opened | *Function* | - | - |
| onClose | Callback function after close | *Function* | - | - |

View File

@ -150,7 +150,7 @@ Toast.resetDefaultOptions('loading');
| forbidClick | 是否禁止背景点击 | *boolean* | `false` | - |
| closeOnClick | 是否在点击后关闭 | *boolean* | `false` | 2.1.5 |
| loadingType | 加载图标类型, 可选值为 `spinner` | *string* | `circular` | - |
| duration | 展示时长(ms),值为 0 时toast 不会消失 | *number* | `3000` | - |
| duration | 展示时长(ms),值为 0 时toast 不会消失 | *number* | `2000` | - |
| className | 自定义类名 | *any* | - | - |
| onOpened | 完全展示后的回调函数 | *Function* | - | - |
| onClose | 关闭时的回调函数 | *Function* | - | - |

View File

@ -11,7 +11,7 @@ const defaultOptions = {
className: '',
onClose: null,
onOpened: null,
duration: 3000,
duration: 2000,
iconPrefix: undefined,
position: 'middle',
transition: 'van-fade',