mirror of
https://github.com/QIDITECH/QIDIStudio.git
synced 2026-01-31 08:58:42 +03:00
update
This commit is contained in:
13
resources/web/guide/swiper/shared/create-shadow.js
Normal file
13
resources/web/guide/swiper/shared/create-shadow.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import $ from './dom.js';
|
||||
export default function createShadow(params, $slideEl, side) {
|
||||
const shadowClass = `swiper-slide-shadow${side ? `-${side}` : ''}`;
|
||||
const $shadowContainer = params.transformEl ? $slideEl.find(params.transformEl) : $slideEl;
|
||||
let $shadowEl = $shadowContainer.children(`.${shadowClass}`);
|
||||
|
||||
if (!$shadowEl.length) {
|
||||
$shadowEl = $(`<div class="swiper-slide-shadow${side ? `-${side}` : ''}"></div>`);
|
||||
$shadowContainer.append($shadowEl);
|
||||
}
|
||||
|
||||
return $shadowEl;
|
||||
}
|
||||
Reference in New Issue
Block a user