fix Carousel can not trigger on-change event when click the bottom dot
This commit is contained in:
parent
253c7010c9
commit
544398501f
1 changed files with 2 additions and 0 deletions
|
@ -269,8 +269,10 @@
|
|||
},
|
||||
dotsEvent (event, n) {
|
||||
let curIndex = this.showCopyTrack ? this.copyTrackIndex : this.trackIndex;
|
||||
const oldCurrentIndex = this.currentIndex;
|
||||
if (event === this.trigger && curIndex !== n) {
|
||||
this.updateTrackIndex(n);
|
||||
this.$emit('on-change', oldCurrentIndex, this.currentIndex);
|
||||
this.$emit('input', n);
|
||||
// Reset autoplay timer when trigger be activated
|
||||
this.setAutoplay();
|
||||
|
|
Loading…
Add table
Reference in a new issue