how to combine modal and slider



  • 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


Log in to reply
 

Looks like your connection to Quasar Framework was lost, please wait while we try to reconnect.