From e011898cc72ab1fb3eed5c2f40690449d055a8ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E7=81=8F?= Date: Fri, 13 Jan 2017 15:35:38 +0800 Subject: [PATCH] fixed #197 fixed #197 --- src/components/modal/modal.vue | 3 ++- test/routers/more.vue | 32 ++++++++++++++++++++++++-------- 2 files changed, 26 insertions(+), 9 deletions(-) diff --git a/src/components/modal/modal.vue b/src/components/modal/modal.vue index 00b8d1d8..63cf6eee 100644 --- a/src/components/modal/modal.vue +++ b/src/components/modal/modal.vue @@ -197,11 +197,12 @@ visible (val) { if (val === false) { this.buttonLoading = false; - setTimeout(() => { + this.timer = setTimeout(() => { this.wrapShow = false; this.removeScrollEffect(); }, 300); } else { + if (this.timer) clearTimeout(this.timer); this.wrapShow = true; this.addScrollEffect(); } diff --git a/test/routers/more.vue b/test/routers/more.vue index fa1445a1..3c351b41 100644 --- a/test/routers/more.vue +++ b/test/routers/more.vue @@ -4,16 +4,32 @@ }