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 @@
style="border-radius: .5rem;",
position="bottom-right")
div(v-if="carousel.visibility")
q-carousel.q-py-sm(v-model="slide", infinite, @input="getCarouselIcon(index)")
// div(v-if="carousel.visibility")
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
......@@ -413,7 +414,6 @@
watch: {
slide (val) {
let icon
this.carousel.slide = val
switch (val) {
case 0:
icon = 'open_with'
......@@ -428,7 +428,9 @@
icon = 'open_with'
break
}
this.carousel.icon = icon
// this.carousel.slide = val
// this.carousel.icon = icon
this.carousel = {slide: val, icon: icon, visibility: this.carousel.visibility}
},
annotations () {
this.updateAnnotationUIStates()
......@@ -462,6 +464,10 @@
console.log(val)
},
carouselVisibility () {
console.log(this.carousel.slide)
if (this.$refs.carousel) {
this.$refs.carousel.goToSlide(this.carousel.slide)
}
this.carousel.visibility = !this.carousel.visibility
},
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