From 45ecd1f43858ed4d06d28a1a59016200a7fdbd81 Mon Sep 17 00:00:00 2001 From: xuxiaoyan Date: Sat, 1 Dec 2018 02:17:05 +0800 Subject: [PATCH] fix(popup): hide asynchronously[#242] --- components/popup/index.vue | 4 +++- components/toast/toast.vue | 4 +--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/popup/index.vue b/components/popup/index.vue index f551f7aea..26ad0831f 100644 --- a/components/popup/index.vue +++ b/components/popup/index.vue @@ -109,7 +109,9 @@ this.$_showPopupBox() } } else { - this.$_hidePopupBox() + setTimeout(() => { + this.$_hidePopupBox() + }, 0) } }, preventScrollExclude(val, oldVal) { diff --git a/components/toast/toast.vue b/components/toast/toast.vue index e2bbadad0..a4e1fa401 100644 --- a/components/toast/toast.vue +++ b/components/toast/toast.vue @@ -86,9 +86,7 @@ export default { this.$emit('hide') }, hide() { - setTimeout(() => { - this.visible = false - }, 0) + this.visible = false }, }, }