We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 37e27b6 commit 6e030cfCopy full SHA for 6e030cf
src/components/slider/QSlider.vue
@@ -153,10 +153,11 @@ export default {
153
}
154
},
155
goToSlide (slide, done) {
156
+ let direction = ''
157
this.__cleanup()
158
159
const finish = () => {
- this.$emit('slide', this.slide)
160
+ this.$emit('slide', this.slide, direction)
161
this.__planAutoPlay()
162
if (typeof done === 'function') {
163
done()
@@ -171,7 +172,7 @@ export default {
171
172
if (!this.hasOwnProperty('initialPosition')) {
173
this.position = -this.slide * 100
174
-
175
+ direction = slide > this.slide ? 'next' : 'previous'
176
if (this.infinite) {
177
this.slide = normalizeToInterval(slide, 0, this.slidesNumber - 1)
178
this.positionSlide = normalizeToInterval(slide, -1, this.slidesNumber)
0 commit comments