zz-shopify-components 0.29.0 → 0.29.1-beta.0

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.
@@ -210,13 +210,16 @@
210
210
  let instance = null;
211
211
  let initialized = false;
212
212
 
213
+ const isDesktop = window.innerWidth > 1023;
214
+ const spaceBetween = isDesktop ? {{ block.settings.space_between | default: 8 }} : {{ block.settings.space_between_mb | default: 8 }};
215
+
213
216
  const options = {
214
217
  loop: {{ block.settings.loop | json }},
215
218
  speed: {{ block.settings.speed | default: 500 }},
216
219
  autoHeight: {{ block.settings.auto_height | json }},
217
220
  centeredSlides: {{ block.settings.centered_slides | json }},
218
221
  watchOverflow: true,
219
- spaceBetween: {{ block.settings.space_between | default: 8 }},
222
+ spaceBetween: spaceBetween,
220
223
  {% if block.settings.pagination_type != 'none' %}
221
224
  pagination: {
222
225
  el: '#shopify-block-{{block.id}} .swiper-pagination',
@@ -307,6 +310,15 @@
307
310
  "max": 80,
308
311
  "step": 2
309
312
  },
313
+ {
314
+ "type": "range",
315
+ "id": "space_between_mb",
316
+ "label": "卡片间距(px)(mobile)",
317
+ "default": 8,
318
+ "min": 0,
319
+ "max": 80,
320
+ "step": 2
321
+ },
310
322
  {
311
323
  "type": "checkbox",
312
324
  "id": "centered_slides",
@@ -471,6 +483,7 @@
471
483
  "loop": true,
472
484
  "speed": 500,
473
485
  "space_between": 8,
486
+ "space_between_mb": 8,
474
487
  "centered_slides": false,
475
488
  "auto_height": false,
476
489
  "autoplay": false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zz-shopify-components",
3
- "version": "0.29.0",
3
+ "version": "0.29.1-beta.0",
4
4
  "description": "Reusable Shopify components for theme projects",
5
5
  "keywords": [
6
6
  "shopify",