From adca528e99cef4a7ced5ce2b3b61b2e2634ce166 Mon Sep 17 00:00:00 2001 From: pangxie1991 Date: Wed, 18 Jan 2017 19:49:24 +0800 Subject: [PATCH] timer --- dist/toast/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dist/toast/index.js b/dist/toast/index.js index b48952d9..68d8ee8a 100644 --- a/dist/toast/index.js +++ b/dist/toast/index.js @@ -12,9 +12,13 @@ module.exports = { zuiToast }); - zuiToast.timer = setTimeout(() => { + var timer = setTimeout(() => { this.clearZuiToast(); }, timeout || 3000); + + this.setData({ + 'zuiToast.timer': timer + }); }, clearZuiToast() {