@tarojs/components 4.3.1-beta.3 → 4.3.1
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/cjs/index.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{swiper-3ab835bb.js → swiper-f67b39e6.js} +176 -126
- package/dist/cjs/taro-components.cjs.js +1 -1
- package/dist/cjs/taro-swiper-core_2.cjs.entry.js +1 -2
- package/dist/cjs/taro-video-control_3.cjs.entry.js +1 -1
- package/dist/cjs/{video-cd8fa901.js → video-872b1da3.js} +1 -1
- package/dist/collection/components/swiper/swiper.js +176 -136
- package/dist/collection/components/video/style/index.css +1 -1
- package/dist/components/taro-swiper-core.js +177 -131
- package/dist/components/taro-video-core.js +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{swiper-20b19ce0.js → swiper-59728a6c.js} +176 -126
- package/dist/esm/taro-components.js +1 -1
- package/dist/esm/taro-swiper-core_2.entry.js +1 -2
- package/dist/esm/taro-video-control_3.entry.js +1 -1
- package/dist/esm/{video-8a258487.js → video-0a17fcbc.js} +1 -1
- package/dist/hydrate/index.js +178 -131
- package/dist/taro-components/index.esm.js +1 -1
- package/dist/taro-components/p-447ec5e9.js +1 -0
- package/dist/taro-components/p-66e8ef33.entry.js +1 -0
- package/dist/taro-components/{p-465dbd80.js → p-693b334c.js} +1 -1
- package/dist/taro-components/{p-b70027b2.entry.js → p-83f14440.entry.js} +1 -1
- package/dist/taro-components/taro-components.esm.js +1 -1
- package/dist/types/components/swiper/swiper.d.ts +7 -7
- package/package.json +5 -5
- package/dist/taro-components/p-8d26b600.js +0 -1
- package/dist/taro-components/p-905410a9.entry.js +0 -1
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -80,7 +80,7 @@ const snapshot = require('./snapshot-c2520c58.js');
|
|
|
80
80
|
const span = require('./span-fb1efcaf.js');
|
|
81
81
|
const stickyHeader = require('./sticky-header-dcde70ca.js');
|
|
82
82
|
const stickySection = require('./sticky-section-170bc892.js');
|
|
83
|
-
const swiper = require('./swiper-
|
|
83
|
+
const swiper = require('./swiper-f67b39e6.js');
|
|
84
84
|
const _switch = require('./switch-586022a8.js');
|
|
85
85
|
const tabbar = require('./tabbar-41113df5.js');
|
|
86
86
|
const tabItem = require('./tab-item-cfa3339e.js');
|
|
@@ -89,7 +89,7 @@ const script$7 = require('./script-2eb2d361.js');
|
|
|
89
89
|
const text = require('./text-642f2f48.js');
|
|
90
90
|
const textarea = require('./textarea-ea3376ec.js');
|
|
91
91
|
const script$8 = require('./script-66238de4.js');
|
|
92
|
-
const video = require('./video-
|
|
92
|
+
const video = require('./video-872b1da3.js');
|
|
93
93
|
const view = require('./view-609adfc6.js');
|
|
94
94
|
const voipRoom = require('./voip-room-7f55d8a0.js');
|
|
95
95
|
const webView = require('./web-view-1ec276e7.js');
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy(JSON.parse("[[\"taro-checkbox-core_2.cjs\",[[4,\"taro-checkbox-core\",{\"name\":[1],\"value\":[1032],\"color\":[1],\"id\":[1025],\"checked\":[4],\"disabled\":[4],\"nativeProps\":[16],\"isWillLoadCalled\":[32]}],[0,\"taro-checkbox-group-core\",{\"name\":[8]},[[0,\"checkboxchange\",\"function\"]]]]],[\"taro-movable-area-core_2.cjs\",[[0,\"taro-movable-area-core\",{\"scaleArea\":[4,\"scale-area\"]}],[0,\"taro-movable-view-core\",{\"x\":[8],\"y\":[8],\"direction\":[1],\"outOfBounds\":[4,\"out-of-bounds\"],\"inertia\":[4],\"friction\":[2],\"damping\":[2],\"disabled\":[4],\"scale\":[4],\"scaleMin\":[2,\"scale-min\"],\"scaleMax\":[2,\"scale-max\"],\"scaleValue\":[2,\"scale-value\"],\"animation\":[4],\"setParent\":[64],\"endScale\":[64],\"setScale\":[64]}]]],[\"taro-picker-view-column-core_2.cjs\",[[0,\"taro-picker-view-column-core\",{\"col\":[1],\"initialPosition\":[1,\"initial-position\"],\"paddingVertical\":[2,\"padding-vertical\"],\"isInit\":[32]},[[1,\"touchstart\",\"onTouchStart\"],[1,\"touchend\",\"onTouchEnd\"]]],[4,\"taro-picker-view-core\",{\"indicatorStyle\":[1,\"indicator-style\"],\"indicatorClass\":[1,\"indicator-class\"],\"value\":[16],\"maskStyle\":[1,\"mask-style\"],\"maskClass\":[1,\"mask-class\"]},[[0,\"onselect\",\"onSelect\"],[0,\"onselectstart\",\"onSelectStart\"],[0,\"onselectend\",\"onPickerColEnd\"]]]]],[\"taro-radio-core_2.cjs\",[[4,\"taro-radio-core\",{\"name\":[1],\"value\":[1],\"id\":[1025],\"checked\":[1540],\"disabled\":[4],\"nativeProps\":[16],\"isWillLoadCalled\":[32]}],[0,\"taro-radio-group-core\",{\"name\":[8]},[[0,\"radiochange\",\"function\"]]]]],[\"taro-swiper-core_2.cjs\",[[4,\"taro-swiper-core\",{\"indicatorDots\":[4,\"indicator-dots\"],\"indicatorColor\":[1,\"indicator-color\"],\"indicatorActiveColor\":[1,\"indicator-active-color\"],\"autoplay\":[4],\"current\":[2],\"currentItemId\":[1,\"current-item-id\"],\"interval\":[2],\"duration\":[2],\"circular\":[4],\"vertical\":[4],\"previousMargin\":[1,\"previous-margin\"],\"nextMargin\":[1,\"next-margin\"],\"displayMultipleItems\":[2,\"display-multiple-items\"],\"full\":[4],\"zoom\":[4],\"effectsProps\":[16],\"swiperWrapper\":[32],\"swiper\":[32],\"isWillLoadCalled\":[32],\"observer\":[32]}],[4,\"taro-swiper-item-core\",{\"itemId\":[1,\"item-id\"]}]]],[\"taro-ad-core.cjs\",[[0,\"taro-ad-core\"]]],[\"taro-ad-custom-core.cjs\",[[0,\"taro-ad-custom-core\"]]],[\"taro-animation-video-core.cjs\",[[0,\"taro-animation-video-core\"]]],[\"taro-animation-view-core.cjs\",[[0,\"taro-animation-view-core\"]]],[\"taro-ar-camera-core.cjs\",[[0,\"taro-ar-camera-core\"]]],[\"taro-audio-core.cjs\",[[0,\"taro-audio-core\",{\"src\":[1],\"controls\":[4],\"autoplay\":[4],\"loop\":[4],\"muted\":[4],\"nativeProps\":[16]}]]],[\"taro-aweme-data-core.cjs\",[[0,\"taro-aweme-data-core\"]]],[\"taro-block-core.cjs\",[[0,\"taro-block-core\"]]],[\"taro-button-core.cjs\",[[4,\"taro-button-core\",{\"disabled\":[516],\"hoverClass\":[1,\"hover-class\"],\"type\":[1],\"hoverStartTime\":[2,\"hover-start-time\"],\"hoverStayTime\":[2,\"hover-stay-time\"],\"size\":[1],\"plain\":[4],\"loading\":[4],\"formType\":[513,\"form-type\"],\"hover\":[32],\"touch\":[32]},[[0,\"click\",\"onClick\"],[1,\"touchstart\",\"onTouchStart\"],[1,\"touchend\",\"onTouchEnd\"]]]]],[\"taro-camera-core.cjs\",[[0,\"taro-camera-core\"]]],[\"taro-canvas-core.cjs\",[[0,\"taro-canvas-core\",{\"canvasId\":[1,\"id\"],\"height\":[1537],\"width\":[1537],\"nativeProps\":[16]}]]],[\"taro-channel-live-core.cjs\",[[0,\"taro-channel-live-core\"]]],[\"taro-channel-video-core.cjs\",[[0,\"taro-channel-video-core\"]]],[\"taro-comment-detail-core.cjs\",[[0,\"taro-comment-detail-core\"]]],[\"taro-comment-list-core.cjs\",[[0,\"taro-comment-list-core\"]]],[\"taro-contact-button-core.cjs\",[[0,\"taro-contact-button-core\"]]],[\"taro-cover-image-core.cjs\",[[0,\"taro-cover-image-core\",{\"src\":[1],\"nativeProps\":[16]}]]],[\"taro-cover-view-core.cjs\",[[4,\"taro-cover-view-core\",{\"animation\":[1],\"hoverClass\":[1,\"hover-class\"],\"hoverStartTime\":[2,\"hover-start-time\"],\"hoverStayTime\":[2,\"hover-stay-time\"],\"hover\":[32],\"touch\":[32]},[[1,\"touchstart\",\"onTouchStart\"],[1,\"touchmove\",\"onTouchMove\"],[1,\"touchend\",\"onTouchEnd\"]]]]],[\"taro-custom-wrapper-core.cjs\",[[0,\"taro-custom-wrapper-core\"]]],[\"taro-double-tap-gesture-handler-core.cjs\",[[0,\"taro-double-tap-gesture-handler-core\"]]],[\"taro-draggable-sheet-core.cjs\",[[0,\"taro-draggable-sheet-core\"]]],[\"taro-editor-core.cjs\",[[0,\"taro-editor-core\"]]],[\"taro-follow-swan-core.cjs\",[[0,\"taro-follow-swan-core\"]]],[\"taro-force-press-gesture-handler-core.cjs\",[[0,\"taro-force-press-gesture-handler-core\"]]],[\"taro-form-core.cjs\",[[4,\"taro-form-core\",null,[[0,\"tarobuttonsubmit\",\"onButtonSubmit\"],[0,\"tarobuttonreset\",\"onButtonReset\"]]]]],[\"taro-functional-page-navigator-core.cjs\",[[0,\"taro-functional-page-navigator-core\"]]],[\"taro-grid-builder-core.cjs\",[[0,\"taro-grid-builder-core\"]]],[\"taro-grid-view-core.cjs\",[[0,\"taro-grid-view-core\"]]],[\"taro-horizontal-drag-gesture-handler-core.cjs\",[[0,\"taro-horizontal-drag-gesture-handler-core\"]]],[\"taro-icon-core.cjs\",[[0,\"taro-icon-core\",{\"type\":[1],\"size\":[8],\"color\":[1]}]]],[\"taro-image-core.cjs\",[[0,\"taro-image-core\",{\"src\":[1],\"mode\":[1],\"lazyLoad\":[4,\"lazy-load\"],\"nativeProps\":[16],\"disableDefaultSize\":[4,\"disable-default-size\"],\"didLoad\":[32]}]]],[\"taro-inline-payment-panel-core.cjs\",[[0,\"taro-inline-payment-panel-core\"]]],[\"taro-input-core.cjs\",[[0,\"taro-input-core\",{\"value\":[1025],\"type\":[1],\"password\":[4],\"placeholder\":[1],\"disabled\":[4],\"maxlength\":[2],\"autoFocus\":[4,\"focus\"],\"confirmType\":[1,\"confirm-type\"],\"name\":[1],\"readonly\":[4],\"nativeProps\":[16],\"focus\":[64]}]]],[\"taro-keyboard-accessory-core.cjs\",[[0,\"taro-keyboard-accessory-core\"]]],[\"taro-label-core.cjs\",[[4,\"taro-label-core\",{\"for\":[1]}]]],[\"taro-lifestyle-core.cjs\",[[0,\"taro-lifestyle-core\"]]],[\"taro-like-core.cjs\",[[0,\"taro-like-core\"]]],[\"taro-list-builder-core.cjs\",[[0,\"taro-list-builder-core\"]]],[\"taro-list-view-core.cjs\",[[0,\"taro-list-view-core\"]]],[\"taro-live-player-core.cjs\",[[0,\"taro-live-player-core\"]]],[\"taro-live-pusher-core.cjs\",[[0,\"taro-live-pusher-core\"]]],[\"taro-login-core.cjs\",[[0,\"taro-login-core\"]]],[\"taro-long-press-gesture-handler-core.cjs\",[[0,\"taro-long-press-gesture-handler-core\"]]],[\"taro-lottie-core.cjs\",[[0,\"taro-lottie-core\"]]],[\"taro-map-core.cjs\",[[0,\"taro-map-core\",{\"latitude\":[2],\"longitude\":[2],\"scale\":[2],\"minScale\":[2,\"min-scale\"],\"maxScale\":[2,\"max-scale\"],\"markers\":[16],\"polyline\":[16],\"circles\":[16],\"polygons\":[16],\"subkey\":[1],\"layerStyle\":[2,\"layer-style\"],\"rotate\":[2],\"skew\":[2],\"showCompass\":[4,\"show-compass\"],\"showScale\":[4,\"show-scale\"],\"enableOverlooking\":[4,\"enable-overlooking\"],\"enableZoom\":[4,\"enable-zoom\"],\"enableScroll\":[4,\"enable-scroll\"],\"enableRotate\":[4,\"enable-rotate\"],\"enableSatellite\":[4,\"enable-satellite\"],\"enableTraffic\":[4,\"enable-traffic\"],\"enableBuilding\":[4,\"enable-building\"],\"enableAutoMaxOverlooking\":[4,\"enable-auto-max-overlooking\"],\"enable3D\":[4,\"enable-3-d\"],\"width\":[1],\"height\":[1]}]]],[\"taro-match-media-core.cjs\",[[0,\"taro-match-media-core\"]]],[\"taro-native-slot-core.cjs\",[[0,\"taro-native-slot-core\"]]],[\"taro-navigation-bar-core.cjs\",[[0,\"taro-navigation-bar-core\"]]],[\"taro-navigator-core.cjs\",[[0,\"taro-navigator-core\",{\"hoverClass\":[1,\"hover-class\"],\"url\":[1],\"openType\":[1,\"open-type\"],\"isHover\":[4,\"is-hover\"],\"delta\":[2]},[[0,\"click\",\"onClick\"]]]]],[\"taro-nested-scroll-body-core.cjs\",[[0,\"taro-nested-scroll-body-core\"]]],[\"taro-nested-scroll-header-core.cjs\",[[0,\"taro-nested-scroll-header-core\"]]],[\"taro-official-account-core.cjs\",[[0,\"taro-official-account-core\"]]],[\"taro-open-container-core.cjs\",[[0,\"taro-open-container-core\"]]],[\"taro-open-data-core.cjs\",[[0,\"taro-open-data-core\"]]],[\"taro-open-embedded-atomicservice-core.cjs\",[[0,\"taro-open-embedded-atomicservice-core\"]]],[\"taro-page-container-core.cjs\",[[0,\"taro-page-container-core\"]]],[\"taro-page-meta-core.cjs\",[[0,\"taro-page-meta-core\"]]],[\"taro-pan-gesture-handler-core.cjs\",[[0,\"taro-pan-gesture-handler-core\"]]],[\"taro-progress-core.cjs\",[[0,\"taro-progress-core\",{\"percent\":[2],\"showInfo\":[4,\"show-info\"],\"borderRadius\":[8,\"border-radius\"],\"fontSize\":[8,\"font-size\"],\"strokeWidth\":[8,\"stroke-width\"],\"activeColor\":[1,\"active-color\"],\"backgroundColor\":[1,\"background-color\"],\"active\":[4]}]]],[\"taro-pull-to-refresh-core.cjs\",[[4,\"taro-pull-to-refresh-core\",{\"prefixCls\":[1,\"prefix-cls\"],\"distanceToRefresh\":[2,\"distance-to-refresh\"],\"damping\":[2],\"indicator\":[16],\"currSt\":[32],\"dragOnEdge\":[32]}]]],[\"taro-rich-text-core.cjs\",[[0,\"taro-rich-text-core\",{\"nodes\":[1],\"selectable\":[1028],\"userSelect\":[1028,\"user-select\"],\"space\":[1]}]]],[\"taro-root-portal-core.cjs\",[[0,\"taro-root-portal-core\"]]],[\"taro-rtc-room-core.cjs\",[[0,\"taro-rtc-room-core\"]]],[\"taro-rtc-room-item-core.cjs\",[[0,\"taro-rtc-room-item-core\"]]],[\"taro-scale-gesture-handler-core.cjs\",[[0,\"taro-scale-gesture-handler-core\"]]],[\"taro-script-core.cjs\",[[0,\"taro-script-core\"]]],[\"taro-scroll-view-core.cjs\",[[4,\"taro-scroll-view-core\",{\"scrollX\":[4,\"scroll-x\"],\"scrollY\":[4,\"scroll-y\"],\"upperThreshold\":[8,\"upper-threshold\"],\"lowerThreshold\":[8,\"lower-threshold\"],\"mpScrollTop\":[520,\"scroll-top\"],\"mpScrollLeft\":[520,\"scroll-left\"],\"mpScrollIntoView\":[513,\"scroll-into-view\"],\"mpScrollIntoViewAlignment\":[1,\"scroll-into-view-alignment\"],\"animated\":[4,\"scroll-with-animation\"],\"enhanced\":[4],\"showScrollbar\":[4,\"show-scrollbar\"],\"stopTouchMovePropagation\":[4,\"stop-touch-move-propagation\"],\"mpScrollToMethod\":[64],\"mpScrollIntoViewMethod\":[64]},[[1,\"scroll\",\"handleScroll\"],[1,\"touchmove\",\"handleTouchMove\"]]]]],[\"taro-share-element-core.cjs\",[[0,\"taro-share-element-core\"]]],[\"taro-slider-core.cjs\",[[0,\"taro-slider-core\",{\"min\":[2],\"max\":[2],\"step\":[2],\"disabled\":[4],\"value\":[1538],\"activeColor\":[1,\"active-color\"],\"backgroundColor\":[1,\"background-color\"],\"blockSize\":[2,\"block-size\"],\"blockColor\":[1,\"block-color\"],\"showValue\":[4,\"show-value\"],\"name\":[1],\"totalWidth\":[32],\"touching\":[32],\"ogX\":[32],\"touchId\":[32],\"percent\":[32],\"ogPercent\":[32],\"isWillLoadCalled\":[32]}]]],[\"taro-slot-core.cjs\",[[0,\"taro-slot-core\"]]],[\"taro-snapshot-core.cjs\",[[0,\"taro-snapshot-core\"]]],[\"taro-span-core.cjs\",[[0,\"taro-span-core\"]]],[\"taro-sticky-header-core.cjs\",[[0,\"taro-sticky-header-core\"]]],[\"taro-sticky-section-core.cjs\",[[0,\"taro-sticky-section-core\"]]],[\"taro-switch-core.cjs\",[[0,\"taro-switch-core\",{\"type\":[1],\"checked\":[1028],\"color\":[1],\"name\":[1],\"disabled\":[4],\"nativeProps\":[16],\"isWillLoadCalled\":[32]}]]],[\"taro-tab-item-core.cjs\",[[0,\"taro-tab-item-core\"]]],[\"taro-tabbar.cjs\",[[0,\"taro-tabbar\",{\"conf\":[16],\"list\":[32],\"borderStyle\":[32],\"backgroundColor\":[32],\"color\":[32],\"selectedColor\":[32],\"selectedIndex\":[32],\"status\":[32]}]]],[\"taro-tabs-core.cjs\",[[0,\"taro-tabs-core\"]]],[\"taro-tap-gesture-handler-core.cjs\",[[0,\"taro-tap-gesture-handler-core\"]]],[\"taro-text-core.cjs\",[[4,\"taro-text-core\",{\"selectable\":[1028],\"userSelect\":[1028,\"user-select\"],\"space\":[1025],\"numberOfLines\":[2,\"number-of-lines\"]}]]],[\"taro-textarea-core.cjs\",[[0,\"taro-textarea-core\",{\"value\":[1025],\"placeholder\":[1],\"disabled\":[4],\"maxlength\":[2],\"autoFocus\":[4,\"focus\"],\"autoHeight\":[4,\"auto-height\"],\"name\":[1],\"nativeProps\":[16],\"line\":[32],\"compositionValue\":[32],\"focus\":[64]}]]],[\"taro-vertical-drag-gesture-handler-core.cjs\",[[0,\"taro-vertical-drag-gesture-handler-core\"]]],[\"taro-view-core.cjs\",[[4,\"taro-view-core\",{\"animation\":[1],\"hoverClass\":[1,\"hover-class\"],\"hoverStartTime\":[2,\"hover-start-time\"],\"hoverStayTime\":[2,\"hover-stay-time\"],\"hover\":[32],\"touch\":[32]},[[1,\"touchstart\",\"onTouchStart\"],[1,\"touchmove\",\"onTouchMove\"],[1,\"touchend\",\"onTouchEnd\"]]]]],[\"taro-voip-room-core.cjs\",[[0,\"taro-voip-room-core\"]]],[\"taro-web-view-core.cjs\",[[0,\"taro-web-view-core\",{\"src\":[1]}]]],[\"taro-picker-core_2.cjs\",[[4,\"taro-picker-core\",{\"mode\":[1],\"disabled\":[4],\"range\":[16],\"rangeKey\":[1,\"range-key\"],\"value\":[1032],\"start\":[1],\"end\":[1],\"fields\":[1],\"name\":[1],\"textProps\":[16],\"pickerValue\":[32],\"height\":[32],\"hidden\":[32],\"fadeOut\":[32],\"isWillLoadCalled\":[32]}],[0,\"taro-picker-group\",{\"mode\":[1],\"range\":[16],\"rangeKey\":[1,\"range-key\"],\"height\":[2],\"columnId\":[1,\"column-id\"],\"updateHeight\":[16],\"updateDay\":[16],\"startY\":[32],\"preY\":[32],\"hadMove\":[32],\"touchEnd\":[32],\"isMove\":[32],\"handleMoveStart\":[64],\"handleMoving\":[64],\"handleMoveEnd\":[64]},[[1,\"mousedown\",\"onMouseDown\"],[3,\"mousemove\",\"onMouseMove\"],[1,\"mouseup\",\"onMouseMoveEnd\"],[1,\"mouseleave\",\"onMouseMoveEnd\"],[1,\"touchstart\",\"onTouchStart\"],[3,\"touchmove\",\"onTouchMove\"],[1,\"touchend\",\"onTouchEnd\"]]]]],[\"taro-video-control_3.cjs\",[[0,\"taro-video-core\",{\"src\":[1],\"duration\":[2],\"controls\":[4],\"autoplay\":[4],\"loop\":[4],\"muted\":[4],\"initialTime\":[2,\"initial-time\"],\"poster\":[1],\"objectFit\":[1,\"object-fit\"],\"showProgress\":[4,\"show-progress\"],\"showFullscreenBtn\":[4,\"show-fullscreen-btn\"],\"showPlayBtn\":[4,\"show-play-btn\"],\"showCenterPlayBtn\":[4,\"show-center-play-btn\"],\"showMuteBtn\":[4,\"show-mute-btn\"],\"danmuList\":[16],\"danmuBtn\":[4,\"danmu-btn\"],\"enableDanmu\":[4,\"enable-danmu\"],\"enablePlayGesture\":[4,\"enable-play-gesture\"],\"enableProgressGesture\":[4,\"enable-progress-gesture\"],\"vslideGesture\":[4,\"vslide-gesture\"],\"vslideGestureInFullscreen\":[4,\"vslide-gesture-in-fullscreen\"],\"nativeProps\":[16],\"_duration\":[32],\"_enableDanmu\":[32],\"isPlaying\":[32],\"isFirst\":[32],\"isFullScreen\":[32],\"fullScreenTimestamp\":[32],\"isMute\":[32],\"getHlsObject\":[64],\"play\":[64],\"pause\":[64],\"stop\":[64],\"seek\":[64],\"requestFullScreen\":[64],\"exitFullScreen\":[64]},[[5,\"touchmove\",\"onDocumentTouchMove\"],[5,\"touchend\",\"onDocumentTouchEnd\"],[5,\"touchcancel\",\"onDocumentTouchEnd\"]]],[4,\"taro-video-control\",{\"controls\":[4],\"currentTime\":[2,\"current-time\"],\"duration\":[2],\"isPlaying\":[4,\"is-playing\"],\"pauseFunc\":[16],\"playFunc\":[16],\"seekFunc\":[16],\"showPlayBtn\":[4,\"show-play-btn\"],\"showProgress\":[4,\"show-progress\"],\"setProgressBall\":[64],\"toggleVisibility\":[64],\"getIsDraggingProgressBall\":[64],\"setCurrentTime\":[64]},[[5,\"touchmove\",\"onDocumentTouchMove\"],[5,\"touchend\",\"onDocumentTouchEnd\"],[5,\"touchcancel\",\"onDocumentTouchEnd\"]]],[0,\"taro-video-danmu\",{\"enable\":[4],\"danmuList\":[32],\"sendDanmu\":[64],\"tick\":[64]}]]]]"), options);
|
|
17
|
+
return index.bootstrapLazy(JSON.parse("[[\"taro-checkbox-core_2.cjs\",[[4,\"taro-checkbox-core\",{\"name\":[1],\"value\":[1032],\"color\":[1],\"id\":[1025],\"checked\":[4],\"disabled\":[4],\"nativeProps\":[16],\"isWillLoadCalled\":[32]}],[0,\"taro-checkbox-group-core\",{\"name\":[8]},[[0,\"checkboxchange\",\"function\"]]]]],[\"taro-movable-area-core_2.cjs\",[[0,\"taro-movable-area-core\",{\"scaleArea\":[4,\"scale-area\"]}],[0,\"taro-movable-view-core\",{\"x\":[8],\"y\":[8],\"direction\":[1],\"outOfBounds\":[4,\"out-of-bounds\"],\"inertia\":[4],\"friction\":[2],\"damping\":[2],\"disabled\":[4],\"scale\":[4],\"scaleMin\":[2,\"scale-min\"],\"scaleMax\":[2,\"scale-max\"],\"scaleValue\":[2,\"scale-value\"],\"animation\":[4],\"setParent\":[64],\"endScale\":[64],\"setScale\":[64]}]]],[\"taro-picker-view-column-core_2.cjs\",[[0,\"taro-picker-view-column-core\",{\"col\":[1],\"initialPosition\":[1,\"initial-position\"],\"paddingVertical\":[2,\"padding-vertical\"],\"isInit\":[32]},[[1,\"touchstart\",\"onTouchStart\"],[1,\"touchend\",\"onTouchEnd\"]]],[4,\"taro-picker-view-core\",{\"indicatorStyle\":[1,\"indicator-style\"],\"indicatorClass\":[1,\"indicator-class\"],\"value\":[16],\"maskStyle\":[1,\"mask-style\"],\"maskClass\":[1,\"mask-class\"]},[[0,\"onselect\",\"onSelect\"],[0,\"onselectstart\",\"onSelectStart\"],[0,\"onselectend\",\"onPickerColEnd\"]]]]],[\"taro-radio-core_2.cjs\",[[4,\"taro-radio-core\",{\"name\":[1],\"value\":[1],\"id\":[1025],\"checked\":[1540],\"disabled\":[4],\"nativeProps\":[16],\"isWillLoadCalled\":[32]}],[0,\"taro-radio-group-core\",{\"name\":[8]},[[0,\"radiochange\",\"function\"]]]]],[\"taro-swiper-core_2.cjs\",[[4,\"taro-swiper-core\",{\"indicatorDots\":[4,\"indicator-dots\"],\"indicatorColor\":[1,\"indicator-color\"],\"indicatorActiveColor\":[1,\"indicator-active-color\"],\"autoplay\":[4],\"current\":[2],\"currentItemId\":[1,\"current-item-id\"],\"interval\":[2],\"duration\":[2],\"circular\":[4],\"vertical\":[4],\"previousMargin\":[1,\"previous-margin\"],\"nextMargin\":[1,\"next-margin\"],\"displayMultipleItems\":[2,\"display-multiple-items\"],\"full\":[4],\"zoom\":[4],\"effectsProps\":[16]}],[4,\"taro-swiper-item-core\",{\"itemId\":[1,\"item-id\"]}]]],[\"taro-ad-core.cjs\",[[0,\"taro-ad-core\"]]],[\"taro-ad-custom-core.cjs\",[[0,\"taro-ad-custom-core\"]]],[\"taro-animation-video-core.cjs\",[[0,\"taro-animation-video-core\"]]],[\"taro-animation-view-core.cjs\",[[0,\"taro-animation-view-core\"]]],[\"taro-ar-camera-core.cjs\",[[0,\"taro-ar-camera-core\"]]],[\"taro-audio-core.cjs\",[[0,\"taro-audio-core\",{\"src\":[1],\"controls\":[4],\"autoplay\":[4],\"loop\":[4],\"muted\":[4],\"nativeProps\":[16]}]]],[\"taro-aweme-data-core.cjs\",[[0,\"taro-aweme-data-core\"]]],[\"taro-block-core.cjs\",[[0,\"taro-block-core\"]]],[\"taro-button-core.cjs\",[[4,\"taro-button-core\",{\"disabled\":[516],\"hoverClass\":[1,\"hover-class\"],\"type\":[1],\"hoverStartTime\":[2,\"hover-start-time\"],\"hoverStayTime\":[2,\"hover-stay-time\"],\"size\":[1],\"plain\":[4],\"loading\":[4],\"formType\":[513,\"form-type\"],\"hover\":[32],\"touch\":[32]},[[0,\"click\",\"onClick\"],[1,\"touchstart\",\"onTouchStart\"],[1,\"touchend\",\"onTouchEnd\"]]]]],[\"taro-camera-core.cjs\",[[0,\"taro-camera-core\"]]],[\"taro-canvas-core.cjs\",[[0,\"taro-canvas-core\",{\"canvasId\":[1,\"id\"],\"height\":[1537],\"width\":[1537],\"nativeProps\":[16]}]]],[\"taro-channel-live-core.cjs\",[[0,\"taro-channel-live-core\"]]],[\"taro-channel-video-core.cjs\",[[0,\"taro-channel-video-core\"]]],[\"taro-comment-detail-core.cjs\",[[0,\"taro-comment-detail-core\"]]],[\"taro-comment-list-core.cjs\",[[0,\"taro-comment-list-core\"]]],[\"taro-contact-button-core.cjs\",[[0,\"taro-contact-button-core\"]]],[\"taro-cover-image-core.cjs\",[[0,\"taro-cover-image-core\",{\"src\":[1],\"nativeProps\":[16]}]]],[\"taro-cover-view-core.cjs\",[[4,\"taro-cover-view-core\",{\"animation\":[1],\"hoverClass\":[1,\"hover-class\"],\"hoverStartTime\":[2,\"hover-start-time\"],\"hoverStayTime\":[2,\"hover-stay-time\"],\"hover\":[32],\"touch\":[32]},[[1,\"touchstart\",\"onTouchStart\"],[1,\"touchmove\",\"onTouchMove\"],[1,\"touchend\",\"onTouchEnd\"]]]]],[\"taro-custom-wrapper-core.cjs\",[[0,\"taro-custom-wrapper-core\"]]],[\"taro-double-tap-gesture-handler-core.cjs\",[[0,\"taro-double-tap-gesture-handler-core\"]]],[\"taro-draggable-sheet-core.cjs\",[[0,\"taro-draggable-sheet-core\"]]],[\"taro-editor-core.cjs\",[[0,\"taro-editor-core\"]]],[\"taro-follow-swan-core.cjs\",[[0,\"taro-follow-swan-core\"]]],[\"taro-force-press-gesture-handler-core.cjs\",[[0,\"taro-force-press-gesture-handler-core\"]]],[\"taro-form-core.cjs\",[[4,\"taro-form-core\",null,[[0,\"tarobuttonsubmit\",\"onButtonSubmit\"],[0,\"tarobuttonreset\",\"onButtonReset\"]]]]],[\"taro-functional-page-navigator-core.cjs\",[[0,\"taro-functional-page-navigator-core\"]]],[\"taro-grid-builder-core.cjs\",[[0,\"taro-grid-builder-core\"]]],[\"taro-grid-view-core.cjs\",[[0,\"taro-grid-view-core\"]]],[\"taro-horizontal-drag-gesture-handler-core.cjs\",[[0,\"taro-horizontal-drag-gesture-handler-core\"]]],[\"taro-icon-core.cjs\",[[0,\"taro-icon-core\",{\"type\":[1],\"size\":[8],\"color\":[1]}]]],[\"taro-image-core.cjs\",[[0,\"taro-image-core\",{\"src\":[1],\"mode\":[1],\"lazyLoad\":[4,\"lazy-load\"],\"nativeProps\":[16],\"disableDefaultSize\":[4,\"disable-default-size\"],\"didLoad\":[32]}]]],[\"taro-inline-payment-panel-core.cjs\",[[0,\"taro-inline-payment-panel-core\"]]],[\"taro-input-core.cjs\",[[0,\"taro-input-core\",{\"value\":[1025],\"type\":[1],\"password\":[4],\"placeholder\":[1],\"disabled\":[4],\"maxlength\":[2],\"autoFocus\":[4,\"focus\"],\"confirmType\":[1,\"confirm-type\"],\"name\":[1],\"readonly\":[4],\"nativeProps\":[16],\"focus\":[64]}]]],[\"taro-keyboard-accessory-core.cjs\",[[0,\"taro-keyboard-accessory-core\"]]],[\"taro-label-core.cjs\",[[4,\"taro-label-core\",{\"for\":[1]}]]],[\"taro-lifestyle-core.cjs\",[[0,\"taro-lifestyle-core\"]]],[\"taro-like-core.cjs\",[[0,\"taro-like-core\"]]],[\"taro-list-builder-core.cjs\",[[0,\"taro-list-builder-core\"]]],[\"taro-list-view-core.cjs\",[[0,\"taro-list-view-core\"]]],[\"taro-live-player-core.cjs\",[[0,\"taro-live-player-core\"]]],[\"taro-live-pusher-core.cjs\",[[0,\"taro-live-pusher-core\"]]],[\"taro-login-core.cjs\",[[0,\"taro-login-core\"]]],[\"taro-long-press-gesture-handler-core.cjs\",[[0,\"taro-long-press-gesture-handler-core\"]]],[\"taro-lottie-core.cjs\",[[0,\"taro-lottie-core\"]]],[\"taro-map-core.cjs\",[[0,\"taro-map-core\",{\"latitude\":[2],\"longitude\":[2],\"scale\":[2],\"minScale\":[2,\"min-scale\"],\"maxScale\":[2,\"max-scale\"],\"markers\":[16],\"polyline\":[16],\"circles\":[16],\"polygons\":[16],\"subkey\":[1],\"layerStyle\":[2,\"layer-style\"],\"rotate\":[2],\"skew\":[2],\"showCompass\":[4,\"show-compass\"],\"showScale\":[4,\"show-scale\"],\"enableOverlooking\":[4,\"enable-overlooking\"],\"enableZoom\":[4,\"enable-zoom\"],\"enableScroll\":[4,\"enable-scroll\"],\"enableRotate\":[4,\"enable-rotate\"],\"enableSatellite\":[4,\"enable-satellite\"],\"enableTraffic\":[4,\"enable-traffic\"],\"enableBuilding\":[4,\"enable-building\"],\"enableAutoMaxOverlooking\":[4,\"enable-auto-max-overlooking\"],\"enable3D\":[4,\"enable-3-d\"],\"width\":[1],\"height\":[1]}]]],[\"taro-match-media-core.cjs\",[[0,\"taro-match-media-core\"]]],[\"taro-native-slot-core.cjs\",[[0,\"taro-native-slot-core\"]]],[\"taro-navigation-bar-core.cjs\",[[0,\"taro-navigation-bar-core\"]]],[\"taro-navigator-core.cjs\",[[0,\"taro-navigator-core\",{\"hoverClass\":[1,\"hover-class\"],\"url\":[1],\"openType\":[1,\"open-type\"],\"isHover\":[4,\"is-hover\"],\"delta\":[2]},[[0,\"click\",\"onClick\"]]]]],[\"taro-nested-scroll-body-core.cjs\",[[0,\"taro-nested-scroll-body-core\"]]],[\"taro-nested-scroll-header-core.cjs\",[[0,\"taro-nested-scroll-header-core\"]]],[\"taro-official-account-core.cjs\",[[0,\"taro-official-account-core\"]]],[\"taro-open-container-core.cjs\",[[0,\"taro-open-container-core\"]]],[\"taro-open-data-core.cjs\",[[0,\"taro-open-data-core\"]]],[\"taro-open-embedded-atomicservice-core.cjs\",[[0,\"taro-open-embedded-atomicservice-core\"]]],[\"taro-page-container-core.cjs\",[[0,\"taro-page-container-core\"]]],[\"taro-page-meta-core.cjs\",[[0,\"taro-page-meta-core\"]]],[\"taro-pan-gesture-handler-core.cjs\",[[0,\"taro-pan-gesture-handler-core\"]]],[\"taro-progress-core.cjs\",[[0,\"taro-progress-core\",{\"percent\":[2],\"showInfo\":[4,\"show-info\"],\"borderRadius\":[8,\"border-radius\"],\"fontSize\":[8,\"font-size\"],\"strokeWidth\":[8,\"stroke-width\"],\"activeColor\":[1,\"active-color\"],\"backgroundColor\":[1,\"background-color\"],\"active\":[4]}]]],[\"taro-pull-to-refresh-core.cjs\",[[4,\"taro-pull-to-refresh-core\",{\"prefixCls\":[1,\"prefix-cls\"],\"distanceToRefresh\":[2,\"distance-to-refresh\"],\"damping\":[2],\"indicator\":[16],\"currSt\":[32],\"dragOnEdge\":[32]}]]],[\"taro-rich-text-core.cjs\",[[0,\"taro-rich-text-core\",{\"nodes\":[1],\"selectable\":[1028],\"userSelect\":[1028,\"user-select\"],\"space\":[1]}]]],[\"taro-root-portal-core.cjs\",[[0,\"taro-root-portal-core\"]]],[\"taro-rtc-room-core.cjs\",[[0,\"taro-rtc-room-core\"]]],[\"taro-rtc-room-item-core.cjs\",[[0,\"taro-rtc-room-item-core\"]]],[\"taro-scale-gesture-handler-core.cjs\",[[0,\"taro-scale-gesture-handler-core\"]]],[\"taro-script-core.cjs\",[[0,\"taro-script-core\"]]],[\"taro-scroll-view-core.cjs\",[[4,\"taro-scroll-view-core\",{\"scrollX\":[4,\"scroll-x\"],\"scrollY\":[4,\"scroll-y\"],\"upperThreshold\":[8,\"upper-threshold\"],\"lowerThreshold\":[8,\"lower-threshold\"],\"mpScrollTop\":[520,\"scroll-top\"],\"mpScrollLeft\":[520,\"scroll-left\"],\"mpScrollIntoView\":[513,\"scroll-into-view\"],\"mpScrollIntoViewAlignment\":[1,\"scroll-into-view-alignment\"],\"animated\":[4,\"scroll-with-animation\"],\"enhanced\":[4],\"showScrollbar\":[4,\"show-scrollbar\"],\"stopTouchMovePropagation\":[4,\"stop-touch-move-propagation\"],\"mpScrollToMethod\":[64],\"mpScrollIntoViewMethod\":[64]},[[1,\"scroll\",\"handleScroll\"],[1,\"touchmove\",\"handleTouchMove\"]]]]],[\"taro-share-element-core.cjs\",[[0,\"taro-share-element-core\"]]],[\"taro-slider-core.cjs\",[[0,\"taro-slider-core\",{\"min\":[2],\"max\":[2],\"step\":[2],\"disabled\":[4],\"value\":[1538],\"activeColor\":[1,\"active-color\"],\"backgroundColor\":[1,\"background-color\"],\"blockSize\":[2,\"block-size\"],\"blockColor\":[1,\"block-color\"],\"showValue\":[4,\"show-value\"],\"name\":[1],\"totalWidth\":[32],\"touching\":[32],\"ogX\":[32],\"touchId\":[32],\"percent\":[32],\"ogPercent\":[32],\"isWillLoadCalled\":[32]}]]],[\"taro-slot-core.cjs\",[[0,\"taro-slot-core\"]]],[\"taro-snapshot-core.cjs\",[[0,\"taro-snapshot-core\"]]],[\"taro-span-core.cjs\",[[0,\"taro-span-core\"]]],[\"taro-sticky-header-core.cjs\",[[0,\"taro-sticky-header-core\"]]],[\"taro-sticky-section-core.cjs\",[[0,\"taro-sticky-section-core\"]]],[\"taro-switch-core.cjs\",[[0,\"taro-switch-core\",{\"type\":[1],\"checked\":[1028],\"color\":[1],\"name\":[1],\"disabled\":[4],\"nativeProps\":[16],\"isWillLoadCalled\":[32]}]]],[\"taro-tab-item-core.cjs\",[[0,\"taro-tab-item-core\"]]],[\"taro-tabbar.cjs\",[[0,\"taro-tabbar\",{\"conf\":[16],\"list\":[32],\"borderStyle\":[32],\"backgroundColor\":[32],\"color\":[32],\"selectedColor\":[32],\"selectedIndex\":[32],\"status\":[32]}]]],[\"taro-tabs-core.cjs\",[[0,\"taro-tabs-core\"]]],[\"taro-tap-gesture-handler-core.cjs\",[[0,\"taro-tap-gesture-handler-core\"]]],[\"taro-text-core.cjs\",[[4,\"taro-text-core\",{\"selectable\":[1028],\"userSelect\":[1028,\"user-select\"],\"space\":[1025],\"numberOfLines\":[2,\"number-of-lines\"]}]]],[\"taro-textarea-core.cjs\",[[0,\"taro-textarea-core\",{\"value\":[1025],\"placeholder\":[1],\"disabled\":[4],\"maxlength\":[2],\"autoFocus\":[4,\"focus\"],\"autoHeight\":[4,\"auto-height\"],\"name\":[1],\"nativeProps\":[16],\"line\":[32],\"compositionValue\":[32],\"focus\":[64]}]]],[\"taro-vertical-drag-gesture-handler-core.cjs\",[[0,\"taro-vertical-drag-gesture-handler-core\"]]],[\"taro-view-core.cjs\",[[4,\"taro-view-core\",{\"animation\":[1],\"hoverClass\":[1,\"hover-class\"],\"hoverStartTime\":[2,\"hover-start-time\"],\"hoverStayTime\":[2,\"hover-stay-time\"],\"hover\":[32],\"touch\":[32]},[[1,\"touchstart\",\"onTouchStart\"],[1,\"touchmove\",\"onTouchMove\"],[1,\"touchend\",\"onTouchEnd\"]]]]],[\"taro-voip-room-core.cjs\",[[0,\"taro-voip-room-core\"]]],[\"taro-web-view-core.cjs\",[[0,\"taro-web-view-core\",{\"src\":[1]}]]],[\"taro-picker-core_2.cjs\",[[4,\"taro-picker-core\",{\"mode\":[1],\"disabled\":[4],\"range\":[16],\"rangeKey\":[1,\"range-key\"],\"value\":[1032],\"start\":[1],\"end\":[1],\"fields\":[1],\"name\":[1],\"textProps\":[16],\"pickerValue\":[32],\"height\":[32],\"hidden\":[32],\"fadeOut\":[32],\"isWillLoadCalled\":[32]}],[0,\"taro-picker-group\",{\"mode\":[1],\"range\":[16],\"rangeKey\":[1,\"range-key\"],\"height\":[2],\"columnId\":[1,\"column-id\"],\"updateHeight\":[16],\"updateDay\":[16],\"startY\":[32],\"preY\":[32],\"hadMove\":[32],\"touchEnd\":[32],\"isMove\":[32],\"handleMoveStart\":[64],\"handleMoving\":[64],\"handleMoveEnd\":[64]},[[1,\"mousedown\",\"onMouseDown\"],[3,\"mousemove\",\"onMouseMove\"],[1,\"mouseup\",\"onMouseMoveEnd\"],[1,\"mouseleave\",\"onMouseMoveEnd\"],[1,\"touchstart\",\"onTouchStart\"],[3,\"touchmove\",\"onTouchMove\"],[1,\"touchend\",\"onTouchEnd\"]]]]],[\"taro-video-control_3.cjs\",[[0,\"taro-video-core\",{\"src\":[1],\"duration\":[2],\"controls\":[4],\"autoplay\":[4],\"loop\":[4],\"muted\":[4],\"initialTime\":[2,\"initial-time\"],\"poster\":[1],\"objectFit\":[1,\"object-fit\"],\"showProgress\":[4,\"show-progress\"],\"showFullscreenBtn\":[4,\"show-fullscreen-btn\"],\"showPlayBtn\":[4,\"show-play-btn\"],\"showCenterPlayBtn\":[4,\"show-center-play-btn\"],\"showMuteBtn\":[4,\"show-mute-btn\"],\"danmuList\":[16],\"danmuBtn\":[4,\"danmu-btn\"],\"enableDanmu\":[4,\"enable-danmu\"],\"enablePlayGesture\":[4,\"enable-play-gesture\"],\"enableProgressGesture\":[4,\"enable-progress-gesture\"],\"vslideGesture\":[4,\"vslide-gesture\"],\"vslideGestureInFullscreen\":[4,\"vslide-gesture-in-fullscreen\"],\"nativeProps\":[16],\"_duration\":[32],\"_enableDanmu\":[32],\"isPlaying\":[32],\"isFirst\":[32],\"isFullScreen\":[32],\"fullScreenTimestamp\":[32],\"isMute\":[32],\"getHlsObject\":[64],\"play\":[64],\"pause\":[64],\"stop\":[64],\"seek\":[64],\"requestFullScreen\":[64],\"exitFullScreen\":[64]},[[5,\"touchmove\",\"onDocumentTouchMove\"],[5,\"touchend\",\"onDocumentTouchEnd\"],[5,\"touchcancel\",\"onDocumentTouchEnd\"]]],[4,\"taro-video-control\",{\"controls\":[4],\"currentTime\":[2,\"current-time\"],\"duration\":[2],\"isPlaying\":[4,\"is-playing\"],\"pauseFunc\":[16],\"playFunc\":[16],\"seekFunc\":[16],\"showPlayBtn\":[4,\"show-play-btn\"],\"showProgress\":[4,\"show-progress\"],\"setProgressBall\":[64],\"toggleVisibility\":[64],\"getIsDraggingProgressBall\":[64],\"setCurrentTime\":[64]},[[5,\"touchmove\",\"onDocumentTouchMove\"],[5,\"touchend\",\"onDocumentTouchEnd\"],[5,\"touchcancel\",\"onDocumentTouchEnd\"]]],[0,\"taro-video-danmu\",{\"enable\":[4],\"danmuList\":[32],\"sendDanmu\":[64],\"tick\":[64]}]]]]"), options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -4,7 +4,6 @@ const index = require('./index-ae99cbcc.js');
|
|
|
4
4
|
const index$1 = require('./index-b873e40f.js');
|
|
5
5
|
const helper = require('./helper-ad6306f6.js');
|
|
6
6
|
const SwiperJS = require('swiper/bundle');
|
|
7
|
-
const index$2 = require('./index-8a70c333.js');
|
|
8
7
|
|
|
9
8
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
10
9
|
|
|
@@ -46,7 +45,7 @@ var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) ||
|
|
|
46
45
|
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
47
46
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
48
47
|
};
|
|
49
|
-
var _Swiper_id, _Swiper_source, _Swiper_swiperResetting,
|
|
48
|
+
var _Swiper_id, _Swiper_source, _Swiper_swiperResetting, _Swiper_lastSwiperActiveIndex, _Swiper_pendingCurrentItemId, _Swiper_didLoad, _Swiper_container, _Swiper_sizeTimer;
|
|
50
49
|
let INSTANCE_ID = 0;
|
|
51
50
|
const ONE_ADDITIONAL_SLIDES_THRESHOLD = 5;
|
|
52
51
|
const TWO_ADDITIONAL_SLIDES_THRESHOLD = 7;
|
|
@@ -57,33 +56,41 @@ const Swiper = class {
|
|
|
57
56
|
this.onAnimationFinish = index.createEvent(this, "animationfinish", 7);
|
|
58
57
|
_Swiper_id.set(this, INSTANCE_ID++);
|
|
59
58
|
_Swiper_source.set(this, 'autoplay');
|
|
60
|
-
_Swiper_swiperResetting.set(this, false
|
|
61
|
-
// dom 变化是否由外部引起,因为 swiper 的循环模式也会引起 dom 的变化。如果不是由外部引起的 dom 变化,就不需要重新初始化 swiper
|
|
62
|
-
);
|
|
63
|
-
// dom 变化是否由外部引起,因为 swiper 的循环模式也会引起 dom 的变化。如果不是由外部引起的 dom 变化,就不需要重新初始化 swiper
|
|
64
|
-
_Swiper_domChangeByOutSide.set(this, false);
|
|
59
|
+
_Swiper_swiperResetting.set(this, false);
|
|
65
60
|
_Swiper_lastSwiperActiveIndex.set(this, 0);
|
|
66
|
-
this
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
61
|
+
_Swiper_pendingCurrentItemId.set(this, null);
|
|
62
|
+
_Swiper_didLoad.set(this, false);
|
|
63
|
+
_Swiper_container.set(this, null);
|
|
64
|
+
_Swiper_sizeTimer.set(this, void 0);
|
|
65
|
+
this.swiper = null;
|
|
66
|
+
this.observer = null;
|
|
67
|
+
this.handleSwiperSizeDebounce = () => {
|
|
68
|
+
clearTimeout(__classPrivateFieldGet(this, _Swiper_sizeTimer, "f"));
|
|
69
|
+
const swiper = this.swiper;
|
|
70
|
+
__classPrivateFieldSet(this, _Swiper_sizeTimer, setTimeout(() => {
|
|
71
|
+
if (this.swiper !== swiper || !swiper)
|
|
72
|
+
return;
|
|
73
|
+
if (this.circular) {
|
|
74
|
+
if (__classPrivateFieldGet(this, _Swiper_swiperResetting, "f"))
|
|
75
|
+
this.reset();
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
swiper.update();
|
|
73
79
|
__classPrivateFieldSet(this, _Swiper_swiperResetting, false, "f");
|
|
74
80
|
}
|
|
81
|
+
}, 50), "f");
|
|
82
|
+
};
|
|
83
|
+
this.reset = (current) => {
|
|
84
|
+
this.destroySwiper();
|
|
85
|
+
if (current !== undefined)
|
|
86
|
+
__classPrivateFieldSet(this, _Swiper_lastSwiperActiveIndex, current, "f");
|
|
87
|
+
__classPrivateFieldSet(this, _Swiper_swiperResetting, true, "f");
|
|
88
|
+
try {
|
|
89
|
+
this.handleInit(true);
|
|
75
90
|
}
|
|
76
|
-
|
|
77
|
-
this.swiper.update();
|
|
91
|
+
finally {
|
|
78
92
|
__classPrivateFieldSet(this, _Swiper_swiperResetting, false, "f");
|
|
79
93
|
}
|
|
80
|
-
}, 50);
|
|
81
|
-
this.reset = () => {
|
|
82
|
-
__classPrivateFieldSet(this, _Swiper_swiperResetting, true, "f");
|
|
83
|
-
__classPrivateFieldSet(this, _Swiper_lastSwiperActiveIndex, this.swiper.realIndex, "f");
|
|
84
|
-
this.swiper.destroy();
|
|
85
|
-
this.handleInit(true);
|
|
86
|
-
__classPrivateFieldSet(this, _Swiper_swiperResetting, false, "f");
|
|
87
94
|
};
|
|
88
95
|
// 下面为方法函数
|
|
89
96
|
this.getSlidersList = () => this.el.querySelectorAll('taro-swiper-item-core:not(.swiper-slide-duplicate)') || [];
|
|
@@ -98,9 +105,6 @@ const Swiper = class {
|
|
|
98
105
|
const [, nextMargin] = /^(\d+)px/.exec(this.nextMargin) || [];
|
|
99
106
|
return [parseInt(previousMargin) || 0, parseInt(nextMargin) || 0];
|
|
100
107
|
};
|
|
101
|
-
this.swiperWrapper = undefined;
|
|
102
|
-
this.swiper = undefined;
|
|
103
|
-
this.isWillLoadCalled = false;
|
|
104
108
|
this.indicatorDots = false;
|
|
105
109
|
this.indicatorColor = 'rgba(0, 0, 0, .3)';
|
|
106
110
|
this.indicatorActiveColor = '#000000';
|
|
@@ -117,29 +121,46 @@ const Swiper = class {
|
|
|
117
121
|
this.full = false;
|
|
118
122
|
this.zoom = false;
|
|
119
123
|
this.effectsProps = {};
|
|
120
|
-
|
|
124
|
+
}
|
|
125
|
+
// 属性入口统一恢复失效实例,事件回调只需排除旧实例
|
|
126
|
+
getSwiper(current) {
|
|
127
|
+
const swiper = this.swiper;
|
|
128
|
+
if (swiper && (swiper.destroyed || !swiper.wrapperEl || !swiper.slidesEl))
|
|
129
|
+
this.reset(current);
|
|
130
|
+
return this.swiper;
|
|
121
131
|
}
|
|
122
132
|
watchCurrent(newVal) {
|
|
123
|
-
if (this.currentItemId || !this
|
|
133
|
+
if (this.currentItemId || !__classPrivateFieldGet(this, _Swiper_didLoad, "f"))
|
|
124
134
|
return;
|
|
125
135
|
const n = parseInt(newVal, 10);
|
|
126
|
-
if (isNaN(n)
|
|
136
|
+
if (isNaN(n))
|
|
137
|
+
return;
|
|
138
|
+
const swiper = this.getSwiper(n);
|
|
139
|
+
if (!swiper) {
|
|
140
|
+
__classPrivateFieldSet(this, _Swiper_lastSwiperActiveIndex, n, "f");
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
if (n === swiper.realIndex)
|
|
127
144
|
return;
|
|
128
145
|
__classPrivateFieldSet(this, _Swiper_source, '', "f");
|
|
129
146
|
if (this.circular) {
|
|
130
|
-
|
|
131
|
-
this.autoplay &&
|
|
147
|
+
swiper.slideToLoop(n); // 更新下标
|
|
148
|
+
this.autoplay && swiper.autoplay.pause();
|
|
132
149
|
// @ts-ignore
|
|
133
|
-
|
|
134
|
-
this.autoplay &&
|
|
150
|
+
swiper.loopFix();
|
|
151
|
+
this.autoplay && swiper.autoplay.start();
|
|
135
152
|
}
|
|
136
153
|
else {
|
|
137
|
-
|
|
154
|
+
swiper.slideTo(n); // 更新下标
|
|
138
155
|
}
|
|
139
156
|
}
|
|
140
157
|
watchCurrentItemId(newVal) {
|
|
141
|
-
|
|
158
|
+
const swiper = this.getSwiper();
|
|
159
|
+
if (!swiper) {
|
|
160
|
+
__classPrivateFieldSet(this, _Swiper_pendingCurrentItemId, newVal, "f");
|
|
142
161
|
return;
|
|
162
|
+
}
|
|
163
|
+
__classPrivateFieldSet(this, _Swiper_pendingCurrentItemId, null, "f");
|
|
143
164
|
let itemIdIndex = 0;
|
|
144
165
|
this.getSlidersList().forEach((swiperItem, index) => {
|
|
145
166
|
const itemId = swiperItem.getAttribute('item-id');
|
|
@@ -152,32 +173,33 @@ const Swiper = class {
|
|
|
152
173
|
}
|
|
153
174
|
}
|
|
154
175
|
});
|
|
155
|
-
if (itemIdIndex ===
|
|
176
|
+
if (itemIdIndex === swiper.realIndex)
|
|
156
177
|
return; // 无需更新
|
|
157
178
|
__classPrivateFieldSet(this, _Swiper_source, '', "f");
|
|
158
179
|
if (this.circular) {
|
|
159
|
-
|
|
180
|
+
swiper.slideToLoop(itemIdIndex); // 更新下标
|
|
160
181
|
// @ts-ignore
|
|
161
|
-
|
|
162
|
-
this.autoplay &&
|
|
182
|
+
swiper.loopFix();
|
|
183
|
+
this.autoplay && swiper.autoplay.start();
|
|
163
184
|
}
|
|
164
185
|
else {
|
|
165
|
-
|
|
186
|
+
swiper.slideTo(itemIdIndex); // 更新下标
|
|
166
187
|
}
|
|
167
188
|
}
|
|
168
189
|
watchAutoplay(newVal) {
|
|
169
|
-
|
|
190
|
+
const swiper = this.getSwiper();
|
|
191
|
+
if (!swiper)
|
|
170
192
|
return;
|
|
171
|
-
const swiperAutoplay =
|
|
193
|
+
const swiperAutoplay = swiper.autoplay;
|
|
172
194
|
if (swiperAutoplay) {
|
|
173
195
|
if (swiperAutoplay.running === newVal)
|
|
174
196
|
return;
|
|
175
197
|
if (newVal) {
|
|
176
|
-
if (
|
|
177
|
-
if (
|
|
178
|
-
|
|
198
|
+
if (swiper.params && typeof swiper.params.autoplay === 'object') {
|
|
199
|
+
if (swiper.params.autoplay.disableOnInteraction === true) {
|
|
200
|
+
swiper.params.autoplay.disableOnInteraction = false;
|
|
179
201
|
}
|
|
180
|
-
|
|
202
|
+
swiper.params.autoplay.delay = this.interval;
|
|
181
203
|
}
|
|
182
204
|
swiperAutoplay.start();
|
|
183
205
|
}
|
|
@@ -187,110 +209,114 @@ const Swiper = class {
|
|
|
187
209
|
}
|
|
188
210
|
}
|
|
189
211
|
watchDuration(newVal) {
|
|
190
|
-
|
|
212
|
+
const swiper = this.getSwiper();
|
|
213
|
+
if (!swiper)
|
|
191
214
|
return;
|
|
192
|
-
|
|
215
|
+
swiper.params.speed = newVal;
|
|
193
216
|
}
|
|
194
217
|
watchInterval(newVal) {
|
|
195
|
-
|
|
218
|
+
const swiper = this.getSwiper();
|
|
219
|
+
if (!swiper)
|
|
196
220
|
return;
|
|
197
|
-
if (typeof
|
|
198
|
-
|
|
221
|
+
if (typeof swiper.params.autoplay === 'object') {
|
|
222
|
+
swiper.params.autoplay.delay = newVal;
|
|
199
223
|
}
|
|
200
224
|
}
|
|
201
|
-
|
|
202
|
-
if (!this.isWillLoadCalled || !this.swiper)
|
|
203
|
-
return;
|
|
204
|
-
if (!newVal)
|
|
205
|
-
return;
|
|
225
|
+
bindWrapper(wrapper) {
|
|
206
226
|
const beforeDomOperation = () => {
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
this
|
|
211
|
-
this.swiper.params.loop = false;
|
|
212
|
-
};
|
|
213
|
-
this.el.appendChild = (newChild) => {
|
|
227
|
+
const swiper = this.swiper;
|
|
228
|
+
if (!swiper)
|
|
229
|
+
return;
|
|
230
|
+
const firstChange = !__classPrivateFieldGet(this, _Swiper_swiperResetting, "f");
|
|
214
231
|
__classPrivateFieldSet(this, _Swiper_swiperResetting, true, "f");
|
|
215
|
-
if (
|
|
216
|
-
|
|
232
|
+
if (firstChange && this.circular) {
|
|
233
|
+
swiper.autoplay.stop();
|
|
234
|
+
if (swiper.wrapperEl && swiper.slidesEl)
|
|
235
|
+
swiper.loopDestroy();
|
|
236
|
+
swiper.params.loop = false;
|
|
217
237
|
}
|
|
218
|
-
|
|
238
|
+
this.handleSwiperSizeDebounce();
|
|
239
|
+
};
|
|
240
|
+
this.el.appendChild = (newChild) => {
|
|
241
|
+
beforeDomOperation();
|
|
242
|
+
return wrapper.appendChild(newChild);
|
|
219
243
|
};
|
|
220
244
|
this.el.insertBefore = (newChild, refChild) => {
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
beforeDomOperation();
|
|
224
|
-
}
|
|
225
|
-
return newVal.insertBefore(newChild, refChild);
|
|
245
|
+
beforeDomOperation();
|
|
246
|
+
return wrapper.insertBefore(newChild, refChild);
|
|
226
247
|
};
|
|
227
248
|
this.el.replaceChild = (newChild, oldChild) => {
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
beforeDomOperation();
|
|
231
|
-
}
|
|
232
|
-
return newVal.replaceChild(newChild, oldChild);
|
|
249
|
+
beforeDomOperation();
|
|
250
|
+
return wrapper.replaceChild(newChild, oldChild);
|
|
233
251
|
};
|
|
234
252
|
this.el.removeChild = (oldChild) => {
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
beforeDomOperation();
|
|
238
|
-
}
|
|
239
|
-
return newVal.removeChild(oldChild);
|
|
253
|
+
beforeDomOperation();
|
|
254
|
+
return wrapper.removeChild(oldChild);
|
|
240
255
|
};
|
|
241
256
|
}
|
|
242
257
|
watchCircular() {
|
|
243
|
-
if (
|
|
244
|
-
|
|
245
|
-
this.reset();
|
|
258
|
+
if (__classPrivateFieldGet(this, _Swiper_didLoad, "f"))
|
|
259
|
+
this.reset();
|
|
246
260
|
}
|
|
247
261
|
watchDisplayMultipleItems() {
|
|
248
|
-
if (
|
|
249
|
-
|
|
250
|
-
this.reset();
|
|
262
|
+
if (__classPrivateFieldGet(this, _Swiper_didLoad, "f"))
|
|
263
|
+
this.reset();
|
|
251
264
|
}
|
|
252
|
-
|
|
253
|
-
this
|
|
265
|
+
connectedCallback() {
|
|
266
|
+
if (__classPrivateFieldGet(this, _Swiper_didLoad, "f"))
|
|
267
|
+
this.handleInit(true);
|
|
254
268
|
}
|
|
255
269
|
componentDidLoad() {
|
|
270
|
+
__classPrivateFieldSet(this, _Swiper_didLoad, true, "f");
|
|
256
271
|
this.handleInit();
|
|
257
|
-
if (!this.swiper || !this.swiperWrapper)
|
|
258
|
-
return;
|
|
259
|
-
this.observer = new MutationObserver(this.handleSwiperSizeDebounce);
|
|
260
|
-
this.observer.observe(this.swiperWrapper, {
|
|
261
|
-
childList: true
|
|
262
|
-
});
|
|
263
272
|
}
|
|
264
273
|
disconnectedCallback() {
|
|
274
|
+
this.destroySwiper();
|
|
275
|
+
}
|
|
276
|
+
destroySwiper() {
|
|
265
277
|
var _a;
|
|
278
|
+
clearTimeout(__classPrivateFieldGet(this, _Swiper_sizeTimer, "f"));
|
|
266
279
|
(_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
280
|
+
this.observer = null;
|
|
281
|
+
const swiper = this.swiper;
|
|
282
|
+
this.swiper = null;
|
|
283
|
+
if (swiper && !swiper.destroyed) {
|
|
284
|
+
__classPrivateFieldSet(this, _Swiper_lastSwiperActiveIndex, swiper.realIndex, "f");
|
|
285
|
+
swiper.autoplay.stop();
|
|
286
|
+
// 失效节点无法还原循环顺序,但实例的事件和观察器仍需释放
|
|
287
|
+
if (!swiper.wrapperEl || !swiper.slidesEl)
|
|
288
|
+
swiper.params.loop = false;
|
|
289
|
+
swiper.destroy();
|
|
290
|
+
}
|
|
291
|
+
__classPrivateFieldSet(this, _Swiper_swiperResetting, false, "f");
|
|
267
292
|
}
|
|
268
293
|
handleInit(reset = false) {
|
|
294
|
+
var _a;
|
|
295
|
+
if (!this.el.isConnected || !__classPrivateFieldGet(this, _Swiper_container, "f") || this.swiper)
|
|
296
|
+
return;
|
|
269
297
|
const { autoplay, circular, current, currentItemId, displayMultipleItems, duration, interval, effectsProps, vertical } = this;
|
|
270
298
|
let initialSlide = current;
|
|
271
299
|
if (reset) {
|
|
272
300
|
initialSlide = __classPrivateFieldGet(this, _Swiper_lastSwiperActiveIndex, "f");
|
|
273
301
|
}
|
|
274
|
-
else {
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
initialSlide = itemIdIndex;
|
|
284
|
-
}
|
|
302
|
+
else if (currentItemId) {
|
|
303
|
+
let itemIdIndex = 0;
|
|
304
|
+
this.getSlidersList().forEach((swiperItem, index) => {
|
|
305
|
+
// @ts-ignore
|
|
306
|
+
if (swiperItem.itemId && swiperItem.itemId === currentItemId) {
|
|
307
|
+
itemIdIndex = index;
|
|
308
|
+
}
|
|
309
|
+
});
|
|
310
|
+
initialSlide = itemIdIndex;
|
|
285
311
|
}
|
|
286
312
|
const loopAdditionalSlides = this.getLoopAdditionalSlides();
|
|
287
313
|
const centeredSlides = displayMultipleItems === 1 && this.getNeedFixLoop();
|
|
288
314
|
const slidesPerView = displayMultipleItems;
|
|
289
315
|
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
290
316
|
const that = this;
|
|
291
|
-
const options = Object.assign(Object.assign({ pagination: { el:
|
|
317
|
+
const options = Object.assign(Object.assign({ pagination: { el: __classPrivateFieldGet(this, _Swiper_container, "f").querySelector('.swiper-pagination') }, direction: vertical ? 'vertical' : 'horizontal', loop: circular, slidesPerView: slidesPerView, initialSlide: initialSlide, loopAdditionalSlides: loopAdditionalSlides, speed: duration, observeParents: true, observer: true, centeredSlides: centeredSlides, zoom: this.zoom, nested: true, touchReleaseOnEdges: true, threshold: 0 }, effectsProps), { init: false, on: {
|
|
292
318
|
transitionEnd(e) {
|
|
293
|
-
if (__classPrivateFieldGet(that, _Swiper_swiperResetting, "f") || __classPrivateFieldGet(that, _Swiper_lastSwiperActiveIndex, "f") === this.realIndex)
|
|
319
|
+
if (e !== that.swiper || __classPrivateFieldGet(that, _Swiper_swiperResetting, "f") || __classPrivateFieldGet(that, _Swiper_lastSwiperActiveIndex, "f") === this.realIndex)
|
|
294
320
|
return;
|
|
295
321
|
__classPrivateFieldSet(that, _Swiper_lastSwiperActiveIndex, this.realIndex, "f");
|
|
296
322
|
that.getNeedFixLoop() && e.loopFix();
|
|
@@ -303,11 +329,13 @@ const Swiper = class {
|
|
|
303
329
|
});
|
|
304
330
|
__classPrivateFieldSet(that, _Swiper_source, 'autoplay', "f");
|
|
305
331
|
},
|
|
306
|
-
touchMove() {
|
|
332
|
+
touchMove(e) {
|
|
333
|
+
if (e !== that.swiper)
|
|
334
|
+
return;
|
|
307
335
|
__classPrivateFieldSet(that, _Swiper_source, 'touch', "f");
|
|
308
336
|
},
|
|
309
337
|
slideChange(e) {
|
|
310
|
-
if (__classPrivateFieldGet(that, _Swiper_swiperResetting, "f") || __classPrivateFieldGet(that, _Swiper_lastSwiperActiveIndex, "f") === this.realIndex)
|
|
338
|
+
if (e !== that.swiper || __classPrivateFieldGet(that, _Swiper_swiperResetting, "f") || __classPrivateFieldGet(that, _Swiper_lastSwiperActiveIndex, "f") === this.realIndex)
|
|
311
339
|
return;
|
|
312
340
|
const currentItemId = that.getCurrentItemId(e);
|
|
313
341
|
that.onChange.emit({
|
|
@@ -316,19 +344,21 @@ const Swiper = class {
|
|
|
316
344
|
currentItemId,
|
|
317
345
|
});
|
|
318
346
|
},
|
|
319
|
-
init: (e) => {
|
|
320
|
-
that.getNeedFixLoop() && e.loopFix();
|
|
321
|
-
that.autoplay && e.autoplay.start();
|
|
322
|
-
},
|
|
323
347
|
touchEnd: (e) => {
|
|
348
|
+
if (e !== that.swiper)
|
|
349
|
+
return;
|
|
324
350
|
__classPrivateFieldSet(that, _Swiper_source, 'touch', "f");
|
|
325
351
|
that.autoplay && e.autoplay.start();
|
|
326
352
|
},
|
|
327
353
|
touchStart: (e) => {
|
|
354
|
+
if (e !== that.swiper)
|
|
355
|
+
return;
|
|
328
356
|
__classPrivateFieldSet(that, _Swiper_source, 'touch', "f");
|
|
329
357
|
that.autoplay && e.autoplay.pause();
|
|
330
358
|
},
|
|
331
359
|
autoplay(e) {
|
|
360
|
+
if (e !== that.swiper)
|
|
361
|
+
return;
|
|
332
362
|
// Note: 修复 autoplay 时,切换到其他页面再切回来,autoplay 会停止的问题
|
|
333
363
|
// autoplay 会调用 slideTo 方法,里面会判断是否 animating,如果 animating 为 true,就会被 return
|
|
334
364
|
// 参考源码:https://github.com/nolimits4web/swiper/blob/v11.1.0/src/core/slide/slideTo.mjs#27 27行
|
|
@@ -344,30 +374,51 @@ const Swiper = class {
|
|
|
344
374
|
disableOnInteraction: false
|
|
345
375
|
};
|
|
346
376
|
}
|
|
347
|
-
|
|
377
|
+
// 使用组件内的真实节点,避免全局选择器在脱离文档或重建时匹配失败
|
|
378
|
+
const swiper = new SwiperJS__default['default'](__classPrivateFieldGet(this, _Swiper_container, "f"), options);
|
|
379
|
+
try {
|
|
380
|
+
swiper.init();
|
|
381
|
+
}
|
|
382
|
+
finally {
|
|
383
|
+
if (!swiper.initialized) {
|
|
384
|
+
// 初始化失败时跳过循环节点还原,释放实例并保留原始初始化异常
|
|
385
|
+
swiper.params.loop = false;
|
|
386
|
+
swiper.destroy();
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
if (!swiper.initialized)
|
|
390
|
+
return;
|
|
391
|
+
this.swiper = swiper;
|
|
392
|
+
this.getNeedFixLoop() && swiper.loopFix();
|
|
348
393
|
// Note: 这里是拦截了 swiper 的 minTranslate 和 maxTranslate 方法,手动修复了 loop 模式下的 margin 问题
|
|
349
394
|
// 因为这两个属性会影响滑动到哪个位置进行 fixloop
|
|
350
395
|
// 可参考源码:https://github.com/nolimits4web/swiper/blob/v11.1.0/src/core/events/onTouchMove.mjs
|
|
351
396
|
// https://github.com/nolimits4web/swiper/blob/v11.1.0/src/core/loop/loopFix.mjs
|
|
352
397
|
if (this.getNeedFixLoop()) {
|
|
353
398
|
// @ts-ignore
|
|
354
|
-
const minTranslate =
|
|
399
|
+
const minTranslate = swiper.minTranslate.bind(this.swiper);
|
|
355
400
|
//@ts-ignore
|
|
356
|
-
const maxTranslate =
|
|
401
|
+
const maxTranslate = swiper.maxTranslate.bind(this.swiper);
|
|
357
402
|
if (centeredSlides && this.getSlidersList().length < 4) {
|
|
358
403
|
//@ts-ignore
|
|
359
|
-
|
|
404
|
+
swiper.minTranslate = () => minTranslate() + this.parseMargin()[1];
|
|
360
405
|
//@ts-ignore
|
|
361
|
-
|
|
406
|
+
swiper.maxTranslate = () => maxTranslate() - this.parseMargin()[0];
|
|
362
407
|
}
|
|
363
408
|
else {
|
|
364
409
|
//@ts-ignore
|
|
365
|
-
|
|
410
|
+
swiper.minTranslate = () => minTranslate() - this.parseMargin()[0];
|
|
366
411
|
//@ts-ignore
|
|
367
|
-
|
|
412
|
+
swiper.maxTranslate = () => maxTranslate() + this.parseMargin()[1];
|
|
368
413
|
}
|
|
369
414
|
}
|
|
370
|
-
this.
|
|
415
|
+
this.bindWrapper(swiper.wrapperEl);
|
|
416
|
+
(_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
417
|
+
this.observer = new MutationObserver(this.handleSwiperSizeDebounce);
|
|
418
|
+
this.observer.observe(swiper.wrapperEl, { childList: true });
|
|
419
|
+
// 脱离文档期间更新的目标项,在实例恢复后应用一次
|
|
420
|
+
if (__classPrivateFieldGet(this, _Swiper_pendingCurrentItemId, "f") !== null)
|
|
421
|
+
this.watchCurrentItemId(__classPrivateFieldGet(this, _Swiper_pendingCurrentItemId, "f"));
|
|
371
422
|
}
|
|
372
423
|
// Note: loop 的时候添加 additionalSlides 可以避免循环的时候由于 loopFix 不及时,出现空白的问题。但是并不是 additionalSlides 越多越好,因为 additionalSlides 越多,如果 swiper-item 的数量不够,会导致出现 bug。
|
|
373
424
|
// 目前的策略是 swiper-item 的数量小于等于 5 时,不添加 additionalSlides,大于 5 小于等于 7 时,添加 1 个 additionalSlides,大于 7 时,添加 2 个 additionalSlides。
|
|
@@ -383,7 +434,7 @@ const Swiper = class {
|
|
|
383
434
|
const slides = swiper.slides;
|
|
384
435
|
const activeIndex = swiper.activeIndex;
|
|
385
436
|
const currentSlide = slides[activeIndex];
|
|
386
|
-
return currentSlide.getAttribute('item-id');
|
|
437
|
+
return (currentSlide === null || currentSlide === void 0 ? void 0 : currentSlide.getAttribute('item-id')) || '';
|
|
387
438
|
}
|
|
388
439
|
render() {
|
|
389
440
|
const { vertical, indicatorDots, indicatorColor, indicatorActiveColor } = this;
|
|
@@ -401,7 +452,7 @@ const Swiper = class {
|
|
|
401
452
|
if (this.full) {
|
|
402
453
|
hostStyle.height = '100%';
|
|
403
454
|
}
|
|
404
|
-
return (index.h(index.Host, { class: `taro-swiper-${__classPrivateFieldGet(this, _Swiper_id, "f")}`, style: hostStyle }, index.h("div", { class: 'swiper-container' }, index.h("style", { type: 'text/css' }, `
|
|
455
|
+
return (index.h(index.Host, { class: `taro-swiper-${__classPrivateFieldGet(this, _Swiper_id, "f")}`, style: hostStyle }, index.h("div", { class: 'swiper-container', ref: el => { __classPrivateFieldSet(this, _Swiper_container, el || null, "f"); } }, index.h("style", { type: 'text/css' }, `
|
|
405
456
|
.taro-swiper-${__classPrivateFieldGet(this, _Swiper_id, "f")} > .swiper-container > .swiper-pagination > .swiper-pagination-bullet { background: ${indicatorColor} }
|
|
406
457
|
.taro-swiper-${__classPrivateFieldGet(this, _Swiper_id, "f")} > .swiper-container > .swiper-pagination > .swiper-pagination-bullet-active { background: ${indicatorActiveColor} }
|
|
407
458
|
.taro-swiper-${__classPrivateFieldGet(this, _Swiper_id, "f")} > .swiper-container { ${swiperContainerStyleList.join('')} }
|
|
@@ -415,12 +466,11 @@ const Swiper = class {
|
|
|
415
466
|
"autoplay": ["watchAutoplay"],
|
|
416
467
|
"duration": ["watchDuration"],
|
|
417
468
|
"interval": ["watchInterval"],
|
|
418
|
-
"swiperWrapper": ["watchSwiperWrapper"],
|
|
419
469
|
"circular": ["watchCircular"],
|
|
420
470
|
"displayMultipleItems": ["watchDisplayMultipleItems"]
|
|
421
471
|
}; }
|
|
422
472
|
};
|
|
423
|
-
_Swiper_id = new WeakMap(), _Swiper_source = new WeakMap(), _Swiper_swiperResetting = new WeakMap(),
|
|
473
|
+
_Swiper_id = new WeakMap(), _Swiper_source = new WeakMap(), _Swiper_swiperResetting = new WeakMap(), _Swiper_lastSwiperActiveIndex = new WeakMap(), _Swiper_pendingCurrentItemId = new WeakMap(), _Swiper_didLoad = new WeakMap(), _Swiper_container = new WeakMap(), _Swiper_sizeTimer = new WeakMap();
|
|
424
474
|
Swiper.style = indexCss;
|
|
425
475
|
|
|
426
476
|
exports.Swiper = Swiper;
|