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