set image index in query string
This commit is contained in:
parent
f0ded60d7d
commit
c7654c0005
|
@ -66,19 +66,31 @@ export default {
|
|||
methods: {
|
||||
handleFeaturedClick (index) {
|
||||
this.activeRow = index
|
||||
this.activeImageIndex = 0
|
||||
this.activeGalleryIndex = index
|
||||
this.$router.push({path: this.$route.path, query: { gallery: this.galleries[index].id}})
|
||||
this.setQueryString()
|
||||
},
|
||||
handleThumbClick(gallery, image) {
|
||||
this.activeGalleryIndex = gallery
|
||||
this.activeImageIndex = image
|
||||
this.imageViewerIsVisible = true
|
||||
this.setQueryString()
|
||||
},
|
||||
handleClickNext () {
|
||||
this.activeImageIndex++;
|
||||
},
|
||||
handleClickPrev () {
|
||||
this.activeImageIndex--;
|
||||
},
|
||||
setQueryString () {
|
||||
this.$router.push({
|
||||
path: this.$route.path,
|
||||
query: {
|
||||
gallery: this.activeGalleryIndex,
|
||||
image: this.activeImageIndex,
|
||||
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue