No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    how to combine modal and slider

    Help
    1
    1
    961
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      joe last edited by

      I combine modal and slider to get a GallerySlider, but I fail , this is my code
      <pre>
      <q-modal ref=“modal” class=“maximized” v-if=“photos.length”>
      <q-layout>
      <div slot=“header” class=“toolbar”>
      <button @click=“cancel”>
      <i>arrow_back</i>
      </button>
      <q-toolbar-title :padding=“1” class=“text-center”>
      {{ currentSlide + 1 }}/ {{ total }}
      </q-toolbar-title>
      </div>
      <q-slider ref=“slider” arrows fullscreen @slide="__updateCurrentSlide" class=“text-white bg-black q-gallery-slider”>
      <div v-for="(img, index) in photos" :key=“index” slot=“slide” class=“no-padding flex items-center justify-center”>
      <div class=“full-width”>
      <div class=“card”>
      <img :src=“img.loaded ? img.media + ‘?imageView2/2/w/500’ : ‘statics/loading.gif’” style=“margin: 0 auto” :style="{width: img.loaded ? ‘100%’ : ‘38px’}">
      <div class=“card-content” v-if=“img.desc”>
      {{ img.desc }}
      </div>
      </div>
      </div>
      </div>
      </q-slider>
      <div slot=“footer”>
      <button class=“float-left” @click=“cancel”>关闭</button>
      </div>
      </q-layout>
      </q-modal>
      </pre>

      when the photos change , the slider is not reactive, who can help me

      1 Reply Last reply Reply Quote 0
      • First post
        Last post