resource-single-image.vue
738 Bytes
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
<template>
<resource class="resource-single-image">
<a-link
:title="value.title"
:href="img.url"
v-for="(img, index) in value.list"
:key="index">
<img-format
:src="img.src"
:w="value.imageWidth"
:h="value.imageHeight"
:alt="img.alt">
</img-format>
</a-link>
</resource>
</template>
<script>
import Resource from './resource';
export default {
name: 'ResourceSingleImage',
props: {
value: Object
},
components: {Resource}
};
</script>
<style lang="scss">
.resource-single-image {
img {
width: 100%;
display: block;
}
}
</style>