he wei
2025-06-06 895129470d7ee48183fc15b9ee18ef0880503e5d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<template>
  <div class="image-list-container">
    <span class="image-title">{{ title }}</span>
    <div class="image-block" v-for="(item, key) in urls" :key="'key' + key">
      <el-image :style="getImageStyle" :src="item" :preview-src-list="list">
      </el-image>
    </div>
  </div>
</template>
 
<script>
export default {
  props: {
    title: {
      type: String,
      default: "",
    },
    width: {
      type: [String, Number],
      default: 100,
    },
    urls: {
      type: Array,
      default() {
        return [];
      },
    },
  },
  computed: {
    getImageStyle() {
      return {
        width: this.width + "px",
      };
    },
    list() {
      return this.urls.map((item) => {
        return item;
      });
    },
  },
};
</script>
 
<style scoped>
.image-list-container {
  padding: 8px 0;
}
.image-block {
  display: inline-block;
  box-sizing: border-box;
  padding: 8px;
}
.image-title {
  display: inline-block;
  vertical-align: top;
  font-weight: bold;
}
</style>