Carousel: Fix onChange emit value (#16705)

pull/16415/head
iamkun 2019-07-31 11:49:08 +08:00 committed by hetech
parent a08cc0f19d
commit 484a033a66
1 changed files with 3 additions and 1 deletions

View File

@ -148,7 +148,9 @@ export default {
activeIndex(val, oldVal) { activeIndex(val, oldVal) {
this.resetItemPosition(oldVal); this.resetItemPosition(oldVal);
this.$emit('change', val, oldVal); if (oldVal > -1) {
this.$emit('change', val, oldVal);
}
}, },
autoplay(val) { autoplay(val) {