@tarojs/components 4.3.1-beta.4 → 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/esm/loader.js
CHANGED
|
@@ -11,7 +11,7 @@ const patchEsm = () => {
|
|
|
11
11
|
const defineCustomElements = (win, options) => {
|
|
12
12
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
13
13
|
return patchEsm().then(() => {
|
|
14
|
-
return bootstrapLazy(JSON.parse("[[\"taro-checkbox-core_2\",[[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\",[[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\",[[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\",[[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\",[[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\",[[0,\"taro-ad-core\"]]],[\"taro-ad-custom-core\",[[0,\"taro-ad-custom-core\"]]],[\"taro-animation-video-core\",[[0,\"taro-animation-video-core\"]]],[\"taro-animation-view-core\",[[0,\"taro-animation-view-core\"]]],[\"taro-ar-camera-core\",[[0,\"taro-ar-camera-core\"]]],[\"taro-audio-core\",[[0,\"taro-audio-core\",{\"src\":[1],\"controls\":[4],\"autoplay\":[4],\"loop\":[4],\"muted\":[4],\"nativeProps\":[16]}]]],[\"taro-aweme-data-core\",[[0,\"taro-aweme-data-core\"]]],[\"taro-block-core\",[[0,\"taro-block-core\"]]],[\"taro-button-core\",[[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\",[[0,\"taro-camera-core\"]]],[\"taro-canvas-core\",[[0,\"taro-canvas-core\",{\"canvasId\":[1,\"id\"],\"height\":[1537],\"width\":[1537],\"nativeProps\":[16]}]]],[\"taro-channel-live-core\",[[0,\"taro-channel-live-core\"]]],[\"taro-channel-video-core\",[[0,\"taro-channel-video-core\"]]],[\"taro-comment-detail-core\",[[0,\"taro-comment-detail-core\"]]],[\"taro-comment-list-core\",[[0,\"taro-comment-list-core\"]]],[\"taro-contact-button-core\",[[0,\"taro-contact-button-core\"]]],[\"taro-cover-image-core\",[[0,\"taro-cover-image-core\",{\"src\":[1],\"nativeProps\":[16]}]]],[\"taro-cover-view-core\",[[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\",[[0,\"taro-custom-wrapper-core\"]]],[\"taro-double-tap-gesture-handler-core\",[[0,\"taro-double-tap-gesture-handler-core\"]]],[\"taro-draggable-sheet-core\",[[0,\"taro-draggable-sheet-core\"]]],[\"taro-editor-core\",[[0,\"taro-editor-core\"]]],[\"taro-follow-swan-core\",[[0,\"taro-follow-swan-core\"]]],[\"taro-force-press-gesture-handler-core\",[[0,\"taro-force-press-gesture-handler-core\"]]],[\"taro-form-core\",[[4,\"taro-form-core\",null,[[0,\"tarobuttonsubmit\",\"onButtonSubmit\"],[0,\"tarobuttonreset\",\"onButtonReset\"]]]]],[\"taro-functional-page-navigator-core\",[[0,\"taro-functional-page-navigator-core\"]]],[\"taro-grid-builder-core\",[[0,\"taro-grid-builder-core\"]]],[\"taro-grid-view-core\",[[0,\"taro-grid-view-core\"]]],[\"taro-horizontal-drag-gesture-handler-core\",[[0,\"taro-horizontal-drag-gesture-handler-core\"]]],[\"taro-icon-core\",[[0,\"taro-icon-core\",{\"type\":[1],\"size\":[8],\"color\":[1]}]]],[\"taro-image-core\",[[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\",[[0,\"taro-inline-payment-panel-core\"]]],[\"taro-input-core\",[[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\",[[0,\"taro-keyboard-accessory-core\"]]],[\"taro-label-core\",[[4,\"taro-label-core\",{\"for\":[1]}]]],[\"taro-lifestyle-core\",[[0,\"taro-lifestyle-core\"]]],[\"taro-like-core\",[[0,\"taro-like-core\"]]],[\"taro-list-builder-core\",[[0,\"taro-list-builder-core\"]]],[\"taro-list-view-core\",[[0,\"taro-list-view-core\"]]],[\"taro-live-player-core\",[[0,\"taro-live-player-core\"]]],[\"taro-live-pusher-core\",[[0,\"taro-live-pusher-core\"]]],[\"taro-login-core\",[[0,\"taro-login-core\"]]],[\"taro-long-press-gesture-handler-core\",[[0,\"taro-long-press-gesture-handler-core\"]]],[\"taro-lottie-core\",[[0,\"taro-lottie-core\"]]],[\"taro-map-core\",[[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\",[[0,\"taro-match-media-core\"]]],[\"taro-native-slot-core\",[[0,\"taro-native-slot-core\"]]],[\"taro-navigation-bar-core\",[[0,\"taro-navigation-bar-core\"]]],[\"taro-navigator-core\",[[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\",[[0,\"taro-nested-scroll-body-core\"]]],[\"taro-nested-scroll-header-core\",[[0,\"taro-nested-scroll-header-core\"]]],[\"taro-official-account-core\",[[0,\"taro-official-account-core\"]]],[\"taro-open-container-core\",[[0,\"taro-open-container-core\"]]],[\"taro-open-data-core\",[[0,\"taro-open-data-core\"]]],[\"taro-open-embedded-atomicservice-core\",[[0,\"taro-open-embedded-atomicservice-core\"]]],[\"taro-page-container-core\",[[0,\"taro-page-container-core\"]]],[\"taro-page-meta-core\",[[0,\"taro-page-meta-core\"]]],[\"taro-pan-gesture-handler-core\",[[0,\"taro-pan-gesture-handler-core\"]]],[\"taro-progress-core\",[[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\",[[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\",[[0,\"taro-rich-text-core\",{\"nodes\":[1],\"selectable\":[1028],\"userSelect\":[1028,\"user-select\"],\"space\":[1]}]]],[\"taro-root-portal-core\",[[0,\"taro-root-portal-core\"]]],[\"taro-rtc-room-core\",[[0,\"taro-rtc-room-core\"]]],[\"taro-rtc-room-item-core\",[[0,\"taro-rtc-room-item-core\"]]],[\"taro-scale-gesture-handler-core\",[[0,\"taro-scale-gesture-handler-core\"]]],[\"taro-script-core\",[[0,\"taro-script-core\"]]],[\"taro-scroll-view-core\",[[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\",[[0,\"taro-share-element-core\"]]],[\"taro-slider-core\",[[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\",[[0,\"taro-slot-core\"]]],[\"taro-snapshot-core\",[[0,\"taro-snapshot-core\"]]],[\"taro-span-core\",[[0,\"taro-span-core\"]]],[\"taro-sticky-header-core\",[[0,\"taro-sticky-header-core\"]]],[\"taro-sticky-section-core\",[[0,\"taro-sticky-section-core\"]]],[\"taro-switch-core\",[[0,\"taro-switch-core\",{\"type\":[1],\"checked\":[1028],\"color\":[1],\"name\":[1],\"disabled\":[4],\"nativeProps\":[16],\"isWillLoadCalled\":[32]}]]],[\"taro-tab-item-core\",[[0,\"taro-tab-item-core\"]]],[\"taro-tabbar\",[[0,\"taro-tabbar\",{\"conf\":[16],\"list\":[32],\"borderStyle\":[32],\"backgroundColor\":[32],\"color\":[32],\"selectedColor\":[32],\"selectedIndex\":[32],\"status\":[32]}]]],[\"taro-tabs-core\",[[0,\"taro-tabs-core\"]]],[\"taro-tap-gesture-handler-core\",[[0,\"taro-tap-gesture-handler-core\"]]],[\"taro-text-core\",[[4,\"taro-text-core\",{\"selectable\":[1028],\"userSelect\":[1028,\"user-select\"],\"space\":[1025],\"numberOfLines\":[2,\"number-of-lines\"]}]]],[\"taro-textarea-core\",[[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\",[[0,\"taro-vertical-drag-gesture-handler-core\"]]],[\"taro-view-core\",[[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\",[[0,\"taro-voip-room-core\"]]],[\"taro-web-view-core\",[[0,\"taro-web-view-core\",{\"src\":[1]}]]],[\"taro-picker-core_2\",[[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\",[[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);
|
|
14
|
+
return bootstrapLazy(JSON.parse("[[\"taro-checkbox-core_2\",[[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\",[[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\",[[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\",[[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\",[[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\",[[0,\"taro-ad-core\"]]],[\"taro-ad-custom-core\",[[0,\"taro-ad-custom-core\"]]],[\"taro-animation-video-core\",[[0,\"taro-animation-video-core\"]]],[\"taro-animation-view-core\",[[0,\"taro-animation-view-core\"]]],[\"taro-ar-camera-core\",[[0,\"taro-ar-camera-core\"]]],[\"taro-audio-core\",[[0,\"taro-audio-core\",{\"src\":[1],\"controls\":[4],\"autoplay\":[4],\"loop\":[4],\"muted\":[4],\"nativeProps\":[16]}]]],[\"taro-aweme-data-core\",[[0,\"taro-aweme-data-core\"]]],[\"taro-block-core\",[[0,\"taro-block-core\"]]],[\"taro-button-core\",[[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\",[[0,\"taro-camera-core\"]]],[\"taro-canvas-core\",[[0,\"taro-canvas-core\",{\"canvasId\":[1,\"id\"],\"height\":[1537],\"width\":[1537],\"nativeProps\":[16]}]]],[\"taro-channel-live-core\",[[0,\"taro-channel-live-core\"]]],[\"taro-channel-video-core\",[[0,\"taro-channel-video-core\"]]],[\"taro-comment-detail-core\",[[0,\"taro-comment-detail-core\"]]],[\"taro-comment-list-core\",[[0,\"taro-comment-list-core\"]]],[\"taro-contact-button-core\",[[0,\"taro-contact-button-core\"]]],[\"taro-cover-image-core\",[[0,\"taro-cover-image-core\",{\"src\":[1],\"nativeProps\":[16]}]]],[\"taro-cover-view-core\",[[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\",[[0,\"taro-custom-wrapper-core\"]]],[\"taro-double-tap-gesture-handler-core\",[[0,\"taro-double-tap-gesture-handler-core\"]]],[\"taro-draggable-sheet-core\",[[0,\"taro-draggable-sheet-core\"]]],[\"taro-editor-core\",[[0,\"taro-editor-core\"]]],[\"taro-follow-swan-core\",[[0,\"taro-follow-swan-core\"]]],[\"taro-force-press-gesture-handler-core\",[[0,\"taro-force-press-gesture-handler-core\"]]],[\"taro-form-core\",[[4,\"taro-form-core\",null,[[0,\"tarobuttonsubmit\",\"onButtonSubmit\"],[0,\"tarobuttonreset\",\"onButtonReset\"]]]]],[\"taro-functional-page-navigator-core\",[[0,\"taro-functional-page-navigator-core\"]]],[\"taro-grid-builder-core\",[[0,\"taro-grid-builder-core\"]]],[\"taro-grid-view-core\",[[0,\"taro-grid-view-core\"]]],[\"taro-horizontal-drag-gesture-handler-core\",[[0,\"taro-horizontal-drag-gesture-handler-core\"]]],[\"taro-icon-core\",[[0,\"taro-icon-core\",{\"type\":[1],\"size\":[8],\"color\":[1]}]]],[\"taro-image-core\",[[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\",[[0,\"taro-inline-payment-panel-core\"]]],[\"taro-input-core\",[[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\",[[0,\"taro-keyboard-accessory-core\"]]],[\"taro-label-core\",[[4,\"taro-label-core\",{\"for\":[1]}]]],[\"taro-lifestyle-core\",[[0,\"taro-lifestyle-core\"]]],[\"taro-like-core\",[[0,\"taro-like-core\"]]],[\"taro-list-builder-core\",[[0,\"taro-list-builder-core\"]]],[\"taro-list-view-core\",[[0,\"taro-list-view-core\"]]],[\"taro-live-player-core\",[[0,\"taro-live-player-core\"]]],[\"taro-live-pusher-core\",[[0,\"taro-live-pusher-core\"]]],[\"taro-login-core\",[[0,\"taro-login-core\"]]],[\"taro-long-press-gesture-handler-core\",[[0,\"taro-long-press-gesture-handler-core\"]]],[\"taro-lottie-core\",[[0,\"taro-lottie-core\"]]],[\"taro-map-core\",[[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\",[[0,\"taro-match-media-core\"]]],[\"taro-native-slot-core\",[[0,\"taro-native-slot-core\"]]],[\"taro-navigation-bar-core\",[[0,\"taro-navigation-bar-core\"]]],[\"taro-navigator-core\",[[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\",[[0,\"taro-nested-scroll-body-core\"]]],[\"taro-nested-scroll-header-core\",[[0,\"taro-nested-scroll-header-core\"]]],[\"taro-official-account-core\",[[0,\"taro-official-account-core\"]]],[\"taro-open-container-core\",[[0,\"taro-open-container-core\"]]],[\"taro-open-data-core\",[[0,\"taro-open-data-core\"]]],[\"taro-open-embedded-atomicservice-core\",[[0,\"taro-open-embedded-atomicservice-core\"]]],[\"taro-page-container-core\",[[0,\"taro-page-container-core\"]]],[\"taro-page-meta-core\",[[0,\"taro-page-meta-core\"]]],[\"taro-pan-gesture-handler-core\",[[0,\"taro-pan-gesture-handler-core\"]]],[\"taro-progress-core\",[[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\",[[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\",[[0,\"taro-rich-text-core\",{\"nodes\":[1],\"selectable\":[1028],\"userSelect\":[1028,\"user-select\"],\"space\":[1]}]]],[\"taro-root-portal-core\",[[0,\"taro-root-portal-core\"]]],[\"taro-rtc-room-core\",[[0,\"taro-rtc-room-core\"]]],[\"taro-rtc-room-item-core\",[[0,\"taro-rtc-room-item-core\"]]],[\"taro-scale-gesture-handler-core\",[[0,\"taro-scale-gesture-handler-core\"]]],[\"taro-script-core\",[[0,\"taro-script-core\"]]],[\"taro-scroll-view-core\",[[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\",[[0,\"taro-share-element-core\"]]],[\"taro-slider-core\",[[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\",[[0,\"taro-slot-core\"]]],[\"taro-snapshot-core\",[[0,\"taro-snapshot-core\"]]],[\"taro-span-core\",[[0,\"taro-span-core\"]]],[\"taro-sticky-header-core\",[[0,\"taro-sticky-header-core\"]]],[\"taro-sticky-section-core\",[[0,\"taro-sticky-section-core\"]]],[\"taro-switch-core\",[[0,\"taro-switch-core\",{\"type\":[1],\"checked\":[1028],\"color\":[1],\"name\":[1],\"disabled\":[4],\"nativeProps\":[16],\"isWillLoadCalled\":[32]}]]],[\"taro-tab-item-core\",[[0,\"taro-tab-item-core\"]]],[\"taro-tabbar\",[[0,\"taro-tabbar\",{\"conf\":[16],\"list\":[32],\"borderStyle\":[32],\"backgroundColor\":[32],\"color\":[32],\"selectedColor\":[32],\"selectedIndex\":[32],\"status\":[32]}]]],[\"taro-tabs-core\",[[0,\"taro-tabs-core\"]]],[\"taro-tap-gesture-handler-core\",[[0,\"taro-tap-gesture-handler-core\"]]],[\"taro-text-core\",[[4,\"taro-text-core\",{\"selectable\":[1028],\"userSelect\":[1028,\"user-select\"],\"space\":[1025],\"numberOfLines\":[2,\"number-of-lines\"]}]]],[\"taro-textarea-core\",[[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\",[[0,\"taro-vertical-drag-gesture-handler-core\"]]],[\"taro-view-core\",[[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\",[[0,\"taro-voip-room-core\"]]],[\"taro-web-view-core\",[[0,\"taro-web-view-core\",{\"src\":[1]}]]],[\"taro-picker-core_2\",[[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\",[[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);
|
|
15
15
|
});
|
|
16
16
|
};
|
|
17
17
|
|
|
@@ -2,7 +2,6 @@ import { r as registerInstance, h, H as Host, g as getElement, c as createEvent
|
|
|
2
2
|
import { c as classnames } from './index-b9522531.js';
|
|
3
3
|
import { h as handleStencilNodes } from './helper-8a85bb65.js';
|
|
4
4
|
import SwiperJS from 'swiper/bundle';
|
|
5
|
-
import { d as debounce } from './index-a00a7418.js';
|
|
6
5
|
|
|
7
6
|
const SwiperItem = class {
|
|
8
7
|
constructor(hostRef) {
|
|
@@ -40,7 +39,7 @@ var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) ||
|
|
|
40
39
|
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
41
40
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
42
41
|
};
|
|
43
|
-
var _Swiper_id, _Swiper_source, _Swiper_swiperResetting,
|
|
42
|
+
var _Swiper_id, _Swiper_source, _Swiper_swiperResetting, _Swiper_lastSwiperActiveIndex, _Swiper_pendingCurrentItemId, _Swiper_didLoad, _Swiper_container, _Swiper_sizeTimer;
|
|
44
43
|
let INSTANCE_ID = 0;
|
|
45
44
|
const ONE_ADDITIONAL_SLIDES_THRESHOLD = 5;
|
|
46
45
|
const TWO_ADDITIONAL_SLIDES_THRESHOLD = 7;
|
|
@@ -51,33 +50,41 @@ const Swiper = class {
|
|
|
51
50
|
this.onAnimationFinish = createEvent(this, "animationfinish", 7);
|
|
52
51
|
_Swiper_id.set(this, INSTANCE_ID++);
|
|
53
52
|
_Swiper_source.set(this, 'autoplay');
|
|
54
|
-
_Swiper_swiperResetting.set(this, false
|
|
55
|
-
// dom 变化是否由外部引起,因为 swiper 的循环模式也会引起 dom 的变化。如果不是由外部引起的 dom 变化,就不需要重新初始化 swiper
|
|
56
|
-
);
|
|
57
|
-
// dom 变化是否由外部引起,因为 swiper 的循环模式也会引起 dom 的变化。如果不是由外部引起的 dom 变化,就不需要重新初始化 swiper
|
|
58
|
-
_Swiper_domChangeByOutSide.set(this, false);
|
|
53
|
+
_Swiper_swiperResetting.set(this, false);
|
|
59
54
|
_Swiper_lastSwiperActiveIndex.set(this, 0);
|
|
60
|
-
this
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
55
|
+
_Swiper_pendingCurrentItemId.set(this, null);
|
|
56
|
+
_Swiper_didLoad.set(this, false);
|
|
57
|
+
_Swiper_container.set(this, null);
|
|
58
|
+
_Swiper_sizeTimer.set(this, void 0);
|
|
59
|
+
this.swiper = null;
|
|
60
|
+
this.observer = null;
|
|
61
|
+
this.handleSwiperSizeDebounce = () => {
|
|
62
|
+
clearTimeout(__classPrivateFieldGet(this, _Swiper_sizeTimer, "f"));
|
|
63
|
+
const swiper = this.swiper;
|
|
64
|
+
__classPrivateFieldSet(this, _Swiper_sizeTimer, setTimeout(() => {
|
|
65
|
+
if (this.swiper !== swiper || !swiper)
|
|
66
|
+
return;
|
|
67
|
+
if (this.circular) {
|
|
68
|
+
if (__classPrivateFieldGet(this, _Swiper_swiperResetting, "f"))
|
|
69
|
+
this.reset();
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
swiper.update();
|
|
67
73
|
__classPrivateFieldSet(this, _Swiper_swiperResetting, false, "f");
|
|
68
74
|
}
|
|
75
|
+
}, 50), "f");
|
|
76
|
+
};
|
|
77
|
+
this.reset = (current) => {
|
|
78
|
+
this.destroySwiper();
|
|
79
|
+
if (current !== undefined)
|
|
80
|
+
__classPrivateFieldSet(this, _Swiper_lastSwiperActiveIndex, current, "f");
|
|
81
|
+
__classPrivateFieldSet(this, _Swiper_swiperResetting, true, "f");
|
|
82
|
+
try {
|
|
83
|
+
this.handleInit(true);
|
|
69
84
|
}
|
|
70
|
-
|
|
71
|
-
this.swiper.update();
|
|
85
|
+
finally {
|
|
72
86
|
__classPrivateFieldSet(this, _Swiper_swiperResetting, false, "f");
|
|
73
87
|
}
|
|
74
|
-
}, 50);
|
|
75
|
-
this.reset = () => {
|
|
76
|
-
__classPrivateFieldSet(this, _Swiper_swiperResetting, true, "f");
|
|
77
|
-
__classPrivateFieldSet(this, _Swiper_lastSwiperActiveIndex, this.swiper.realIndex, "f");
|
|
78
|
-
this.swiper.destroy();
|
|
79
|
-
this.handleInit(true);
|
|
80
|
-
__classPrivateFieldSet(this, _Swiper_swiperResetting, false, "f");
|
|
81
88
|
};
|
|
82
89
|
// 下面为方法函数
|
|
83
90
|
this.getSlidersList = () => this.el.querySelectorAll('taro-swiper-item-core:not(.swiper-slide-duplicate)') || [];
|
|
@@ -92,9 +99,6 @@ const Swiper = class {
|
|
|
92
99
|
const [, nextMargin] = /^(\d+)px/.exec(this.nextMargin) || [];
|
|
93
100
|
return [parseInt(previousMargin) || 0, parseInt(nextMargin) || 0];
|
|
94
101
|
};
|
|
95
|
-
this.swiperWrapper = undefined;
|
|
96
|
-
this.swiper = undefined;
|
|
97
|
-
this.isWillLoadCalled = false;
|
|
98
102
|
this.indicatorDots = false;
|
|
99
103
|
this.indicatorColor = 'rgba(0, 0, 0, .3)';
|
|
100
104
|
this.indicatorActiveColor = '#000000';
|
|
@@ -111,29 +115,46 @@ const Swiper = class {
|
|
|
111
115
|
this.full = false;
|
|
112
116
|
this.zoom = false;
|
|
113
117
|
this.effectsProps = {};
|
|
114
|
-
|
|
118
|
+
}
|
|
119
|
+
// 属性入口统一恢复失效实例,事件回调只需排除旧实例
|
|
120
|
+
getSwiper(current) {
|
|
121
|
+
const swiper = this.swiper;
|
|
122
|
+
if (swiper && (swiper.destroyed || !swiper.wrapperEl || !swiper.slidesEl))
|
|
123
|
+
this.reset(current);
|
|
124
|
+
return this.swiper;
|
|
115
125
|
}
|
|
116
126
|
watchCurrent(newVal) {
|
|
117
|
-
if (this.currentItemId || !this
|
|
127
|
+
if (this.currentItemId || !__classPrivateFieldGet(this, _Swiper_didLoad, "f"))
|
|
118
128
|
return;
|
|
119
129
|
const n = parseInt(newVal, 10);
|
|
120
|
-
if (isNaN(n)
|
|
130
|
+
if (isNaN(n))
|
|
131
|
+
return;
|
|
132
|
+
const swiper = this.getSwiper(n);
|
|
133
|
+
if (!swiper) {
|
|
134
|
+
__classPrivateFieldSet(this, _Swiper_lastSwiperActiveIndex, n, "f");
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
if (n === swiper.realIndex)
|
|
121
138
|
return;
|
|
122
139
|
__classPrivateFieldSet(this, _Swiper_source, '', "f");
|
|
123
140
|
if (this.circular) {
|
|
124
|
-
|
|
125
|
-
this.autoplay &&
|
|
141
|
+
swiper.slideToLoop(n); // 更新下标
|
|
142
|
+
this.autoplay && swiper.autoplay.pause();
|
|
126
143
|
// @ts-ignore
|
|
127
|
-
|
|
128
|
-
this.autoplay &&
|
|
144
|
+
swiper.loopFix();
|
|
145
|
+
this.autoplay && swiper.autoplay.start();
|
|
129
146
|
}
|
|
130
147
|
else {
|
|
131
|
-
|
|
148
|
+
swiper.slideTo(n); // 更新下标
|
|
132
149
|
}
|
|
133
150
|
}
|
|
134
151
|
watchCurrentItemId(newVal) {
|
|
135
|
-
|
|
152
|
+
const swiper = this.getSwiper();
|
|
153
|
+
if (!swiper) {
|
|
154
|
+
__classPrivateFieldSet(this, _Swiper_pendingCurrentItemId, newVal, "f");
|
|
136
155
|
return;
|
|
156
|
+
}
|
|
157
|
+
__classPrivateFieldSet(this, _Swiper_pendingCurrentItemId, null, "f");
|
|
137
158
|
let itemIdIndex = 0;
|
|
138
159
|
this.getSlidersList().forEach((swiperItem, index) => {
|
|
139
160
|
const itemId = swiperItem.getAttribute('item-id');
|
|
@@ -146,32 +167,33 @@ const Swiper = class {
|
|
|
146
167
|
}
|
|
147
168
|
}
|
|
148
169
|
});
|
|
149
|
-
if (itemIdIndex ===
|
|
170
|
+
if (itemIdIndex === swiper.realIndex)
|
|
150
171
|
return; // 无需更新
|
|
151
172
|
__classPrivateFieldSet(this, _Swiper_source, '', "f");
|
|
152
173
|
if (this.circular) {
|
|
153
|
-
|
|
174
|
+
swiper.slideToLoop(itemIdIndex); // 更新下标
|
|
154
175
|
// @ts-ignore
|
|
155
|
-
|
|
156
|
-
this.autoplay &&
|
|
176
|
+
swiper.loopFix();
|
|
177
|
+
this.autoplay && swiper.autoplay.start();
|
|
157
178
|
}
|
|
158
179
|
else {
|
|
159
|
-
|
|
180
|
+
swiper.slideTo(itemIdIndex); // 更新下标
|
|
160
181
|
}
|
|
161
182
|
}
|
|
162
183
|
watchAutoplay(newVal) {
|
|
163
|
-
|
|
184
|
+
const swiper = this.getSwiper();
|
|
185
|
+
if (!swiper)
|
|
164
186
|
return;
|
|
165
|
-
const swiperAutoplay =
|
|
187
|
+
const swiperAutoplay = swiper.autoplay;
|
|
166
188
|
if (swiperAutoplay) {
|
|
167
189
|
if (swiperAutoplay.running === newVal)
|
|
168
190
|
return;
|
|
169
191
|
if (newVal) {
|
|
170
|
-
if (
|
|
171
|
-
if (
|
|
172
|
-
|
|
192
|
+
if (swiper.params && typeof swiper.params.autoplay === 'object') {
|
|
193
|
+
if (swiper.params.autoplay.disableOnInteraction === true) {
|
|
194
|
+
swiper.params.autoplay.disableOnInteraction = false;
|
|
173
195
|
}
|
|
174
|
-
|
|
196
|
+
swiper.params.autoplay.delay = this.interval;
|
|
175
197
|
}
|
|
176
198
|
swiperAutoplay.start();
|
|
177
199
|
}
|
|
@@ -181,110 +203,114 @@ const Swiper = class {
|
|
|
181
203
|
}
|
|
182
204
|
}
|
|
183
205
|
watchDuration(newVal) {
|
|
184
|
-
|
|
206
|
+
const swiper = this.getSwiper();
|
|
207
|
+
if (!swiper)
|
|
185
208
|
return;
|
|
186
|
-
|
|
209
|
+
swiper.params.speed = newVal;
|
|
187
210
|
}
|
|
188
211
|
watchInterval(newVal) {
|
|
189
|
-
|
|
212
|
+
const swiper = this.getSwiper();
|
|
213
|
+
if (!swiper)
|
|
190
214
|
return;
|
|
191
|
-
if (typeof
|
|
192
|
-
|
|
215
|
+
if (typeof swiper.params.autoplay === 'object') {
|
|
216
|
+
swiper.params.autoplay.delay = newVal;
|
|
193
217
|
}
|
|
194
218
|
}
|
|
195
|
-
|
|
196
|
-
if (!this.isWillLoadCalled || !this.swiper)
|
|
197
|
-
return;
|
|
198
|
-
if (!newVal)
|
|
199
|
-
return;
|
|
219
|
+
bindWrapper(wrapper) {
|
|
200
220
|
const beforeDomOperation = () => {
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
this
|
|
205
|
-
this.swiper.params.loop = false;
|
|
206
|
-
};
|
|
207
|
-
this.el.appendChild = (newChild) => {
|
|
221
|
+
const swiper = this.swiper;
|
|
222
|
+
if (!swiper)
|
|
223
|
+
return;
|
|
224
|
+
const firstChange = !__classPrivateFieldGet(this, _Swiper_swiperResetting, "f");
|
|
208
225
|
__classPrivateFieldSet(this, _Swiper_swiperResetting, true, "f");
|
|
209
|
-
if (
|
|
210
|
-
|
|
226
|
+
if (firstChange && this.circular) {
|
|
227
|
+
swiper.autoplay.stop();
|
|
228
|
+
if (swiper.wrapperEl && swiper.slidesEl)
|
|
229
|
+
swiper.loopDestroy();
|
|
230
|
+
swiper.params.loop = false;
|
|
211
231
|
}
|
|
212
|
-
|
|
232
|
+
this.handleSwiperSizeDebounce();
|
|
233
|
+
};
|
|
234
|
+
this.el.appendChild = (newChild) => {
|
|
235
|
+
beforeDomOperation();
|
|
236
|
+
return wrapper.appendChild(newChild);
|
|
213
237
|
};
|
|
214
238
|
this.el.insertBefore = (newChild, refChild) => {
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
beforeDomOperation();
|
|
218
|
-
}
|
|
219
|
-
return newVal.insertBefore(newChild, refChild);
|
|
239
|
+
beforeDomOperation();
|
|
240
|
+
return wrapper.insertBefore(newChild, refChild);
|
|
220
241
|
};
|
|
221
242
|
this.el.replaceChild = (newChild, oldChild) => {
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
beforeDomOperation();
|
|
225
|
-
}
|
|
226
|
-
return newVal.replaceChild(newChild, oldChild);
|
|
243
|
+
beforeDomOperation();
|
|
244
|
+
return wrapper.replaceChild(newChild, oldChild);
|
|
227
245
|
};
|
|
228
246
|
this.el.removeChild = (oldChild) => {
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
beforeDomOperation();
|
|
232
|
-
}
|
|
233
|
-
return newVal.removeChild(oldChild);
|
|
247
|
+
beforeDomOperation();
|
|
248
|
+
return wrapper.removeChild(oldChild);
|
|
234
249
|
};
|
|
235
250
|
}
|
|
236
251
|
watchCircular() {
|
|
237
|
-
if (
|
|
238
|
-
|
|
239
|
-
this.reset();
|
|
252
|
+
if (__classPrivateFieldGet(this, _Swiper_didLoad, "f"))
|
|
253
|
+
this.reset();
|
|
240
254
|
}
|
|
241
255
|
watchDisplayMultipleItems() {
|
|
242
|
-
if (
|
|
243
|
-
|
|
244
|
-
this.reset();
|
|
256
|
+
if (__classPrivateFieldGet(this, _Swiper_didLoad, "f"))
|
|
257
|
+
this.reset();
|
|
245
258
|
}
|
|
246
|
-
|
|
247
|
-
this
|
|
259
|
+
connectedCallback() {
|
|
260
|
+
if (__classPrivateFieldGet(this, _Swiper_didLoad, "f"))
|
|
261
|
+
this.handleInit(true);
|
|
248
262
|
}
|
|
249
263
|
componentDidLoad() {
|
|
264
|
+
__classPrivateFieldSet(this, _Swiper_didLoad, true, "f");
|
|
250
265
|
this.handleInit();
|
|
251
|
-
if (!this.swiper || !this.swiperWrapper)
|
|
252
|
-
return;
|
|
253
|
-
this.observer = new MutationObserver(this.handleSwiperSizeDebounce);
|
|
254
|
-
this.observer.observe(this.swiperWrapper, {
|
|
255
|
-
childList: true
|
|
256
|
-
});
|
|
257
266
|
}
|
|
258
267
|
disconnectedCallback() {
|
|
268
|
+
this.destroySwiper();
|
|
269
|
+
}
|
|
270
|
+
destroySwiper() {
|
|
259
271
|
var _a;
|
|
272
|
+
clearTimeout(__classPrivateFieldGet(this, _Swiper_sizeTimer, "f"));
|
|
260
273
|
(_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
274
|
+
this.observer = null;
|
|
275
|
+
const swiper = this.swiper;
|
|
276
|
+
this.swiper = null;
|
|
277
|
+
if (swiper && !swiper.destroyed) {
|
|
278
|
+
__classPrivateFieldSet(this, _Swiper_lastSwiperActiveIndex, swiper.realIndex, "f");
|
|
279
|
+
swiper.autoplay.stop();
|
|
280
|
+
// 失效节点无法还原循环顺序,但实例的事件和观察器仍需释放
|
|
281
|
+
if (!swiper.wrapperEl || !swiper.slidesEl)
|
|
282
|
+
swiper.params.loop = false;
|
|
283
|
+
swiper.destroy();
|
|
284
|
+
}
|
|
285
|
+
__classPrivateFieldSet(this, _Swiper_swiperResetting, false, "f");
|
|
261
286
|
}
|
|
262
287
|
handleInit(reset = false) {
|
|
288
|
+
var _a;
|
|
289
|
+
if (!this.el.isConnected || !__classPrivateFieldGet(this, _Swiper_container, "f") || this.swiper)
|
|
290
|
+
return;
|
|
263
291
|
const { autoplay, circular, current, currentItemId, displayMultipleItems, duration, interval, effectsProps, vertical } = this;
|
|
264
292
|
let initialSlide = current;
|
|
265
293
|
if (reset) {
|
|
266
294
|
initialSlide = __classPrivateFieldGet(this, _Swiper_lastSwiperActiveIndex, "f");
|
|
267
295
|
}
|
|
268
|
-
else {
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
initialSlide = itemIdIndex;
|
|
278
|
-
}
|
|
296
|
+
else if (currentItemId) {
|
|
297
|
+
let itemIdIndex = 0;
|
|
298
|
+
this.getSlidersList().forEach((swiperItem, index) => {
|
|
299
|
+
// @ts-ignore
|
|
300
|
+
if (swiperItem.itemId && swiperItem.itemId === currentItemId) {
|
|
301
|
+
itemIdIndex = index;
|
|
302
|
+
}
|
|
303
|
+
});
|
|
304
|
+
initialSlide = itemIdIndex;
|
|
279
305
|
}
|
|
280
306
|
const loopAdditionalSlides = this.getLoopAdditionalSlides();
|
|
281
307
|
const centeredSlides = displayMultipleItems === 1 && this.getNeedFixLoop();
|
|
282
308
|
const slidesPerView = displayMultipleItems;
|
|
283
309
|
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
284
310
|
const that = this;
|
|
285
|
-
const options = Object.assign(Object.assign({ pagination: { el:
|
|
311
|
+
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: {
|
|
286
312
|
transitionEnd(e) {
|
|
287
|
-
if (__classPrivateFieldGet(that, _Swiper_swiperResetting, "f") || __classPrivateFieldGet(that, _Swiper_lastSwiperActiveIndex, "f") === this.realIndex)
|
|
313
|
+
if (e !== that.swiper || __classPrivateFieldGet(that, _Swiper_swiperResetting, "f") || __classPrivateFieldGet(that, _Swiper_lastSwiperActiveIndex, "f") === this.realIndex)
|
|
288
314
|
return;
|
|
289
315
|
__classPrivateFieldSet(that, _Swiper_lastSwiperActiveIndex, this.realIndex, "f");
|
|
290
316
|
that.getNeedFixLoop() && e.loopFix();
|
|
@@ -297,11 +323,13 @@ const Swiper = class {
|
|
|
297
323
|
});
|
|
298
324
|
__classPrivateFieldSet(that, _Swiper_source, 'autoplay', "f");
|
|
299
325
|
},
|
|
300
|
-
touchMove() {
|
|
326
|
+
touchMove(e) {
|
|
327
|
+
if (e !== that.swiper)
|
|
328
|
+
return;
|
|
301
329
|
__classPrivateFieldSet(that, _Swiper_source, 'touch', "f");
|
|
302
330
|
},
|
|
303
331
|
slideChange(e) {
|
|
304
|
-
if (__classPrivateFieldGet(that, _Swiper_swiperResetting, "f") || __classPrivateFieldGet(that, _Swiper_lastSwiperActiveIndex, "f") === this.realIndex)
|
|
332
|
+
if (e !== that.swiper || __classPrivateFieldGet(that, _Swiper_swiperResetting, "f") || __classPrivateFieldGet(that, _Swiper_lastSwiperActiveIndex, "f") === this.realIndex)
|
|
305
333
|
return;
|
|
306
334
|
const currentItemId = that.getCurrentItemId(e);
|
|
307
335
|
that.onChange.emit({
|
|
@@ -310,19 +338,21 @@ const Swiper = class {
|
|
|
310
338
|
currentItemId,
|
|
311
339
|
});
|
|
312
340
|
},
|
|
313
|
-
init: (e) => {
|
|
314
|
-
that.getNeedFixLoop() && e.loopFix();
|
|
315
|
-
that.autoplay && e.autoplay.start();
|
|
316
|
-
},
|
|
317
341
|
touchEnd: (e) => {
|
|
342
|
+
if (e !== that.swiper)
|
|
343
|
+
return;
|
|
318
344
|
__classPrivateFieldSet(that, _Swiper_source, 'touch', "f");
|
|
319
345
|
that.autoplay && e.autoplay.start();
|
|
320
346
|
},
|
|
321
347
|
touchStart: (e) => {
|
|
348
|
+
if (e !== that.swiper)
|
|
349
|
+
return;
|
|
322
350
|
__classPrivateFieldSet(that, _Swiper_source, 'touch', "f");
|
|
323
351
|
that.autoplay && e.autoplay.pause();
|
|
324
352
|
},
|
|
325
353
|
autoplay(e) {
|
|
354
|
+
if (e !== that.swiper)
|
|
355
|
+
return;
|
|
326
356
|
// Note: 修复 autoplay 时,切换到其他页面再切回来,autoplay 会停止的问题
|
|
327
357
|
// autoplay 会调用 slideTo 方法,里面会判断是否 animating,如果 animating 为 true,就会被 return
|
|
328
358
|
// 参考源码:https://github.com/nolimits4web/swiper/blob/v11.1.0/src/core/slide/slideTo.mjs#27 27行
|
|
@@ -338,30 +368,51 @@ const Swiper = class {
|
|
|
338
368
|
disableOnInteraction: false
|
|
339
369
|
};
|
|
340
370
|
}
|
|
341
|
-
|
|
371
|
+
// 使用组件内的真实节点,避免全局选择器在脱离文档或重建时匹配失败
|
|
372
|
+
const swiper = new SwiperJS(__classPrivateFieldGet(this, _Swiper_container, "f"), options);
|
|
373
|
+
try {
|
|
374
|
+
swiper.init();
|
|
375
|
+
}
|
|
376
|
+
finally {
|
|
377
|
+
if (!swiper.initialized) {
|
|
378
|
+
// 初始化失败时跳过循环节点还原,释放实例并保留原始初始化异常
|
|
379
|
+
swiper.params.loop = false;
|
|
380
|
+
swiper.destroy();
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
if (!swiper.initialized)
|
|
384
|
+
return;
|
|
385
|
+
this.swiper = swiper;
|
|
386
|
+
this.getNeedFixLoop() && swiper.loopFix();
|
|
342
387
|
// Note: 这里是拦截了 swiper 的 minTranslate 和 maxTranslate 方法,手动修复了 loop 模式下的 margin 问题
|
|
343
388
|
// 因为这两个属性会影响滑动到哪个位置进行 fixloop
|
|
344
389
|
// 可参考源码:https://github.com/nolimits4web/swiper/blob/v11.1.0/src/core/events/onTouchMove.mjs
|
|
345
390
|
// https://github.com/nolimits4web/swiper/blob/v11.1.0/src/core/loop/loopFix.mjs
|
|
346
391
|
if (this.getNeedFixLoop()) {
|
|
347
392
|
// @ts-ignore
|
|
348
|
-
const minTranslate =
|
|
393
|
+
const minTranslate = swiper.minTranslate.bind(this.swiper);
|
|
349
394
|
//@ts-ignore
|
|
350
|
-
const maxTranslate =
|
|
395
|
+
const maxTranslate = swiper.maxTranslate.bind(this.swiper);
|
|
351
396
|
if (centeredSlides && this.getSlidersList().length < 4) {
|
|
352
397
|
//@ts-ignore
|
|
353
|
-
|
|
398
|
+
swiper.minTranslate = () => minTranslate() + this.parseMargin()[1];
|
|
354
399
|
//@ts-ignore
|
|
355
|
-
|
|
400
|
+
swiper.maxTranslate = () => maxTranslate() - this.parseMargin()[0];
|
|
356
401
|
}
|
|
357
402
|
else {
|
|
358
403
|
//@ts-ignore
|
|
359
|
-
|
|
404
|
+
swiper.minTranslate = () => minTranslate() - this.parseMargin()[0];
|
|
360
405
|
//@ts-ignore
|
|
361
|
-
|
|
406
|
+
swiper.maxTranslate = () => maxTranslate() + this.parseMargin()[1];
|
|
362
407
|
}
|
|
363
408
|
}
|
|
364
|
-
this.
|
|
409
|
+
this.bindWrapper(swiper.wrapperEl);
|
|
410
|
+
(_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
411
|
+
this.observer = new MutationObserver(this.handleSwiperSizeDebounce);
|
|
412
|
+
this.observer.observe(swiper.wrapperEl, { childList: true });
|
|
413
|
+
// 脱离文档期间更新的目标项,在实例恢复后应用一次
|
|
414
|
+
if (__classPrivateFieldGet(this, _Swiper_pendingCurrentItemId, "f") !== null)
|
|
415
|
+
this.watchCurrentItemId(__classPrivateFieldGet(this, _Swiper_pendingCurrentItemId, "f"));
|
|
365
416
|
}
|
|
366
417
|
// Note: loop 的时候添加 additionalSlides 可以避免循环的时候由于 loopFix 不及时,出现空白的问题。但是并不是 additionalSlides 越多越好,因为 additionalSlides 越多,如果 swiper-item 的数量不够,会导致出现 bug。
|
|
367
418
|
// 目前的策略是 swiper-item 的数量小于等于 5 时,不添加 additionalSlides,大于 5 小于等于 7 时,添加 1 个 additionalSlides,大于 7 时,添加 2 个 additionalSlides。
|
|
@@ -377,7 +428,7 @@ const Swiper = class {
|
|
|
377
428
|
const slides = swiper.slides;
|
|
378
429
|
const activeIndex = swiper.activeIndex;
|
|
379
430
|
const currentSlide = slides[activeIndex];
|
|
380
|
-
return currentSlide.getAttribute('item-id');
|
|
431
|
+
return (currentSlide === null || currentSlide === void 0 ? void 0 : currentSlide.getAttribute('item-id')) || '';
|
|
381
432
|
}
|
|
382
433
|
render() {
|
|
383
434
|
const { vertical, indicatorDots, indicatorColor, indicatorActiveColor } = this;
|
|
@@ -395,7 +446,7 @@ const Swiper = class {
|
|
|
395
446
|
if (this.full) {
|
|
396
447
|
hostStyle.height = '100%';
|
|
397
448
|
}
|
|
398
|
-
return (h(Host, { class: `taro-swiper-${__classPrivateFieldGet(this, _Swiper_id, "f")}`, style: hostStyle }, h("div", { class: 'swiper-container' }, h("style", { type: 'text/css' }, `
|
|
449
|
+
return (h(Host, { class: `taro-swiper-${__classPrivateFieldGet(this, _Swiper_id, "f")}`, style: hostStyle }, h("div", { class: 'swiper-container', ref: el => { __classPrivateFieldSet(this, _Swiper_container, el || null, "f"); } }, h("style", { type: 'text/css' }, `
|
|
399
450
|
.taro-swiper-${__classPrivateFieldGet(this, _Swiper_id, "f")} > .swiper-container > .swiper-pagination > .swiper-pagination-bullet { background: ${indicatorColor} }
|
|
400
451
|
.taro-swiper-${__classPrivateFieldGet(this, _Swiper_id, "f")} > .swiper-container > .swiper-pagination > .swiper-pagination-bullet-active { background: ${indicatorActiveColor} }
|
|
401
452
|
.taro-swiper-${__classPrivateFieldGet(this, _Swiper_id, "f")} > .swiper-container { ${swiperContainerStyleList.join('')} }
|
|
@@ -409,12 +460,11 @@ const Swiper = class {
|
|
|
409
460
|
"autoplay": ["watchAutoplay"],
|
|
410
461
|
"duration": ["watchDuration"],
|
|
411
462
|
"interval": ["watchInterval"],
|
|
412
|
-
"swiperWrapper": ["watchSwiperWrapper"],
|
|
413
463
|
"circular": ["watchCircular"],
|
|
414
464
|
"displayMultipleItems": ["watchDisplayMultipleItems"]
|
|
415
465
|
}; }
|
|
416
466
|
};
|
|
417
|
-
_Swiper_id = new WeakMap(), _Swiper_source = new WeakMap(), _Swiper_swiperResetting = new WeakMap(),
|
|
467
|
+
_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();
|
|
418
468
|
Swiper.style = indexCss;
|
|
419
469
|
|
|
420
470
|
export { SwiperItem as S, Swiper as a };
|