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
<template>
<div>
<!-- 需要绑定放图片的数组,接收固定参数 -->
<viewer class="container" :images="images">
<div class="imgWrapper" v-if="images.length > 0">
<div class="img" v-for="(item, index) of images" :key="index">
<img :key="item" :src="item" alt="" />
</div>
</div>
</viewer>
</div>
</template>
<script>
export default {
name: 'imageView',
props: {
imageArray: {
type: Array,
default () {
return []
}
},
},
data() {
return {
images: [],
isUrl: false,
}
},
created() {
this.images = imageArray
}
}
</script>
<style lang="less" scoped>
.viewer-toolbar {
.viewer-flip-horizontal {
display: none;
}
.viewer-flip-vertical {
display: none;
}
}
</style>