From 961999dbbed6bf46f47fee8db43aeeee5568cdf5 Mon Sep 17 00:00:00 2001 From: neverland Date: Mon, 16 Dec 2019 20:20:32 +0800 Subject: [PATCH] fix(Popup): should reopen when activated (#5286) --- src/mixins/popup/index.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/mixins/popup/index.js b/src/mixins/popup/index.js index 5ca101653..a3d4a8465 100644 --- a/src/mixins/popup/index.js +++ b/src/mixins/popup/index.js @@ -75,8 +75,9 @@ export const PopupMixin = { /* istanbul ignore next */ activated() { - if (this.value) { - this.open(); + if (this.shouldReopen) { + this.$emit('input', true); + this.shouldReopen = false; } }, @@ -90,7 +91,10 @@ export const PopupMixin = { /* istanbul ignore next */ deactivated() { - this.close(); + if (this.value) { + this.close(); + this.shouldReopen = true; + } }, methods: {