1initBannerImg() 2function initBannerImg() { 3 const slides = document.querySelectorAll(`[data-pc]`) 4 slides.forEach(function (slide) { 5 let url = slide.getAttribute('data-mobile') 6 if (!url) { 7 url = slide.getAttribute('data-pc') 8 } 9 if (isMobile) { 10 slide.setAttribute('data-src', url) 11 } else { 12 slide.setAttribute('src', slide.getAttribute('data-pc')) 13 slide.classList.remove('swiper-lazy') 14 $('.swiper-lazy-preloader').hide() 15 } 16 }) 17 18 let progressTime = 5000 19 20 window.bannerSwiper = new Swiper('.bannerSwiper', { 21 // freeMode: true, 22 loop: true, 23 lazy: isMobile, 24 lazyLoading: isMobile, //å¯å¨å»¶è¿å è½½ 25 lazyLoadingInPrevNext: isMobile, //å»¶è¿å è½½åºç¨å°ææ¥è¿çslideçå¾ç 26 lazyLoadingInPrevNextAmount: 1, //å è½½ä¸ä¸ä¸ªslide 27 lazyLoadingOnTransitionStart: isMobile, // è¿æ¸¡å°slideä¸å¼å§å°±å è½½ï¼è®¾ç½®ä¸ºtrue 28 navigation: { 29 nextEl: '.swiper-button-next', 30 prevEl: '.swiper-button-prev', 31 }, 32 pagination: { 33 el: '.swiper-pagination', 34 clickable: true, 35 renderBullet: function (index, className) { 36 return ` 37 <span 38 class="${className}" 39 style="--duration:${progressTime}ms" 40 > 41 <span class="progress"></span> 42 </span> 43 ` 44 }, 45 }, 46 autoplay: { 47 delay: progressTime, 48 disableOnInteraction: false, 49 }, 50 }) 51} 52window.addEventListener('switchingMobile', initBannerImg)
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.