@wikala/spmkt 2.20.1 → 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,13 +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
- loading="lazy"
19
- :src="image.url"
20
- :srcset="getSrcset(image)"
17
+ <img
21
18
  decoding="async"
22
- sizes="100vw"
23
- style="max-height: calc(100vh - 100px);">
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">
24
23
  </picture>
25
24
  </b-carousel-item>
26
25
  <span v-if="gallery" @click="switchGallery(false)" class="modal-close is-large"></span>
@@ -48,6 +47,7 @@
48
47
  <script>
49
48
  import _ from 'underscore'
50
49
  import Photo from './Photo'
50
+ import { getSizesAttribute } from '../../utils/responsive-images.js'
51
51
 
52
52
  export default {
53
53
  name: 'ProductImages',
@@ -113,6 +113,8 @@ export default {
113
113
  return srcset.join(', ')
114
114
  },
115
115
 
116
+ getSizesAttribute,
117
+
116
118
  switchGallery(value) {
117
119
  if (this.$mq === 'mobile') {
118
120
  this.gallery = false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wikala/spmkt",
3
- "version": "2.20.1",
3
+ "version": "2.20.3",
4
4
  "private": false,
5
5
  "description": "supermarket",
6
6
  "scripts": {