<script setup>
import { ref } from 'vue'
const viewImagesDialogVisible = ref(false)
const imgUrls = ref([])

const open = (row) => {
  viewImagesDialogVisible.value = true
  imgUrls.value = JSON.parse(row.imgUrl)
}
defineExpose({
  open
})
</script>
<template>
  <el-dialog
    v-model="viewImagesDialogVisible"
    title="反馈图片"
    width="50%"
    align-center
  >
    <el-carousel :interval="4000" type="card" height="200px">
      <el-carousel-item v-for="item in imgUrls" :key="item">
        <el-image
          style="width: 100px; height: 100px"
          :src="item"
          :fit="contain"
        />
      </el-carousel-item>
    </el-carousel>
    <template #footer>
      <span class="dialog-footer">
        <el-button @click="centerDialogVisible = false">关闭</el-button>
      </span>
    </template>
  </el-dialog>
</template>
<style scoped>
.el-carousel__item h3 {
  color: #475669;
  opacity: 0.75;
  line-height: 200px;
  margin: 0;
  text-align: center;
}

.el-carousel__item:nth-child(2n) {
  background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n + 1) {
  background-color: #d3dce6;
}
</style>
