Commit 5e53bb5b authored by christianrhansen's avatar christianrhansen

mobile: remembering the last slide

parent cb42d65a
Pipeline #16812 passed with stage
in 1 minute and 7 seconds
...@@ -165,8 +165,9 @@ ...@@ -165,8 +165,9 @@
style="border-radius: .5rem;", style="border-radius: .5rem;",
position="bottom-right") position="bottom-right")
div(v-if="carousel.visibility") // div(v-if="carousel.visibility")
q-carousel.q-py-sm(v-model="slide", infinite, @input="getCarouselIcon(index)") div(:class="{'hidden': !carousel.visibility}")
q-carousel.q-py-sm(ref="carousel", v-model="slide", infinite, @input="getCarouselIcon(index)")
// //
q-carousel-slide.q-pa-sm q-carousel-slide.q-pa-sm
...@@ -413,7 +414,6 @@ ...@@ -413,7 +414,6 @@
watch: { watch: {
slide (val) { slide (val) {
let icon let icon
this.carousel.slide = val
switch (val) { switch (val) {
case 0: case 0:
icon = 'open_with' icon = 'open_with'
...@@ -428,7 +428,9 @@ ...@@ -428,7 +428,9 @@
icon = 'open_with' icon = 'open_with'
break break
} }
this.carousel.icon = icon // this.carousel.slide = val
// this.carousel.icon = icon
this.carousel = {slide: val, icon: icon, visibility: this.carousel.visibility}
}, },
annotations () { annotations () {
this.updateAnnotationUIStates() this.updateAnnotationUIStates()
...@@ -462,6 +464,10 @@ ...@@ -462,6 +464,10 @@
console.log(val) console.log(val)
}, },
carouselVisibility () { carouselVisibility () {
console.log(this.carousel.slide)
if (this.$refs.carousel) {
this.$refs.carousel.goToSlide(this.carousel.slide)
}
this.carousel.visibility = !this.carousel.visibility this.carousel.visibility = !this.carousel.visibility
}, },
handleModal () { handleModal () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment