@tarojs/components 4.3.1-alpha.4 → 4.3.1-alpha.5

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.
@@ -14,5 +14,5 @@ const patchBrowser = () => {
14
14
  };
15
15
 
16
16
  patchBrowser().then(options => {
17
- 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);
17
+ 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);
18
18
  });
@@ -1,7 +1,6 @@
1
- export { a as taro_swiper_core, S as taro_swiper_item_core } from './swiper-20b19ce0.js';
1
+ export { a as taro_swiper_core, S as taro_swiper_item_core } from './swiper-59728a6c.js';
2
2
  import './index-0004ce39.js';
3
3
  import './index-b9522531.js';
4
4
  import './helper-8a85bb65.js';
5
5
  import '@tarojs/taro';
6
6
  import 'swiper/bundle';
7
- import './index-a00a7418.js';
@@ -11680,7 +11680,7 @@ var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) ||
11680
11680
  throw new TypeError("Cannot write private member to an object whose class did not declare it");
11681
11681
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
11682
11682
  };
11683
- var _Swiper_id, _Swiper_source, _Swiper_swiperResetting, _Swiper_domChangeByOutSide, _Swiper_lastSwiperActiveIndex;
11683
+ var _Swiper_id, _Swiper_source, _Swiper_swiperResetting, _Swiper_lastSwiperActiveIndex, _Swiper_pendingCurrentItemId, _Swiper_didLoad, _Swiper_container, _Swiper_sizeTimer;
11684
11684
  let INSTANCE_ID = 0;
11685
11685
  const ONE_ADDITIONAL_SLIDES_THRESHOLD = 5;
11686
11686
  const TWO_ADDITIONAL_SLIDES_THRESHOLD = 7;
@@ -11691,33 +11691,41 @@ class Swiper {
11691
11691
  this.onAnimationFinish = createEvent(this, "animationfinish", 7);
11692
11692
  _Swiper_id.set(this, INSTANCE_ID++);
11693
11693
  _Swiper_source.set(this, 'autoplay');
11694
- _Swiper_swiperResetting.set(this, false
11695
- // dom 变化是否由外部引起,因为 swiper 的循环模式也会引起 dom 的变化。如果不是由外部引起的 dom 变化,就不需要重新初始化 swiper
11696
- );
11697
- // dom 变化是否由外部引起,因为 swiper 的循环模式也会引起 dom 的变化。如果不是由外部引起的 dom 变化,就不需要重新初始化 swiper
11698
- _Swiper_domChangeByOutSide.set(this, false);
11694
+ _Swiper_swiperResetting.set(this, false);
11699
11695
  _Swiper_lastSwiperActiveIndex.set(this, 0);
11700
- this.handleSwiperSizeDebounce = debounce(() => {
11701
- if (!this.swiper || !this.isWillLoadCalled)
11702
- return;
11703
- if (this.circular) {
11704
- if (__classPrivateFieldGet(this, _Swiper_domChangeByOutSide, "f")) {
11705
- this.reset();
11706
- __classPrivateFieldSet(this, _Swiper_domChangeByOutSide, false, "f");
11696
+ _Swiper_pendingCurrentItemId.set(this, null);
11697
+ _Swiper_didLoad.set(this, false);
11698
+ _Swiper_container.set(this, null);
11699
+ _Swiper_sizeTimer.set(this, void 0);
11700
+ this.swiper = null;
11701
+ this.observer = null;
11702
+ this.handleSwiperSizeDebounce = () => {
11703
+ clearTimeout(__classPrivateFieldGet(this, _Swiper_sizeTimer, "f"));
11704
+ const swiper = this.swiper;
11705
+ __classPrivateFieldSet(this, _Swiper_sizeTimer, setTimeout(() => {
11706
+ if (this.swiper !== swiper || !swiper)
11707
+ return;
11708
+ if (this.circular) {
11709
+ if (__classPrivateFieldGet(this, _Swiper_swiperResetting, "f"))
11710
+ this.reset();
11711
+ }
11712
+ else {
11713
+ swiper.update();
11707
11714
  __classPrivateFieldSet(this, _Swiper_swiperResetting, false, "f");
11708
11715
  }
11716
+ }, 50), "f");
11717
+ };
11718
+ this.reset = (current) => {
11719
+ this.destroySwiper();
11720
+ if (current !== undefined)
11721
+ __classPrivateFieldSet(this, _Swiper_lastSwiperActiveIndex, current, "f");
11722
+ __classPrivateFieldSet(this, _Swiper_swiperResetting, true, "f");
11723
+ try {
11724
+ this.handleInit(true);
11709
11725
  }
11710
- else {
11711
- this.swiper.update();
11726
+ finally {
11712
11727
  __classPrivateFieldSet(this, _Swiper_swiperResetting, false, "f");
11713
11728
  }
11714
- }, 50);
11715
- this.reset = () => {
11716
- __classPrivateFieldSet(this, _Swiper_swiperResetting, true, "f");
11717
- __classPrivateFieldSet(this, _Swiper_lastSwiperActiveIndex, this.swiper.realIndex, "f");
11718
- this.swiper.destroy();
11719
- this.handleInit(true);
11720
- __classPrivateFieldSet(this, _Swiper_swiperResetting, false, "f");
11721
11729
  };
11722
11730
  // 下面为方法函数
11723
11731
  this.getSlidersList = () => this.el.querySelectorAll('taro-swiper-item-core:not(.swiper-slide-duplicate)') || [];
@@ -11732,9 +11740,6 @@ class Swiper {
11732
11740
  const [, nextMargin] = /^(\d+)px/.exec(this.nextMargin) || [];
11733
11741
  return [parseInt(previousMargin) || 0, parseInt(nextMargin) || 0];
11734
11742
  };
11735
- this.swiperWrapper = undefined;
11736
- this.swiper = undefined;
11737
- this.isWillLoadCalled = false;
11738
11743
  this.indicatorDots = false;
11739
11744
  this.indicatorColor = 'rgba(0, 0, 0, .3)';
11740
11745
  this.indicatorActiveColor = '#000000';
@@ -11751,29 +11756,46 @@ class Swiper {
11751
11756
  this.full = false;
11752
11757
  this.zoom = false;
11753
11758
  this.effectsProps = {};
11754
- this.observer = undefined;
11759
+ }
11760
+ // 属性入口统一恢复失效实例,事件回调只需排除旧实例
11761
+ getSwiper(current) {
11762
+ const swiper = this.swiper;
11763
+ if (swiper && (swiper.destroyed || !swiper.wrapperEl || !swiper.slidesEl))
11764
+ this.reset(current);
11765
+ return this.swiper;
11755
11766
  }
11756
11767
  watchCurrent(newVal) {
11757
- if (this.currentItemId || !this.isWillLoadCalled || !this.swiper)
11768
+ if (this.currentItemId || !__classPrivateFieldGet(this, _Swiper_didLoad, "f"))
11758
11769
  return;
11759
11770
  const n = parseInt(newVal, 10);
11760
- if (isNaN(n) || n === this.swiper.realIndex)
11771
+ if (isNaN(n))
11772
+ return;
11773
+ const swiper = this.getSwiper(n);
11774
+ if (!swiper) {
11775
+ __classPrivateFieldSet(this, _Swiper_lastSwiperActiveIndex, n, "f");
11776
+ return;
11777
+ }
11778
+ if (n === swiper.realIndex)
11761
11779
  return;
11762
11780
  __classPrivateFieldSet(this, _Swiper_source, '', "f");
11763
11781
  if (this.circular) {
11764
- this.swiper.slideToLoop(n); // 更新下标
11765
- this.autoplay && this.swiper.autoplay.pause();
11782
+ swiper.slideToLoop(n); // 更新下标
11783
+ this.autoplay && swiper.autoplay.pause();
11766
11784
  // @ts-ignore
11767
- this.swiper.loopFix();
11768
- this.autoplay && this.swiper.autoplay.start();
11785
+ swiper.loopFix();
11786
+ this.autoplay && swiper.autoplay.start();
11769
11787
  }
11770
11788
  else {
11771
- this.swiper.slideTo(n); // 更新下标
11789
+ swiper.slideTo(n); // 更新下标
11772
11790
  }
11773
11791
  }
11774
11792
  watchCurrentItemId(newVal) {
11775
- if (!this.swiperWrapper || !this.isWillLoadCalled)
11793
+ const swiper = this.getSwiper();
11794
+ if (!swiper) {
11795
+ __classPrivateFieldSet(this, _Swiper_pendingCurrentItemId, newVal, "f");
11776
11796
  return;
11797
+ }
11798
+ __classPrivateFieldSet(this, _Swiper_pendingCurrentItemId, null, "f");
11777
11799
  let itemIdIndex = 0;
11778
11800
  this.getSlidersList().forEach((swiperItem, index) => {
11779
11801
  const itemId = swiperItem.getAttribute('item-id');
@@ -11786,32 +11808,33 @@ class Swiper {
11786
11808
  }
11787
11809
  }
11788
11810
  });
11789
- if (itemIdIndex === this.swiper.realIndex)
11811
+ if (itemIdIndex === swiper.realIndex)
11790
11812
  return; // 无需更新
11791
11813
  __classPrivateFieldSet(this, _Swiper_source, '', "f");
11792
11814
  if (this.circular) {
11793
- this.swiper.slideToLoop(itemIdIndex); // 更新下标
11815
+ swiper.slideToLoop(itemIdIndex); // 更新下标
11794
11816
  // @ts-ignore
11795
- this.swiper.loopFix();
11796
- this.autoplay && this.swiper.autoplay.start();
11817
+ swiper.loopFix();
11818
+ this.autoplay && swiper.autoplay.start();
11797
11819
  }
11798
11820
  else {
11799
- this.swiper.slideTo(itemIdIndex); // 更新下标
11821
+ swiper.slideTo(itemIdIndex); // 更新下标
11800
11822
  }
11801
11823
  }
11802
11824
  watchAutoplay(newVal) {
11803
- if (!this.isWillLoadCalled || !this.swiper)
11825
+ const swiper = this.getSwiper();
11826
+ if (!swiper)
11804
11827
  return;
11805
- const swiperAutoplay = this.swiper.autoplay;
11828
+ const swiperAutoplay = swiper.autoplay;
11806
11829
  if (swiperAutoplay) {
11807
11830
  if (swiperAutoplay.running === newVal)
11808
11831
  return;
11809
11832
  if (newVal) {
11810
- if (this.swiper.params && typeof this.swiper.params.autoplay === 'object') {
11811
- if (this.swiper.params.autoplay.disableOnInteraction === true) {
11812
- this.swiper.params.autoplay.disableOnInteraction = false;
11833
+ if (swiper.params && typeof swiper.params.autoplay === 'object') {
11834
+ if (swiper.params.autoplay.disableOnInteraction === true) {
11835
+ swiper.params.autoplay.disableOnInteraction = false;
11813
11836
  }
11814
- this.swiper.params.autoplay.delay = this.interval;
11837
+ swiper.params.autoplay.delay = this.interval;
11815
11838
  }
11816
11839
  swiperAutoplay.start();
11817
11840
  }
@@ -11821,110 +11844,114 @@ class Swiper {
11821
11844
  }
11822
11845
  }
11823
11846
  watchDuration(newVal) {
11824
- if (!this.swiper || !this.isWillLoadCalled)
11847
+ const swiper = this.getSwiper();
11848
+ if (!swiper)
11825
11849
  return;
11826
- this.swiper.params.speed = newVal;
11850
+ swiper.params.speed = newVal;
11827
11851
  }
11828
11852
  watchInterval(newVal) {
11829
- if (!this.swiper || !this.isWillLoadCalled)
11853
+ const swiper = this.getSwiper();
11854
+ if (!swiper)
11830
11855
  return;
11831
- if (typeof this.swiper.params.autoplay === 'object') {
11832
- this.swiper.params.autoplay.delay = newVal;
11856
+ if (typeof swiper.params.autoplay === 'object') {
11857
+ swiper.params.autoplay.delay = newVal;
11833
11858
  }
11834
11859
  }
11835
- watchSwiperWrapper(newVal) {
11836
- if (!this.isWillLoadCalled || !this.swiper)
11837
- return;
11838
- if (!newVal)
11839
- return;
11860
+ bindWrapper(wrapper) {
11840
11861
  const beforeDomOperation = () => {
11841
- __classPrivateFieldSet(this, _Swiper_domChangeByOutSide, true, "f");
11842
- // 如果是由于外部子节点的变化引起的 dom 变化,需要重新初始化 swiper。
11843
- // 在初dom操作之前,需要调用 loopDestroy,把子节点的顺序恢复
11844
- this.swiper.loopDestroy();
11845
- this.swiper.params.loop = false;
11846
- };
11847
- this.el.appendChild = (newChild) => {
11862
+ const swiper = this.swiper;
11863
+ if (!swiper)
11864
+ return;
11865
+ const firstChange = !__classPrivateFieldGet(this, _Swiper_swiperResetting, "f");
11848
11866
  __classPrivateFieldSet(this, _Swiper_swiperResetting, true, "f");
11849
- if (!__classPrivateFieldGet(this, _Swiper_domChangeByOutSide, "f") && this.circular) {
11850
- beforeDomOperation();
11867
+ if (firstChange && this.circular) {
11868
+ swiper.autoplay.stop();
11869
+ if (swiper.wrapperEl && swiper.slidesEl)
11870
+ swiper.loopDestroy();
11871
+ swiper.params.loop = false;
11851
11872
  }
11852
- return newVal.appendChild(newChild);
11873
+ this.handleSwiperSizeDebounce();
11874
+ };
11875
+ this.el.appendChild = (newChild) => {
11876
+ beforeDomOperation();
11877
+ return wrapper.appendChild(newChild);
11853
11878
  };
11854
11879
  this.el.insertBefore = (newChild, refChild) => {
11855
- __classPrivateFieldSet(this, _Swiper_swiperResetting, true, "f");
11856
- if (!__classPrivateFieldGet(this, _Swiper_domChangeByOutSide, "f") && this.circular) {
11857
- beforeDomOperation();
11858
- }
11859
- return newVal.insertBefore(newChild, refChild);
11880
+ beforeDomOperation();
11881
+ return wrapper.insertBefore(newChild, refChild);
11860
11882
  };
11861
11883
  this.el.replaceChild = (newChild, oldChild) => {
11862
- __classPrivateFieldSet(this, _Swiper_swiperResetting, true, "f");
11863
- if (!__classPrivateFieldGet(this, _Swiper_domChangeByOutSide, "f") && this.circular) {
11864
- beforeDomOperation();
11865
- }
11866
- return newVal.replaceChild(newChild, oldChild);
11884
+ beforeDomOperation();
11885
+ return wrapper.replaceChild(newChild, oldChild);
11867
11886
  };
11868
11887
  this.el.removeChild = (oldChild) => {
11869
- __classPrivateFieldSet(this, _Swiper_swiperResetting, true, "f");
11870
- if (!__classPrivateFieldGet(this, _Swiper_domChangeByOutSide, "f") && this.circular) {
11871
- beforeDomOperation();
11872
- }
11873
- return newVal.removeChild(oldChild);
11888
+ beforeDomOperation();
11889
+ return wrapper.removeChild(oldChild);
11874
11890
  };
11875
11891
  }
11876
11892
  watchCircular() {
11877
- if (!this.swiper || !this.isWillLoadCalled)
11878
- return;
11879
- this.reset();
11893
+ if (__classPrivateFieldGet(this, _Swiper_didLoad, "f"))
11894
+ this.reset();
11880
11895
  }
11881
11896
  watchDisplayMultipleItems() {
11882
- if (!this.swiper || !this.isWillLoadCalled)
11883
- return;
11884
- this.reset();
11897
+ if (__classPrivateFieldGet(this, _Swiper_didLoad, "f"))
11898
+ this.reset();
11885
11899
  }
11886
- componentWillLoad() {
11887
- this.isWillLoadCalled = true;
11900
+ connectedCallback() {
11901
+ if (__classPrivateFieldGet(this, _Swiper_didLoad, "f"))
11902
+ this.handleInit(true);
11888
11903
  }
11889
11904
  componentDidLoad() {
11905
+ __classPrivateFieldSet(this, _Swiper_didLoad, true, "f");
11890
11906
  this.handleInit();
11891
- if (!this.swiper || !this.swiperWrapper)
11892
- return;
11893
- this.observer = new MutationObserver(this.handleSwiperSizeDebounce);
11894
- this.observer.observe(this.swiperWrapper, {
11895
- childList: true
11896
- });
11897
11907
  }
11898
11908
  disconnectedCallback() {
11909
+ this.destroySwiper();
11910
+ }
11911
+ destroySwiper() {
11899
11912
  var _a;
11913
+ clearTimeout(__classPrivateFieldGet(this, _Swiper_sizeTimer, "f"));
11900
11914
  (_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();
11915
+ this.observer = null;
11916
+ const swiper = this.swiper;
11917
+ this.swiper = null;
11918
+ if (swiper && !swiper.destroyed) {
11919
+ __classPrivateFieldSet(this, _Swiper_lastSwiperActiveIndex, swiper.realIndex, "f");
11920
+ swiper.autoplay.stop();
11921
+ // 失效节点无法还原循环顺序,但实例的事件和观察器仍需释放
11922
+ if (!swiper.wrapperEl || !swiper.slidesEl)
11923
+ swiper.params.loop = false;
11924
+ swiper.destroy();
11925
+ }
11926
+ __classPrivateFieldSet(this, _Swiper_swiperResetting, false, "f");
11901
11927
  }
11902
11928
  handleInit(reset = false) {
11929
+ var _a;
11930
+ if (!this.el.isConnected || !__classPrivateFieldGet(this, _Swiper_container, "f") || this.swiper)
11931
+ return;
11903
11932
  const { autoplay, circular, current, currentItemId, displayMultipleItems, duration, interval, effectsProps, vertical } = this;
11904
11933
  let initialSlide = current;
11905
11934
  if (reset) {
11906
11935
  initialSlide = __classPrivateFieldGet(this, _Swiper_lastSwiperActiveIndex, "f");
11907
11936
  }
11908
- else {
11909
- if (currentItemId) {
11910
- let itemIdIndex = 0;
11911
- this.getSlidersList().forEach((swiperItem, index) => {
11912
- // @ts-ignore
11913
- if (swiperItem.itemId && swiperItem.itemId === currentItemId) {
11914
- itemIdIndex = index;
11915
- }
11916
- });
11917
- initialSlide = itemIdIndex;
11918
- }
11937
+ else if (currentItemId) {
11938
+ let itemIdIndex = 0;
11939
+ this.getSlidersList().forEach((swiperItem, index) => {
11940
+ // @ts-ignore
11941
+ if (swiperItem.itemId && swiperItem.itemId === currentItemId) {
11942
+ itemIdIndex = index;
11943
+ }
11944
+ });
11945
+ initialSlide = itemIdIndex;
11919
11946
  }
11920
11947
  const loopAdditionalSlides = this.getLoopAdditionalSlides();
11921
11948
  const centeredSlides = displayMultipleItems === 1 && this.getNeedFixLoop();
11922
11949
  const slidesPerView = displayMultipleItems;
11923
11950
  // eslint-disable-next-line @typescript-eslint/no-this-alias
11924
11951
  const that = this;
11925
- const options = Object.assign(Object.assign({ pagination: { el: `.taro-swiper-${__classPrivateFieldGet(this, _Swiper_id, "f")} > .swiper-container > .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), { on: {
11952
+ 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: {
11926
11953
  transitionEnd(e) {
11927
- if (__classPrivateFieldGet(that, _Swiper_swiperResetting, "f") || __classPrivateFieldGet(that, _Swiper_lastSwiperActiveIndex, "f") === this.realIndex)
11954
+ if (e !== that.swiper || __classPrivateFieldGet(that, _Swiper_swiperResetting, "f") || __classPrivateFieldGet(that, _Swiper_lastSwiperActiveIndex, "f") === this.realIndex)
11928
11955
  return;
11929
11956
  __classPrivateFieldSet(that, _Swiper_lastSwiperActiveIndex, this.realIndex, "f");
11930
11957
  that.getNeedFixLoop() && e.loopFix();
@@ -11937,11 +11964,13 @@ class Swiper {
11937
11964
  });
11938
11965
  __classPrivateFieldSet(that, _Swiper_source, 'autoplay', "f");
11939
11966
  },
11940
- touchMove() {
11967
+ touchMove(e) {
11968
+ if (e !== that.swiper)
11969
+ return;
11941
11970
  __classPrivateFieldSet(that, _Swiper_source, 'touch', "f");
11942
11971
  },
11943
11972
  slideChange(e) {
11944
- if (__classPrivateFieldGet(that, _Swiper_swiperResetting, "f") || __classPrivateFieldGet(that, _Swiper_lastSwiperActiveIndex, "f") === this.realIndex)
11973
+ if (e !== that.swiper || __classPrivateFieldGet(that, _Swiper_swiperResetting, "f") || __classPrivateFieldGet(that, _Swiper_lastSwiperActiveIndex, "f") === this.realIndex)
11945
11974
  return;
11946
11975
  const currentItemId = that.getCurrentItemId(e);
11947
11976
  that.onChange.emit({
@@ -11950,19 +11979,21 @@ class Swiper {
11950
11979
  currentItemId,
11951
11980
  });
11952
11981
  },
11953
- init: (e) => {
11954
- that.getNeedFixLoop() && e.loopFix();
11955
- that.autoplay && e.autoplay.start();
11956
- },
11957
11982
  touchEnd: (e) => {
11983
+ if (e !== that.swiper)
11984
+ return;
11958
11985
  __classPrivateFieldSet(that, _Swiper_source, 'touch', "f");
11959
11986
  that.autoplay && e.autoplay.start();
11960
11987
  },
11961
11988
  touchStart: (e) => {
11989
+ if (e !== that.swiper)
11990
+ return;
11962
11991
  __classPrivateFieldSet(that, _Swiper_source, 'touch', "f");
11963
11992
  that.autoplay && e.autoplay.pause();
11964
11993
  },
11965
11994
  autoplay(e) {
11995
+ if (e !== that.swiper)
11996
+ return;
11966
11997
  // Note: 修复 autoplay 时,切换到其他页面再切回来,autoplay 会停止的问题
11967
11998
  // autoplay 会调用 slideTo 方法,里面会判断是否 animating,如果 animating 为 true,就会被 return
11968
11999
  // 参考源码:https://github.com/nolimits4web/swiper/blob/v11.1.0/src/core/slide/slideTo.mjs#27 27行
@@ -11978,30 +12009,51 @@ class Swiper {
11978
12009
  disableOnInteraction: false
11979
12010
  };
11980
12011
  }
11981
- this.swiper = new SwiperJS__default['default'](`.taro-swiper-${__classPrivateFieldGet(this, _Swiper_id, "f")} > .swiper-container`, options);
12012
+ // 使用组件内的真实节点,避免全局选择器在脱离文档或重建时匹配失败
12013
+ const swiper = new SwiperJS__default['default'](__classPrivateFieldGet(this, _Swiper_container, "f"), options);
12014
+ try {
12015
+ swiper.init();
12016
+ }
12017
+ finally {
12018
+ if (!swiper.initialized) {
12019
+ // 初始化失败时跳过循环节点还原,释放实例并保留原始初始化异常
12020
+ swiper.params.loop = false;
12021
+ swiper.destroy();
12022
+ }
12023
+ }
12024
+ if (!swiper.initialized)
12025
+ return;
12026
+ this.swiper = swiper;
12027
+ this.getNeedFixLoop() && swiper.loopFix();
11982
12028
  // Note: 这里是拦截了 swiper 的 minTranslate 和 maxTranslate 方法,手动修复了 loop 模式下的 margin 问题
11983
12029
  // 因为这两个属性会影响滑动到哪个位置进行 fixloop
11984
12030
  // 可参考源码:https://github.com/nolimits4web/swiper/blob/v11.1.0/src/core/events/onTouchMove.mjs
11985
12031
  // https://github.com/nolimits4web/swiper/blob/v11.1.0/src/core/loop/loopFix.mjs
11986
12032
  if (this.getNeedFixLoop()) {
11987
12033
  // @ts-ignore
11988
- const minTranslate = this.swiper.minTranslate.bind(this.swiper);
12034
+ const minTranslate = swiper.minTranslate.bind(this.swiper);
11989
12035
  //@ts-ignore
11990
- const maxTranslate = this.swiper.maxTranslate.bind(this.swiper);
12036
+ const maxTranslate = swiper.maxTranslate.bind(this.swiper);
11991
12037
  if (centeredSlides && this.getSlidersList().length < 4) {
11992
12038
  //@ts-ignore
11993
- this.swiper.minTranslate = () => minTranslate() + this.parseMargin()[1];
12039
+ swiper.minTranslate = () => minTranslate() + this.parseMargin()[1];
11994
12040
  //@ts-ignore
11995
- this.swiper.maxTranslate = () => maxTranslate() - this.parseMargin()[0];
12041
+ swiper.maxTranslate = () => maxTranslate() - this.parseMargin()[0];
11996
12042
  }
11997
12043
  else {
11998
12044
  //@ts-ignore
11999
- this.swiper.minTranslate = () => minTranslate() - this.parseMargin()[0];
12045
+ swiper.minTranslate = () => minTranslate() - this.parseMargin()[0];
12000
12046
  //@ts-ignore
12001
- this.swiper.maxTranslate = () => maxTranslate() + this.parseMargin()[1];
12047
+ swiper.maxTranslate = () => maxTranslate() + this.parseMargin()[1];
12002
12048
  }
12003
12049
  }
12004
- this.swiperWrapper = this.swiper.wrapperEl;
12050
+ this.bindWrapper(swiper.wrapperEl);
12051
+ (_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();
12052
+ this.observer = new MutationObserver(this.handleSwiperSizeDebounce);
12053
+ this.observer.observe(swiper.wrapperEl, { childList: true });
12054
+ // 脱离文档期间更新的目标项,在实例恢复后应用一次
12055
+ if (__classPrivateFieldGet(this, _Swiper_pendingCurrentItemId, "f") !== null)
12056
+ this.watchCurrentItemId(__classPrivateFieldGet(this, _Swiper_pendingCurrentItemId, "f"));
12005
12057
  }
12006
12058
  // Note: loop 的时候添加 additionalSlides 可以避免循环的时候由于 loopFix 不及时,出现空白的问题。但是并不是 additionalSlides 越多越好,因为 additionalSlides 越多,如果 swiper-item 的数量不够,会导致出现 bug。
12007
12059
  // 目前的策略是 swiper-item 的数量小于等于 5 时,不添加 additionalSlides,大于 5 小于等于 7 时,添加 1 个 additionalSlides,大于 7 时,添加 2 个 additionalSlides。
@@ -12017,7 +12069,7 @@ class Swiper {
12017
12069
  const slides = swiper.slides;
12018
12070
  const activeIndex = swiper.activeIndex;
12019
12071
  const currentSlide = slides[activeIndex];
12020
- return currentSlide.getAttribute('item-id');
12072
+ return (currentSlide === null || currentSlide === void 0 ? void 0 : currentSlide.getAttribute('item-id')) || '';
12021
12073
  }
12022
12074
  render() {
12023
12075
  const { vertical, indicatorDots, indicatorColor, indicatorActiveColor } = this;
@@ -12035,7 +12087,7 @@ class Swiper {
12035
12087
  if (this.full) {
12036
12088
  hostStyle.height = '100%';
12037
12089
  }
12038
- return (hAsync(Host, { class: `taro-swiper-${__classPrivateFieldGet(this, _Swiper_id, "f")}`, style: hostStyle }, hAsync("div", { class: 'swiper-container' }, hAsync("style", { type: 'text/css' }, `
12090
+ return (hAsync(Host, { class: `taro-swiper-${__classPrivateFieldGet(this, _Swiper_id, "f")}`, style: hostStyle }, hAsync("div", { class: 'swiper-container', ref: el => { __classPrivateFieldSet(this, _Swiper_container, el || null, "f"); } }, hAsync("style", { type: 'text/css' }, `
12039
12091
  .taro-swiper-${__classPrivateFieldGet(this, _Swiper_id, "f")} > .swiper-container > .swiper-pagination > .swiper-pagination-bullet { background: ${indicatorColor} }
12040
12092
  .taro-swiper-${__classPrivateFieldGet(this, _Swiper_id, "f")} > .swiper-container > .swiper-pagination > .swiper-pagination-bullet-active { background: ${indicatorActiveColor} }
12041
12093
  .taro-swiper-${__classPrivateFieldGet(this, _Swiper_id, "f")} > .swiper-container { ${swiperContainerStyleList.join('')} }
@@ -12049,7 +12101,6 @@ class Swiper {
12049
12101
  "autoplay": ["watchAutoplay"],
12050
12102
  "duration": ["watchDuration"],
12051
12103
  "interval": ["watchInterval"],
12052
- "swiperWrapper": ["watchSwiperWrapper"],
12053
12104
  "circular": ["watchCircular"],
12054
12105
  "displayMultipleItems": ["watchDisplayMultipleItems"]
12055
12106
  }; }
@@ -12073,18 +12124,14 @@ class Swiper {
12073
12124
  "displayMultipleItems": [2, "display-multiple-items"],
12074
12125
  "full": [4],
12075
12126
  "zoom": [4],
12076
- "effectsProps": [16],
12077
- "swiperWrapper": [32],
12078
- "swiper": [32],
12079
- "isWillLoadCalled": [32],
12080
- "observer": [32]
12127
+ "effectsProps": [16]
12081
12128
  },
12082
12129
  "$listeners$": undefined,
12083
12130
  "$lazyBundleId$": "-",
12084
12131
  "$attrsToReflect$": []
12085
12132
  }; }
12086
12133
  }
12087
- _Swiper_id = new WeakMap(), _Swiper_source = new WeakMap(), _Swiper_swiperResetting = new WeakMap(), _Swiper_domChangeByOutSide = new WeakMap(), _Swiper_lastSwiperActiveIndex = new WeakMap();
12134
+ _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();
12088
12135
 
12089
12136
  class SwiperItem {
12090
12137
  constructor(hostRef) {