From 257952bd692fa53abd6b9943289f3afe3492017a Mon Sep 17 00:00:00 2001 From: Jiajun Chen Date: Mon, 12 Aug 2019 09:44:38 +0800 Subject: [PATCH] fix(card): fix similar bug #377 (#383) --- components/card/CardPrimaryAction.vue | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/components/card/CardPrimaryAction.vue b/components/card/CardPrimaryAction.vue index 190f7f47a..a8a227c82 100644 --- a/components/card/CardPrimaryAction.vue +++ b/components/card/CardPrimaryAction.vue @@ -25,10 +25,17 @@ export default { }, watch: { ripple () { - if (!this.ripple && this.mdcRipple) { - this.mdcRipple.destroyed() + if (this.ripple) { + if (this.mdcRipple) { + this.mdcRipple.destroy() + } + MDCRipple.attachTo(this.$el) + } else { + if (this.mdcRipple) { + this.mdcRipple.destroy() + } + this.mdcRipple = undefined } - if (this.ripple) this.mdcRipple = MDCRipple.attachTo(this.$el) } }, mounted () {