set image index in query string

This commit is contained in:
ManjaroOne666 2019-01-28 09:57:48 +00:00
parent f0ded60d7d
commit c7654c0005
1 changed files with 13 additions and 1 deletions

View File

@ -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,
},
})
}
}
}