@tarojs/components-react 3.5.0-beta.0 → 3.5.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/swiper/index.js +15 -8
- package/dist/swiper/index.js.map +1 -1
- package/package.json +2 -2
package/dist/swiper/index.js
CHANGED
|
@@ -10292,16 +10292,18 @@ var Swiper = /*#__PURE__*/function (_React$Component2) {
|
|
|
10292
10292
|
var _this$props = this.props,
|
|
10293
10293
|
_this$props$autoplay = _this$props.autoplay,
|
|
10294
10294
|
autoplay = _this$props$autoplay === void 0 ? false : _this$props$autoplay,
|
|
10295
|
-
_this$props$
|
|
10296
|
-
|
|
10297
|
-
_this$props$duration = _this$props.duration,
|
|
10298
|
-
duration = _this$props$duration === void 0 ? 500 : _this$props$duration,
|
|
10295
|
+
_this$props$circular = _this$props.circular,
|
|
10296
|
+
circular = _this$props$circular === void 0 ? true : _this$props$circular,
|
|
10299
10297
|
_this$props$current = _this$props.current,
|
|
10300
10298
|
current = _this$props$current === void 0 ? 0 : _this$props$current,
|
|
10301
10299
|
_this$props$displayMu = _this$props.displayMultipleItems,
|
|
10302
10300
|
displayMultipleItems = _this$props$displayMu === void 0 ? 1 : _this$props$displayMu,
|
|
10303
|
-
|
|
10304
|
-
|
|
10301
|
+
_this$props$duration = _this$props.duration,
|
|
10302
|
+
duration = _this$props$duration === void 0 ? 500 : _this$props$duration,
|
|
10303
|
+
_this$props$interval = _this$props.interval,
|
|
10304
|
+
interval = _this$props$interval === void 0 ? 5000 : _this$props$interval,
|
|
10305
|
+
spaceBetween = _this$props.spaceBetween,
|
|
10306
|
+
vertical = _this$props.vertical; // eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
10305
10307
|
|
|
10306
10308
|
var that = this;
|
|
10307
10309
|
var opt = {
|
|
@@ -10310,7 +10312,7 @@ var Swiper = /*#__PURE__*/function (_React$Component2) {
|
|
|
10310
10312
|
el: ".taro-swiper-".concat(this._id, " > .swiper-container > .swiper-pagination")
|
|
10311
10313
|
},
|
|
10312
10314
|
direction: vertical ? 'vertical' : 'horizontal',
|
|
10313
|
-
loop:
|
|
10315
|
+
loop: circular,
|
|
10314
10316
|
slidesPerView: parseFloat(String(displayMultipleItems)),
|
|
10315
10317
|
initialSlide: parseInt(String(current), 10),
|
|
10316
10318
|
speed: parseInt(String(duration), 10),
|
|
@@ -10358,7 +10360,12 @@ var Swiper = /*#__PURE__*/function (_React$Component2) {
|
|
|
10358
10360
|
|
|
10359
10361
|
if (className.includes('taro_page') && target.style.display !== 'none') {
|
|
10360
10362
|
if (that.props.autoplay && target.contains(_swiper.$el[0])) {
|
|
10361
|
-
|
|
10363
|
+
if (that.props.circular) {
|
|
10364
|
+
_swiper.slideToLoop(this.realIndex, 0); // 更新下标
|
|
10365
|
+
|
|
10366
|
+
} else {
|
|
10367
|
+
_swiper.slideTo(this.realIndex);
|
|
10368
|
+
}
|
|
10362
10369
|
}
|
|
10363
10370
|
}
|
|
10364
10371
|
}
|