how to combine modal and slider

  • I combine modal and slider to get a GallerySlider, but I fail , this is my code
    <q-modal ref=“modal” class=“maximized” v-if=“photos.length”>
    <div slot=“header” class=“toolbar”>
    <button @click=“cancel”>
    <q-toolbar-title :padding=“1” class=“text-center”>
    {{ currentSlide + 1 }}/ {{ total }}
    <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 ? + ‘?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 slot=“footer”>
    <button class=“float-left” @click=“cancel”>关闭</button>

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

Log in to reply