bug fixed #6329
This commit is contained in:
parent
ab7cf4f88e
commit
dd2d0315ab
2 changed files with 6 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<!--#6076-->
|
<!--#6076-->
|
||||||
<Carousel loop>
|
<Carousel loop @on-change="onChange">
|
||||||
<CarouselItem>
|
<CarouselItem>
|
||||||
<div class="demo-carousel">111111111111</div>
|
<div class="demo-carousel">111111111111</div>
|
||||||
</CarouselItem>
|
</CarouselItem>
|
||||||
|
@ -25,7 +25,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
onChange(oldIndex,newIndex){
|
||||||
|
console.log(oldIndex,newIndex,'------')
|
||||||
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
|
|
||||||
|
|
|
@ -272,8 +272,10 @@
|
||||||
},
|
},
|
||||||
dotsEvent (event, n) {
|
dotsEvent (event, n) {
|
||||||
let curIndex = this.showCopyTrack ? this.copyTrackIndex : this.trackIndex;
|
let curIndex = this.showCopyTrack ? this.copyTrackIndex : this.trackIndex;
|
||||||
|
const oldCurrentIndex = this.currentIndex;
|
||||||
if (event === this.trigger && curIndex !== n) {
|
if (event === this.trigger && curIndex !== n) {
|
||||||
this.updateTrackIndex(n);
|
this.updateTrackIndex(n);
|
||||||
|
this.$emit('on-change', oldCurrentIndex, this.currentIndex);
|
||||||
this.$emit('input', n);
|
this.$emit('input', n);
|
||||||
// Reset autoplay timer when trigger be activated
|
// Reset autoplay timer when trigger be activated
|
||||||
this.setAutoplay();
|
this.setAutoplay();
|
||||||
|
|
Loading…
Add table
Reference in a new issue