From 6db1a9656dba678a975b49e44290422ca7a8bc2d Mon Sep 17 00:00:00 2001 From: neverland Date: Thu, 31 Oct 2019 11:38:47 +0800 Subject: [PATCH] feat(Toast): change default duration to 2s (#2227) --- packages/toast/README.md | 2 +- packages/toast/toast.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/toast/README.md b/packages/toast/README.md index 8cea9e28..7adb3c15 100644 --- a/packages/toast/README.md +++ b/packages/toast/README.md @@ -94,7 +94,7 @@ const timer = setInterval(() => { | forbidClick | 是否禁止背景点击 | *boolean* | `false` | - | | loadingType | 加载图标类型, 可选值为 `spinner` | *string* | `circular` | - | | zIndex | z-index 层级 | *number* | `1000` | - | -| duration | 展示时长(ms),值为 0 时,toast 不会消失 | *number* | `3000` | - | +| duration | 展示时长(ms),值为 0 时,toast 不会消失 | *number* | `2000` | - | | selector | 自定义选择器 | *string* | `van-toast` | - | | context | 选择器的选择范围,可以传入自定义组件的 this 作为上下文 | *object* | 当前页面 | - | | onClose | 关闭时的回调函数 | *Function* | - | - | diff --git a/packages/toast/toast.ts b/packages/toast/toast.ts index 8accc157..a6708bf5 100644 --- a/packages/toast/toast.ts +++ b/packages/toast/toast.ts @@ -23,7 +23,7 @@ const defaultOptions = { message: '', show: true, zIndex: 1000, - duration: 3000, + duration: 2000, position: 'middle', forbidClick: false, loadingType: 'circular',