Возможность не указывать Navigation/Pagination в swiper.modules
This commit is contained in:
6
index.js
6
index.js
@@ -342,7 +342,11 @@ const init = async (items = [], options = {}, index = 0) => {
|
||||
|
||||
const swiper = new Swiper(
|
||||
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 () {
|
||||
|
||||
Reference in New Issue
Block a user