From 7e3f17c4a32f61c8fc5cce5ba28e4f8843603542 Mon Sep 17 00:00:00 2001 From: thomaswan Date: Wed, 15 Sep 2021 19:21:33 +0800 Subject: [PATCH] SpeedDial hideOnClickOutside not working this.bindDocumentClickListener() is called in beforeMount without case checking. update code to check props hideOnClickOutside before bind listener. --- src/components/speeddial/SpeedDial.vue | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/components/speeddial/SpeedDial.vue b/src/components/speeddial/SpeedDial.vue index 92362272d..55ac48eb0 100644 --- a/src/components/speeddial/SpeedDial.vue +++ b/src/components/speeddial/SpeedDial.vue @@ -103,14 +103,12 @@ export default { this.list.style.setProperty('--item-diff-y', `${hDiff / 2}px`); } } - + }, + beforeMount() { if (this.hideOnClickOutside) { this.bindDocumentClickListener(); } }, - beforeMount() { - this.bindDocumentClickListener(); - }, methods: { onItemClick(e, item) { if (item.command) {