This commit is contained in:
2026-09-15 10:35:56 +08:00
commit 782f8ea7aa
4086 changed files with 631288 additions and 0 deletions
@@ -0,0 +1,27 @@
define([
'Swiper'
], function (Swiper) {
'use strict';
return function (config, element) {
var hasNavigation = element.getAttribute('data-has-navigation') === 'true';
var container = element.closest('.esun-news-room');
new Swiper(element, {
slidesPerView: 1,
slidesPerGroup: 1,
spaceBetween: 36,
observer: true,
observeParents: true,
watchOverflow: true,
navigation: hasNavigation ? {
nextEl: container.querySelector('.esun-news-room__next'),
prevEl: container.querySelector('.esun-news-room__previous')
} : {},
pagination: hasNavigation ? {
el: element.querySelector('.esun-news-room__pagination'),
clickable: true
} : {}
});
};
});