1 | 1 |
deleted file mode 100644 |
... | ... |
@@ -1,38 +0,0 @@ |
1 |
-"use strict"; |
|
2 |
- |
|
3 |
-exports.__esModule = true; |
|
4 |
-exports.renderVirtual = renderVirtual; |
|
5 |
-exports.updateOnVirtualData = updateOnVirtualData; |
|
6 |
- |
|
7 |
-var _vue = require("vue"); |
|
8 |
- |
|
9 |
-function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } |
|
10 |
- |
|
11 |
-function updateOnVirtualData(swiper) { |
|
12 |
- if (!swiper || swiper.destroyed) return; |
|
13 |
- swiper.updateSlides(); |
|
14 |
- swiper.updateProgress(); |
|
15 |
- swiper.updateSlidesClasses(); |
|
16 |
- |
|
17 |
- if (swiper.lazy && swiper.params.lazy.enabled) { |
|
18 |
- swiper.lazy.load(); |
|
19 |
- } |
|
20 |
-} |
|
21 |
- |
|
22 |
-function renderVirtual(swiperRef, slides, virtualData) { |
|
23 |
- var _ref; |
|
24 |
- |
|
25 |
- if (!virtualData) return null; |
|
26 |
- var style = swiperRef.value.isHorizontal() ? (_ref = {}, _ref[swiperRef.value.rtlTranslate ? 'right' : 'left'] = virtualData.offset + "px", _ref) : { |
|
27 |
- top: virtualData.offset + "px" |
|
28 |
- }; |
|
29 |
- return slides.filter(function (slide, index) { |
|
30 |
- return index >= virtualData.from && index <= virtualData.to; |
|
31 |
- }).map(function (slide) { |
|
32 |
- if (!slide.props) slide.props = {}; |
|
33 |
- if (!slide.props.style) slide.props.style = {}; |
|
34 |
- slide.props.swiperRef = swiperRef; |
|
35 |
- slide.props.style = style; |
|
36 |
- return (0, _vue.h)(slide.type, _extends({}, slide.props), slide.children); |
|
37 |
- }); |
|
38 |
-} |
|
39 | 0 |
\ No newline at end of file |
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,38 @@ |
1 |
+"use strict"; |
|
2 |
+ |
|
3 |
+exports.__esModule = true; |
|
4 |
+exports.renderVirtual = renderVirtual; |
|
5 |
+exports.updateOnVirtualData = updateOnVirtualData; |
|
6 |
+ |
|
7 |
+var _vue = require("vue"); |
|
8 |
+ |
|
9 |
+function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } |
|
10 |
+ |
|
11 |
+function updateOnVirtualData(swiper) { |
|
12 |
+ if (!swiper || swiper.destroyed) return; |
|
13 |
+ swiper.updateSlides(); |
|
14 |
+ swiper.updateProgress(); |
|
15 |
+ swiper.updateSlidesClasses(); |
|
16 |
+ |
|
17 |
+ if (swiper.lazy && swiper.params.lazy.enabled) { |
|
18 |
+ swiper.lazy.load(); |
|
19 |
+ } |
|
20 |
+} |
|
21 |
+ |
|
22 |
+function renderVirtual(swiperRef, slides, virtualData) { |
|
23 |
+ var _ref; |
|
24 |
+ |
|
25 |
+ if (!virtualData) return null; |
|
26 |
+ var style = swiperRef.value.isHorizontal() ? (_ref = {}, _ref[swiperRef.value.rtlTranslate ? 'right' : 'left'] = virtualData.offset + "px", _ref) : { |
|
27 |
+ top: virtualData.offset + "px" |
|
28 |
+ }; |
|
29 |
+ return slides.filter(function (slide, index) { |
|
30 |
+ return index >= virtualData.from && index <= virtualData.to; |
|
31 |
+ }).map(function (slide) { |
|
32 |
+ if (!slide.props) slide.props = {}; |
|
33 |
+ if (!slide.props.style) slide.props.style = {}; |
|
34 |
+ slide.props.swiperRef = swiperRef; |
|
35 |
+ slide.props.style = style; |
|
36 |
+ return (0, _vue.h)(slide.type, _extends({}, slide.props), slide.children); |
|
37 |
+ }); |
|
38 |
+} |
|
0 | 39 |
\ No newline at end of file |