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