html

  <el-carousel ref="remarkCaruselUp" :interval="5000" arrow="always">
        <el-carousel-item
          v-for="(item, i) in uploadDataAll.dialogImageUrlList"
          :key="i"
          :name="'i' + i"
          :autoplay="false"
        >
          <img class="up-d-img" :src="item.url" alt="" />
        </el-carousel-item>
      </el-carousel>

js


const remarkCaruselUp = ref(null)
setup() {
// 点击查看图片
    const handlePictureCardPreview = (i) => {
//查看对应name的图片
      nextTick(() => {
        remarkCaruselUp.value.setActiveItem('i' + i)
      })
    }
return { remarkCaruselUp }
}

Logo

前往低代码交流专区

更多推荐