@wikala/spmkt 2.20.2 → 2.20.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
>
|
|
15
15
|
<b-carousel-item v-for="(image, i) in product.images" :key="i">
|
|
16
16
|
<picture class="image">
|
|
17
|
-
<img
|
|
18
|
-
:src="image.url"
|
|
19
|
-
:srcset="getSrcset(image)"
|
|
17
|
+
<img
|
|
20
18
|
decoding="async"
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
loading="lazy"
|
|
20
|
+
:src="image.url"
|
|
21
|
+
:srcset="getSrcset(image)"
|
|
22
|
+
sizes="(min-width: 1420px) 672px, (min-width: 1220px) 576px, (min-width: 1080px) 480px, (min-width: 780px) calc(40.71vw + 48px), 100vw">
|
|
23
23
|
</picture>
|
|
24
24
|
</b-carousel-item>
|
|
25
25
|
<span v-if="gallery" @click="switchGallery(false)" class="modal-close is-large"></span>
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
<script>
|
|
48
48
|
import _ from 'underscore'
|
|
49
49
|
import Photo from './Photo'
|
|
50
|
+
import { getSizesAttribute } from '../../utils/responsive-images.js'
|
|
50
51
|
|
|
51
52
|
export default {
|
|
52
53
|
name: 'ProductImages',
|
|
@@ -112,6 +113,8 @@ export default {
|
|
|
112
113
|
return srcset.join(', ')
|
|
113
114
|
},
|
|
114
115
|
|
|
116
|
+
getSizesAttribute,
|
|
117
|
+
|
|
115
118
|
switchGallery(value) {
|
|
116
119
|
if (this.$mq === 'mobile') {
|
|
117
120
|
this.gallery = false
|