diff --git a/src/components/accordion/Accordion.vue b/src/components/accordion/Accordion.vue index 2e900fa17e..2688088bda 100755 --- a/src/components/accordion/Accordion.vue +++ b/src/components/accordion/Accordion.vue @@ -21,7 +21,9 @@ export default { } }, methods: { - onToggle(tab, index) { + onToggle(event, tab, index, isActive) { + const eventName = isActive ? 'tab-close' : 'tab-open'; + if (this.multiple) { let x = this.d_activeIndex; @@ -37,6 +39,11 @@ export default { } this.$emit('update:activeIndex', this.d_activeIndex); + + this.$emit(eventName, { + originalEvent: event, + index: index + }); } } } diff --git a/src/components/accordiontab/AccordionTab.vue b/src/components/accordiontab/AccordionTab.vue index b411e833b6..99326067eb 100755 --- a/src/components/accordiontab/AccordionTab.vue +++ b/src/components/accordiontab/AccordionTab.vue @@ -38,9 +38,9 @@ export default { }) }, methods: { - onTabClick() { + onTabClick(event) { if (!this.disabled) { - this.$parent.onToggle(this, DomHandler.index(this.$el)); + this.$parent.onToggle(event, this, DomHandler.index(this.$el), this.isTabActive()); } }, onTabKeydown(event) { diff --git a/src/views/accordion/AccordionDoc.vue b/src/views/accordion/AccordionDoc.vue index 878e480296..1f23beedf7 100755 --- a/src/views/accordion/AccordionDoc.vue +++ b/src/views/accordion/AccordionDoc.vue @@ -237,7 +237,7 @@ export default {