Archived
Возможность не указывать Navigation/Pagination в swiper.modules
This commit is contained in:
1 parent
1ab21ec6c7
commit
19990b507e
1 file changed
+5
-1
@@ -342,7 +342,11 @@ const init = async (items = [], options = {}, index = 0) => {
|
|||||||
|
|
||||||
const swiper = new Swiper(
|
const swiper = new Swiper(
|
||||||
gallery.querySelector('.advdominion-lg__container'),
|
gallery.querySelector('.advdominion-lg__container'),
|
||||||
Object.assign({ modules: [Navigation, Pagination], init: false, initialSlide: index }, options.swiper),
|
Object.assign({
|
||||||
|
modules: [...new Set([Navigation, Pagination, ...(options.swiper?.modules || [])])],
|
||||||
|
init: false,
|
||||||
|
initialSlide: index
|
||||||
|
}, options.swiper),
|
||||||
);
|
);
|
||||||
|
|
||||||
swiper.on('init', function () {
|
swiper.on('init', function () {
|
||||||
|
|||||||
Reference in new issue
Block a user