Skip to content

Commit 6db1a96

Browse files
authored
feat(Toast): change default duration to 2s (youzan#2227)
1 parent b1e6c90 commit 6db1a96

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/toast/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ const timer = setInterval(() => {
9494
| forbidClick | 是否禁止背景点击 | *boolean* | `false` | - |
9595
| loadingType | 加载图标类型, 可选值为 `spinner` | *string* | `circular` | - |
9696
| zIndex | z-index 层级 | *number* | `1000` | - |
97-
| duration | 展示时长(ms),值为 0 时,toast 不会消失 | *number* | `3000` | - |
97+
| duration | 展示时长(ms),值为 0 时,toast 不会消失 | *number* | `2000` | - |
9898
| selector | 自定义选择器 | *string* | `van-toast` | - |
9999
| context | 选择器的选择范围,可以传入自定义组件的 this 作为上下文 | *object* | 当前页面 | - |
100100
| onClose | 关闭时的回调函数 | *Function* | - | - |

packages/toast/toast.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const defaultOptions = {
2323
message: '',
2424
show: true,
2525
zIndex: 1000,
26-
duration: 3000,
26+
duration: 2000,
2727
position: 'middle',
2828
forbidClick: false,
2929
loadingType: 'circular',

0 commit comments

Comments
 (0)