zz-shopify-components 0.35.1-beta.2 → 0.35.1-beta.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.
- package/package.json +1 -1
- package/sections/zz-card-strip.liquid +27 -23
package/package.json
CHANGED
|
@@ -503,6 +503,7 @@ zz-card-strip section 是一个用于展示多张可展开卡片的横向交互
|
|
|
503
503
|
#zz-card-strip-{{ section.id }} button.zz-mobile-only {
|
|
504
504
|
width: 124px;
|
|
505
505
|
height: 42px;
|
|
506
|
+
padding: 0px;
|
|
506
507
|
}
|
|
507
508
|
}
|
|
508
509
|
</style>
|
|
@@ -678,6 +679,32 @@ zz-card-strip section 是一个用于展示多张可展开卡片的横向交互
|
|
|
678
679
|
btn_id: mb_btn_id,
|
|
679
680
|
modal_id: block.settings.modal_id
|
|
680
681
|
%}
|
|
682
|
+
<script>
|
|
683
|
+
document.addEventListener('DOMContentLoaded', (event) => {
|
|
684
|
+
const btn = document.getElementsByClassName('{{ btn_class }}')
|
|
685
|
+
if(btn && btn[0]) {
|
|
686
|
+
{% for block in section.blocks %}
|
|
687
|
+
{% if block.type == 'cta_button' %}
|
|
688
|
+
{% if block.settings.click_event_class_name != blank %}
|
|
689
|
+
btn[0].addEventListener('click', (event) => {
|
|
690
|
+
window.zzAnalytics && window.zzAnalytics.trackEvent("{{ block.settings.click_event_class_name }}", {
|
|
691
|
+
timestamp: new Date().toISOString(),
|
|
692
|
+
});
|
|
693
|
+
});
|
|
694
|
+
{% endif %}
|
|
695
|
+
{% if block.settings.function_type == 'link_map' %}
|
|
696
|
+
if(window.bindSiteJump) {
|
|
697
|
+
bindSiteJump(btn[0], {{ block.settings.links | json }})
|
|
698
|
+
if (btn[1]) {
|
|
699
|
+
bindSiteJump(btn[1], {{ block.settings.links | json }})
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
{% endif %}
|
|
703
|
+
{% endif %}
|
|
704
|
+
{% endfor %}
|
|
705
|
+
}
|
|
706
|
+
})
|
|
707
|
+
</script>
|
|
681
708
|
{% endif %}
|
|
682
709
|
{% endfor %}
|
|
683
710
|
</div>
|
|
@@ -1155,29 +1182,6 @@ zz-card-strip section 是一个用于展示多张可展开卡片的横向交互
|
|
|
1155
1182
|
}
|
|
1156
1183
|
})();
|
|
1157
1184
|
</script>
|
|
1158
|
-
<script>
|
|
1159
|
-
document.addEventListener('DOMContentLoaded', (event) => {
|
|
1160
|
-
const btn = document.getElementsByClassName('{{ btn_class }}')
|
|
1161
|
-
if(btn && btn[0]) {
|
|
1162
|
-
{% for block in section.blocks %}
|
|
1163
|
-
{% if block.type == 'cta_button' %}
|
|
1164
|
-
{% if block.settings.click_event_class_name != blank %}
|
|
1165
|
-
btn[0].addEventListener('click', (event) => {
|
|
1166
|
-
window.zzAnalytics && window.zzAnalytics.trackEvent("{{ block.settings.click_event_class_name }}", {
|
|
1167
|
-
timestamp: new Date().toISOString(),
|
|
1168
|
-
});
|
|
1169
|
-
});
|
|
1170
|
-
{% endif %}
|
|
1171
|
-
{% if block.settings.function_type == 'link_map' %}
|
|
1172
|
-
if(window.bindSiteJump) {
|
|
1173
|
-
bindSiteJump(btn[0], {{ block.settings.links | json }})
|
|
1174
|
-
}
|
|
1175
|
-
{% endif %}
|
|
1176
|
-
{% endif %}
|
|
1177
|
-
{% endfor %}
|
|
1178
|
-
}
|
|
1179
|
-
})
|
|
1180
|
-
</script>
|
|
1181
1185
|
|
|
1182
1186
|
{% schema %}
|
|
1183
1187
|
{
|