@tarojs/components 3.8.0-canary.0 → 4.0.0-beta.0
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/helper-ad6306f6.js +31 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/taro-ad-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-ad-custom-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-animation-video-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-animation-view-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-ar-camera-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-aweme-data-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-camera-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-canvas-core.cjs.entry.js +13 -1
- package/dist/cjs/taro-channel-live-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-channel-video-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-comment-detail-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-comment-list-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-components.cjs.js +1 -1
- package/dist/cjs/taro-contact-button-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-editor-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-follow-swan-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-functional-page-navigator-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-grid-view-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-image-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-inline-payment-panel-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-keyboard-accessory-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-lifestyle-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-like-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-list-view-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-live-player-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-live-pusher-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-login-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-lottie-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-map-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-match-media-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-native-slot-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-navigation-bar-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-official-account-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-open-data-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-page-container-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-page-meta-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-picker-core_2.cjs.entry.js +31 -30
- package/dist/cjs/taro-picker-view-column-core_2.cjs.entry.js +35 -35
- package/dist/cjs/{taro-pull-to-refresh.cjs.entry.js → taro-pull-to-refresh-core.cjs.entry.js} +15 -13
- package/dist/cjs/taro-root-portal-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-rtc-room-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-rtc-room-item-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-scroll-view-core.cjs.entry.js +12 -0
- package/dist/cjs/taro-share-element-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-slot-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-snapshot-core.cjs.entry.js +21 -0
- package/dist/cjs/taro-sticky-header-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-sticky-section-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-swiper-core_2.cjs.entry.js +90 -58
- package/dist/cjs/taro-tab-item-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-tabbar.cjs.entry.js +9 -21
- package/dist/cjs/taro-tabs-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-video-control_3.cjs.entry.js +7 -3
- package/dist/cjs/taro-view-core.cjs.entry.js +3 -9
- package/dist/cjs/taro-voip-room-core.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/canvas/canvas.js +48 -2
- package/dist/collection/components/image/style/index.css +2 -2
- package/dist/collection/components/picker/picker.js +31 -30
- package/dist/collection/components/picker-view/picker-view-column.js +27 -55
- package/dist/collection/components/picker-view/picker-view.js +14 -2
- package/dist/collection/components/pull-to-refresh/pull-to-refresh.js +14 -12
- package/dist/collection/components/pull-to-refresh/style/index.css +1 -1
- package/dist/collection/components/scroll-view/scroll-view.js +18 -2
- package/dist/collection/components/snapshot/snapshot.js +11 -0
- package/dist/collection/components/swiper/swiper-item.js +54 -33
- package/dist/collection/components/swiper/swiper.js +53 -24
- package/dist/collection/components/tabbar/style/index.css +5 -1
- package/dist/collection/components/tabbar/tabbar-item.js +1 -1
- package/dist/collection/components/tabbar/tabbar.js +4 -4
- package/dist/collection/components/video/style/index.css +1 -0
- package/dist/collection/components/video/video.js +6 -2
- package/dist/collection/components/view/view.js +2 -9
- package/dist/collection/utils/helper.js +11 -0
- package/dist/components/helper.js +12 -1
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.js +2 -1
- package/dist/components/taro-canvas-core.js +16 -2
- package/dist/components/taro-image-core.js +1 -1
- package/dist/components/taro-picker-core.js +31 -30
- package/dist/components/taro-picker-view-column-core.js +26 -36
- package/dist/components/taro-picker-view-core.js +11 -2
- package/dist/components/taro-pull-to-refresh-core.d.ts +11 -0
- package/dist/components/{taro-pull-to-refresh.js → taro-pull-to-refresh-core.js} +19 -17
- package/dist/components/taro-scroll-view-core.js +12 -1
- package/dist/components/{taro-pull-to-refresh.d.ts → taro-snapshot-core.d.ts} +4 -4
- package/dist/components/taro-snapshot-core.js +33 -0
- package/dist/components/taro-swiper-core.js +53 -24
- package/dist/components/taro-swiper-item-core.js +40 -36
- package/dist/components/taro-tabbar.js +2 -14
- package/dist/components/taro-video-core.js +7 -3
- package/dist/components/taro-view-core.js +2 -9
- package/dist/esm/helper-8a85bb65.js +24 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/taro-ad-core.entry.js +1 -1
- package/dist/esm/taro-ad-custom-core.entry.js +1 -1
- package/dist/esm/taro-animation-video-core.entry.js +1 -1
- package/dist/esm/taro-animation-view-core.entry.js +1 -1
- package/dist/esm/taro-ar-camera-core.entry.js +1 -1
- package/dist/esm/taro-aweme-data-core.entry.js +1 -1
- package/dist/esm/taro-camera-core.entry.js +1 -1
- package/dist/esm/taro-canvas-core.entry.js +13 -1
- package/dist/esm/taro-channel-live-core.entry.js +1 -1
- package/dist/esm/taro-channel-video-core.entry.js +1 -1
- package/dist/esm/taro-comment-detail-core.entry.js +1 -1
- package/dist/esm/taro-comment-list-core.entry.js +1 -1
- package/dist/esm/taro-components.js +1 -1
- package/dist/esm/taro-contact-button-core.entry.js +1 -1
- package/dist/esm/taro-editor-core.entry.js +1 -1
- package/dist/esm/taro-follow-swan-core.entry.js +1 -1
- package/dist/esm/taro-functional-page-navigator-core.entry.js +1 -1
- package/dist/esm/taro-grid-view-core.entry.js +1 -1
- package/dist/esm/taro-image-core.entry.js +1 -1
- package/dist/esm/taro-inline-payment-panel-core.entry.js +1 -1
- package/dist/esm/taro-keyboard-accessory-core.entry.js +1 -1
- package/dist/esm/taro-lifestyle-core.entry.js +1 -1
- package/dist/esm/taro-like-core.entry.js +1 -1
- package/dist/esm/taro-list-view-core.entry.js +1 -1
- package/dist/esm/taro-live-player-core.entry.js +1 -1
- package/dist/esm/taro-live-pusher-core.entry.js +1 -1
- package/dist/esm/taro-login-core.entry.js +1 -1
- package/dist/esm/taro-lottie-core.entry.js +1 -1
- package/dist/esm/taro-map-core.entry.js +1 -1
- package/dist/esm/taro-match-media-core.entry.js +1 -1
- package/dist/esm/taro-native-slot-core.entry.js +1 -1
- package/dist/esm/taro-navigation-bar-core.entry.js +1 -1
- package/dist/esm/taro-official-account-core.entry.js +1 -1
- package/dist/esm/taro-open-data-core.entry.js +1 -1
- package/dist/esm/taro-page-container-core.entry.js +1 -1
- package/dist/esm/taro-page-meta-core.entry.js +1 -1
- package/dist/esm/taro-picker-core_2.entry.js +31 -30
- package/dist/esm/taro-picker-view-column-core_2.entry.js +35 -35
- package/dist/esm/{taro-pull-to-refresh.entry.js → taro-pull-to-refresh-core.entry.js} +15 -13
- package/dist/esm/taro-root-portal-core.entry.js +1 -1
- package/dist/esm/taro-rtc-room-core.entry.js +1 -1
- package/dist/esm/taro-rtc-room-item-core.entry.js +1 -1
- package/dist/esm/taro-scroll-view-core.entry.js +12 -0
- package/dist/esm/taro-share-element-core.entry.js +1 -1
- package/dist/esm/taro-slot-core.entry.js +1 -1
- package/dist/esm/taro-snapshot-core.entry.js +17 -0
- package/dist/esm/taro-sticky-header-core.entry.js +1 -1
- package/dist/esm/taro-sticky-section-core.entry.js +1 -1
- package/dist/esm/taro-swiper-core_2.entry.js +90 -58
- package/dist/esm/taro-tab-item-core.entry.js +1 -1
- package/dist/esm/taro-tabbar.entry.js +2 -14
- package/dist/esm/taro-tabs-core.entry.js +1 -1
- package/dist/esm/taro-video-control_3.entry.js +7 -3
- package/dist/esm/taro-view-core.entry.js +3 -9
- package/dist/esm/taro-voip-room-core.entry.js +1 -1
- package/dist/esm-es5/helper-8a85bb65.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/taro-ad-core.entry.js +1 -1
- package/dist/esm-es5/taro-ad-custom-core.entry.js +1 -1
- package/dist/esm-es5/taro-animation-video-core.entry.js +1 -1
- package/dist/esm-es5/taro-animation-view-core.entry.js +1 -1
- package/dist/esm-es5/taro-ar-camera-core.entry.js +1 -1
- package/dist/esm-es5/taro-aweme-data-core.entry.js +1 -1
- package/dist/esm-es5/taro-camera-core.entry.js +1 -1
- package/dist/esm-es5/taro-canvas-core.entry.js +1 -1
- package/dist/esm-es5/taro-channel-live-core.entry.js +1 -1
- package/dist/esm-es5/taro-channel-video-core.entry.js +1 -1
- package/dist/esm-es5/taro-comment-detail-core.entry.js +1 -1
- package/dist/esm-es5/taro-comment-list-core.entry.js +1 -1
- package/dist/esm-es5/taro-components.js +1 -1
- package/dist/esm-es5/taro-contact-button-core.entry.js +1 -1
- package/dist/esm-es5/taro-editor-core.entry.js +1 -1
- package/dist/esm-es5/taro-follow-swan-core.entry.js +1 -1
- package/dist/esm-es5/taro-functional-page-navigator-core.entry.js +1 -1
- package/dist/esm-es5/taro-grid-view-core.entry.js +1 -1
- package/dist/esm-es5/taro-image-core.entry.js +1 -1
- package/dist/esm-es5/taro-inline-payment-panel-core.entry.js +1 -1
- package/dist/esm-es5/taro-keyboard-accessory-core.entry.js +1 -1
- package/dist/esm-es5/taro-lifestyle-core.entry.js +1 -1
- package/dist/esm-es5/taro-like-core.entry.js +1 -1
- package/dist/esm-es5/taro-list-view-core.entry.js +1 -1
- package/dist/esm-es5/taro-live-player-core.entry.js +1 -1
- package/dist/esm-es5/taro-live-pusher-core.entry.js +1 -1
- package/dist/esm-es5/taro-login-core.entry.js +1 -1
- package/dist/esm-es5/taro-lottie-core.entry.js +1 -1
- package/dist/esm-es5/taro-map-core.entry.js +1 -1
- package/dist/esm-es5/taro-match-media-core.entry.js +1 -1
- package/dist/esm-es5/taro-native-slot-core.entry.js +1 -1
- package/dist/esm-es5/taro-navigation-bar-core.entry.js +1 -1
- package/dist/esm-es5/taro-official-account-core.entry.js +1 -1
- package/dist/esm-es5/taro-open-data-core.entry.js +1 -1
- package/dist/esm-es5/taro-page-container-core.entry.js +1 -1
- package/dist/esm-es5/taro-page-meta-core.entry.js +1 -1
- package/dist/esm-es5/taro-picker-core_2.entry.js +1 -1
- package/dist/esm-es5/taro-picker-view-column-core_2.entry.js +1 -1
- package/dist/esm-es5/taro-pull-to-refresh-core.entry.js +1 -0
- package/dist/esm-es5/taro-root-portal-core.entry.js +1 -1
- package/dist/esm-es5/taro-rtc-room-core.entry.js +1 -1
- package/dist/esm-es5/taro-rtc-room-item-core.entry.js +1 -1
- package/dist/esm-es5/taro-scroll-view-core.entry.js +1 -1
- package/dist/esm-es5/taro-share-element-core.entry.js +1 -1
- package/dist/esm-es5/taro-slot-core.entry.js +1 -1
- package/dist/esm-es5/taro-snapshot-core.entry.js +1 -0
- package/dist/esm-es5/taro-sticky-header-core.entry.js +1 -1
- package/dist/esm-es5/taro-sticky-section-core.entry.js +1 -1
- package/dist/esm-es5/taro-swiper-core_2.entry.js +1 -1
- package/dist/esm-es5/taro-tab-item-core.entry.js +1 -1
- package/dist/esm-es5/taro-tabbar.entry.js +1 -1
- package/dist/esm-es5/taro-tabs-core.entry.js +1 -1
- package/dist/esm-es5/taro-video-control_3.entry.js +1 -1
- package/dist/esm-es5/taro-view-core.entry.js +1 -1
- package/dist/esm-es5/taro-voip-room-core.entry.js +1 -1
- package/dist/taro-components/p-00ed4bbb.entry.js +1 -0
- package/dist/taro-components/{p-9b6550fc.entry.js → p-065a10d7.entry.js} +1 -1
- package/dist/taro-components/p-06671eee.entry.js +1 -0
- package/dist/taro-components/p-08b7ecd7.system.entry.js +1 -0
- package/dist/taro-components/p-0a250d71.system.entry.js +1 -0
- package/dist/taro-components/{p-c39a46ca.system.entry.js → p-0cedad18.system.entry.js} +1 -1
- package/dist/taro-components/{p-b235e43c.entry.js → p-0e3b37e9.entry.js} +1 -1
- package/dist/taro-components/p-0e8199b7.entry.js +1 -0
- package/dist/taro-components/{p-cc164fa3.entry.js → p-0ec2e88a.entry.js} +1 -1
- package/dist/taro-components/{p-968b7c1d.entry.js → p-124ac21f.entry.js} +1 -1
- package/dist/taro-components/p-15624788.system.entry.js +1 -0
- package/dist/taro-components/p-1b789738.system.entry.js +1 -0
- package/dist/taro-components/p-1cf16dfa.entry.js +1 -0
- package/dist/taro-components/p-1f118969.system.entry.js +1 -0
- package/dist/taro-components/{p-898db637.system.entry.js → p-21c07cb3.system.entry.js} +1 -1
- package/dist/taro-components/{p-af9ef8b4.entry.js → p-22bf7daf.entry.js} +1 -1
- package/dist/taro-components/p-24d9836e.entry.js +1 -0
- package/dist/taro-components/p-29638de3.entry.js +1 -0
- package/dist/taro-components/p-2da9c8fd.entry.js +1 -0
- package/dist/taro-components/{p-5640e9f4.system.entry.js → p-3004e71a.system.entry.js} +1 -1
- package/dist/taro-components/{p-1974e52e.system.entry.js → p-32e9981a.system.entry.js} +1 -1
- package/dist/taro-components/{p-f534057e.system.entry.js → p-36d4407e.system.entry.js} +1 -1
- package/dist/taro-components/p-3f3abe55.system.entry.js +1 -0
- package/dist/taro-components/p-4cedbe5e.system.entry.js +1 -0
- package/dist/taro-components/{p-355e4dbc.entry.js → p-4fc40739.entry.js} +1 -1
- package/dist/taro-components/{p-6d4b7e5c.system.entry.js → p-519fbe84.system.entry.js} +1 -1
- package/dist/taro-components/{p-90333d0a.system.entry.js → p-5756cf00.system.entry.js} +1 -1
- package/dist/taro-components/{p-88d2b41b.system.entry.js → p-5870248f.system.entry.js} +1 -1
- package/dist/taro-components/{p-81f2ad70.system.entry.js → p-58cc2e6d.system.entry.js} +1 -1
- package/dist/taro-components/{p-9ac947ac.system.entry.js → p-5994d9f2.system.entry.js} +1 -1
- package/dist/taro-components/p-5e91398a.system.entry.js +1 -0
- package/dist/taro-components/{p-2d1b4dcc.system.entry.js → p-5ebc7010.system.entry.js} +1 -1
- package/dist/taro-components/p-600e89cc.system.entry.js +1 -0
- package/dist/taro-components/p-64eb91f7.entry.js +1 -0
- package/dist/taro-components/{p-137531b6.entry.js → p-69c43a81.entry.js} +1 -1
- package/dist/taro-components/p-6aa2ac6a.system.entry.js +1 -0
- package/dist/taro-components/{p-982bb5bf.entry.js → p-6b454506.entry.js} +1 -1
- package/dist/taro-components/{p-ebdd350f.system.entry.js → p-6cde54e5.system.entry.js} +1 -1
- package/dist/taro-components/{p-407ca16e.entry.js → p-76996fcb.entry.js} +1 -1
- package/dist/taro-components/p-7726b789.system.entry.js +1 -0
- package/dist/taro-components/{p-bdc30301.entry.js → p-7bfc5f3d.entry.js} +1 -1
- package/dist/taro-components/p-84958ace.entry.js +1 -0
- package/dist/taro-components/p-862b38b9.entry.js +1 -0
- package/dist/taro-components/p-8c3b906c.system.js +1 -0
- package/dist/taro-components/p-8ca82a56.entry.js +1 -0
- package/dist/taro-components/p-8ccaf5e8.entry.js +1 -0
- package/dist/taro-components/{p-0517f107.system.entry.js → p-8d990f1c.system.entry.js} +1 -1
- package/dist/taro-components/{p-07302165.system.entry.js → p-92d04741.system.entry.js} +1 -1
- package/dist/taro-components/p-99e16df8.entry.js +1 -0
- package/dist/taro-components/p-9b0298bf.entry.js +1 -0
- package/dist/taro-components/{p-fa0f6dab.system.entry.js → p-9d76d7a9.system.entry.js} +1 -1
- package/dist/taro-components/p-9dcba4a7.system.entry.js +1 -0
- package/dist/taro-components/p-9e03bc7a.system.entry.js +1 -0
- package/dist/taro-components/p-9ea4f297.entry.js +1 -0
- package/dist/taro-components/p-9eeba192.entry.js +1 -0
- package/dist/taro-components/p-9feff958.system.entry.js +1 -0
- package/dist/taro-components/p-a2141e85.system.entry.js +1 -0
- package/dist/taro-components/p-a2d590ad.entry.js +1 -0
- package/dist/taro-components/{p-204bd245.entry.js → p-a4951dd6.entry.js} +1 -1
- package/dist/taro-components/{p-46b8f89b.entry.js → p-a5a51112.entry.js} +1 -1
- package/dist/taro-components/p-a6e2dd48.entry.js +1 -0
- package/dist/taro-components/{p-66b0b419.system.entry.js → p-a74c970c.system.entry.js} +1 -1
- package/dist/taro-components/{p-e53508c1.system.entry.js → p-a7d31b01.system.entry.js} +1 -1
- package/dist/taro-components/p-a90221ab.system.entry.js +1 -0
- package/dist/taro-components/p-a94e3347.system.entry.js +1 -0
- package/dist/taro-components/p-aa04f605.entry.js +1 -0
- package/dist/taro-components/p-ad9b04e0.entry.js +1 -0
- package/dist/taro-components/{p-f11c9c37.system.entry.js → p-b07cd197.system.entry.js} +1 -1
- package/dist/taro-components/p-b0fc8752.entry.js +1 -0
- package/dist/taro-components/{p-139e6251.entry.js → p-b201ff38.entry.js} +1 -1
- package/dist/taro-components/p-bc541cd8.entry.js +1 -0
- package/dist/taro-components/{p-af8e521a.entry.js → p-bd4ed8b1.entry.js} +1 -1
- package/dist/taro-components/p-be96eb59.system.entry.js +1 -0
- package/dist/taro-components/{p-da239b8b.system.entry.js → p-bf0c8449.system.entry.js} +1 -1
- package/dist/taro-components/p-c0080d83.entry.js +1 -0
- package/dist/taro-components/p-c1a3fecf.system.entry.js +1 -0
- package/dist/taro-components/{p-8201ee31.system.entry.js → p-c913b635.system.entry.js} +1 -1
- package/dist/taro-components/{p-ce33f1f3.entry.js → p-c99e14b5.entry.js} +1 -1
- package/dist/taro-components/p-cb406f85.system.entry.js +1 -0
- package/dist/taro-components/p-cbcaad0e.system.entry.js +1 -0
- package/dist/taro-components/p-ccc64042.system.entry.js +1 -0
- package/dist/taro-components/p-ce303d12.system.entry.js +1 -0
- package/dist/taro-components/{p-7e998213.system.entry.js → p-d025a415.system.entry.js} +1 -1
- package/dist/taro-components/{p-6db97374.entry.js → p-d1756770.entry.js} +1 -1
- package/dist/taro-components/p-d2e0b15c.entry.js +1 -0
- package/dist/taro-components/p-d550aea9.system.entry.js +1 -0
- package/dist/taro-components/p-d5c8380d.system.entry.js +1 -0
- package/dist/taro-components/{p-5dab46cd.system.entry.js → p-d867e333.system.entry.js} +1 -1
- package/dist/taro-components/{p-50902cd0.entry.js → p-d9dcc6c6.entry.js} +1 -1
- package/dist/taro-components/p-da3db323.entry.js +1 -0
- package/dist/taro-components/{p-0114a2e4.entry.js → p-dadd02ca.entry.js} +1 -1
- package/dist/taro-components/p-dbdb9de9.js +1 -0
- package/dist/taro-components/{p-cc70bb7a.system.entry.js → p-dc5d65a0.system.entry.js} +1 -1
- package/dist/taro-components/{p-ab726c20.system.entry.js → p-de96861c.system.entry.js} +1 -1
- package/dist/taro-components/{p-907d9d01.system.entry.js → p-e2cd5dd3.system.entry.js} +1 -1
- package/dist/taro-components/{p-1404c119.entry.js → p-e598f47b.entry.js} +1 -1
- package/dist/taro-components/p-e740320c.entry.js +1 -0
- package/dist/taro-components/p-e976c6c9.system.entry.js +1 -0
- package/dist/taro-components/p-ea0d5d4f.system.entry.js +1 -0
- package/dist/taro-components/p-ed331c06.system.js +1 -1
- package/dist/taro-components/p-eee6e075.system.entry.js +1 -0
- package/dist/taro-components/p-ef322936.entry.js +1 -0
- package/dist/taro-components/p-f1304456.entry.js +1 -0
- package/dist/taro-components/{p-3d8c9dfb.entry.js → p-f2235cbb.entry.js} +1 -1
- package/dist/taro-components/{p-2af69b72.entry.js → p-f23cfdc8.entry.js} +1 -1
- package/dist/taro-components/p-f2c86846.entry.js +1 -0
- package/dist/taro-components/p-f4d86882.entry.js +1 -0
- package/dist/taro-components/{p-8c0b740e.entry.js → p-f658de2e.entry.js} +1 -1
- package/dist/taro-components/p-f78823a1.entry.js +1 -0
- package/dist/taro-components/{p-227e33fc.system.entry.js → p-fac4ce6f.system.entry.js} +1 -1
- package/dist/taro-components/p-fbb2446e.entry.js +1 -0
- package/dist/taro-components/taro-components.css +1 -1
- package/dist/taro-components/taro-components.esm.js +1 -1
- package/dist/types/components/canvas/canvas.d.ts +5 -2
- package/dist/types/components/picker-view/picker-view-column.d.ts +3 -3
- package/dist/types/components/picker-view/picker-view.d.ts +2 -0
- package/dist/types/components/scroll-view/scroll-view.d.ts +2 -0
- package/dist/types/components/snapshot/snapshot.d.ts +5 -0
- package/dist/types/components/swiper/swiper-item.d.ts +3 -0
- package/dist/types/components/swiper/swiper.d.ts +4 -3
- package/dist/types/components/tabbar/tabbar-item.d.ts +4 -4
- package/dist/types/components/tabbar/tabbar.d.ts +17 -16
- package/dist/types/components.d.ts +33 -15
- package/dist/types/utils/helper.d.ts +1 -0
- package/lib/react/component-lib/reactify-wc.js +1 -1
- package/lib/react/component-lib/reactify-wc.js.map +1 -1
- package/lib/react/components.d.ts +3 -2
- package/lib/react/components.js +4 -3
- package/lib/react/components.js.map +1 -1
- package/lib/react/index.js +1 -1
- package/lib/react/react-component-lib/createOverlayComponent.js.map +1 -1
- package/lib/react/react-component-lib/utils/attachProps.js +20 -1
- package/lib/react/react-component-lib/utils/attachProps.js.map +1 -1
- package/lib/vue2/components.d.ts +6 -2
- package/lib/vue2/components.js +10 -4
- package/lib/vue2/components.js.map +1 -1
- package/lib/vue2/index.js +1 -1
- package/lib/vue2/vue-component-lib/utils.js.map +1 -1
- package/lib/vue3/components.d.ts +6 -3
- package/lib/vue3/components.js +8 -4
- package/lib/vue3/components.js.map +1 -1
- package/lib/vue3/index.js +1 -1
- package/lib/vue3/vue-component-lib/utils.js.map +1 -1
- package/package.json +7 -7
- package/types/Button.d.ts +39 -8
- package/types/Camera.d.ts +1 -1
- package/types/Canvas.d.ts +12 -12
- package/types/ChannelVideo.d.ts +2 -2
- package/types/Checkbox.d.ts +10 -5
- package/types/CoverImage.d.ts +1 -1
- package/types/Form.d.ts +2 -2
- package/types/GridView.d.ts +1 -1
- package/types/Icon.d.ts +3 -3
- package/types/Image.d.ts +3 -2
- package/types/Input.d.ts +15 -15
- package/types/Label.d.ts +1 -1
- package/types/ListView.d.ts +1 -1
- package/types/LivePlayer.d.ts +11 -4
- package/types/Map.d.ts +46 -3
- package/types/NativeSlot.d.ts +5 -3
- package/types/NavigationBar.d.ts +7 -1
- package/types/Navigator.d.ts +1 -1
- package/types/PageMeta.d.ts +40 -0
- package/types/Picker.d.ts +20 -20
- package/types/PickerView.d.ts +1 -1
- package/types/PickerViewColumn.d.ts +1 -1
- package/types/Progress.d.ts +1 -1
- package/types/Radio.d.ts +10 -5
- package/types/RadioGroup.d.ts +1 -1
- package/types/ScrollView.d.ts +83 -5
- package/types/ShareElement.d.ts +1 -1
- package/types/Slider.d.ts +14 -14
- package/types/Slot.d.ts +5 -3
- package/types/Snapshot.d.ts +16 -0
- package/types/StickyHeader.d.ts +1 -1
- package/types/StickySection.d.ts +1 -1
- package/types/Swiper.d.ts +13 -9
- package/types/SwiperItem.d.ts +6 -1
- package/types/Switch.d.ts +5 -5
- package/types/Text.d.ts +2 -2
- package/types/Textarea.d.ts +8 -8
- package/types/Video.d.ts +28 -19
- package/types/common.d.ts +2 -1
- package/types/index.d.ts +8 -5
- package/types/index.vue3.d.ts +21 -7
- package/dist/cjs/helper-db78e01a.js +0 -19
- package/dist/esm/helper-3d0ecf0f.js +0 -13
- package/dist/esm-es5/helper-3d0ecf0f.js +0 -1
- package/dist/esm-es5/taro-pull-to-refresh.entry.js +0 -1
- package/dist/taro-components/p-052da7f0.system.entry.js +0 -1
- package/dist/taro-components/p-15e45ed6.system.js +0 -1
- package/dist/taro-components/p-1991cc1a.system.entry.js +0 -1
- package/dist/taro-components/p-1b3d41d3.system.entry.js +0 -1
- package/dist/taro-components/p-1c4e3899.entry.js +0 -1
- package/dist/taro-components/p-1f39576a.system.entry.js +0 -1
- package/dist/taro-components/p-2de2a3fd.system.entry.js +0 -1
- package/dist/taro-components/p-3094bda6.system.entry.js +0 -1
- package/dist/taro-components/p-416cc4dd.system.entry.js +0 -1
- package/dist/taro-components/p-469ee343.entry.js +0 -1
- package/dist/taro-components/p-478deb81.entry.js +0 -1
- package/dist/taro-components/p-486d0ec7.entry.js +0 -1
- package/dist/taro-components/p-53ef8a6c.system.entry.js +0 -1
- package/dist/taro-components/p-5613907c.entry.js +0 -1
- package/dist/taro-components/p-57b9943c.system.entry.js +0 -1
- package/dist/taro-components/p-5c1e6b1c.system.entry.js +0 -1
- package/dist/taro-components/p-6127b1b6.system.entry.js +0 -1
- package/dist/taro-components/p-66f7eea6.entry.js +0 -1
- package/dist/taro-components/p-69cd1f2a.system.entry.js +0 -1
- package/dist/taro-components/p-6a96da58.js +0 -1
- package/dist/taro-components/p-6cde180b.entry.js +0 -1
- package/dist/taro-components/p-6e115968.entry.js +0 -1
- package/dist/taro-components/p-6f84e936.entry.js +0 -1
- package/dist/taro-components/p-71b54f06.entry.js +0 -1
- package/dist/taro-components/p-79c3fde3.system.entry.js +0 -1
- package/dist/taro-components/p-7b3b8057.entry.js +0 -1
- package/dist/taro-components/p-7d635413.entry.js +0 -1
- package/dist/taro-components/p-801f09b8.entry.js +0 -1
- package/dist/taro-components/p-85a7daeb.system.entry.js +0 -1
- package/dist/taro-components/p-86280254.entry.js +0 -1
- package/dist/taro-components/p-9046110a.entry.js +0 -1
- package/dist/taro-components/p-904df510.entry.js +0 -1
- package/dist/taro-components/p-98f9f50f.system.entry.js +0 -1
- package/dist/taro-components/p-9aeb7995.entry.js +0 -1
- package/dist/taro-components/p-9d9ede17.system.entry.js +0 -1
- package/dist/taro-components/p-a20ecd3b.entry.js +0 -1
- package/dist/taro-components/p-a3a1a779.entry.js +0 -1
- package/dist/taro-components/p-a4882902.system.entry.js +0 -1
- package/dist/taro-components/p-a8565231.entry.js +0 -1
- package/dist/taro-components/p-a8925584.system.entry.js +0 -1
- package/dist/taro-components/p-a8e7cf87.entry.js +0 -1
- package/dist/taro-components/p-af3fa859.system.entry.js +0 -1
- package/dist/taro-components/p-afb3895c.system.entry.js +0 -1
- package/dist/taro-components/p-b027181b.entry.js +0 -1
- package/dist/taro-components/p-b4ea72ea.entry.js +0 -1
- package/dist/taro-components/p-b4f3d0ab.entry.js +0 -1
- package/dist/taro-components/p-b6d4634f.system.entry.js +0 -1
- package/dist/taro-components/p-ba3b2aa5.system.entry.js +0 -1
- package/dist/taro-components/p-bcf80126.system.entry.js +0 -1
- package/dist/taro-components/p-c1073ed6.system.entry.js +0 -1
- package/dist/taro-components/p-c11a42e0.entry.js +0 -1
- package/dist/taro-components/p-c4b8851b.entry.js +0 -1
- package/dist/taro-components/p-d34a6c04.entry.js +0 -1
- package/dist/taro-components/p-e33f3592.entry.js +0 -1
- package/dist/taro-components/p-e3480c4c.entry.js +0 -1
- package/dist/taro-components/p-eaa370a9.system.entry.js +0 -1
- package/dist/taro-components/p-f7927285.system.entry.js +0 -1
- package/dist/taro-components/p-f7b32c6b.entry.js +0 -1
- package/dist/taro-components/p-fa6c022a.system.entry.js +0 -1
- package/dist/taro-components/p-fb983850.entry.js +0 -1
|
@@ -257,40 +257,41 @@ export class Picker {
|
|
|
257
257
|
}
|
|
258
258
|
else if (mode === 'date') {
|
|
259
259
|
const value = this.value;
|
|
260
|
-
|
|
260
|
+
let _value = verifyDate(value) || new Date(new Date().setHours(0, 0, 0, 0)); // 没传值或值的合法性错误默认今天时间
|
|
261
261
|
const _start = verifyDate(start) || new Date('1970/01/01');
|
|
262
262
|
const _end = verifyDate(end) || new Date('2999/01/01');
|
|
263
263
|
// 时间区间有效性
|
|
264
|
-
if (
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
const monthRange = getMonthRange(_start, _end, currentYear);
|
|
270
|
-
const dayRange = getDayRange(_start, _end, currentYear, currentMonth);
|
|
271
|
-
this.index = [
|
|
272
|
-
yearRange.indexOf(currentYear),
|
|
273
|
-
monthRange.indexOf(currentMonth),
|
|
274
|
-
dayRange.indexOf(currentDay)
|
|
275
|
-
];
|
|
276
|
-
if (!this.pickerDate ||
|
|
277
|
-
this.pickerDate._value.getTime() !== _value.getTime() ||
|
|
278
|
-
this.pickerDate._start.getTime() !== _start.getTime() ||
|
|
279
|
-
this.pickerDate._end.getTime() !== _end.getTime()) {
|
|
280
|
-
this.pickerDate = {
|
|
281
|
-
_value,
|
|
282
|
-
_start,
|
|
283
|
-
_end,
|
|
284
|
-
_updateValue: [
|
|
285
|
-
currentYear,
|
|
286
|
-
currentMonth,
|
|
287
|
-
currentDay
|
|
288
|
-
]
|
|
289
|
-
};
|
|
290
|
-
}
|
|
264
|
+
if (!(_start <= _end)) {
|
|
265
|
+
throw new Error(`Picker start time must be less than end time.`);
|
|
266
|
+
}
|
|
267
|
+
if (!(_value >= _start && _value <= _end)) {
|
|
268
|
+
_value = _start;
|
|
291
269
|
}
|
|
292
|
-
|
|
293
|
-
|
|
270
|
+
const currentYear = _value.getFullYear();
|
|
271
|
+
const currentMonth = _value.getMonth() + 1;
|
|
272
|
+
const currentDay = _value.getDate();
|
|
273
|
+
const yearRange = getYearRange(_start.getFullYear(), _end.getFullYear());
|
|
274
|
+
const monthRange = getMonthRange(_start, _end, currentYear);
|
|
275
|
+
const dayRange = getDayRange(_start, _end, currentYear, currentMonth);
|
|
276
|
+
this.index = [
|
|
277
|
+
yearRange.indexOf(currentYear),
|
|
278
|
+
monthRange.indexOf(currentMonth),
|
|
279
|
+
dayRange.indexOf(currentDay)
|
|
280
|
+
];
|
|
281
|
+
if (!this.pickerDate ||
|
|
282
|
+
this.pickerDate._value.getTime() !== _value.getTime() ||
|
|
283
|
+
this.pickerDate._start.getTime() !== _start.getTime() ||
|
|
284
|
+
this.pickerDate._end.getTime() !== _end.getTime()) {
|
|
285
|
+
this.pickerDate = {
|
|
286
|
+
_value,
|
|
287
|
+
_start,
|
|
288
|
+
_end,
|
|
289
|
+
_updateValue: [
|
|
290
|
+
currentYear,
|
|
291
|
+
currentMonth,
|
|
292
|
+
currentDay
|
|
293
|
+
]
|
|
294
|
+
};
|
|
294
295
|
}
|
|
295
296
|
}
|
|
296
297
|
else {
|
|
@@ -30,46 +30,37 @@ export class PickerViewColumn {
|
|
|
30
30
|
this.initialPosition = '0';
|
|
31
31
|
this.paddingVertical = 0;
|
|
32
32
|
this.isInit = false;
|
|
33
|
-
this.isMove = false;
|
|
34
33
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
this.isMove = true;
|
|
38
|
-
this.onSelectStart.emit();
|
|
39
|
-
}
|
|
40
|
-
this.handleSelected();
|
|
41
|
-
}
|
|
42
|
-
onMouseEnd() {
|
|
43
|
-
if (!this.isMove)
|
|
44
|
-
return;
|
|
45
|
-
this.isMove = false;
|
|
46
|
-
this.handleSelected();
|
|
34
|
+
onTouchStart() {
|
|
35
|
+
this.onSelectStart.emit();
|
|
47
36
|
}
|
|
48
37
|
onTouchEnd() {
|
|
49
|
-
this.isMove = false;
|
|
50
38
|
this.handleSelected();
|
|
51
39
|
}
|
|
40
|
+
componentDidLoad() {
|
|
41
|
+
this.handleChange();
|
|
42
|
+
}
|
|
52
43
|
componentDidUpdate() {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
sum += item.offsetHeight;
|
|
64
|
-
idx++;
|
|
65
|
-
}
|
|
66
|
-
this.el.scrollTo({ top: sum });
|
|
67
|
-
if (idx >= childList.length) {
|
|
68
|
-
this.onChange.emit({
|
|
69
|
-
curIndex: this.col,
|
|
70
|
-
selectedIndex: idx - 1
|
|
71
|
-
});
|
|
44
|
+
this.handleChange();
|
|
45
|
+
}
|
|
46
|
+
handleChange() {
|
|
47
|
+
const childList = this.el.childNodes;
|
|
48
|
+
let idx = 0;
|
|
49
|
+
let sum = 0;
|
|
50
|
+
for (const index in childList) {
|
|
51
|
+
const item = childList[index];
|
|
52
|
+
if (this.initialPosition === index || !item || typeof item.offsetHeight !== 'number') {
|
|
53
|
+
break;
|
|
72
54
|
}
|
|
55
|
+
sum += item.offsetHeight;
|
|
56
|
+
idx++;
|
|
57
|
+
}
|
|
58
|
+
this.el.scrollTo({ top: sum });
|
|
59
|
+
if (idx >= childList.length) {
|
|
60
|
+
this.onChange.emit({
|
|
61
|
+
curIndex: this.col,
|
|
62
|
+
selectedIndex: idx - 1
|
|
63
|
+
});
|
|
73
64
|
}
|
|
74
65
|
}
|
|
75
66
|
render() {
|
|
@@ -146,8 +137,7 @@ export class PickerViewColumn {
|
|
|
146
137
|
}
|
|
147
138
|
static get states() {
|
|
148
139
|
return {
|
|
149
|
-
"isInit": {}
|
|
150
|
-
"isMove": {}
|
|
140
|
+
"isInit": {}
|
|
151
141
|
};
|
|
152
142
|
}
|
|
153
143
|
static get events() {
|
|
@@ -201,26 +191,8 @@ export class PickerViewColumn {
|
|
|
201
191
|
static get elementRef() { return "el"; }
|
|
202
192
|
static get listeners() {
|
|
203
193
|
return [{
|
|
204
|
-
"name": "
|
|
205
|
-
"method": "
|
|
206
|
-
"target": undefined,
|
|
207
|
-
"capture": false,
|
|
208
|
-
"passive": true
|
|
209
|
-
}, {
|
|
210
|
-
"name": "mouseup",
|
|
211
|
-
"method": "onMouseEnd",
|
|
212
|
-
"target": undefined,
|
|
213
|
-
"capture": false,
|
|
214
|
-
"passive": true
|
|
215
|
-
}, {
|
|
216
|
-
"name": "mouseout",
|
|
217
|
-
"method": "onMouseEnd",
|
|
218
|
-
"target": undefined,
|
|
219
|
-
"capture": false,
|
|
220
|
-
"passive": true
|
|
221
|
-
}, {
|
|
222
|
-
"name": "mouseleave",
|
|
223
|
-
"method": "onMouseEnd",
|
|
194
|
+
"name": "touchstart",
|
|
195
|
+
"method": "onTouchStart",
|
|
224
196
|
"target": undefined,
|
|
225
197
|
"capture": false,
|
|
226
198
|
"passive": true
|
|
@@ -9,6 +9,9 @@ export class PickerView {
|
|
|
9
9
|
this.maskStyle = undefined;
|
|
10
10
|
this.maskClass = undefined;
|
|
11
11
|
}
|
|
12
|
+
onPropsChange() {
|
|
13
|
+
this.handleValueChange();
|
|
14
|
+
}
|
|
12
15
|
onSelect(e) {
|
|
13
16
|
e.stopPropagation();
|
|
14
17
|
if (e.target.tagName !== 'TARO-PICKER-VIEW-COLUMN-CORE')
|
|
@@ -31,13 +34,16 @@ export class PickerView {
|
|
|
31
34
|
this.onPickEnd.emit();
|
|
32
35
|
}
|
|
33
36
|
componentDidLoad() {
|
|
37
|
+
this.handleValueChange();
|
|
38
|
+
}
|
|
39
|
+
handleValueChange() {
|
|
34
40
|
const childList = this.el.querySelectorAll('taro-picker-view-column-core');
|
|
35
41
|
childList.forEach((element, index) => {
|
|
36
42
|
var _a;
|
|
37
43
|
element.setAttribute('col', `${index}`);
|
|
38
|
-
let selectIndex =
|
|
44
|
+
let selectIndex = 0;
|
|
39
45
|
if (!!this.value && this.value.length > index) {
|
|
40
|
-
selectIndex =
|
|
46
|
+
selectIndex = this.value[index];
|
|
41
47
|
}
|
|
42
48
|
const pickerHeight = this.el.getBoundingClientRect().height;
|
|
43
49
|
const indicatorHeight = ((_a = this.indicator) === null || _a === void 0 ? void 0 : _a.offsetHeight) || 0;
|
|
@@ -212,6 +218,12 @@ export class PickerView {
|
|
|
212
218
|
}];
|
|
213
219
|
}
|
|
214
220
|
static get elementRef() { return "el"; }
|
|
221
|
+
static get watchers() {
|
|
222
|
+
return [{
|
|
223
|
+
"propName": "value",
|
|
224
|
+
"methodName": "onPropsChange"
|
|
225
|
+
}];
|
|
226
|
+
}
|
|
215
227
|
static get listeners() {
|
|
216
228
|
return [{
|
|
217
229
|
"name": "onselect",
|
|
@@ -216,17 +216,19 @@ export class PullToRefresh {
|
|
|
216
216
|
}
|
|
217
217
|
});
|
|
218
218
|
Taro.eventCenter.on('__taroStopPullDownRefresh', ({ successHandler, errorHandler }) => {
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
219
|
+
setTimeout(() => {
|
|
220
|
+
try {
|
|
221
|
+
this.triggerPullDownRefresh(false);
|
|
222
|
+
successHandler({
|
|
223
|
+
errMsg: 'stopPullDownRefresh: ok'
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
catch (e) {
|
|
227
|
+
errorHandler({
|
|
228
|
+
errMsg: 'stopPullDownRefresh: fail'
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
}, 0);
|
|
230
232
|
});
|
|
231
233
|
}
|
|
232
234
|
render() {
|
|
@@ -243,7 +245,7 @@ export class PullToRefresh {
|
|
|
243
245
|
}
|
|
244
246
|
return (h(Host, { class: classNames(this.prefixCls, `${this.prefixCls}-down`) }, renderRefresh(`${this.prefixCls}-content`)));
|
|
245
247
|
}
|
|
246
|
-
static get is() { return "taro-pull-to-refresh"; }
|
|
248
|
+
static get is() { return "taro-pull-to-refresh-core"; }
|
|
247
249
|
static get originalStyleUrls() {
|
|
248
250
|
return {
|
|
249
251
|
"$": ["./style/index.scss"]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Host, h } from '@stencil/core';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
|
-
import { debounce } from '../../utils';
|
|
3
|
+
import { debounce, handleStencilNodes } from '../../utils';
|
|
4
4
|
function easeOutScroll(from, to, duration = 500, callback) {
|
|
5
5
|
if (from === to || typeof from !== 'number') {
|
|
6
6
|
return;
|
|
@@ -73,9 +73,11 @@ export class ScrollView {
|
|
|
73
73
|
this.mpScrollIntoViewMethod(newVal);
|
|
74
74
|
}
|
|
75
75
|
handleScroll(e) {
|
|
76
|
+
var _a;
|
|
76
77
|
if (e instanceof CustomEvent)
|
|
77
78
|
return;
|
|
78
79
|
e.stopPropagation();
|
|
80
|
+
(_a = e.stopImmediatePropagation) === null || _a === void 0 ? void 0 : _a.call(e);
|
|
79
81
|
const { scrollLeft, scrollTop, scrollHeight, scrollWidth } = this.el;
|
|
80
82
|
this._scrollLeft = scrollLeft;
|
|
81
83
|
this._scrollTop = scrollTop;
|
|
@@ -87,6 +89,11 @@ export class ScrollView {
|
|
|
87
89
|
scrollWidth
|
|
88
90
|
});
|
|
89
91
|
}
|
|
92
|
+
handleTouchMove(e) {
|
|
93
|
+
if (e instanceof CustomEvent)
|
|
94
|
+
return;
|
|
95
|
+
e.stopPropagation();
|
|
96
|
+
}
|
|
90
97
|
async mpScrollToMethod(object) {
|
|
91
98
|
let { top, left, duration, animated = false } = object;
|
|
92
99
|
if (this.scrollY && typeof top === 'number' && !isNaN(top) && top !== this._scrollTop) {
|
|
@@ -126,6 +133,9 @@ export class ScrollView {
|
|
|
126
133
|
top, left, animated
|
|
127
134
|
});
|
|
128
135
|
}
|
|
136
|
+
componentDidRender() {
|
|
137
|
+
handleStencilNodes(this.el);
|
|
138
|
+
}
|
|
129
139
|
render() {
|
|
130
140
|
const { scrollX, scrollY } = this;
|
|
131
141
|
const cls = classNames({
|
|
@@ -419,7 +429,13 @@ export class ScrollView {
|
|
|
419
429
|
"name": "scroll",
|
|
420
430
|
"method": "handleScroll",
|
|
421
431
|
"target": undefined,
|
|
422
|
-
"capture":
|
|
432
|
+
"capture": false,
|
|
433
|
+
"passive": true
|
|
434
|
+
}, {
|
|
435
|
+
"name": "touchmove",
|
|
436
|
+
"method": "handleTouchMove",
|
|
437
|
+
"target": undefined,
|
|
438
|
+
"capture": false,
|
|
423
439
|
"passive": true
|
|
424
440
|
}];
|
|
425
441
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { h, Host } from '@stencil/core';
|
|
2
|
+
import { notSupport } from '../../utils';
|
|
3
|
+
export class Snapshot {
|
|
4
|
+
componentDidLoad() {
|
|
5
|
+
notSupport('Snapshot', this);
|
|
6
|
+
}
|
|
7
|
+
render() {
|
|
8
|
+
return h(Host, null);
|
|
9
|
+
}
|
|
10
|
+
static get is() { return "taro-snapshot-core"; }
|
|
11
|
+
}
|
|
@@ -1,47 +1,50 @@
|
|
|
1
1
|
import { Host, h } from '@stencil/core';
|
|
2
2
|
const nativeCloneNode = Node.prototype.cloneNode;
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
3
|
+
export class SwiperItem {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.itemId = undefined;
|
|
6
|
+
this.deep = false;
|
|
7
|
+
}
|
|
8
|
+
handleCloneNode(node, deep) {
|
|
9
|
+
const clonedNode = nativeCloneNode.call(node, false);
|
|
10
|
+
const srcChildNodes = this.handleChildNodes(node);
|
|
11
|
+
if (deep) {
|
|
12
|
+
for (let i = 0; i < srcChildNodes.length; i++) {
|
|
13
|
+
const srcNode = srcChildNodes[i];
|
|
14
|
+
if (!srcNode)
|
|
15
|
+
break;
|
|
16
|
+
let srcDeep = deep;
|
|
17
|
+
if (srcNode.nodeType !== 2 && srcNode.nodeType !== 8) {
|
|
18
|
+
// Note: 没有引用节点(s-cr[reference comment])的情况下,不复制子节点避免冗余(例如:Image 组件)
|
|
19
|
+
if (this.deep !== true && !srcNode['s-cr']) {
|
|
20
|
+
srcDeep = false;
|
|
21
|
+
}
|
|
22
|
+
const childClone = this.handleCloneNode(srcNode, srcDeep);
|
|
23
|
+
clonedNode.appendChild(childClone);
|
|
14
24
|
}
|
|
15
|
-
const childClone = cloneNode(srcNode, srcDeep);
|
|
16
|
-
clonedNode.appendChild(childClone);
|
|
17
25
|
}
|
|
18
26
|
}
|
|
27
|
+
return clonedNode;
|
|
19
28
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
result.push(slot);
|
|
29
|
+
handleChildNodes(node) {
|
|
30
|
+
const childNodes = node.childNodes;
|
|
31
|
+
// check if element is stencil element without shadow dom
|
|
32
|
+
// and then detect elements that were slotted into the element
|
|
33
|
+
if (node['s-sc']) {
|
|
34
|
+
const result = [];
|
|
35
|
+
for (let i = 0; i < childNodes.length; i++) {
|
|
36
|
+
const slot = childNodes[i]['s-nr'];
|
|
37
|
+
if (slot) {
|
|
38
|
+
result.push(slot);
|
|
39
|
+
}
|
|
32
40
|
}
|
|
41
|
+
return result;
|
|
33
42
|
}
|
|
34
|
-
return
|
|
35
|
-
}
|
|
36
|
-
return Array.from(childNodes);
|
|
37
|
-
}
|
|
38
|
-
export class SwiperItem {
|
|
39
|
-
constructor() {
|
|
40
|
-
this.itemId = undefined;
|
|
43
|
+
return Array.from(childNodes);
|
|
41
44
|
}
|
|
42
45
|
componentDidRender() {
|
|
43
46
|
this.el.cloneNode = (deep = false) => {
|
|
44
|
-
return
|
|
47
|
+
return this.handleCloneNode(this.el, deep);
|
|
45
48
|
};
|
|
46
49
|
}
|
|
47
50
|
render() {
|
|
@@ -66,6 +69,24 @@ export class SwiperItem {
|
|
|
66
69
|
},
|
|
67
70
|
"attribute": "item-id",
|
|
68
71
|
"reflect": false
|
|
72
|
+
},
|
|
73
|
+
"deep": {
|
|
74
|
+
"type": "boolean",
|
|
75
|
+
"mutable": false,
|
|
76
|
+
"complexType": {
|
|
77
|
+
"original": "boolean",
|
|
78
|
+
"resolved": "boolean",
|
|
79
|
+
"references": {}
|
|
80
|
+
},
|
|
81
|
+
"required": false,
|
|
82
|
+
"optional": false,
|
|
83
|
+
"docs": {
|
|
84
|
+
"tags": [],
|
|
85
|
+
"text": ""
|
|
86
|
+
},
|
|
87
|
+
"attribute": "deep",
|
|
88
|
+
"reflect": false,
|
|
89
|
+
"defaultValue": "false"
|
|
69
90
|
}
|
|
70
91
|
};
|
|
71
92
|
}
|
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
2
|
+
if (kind === "a" && !f)
|
|
3
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
4
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
5
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
6
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
7
|
+
};
|
|
8
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
9
|
+
if (kind === "m")
|
|
10
|
+
throw new TypeError("Private method is not writable");
|
|
11
|
+
if (kind === "a" && !f)
|
|
12
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
13
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
14
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
15
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
16
|
+
};
|
|
17
|
+
var _Swiper_id, _Swiper_source;
|
|
1
18
|
import { h, Host } from '@stencil/core';
|
|
2
19
|
import classNames from 'classnames';
|
|
3
20
|
import SwiperJS from 'swiper/swiper-bundle.esm.js';
|
|
@@ -5,13 +22,14 @@ import { debounce } from '../../utils';
|
|
|
5
22
|
let INSTANCE_ID = 0;
|
|
6
23
|
export class Swiper {
|
|
7
24
|
constructor() {
|
|
8
|
-
this
|
|
25
|
+
_Swiper_id.set(this, INSTANCE_ID++);
|
|
26
|
+
_Swiper_source.set(this, '');
|
|
9
27
|
this.handleSwiperLoopListen = () => {
|
|
10
28
|
var _a, _b, _c;
|
|
11
29
|
((_a = this.observerFirst) === null || _a === void 0 ? void 0 : _a.disconnect) && this.observerFirst.disconnect();
|
|
12
30
|
((_b = this.observerLast) === null || _b === void 0 ? void 0 : _b.disconnect) && this.observerLast.disconnect();
|
|
13
|
-
this.observerFirst = new MutationObserver(this.
|
|
14
|
-
this.observerLast = new MutationObserver(this.
|
|
31
|
+
this.observerFirst = new MutationObserver(this.handleSwiperLoopDebounce);
|
|
32
|
+
this.observerLast = new MutationObserver(this.handleSwiperLoopDebounce);
|
|
15
33
|
const wrapper = (_c = this.swiper.$wrapperEl) === null || _c === void 0 ? void 0 : _c[0];
|
|
16
34
|
const list = wrapper.querySelectorAll('taro-swiper-item-core:not(.swiper-slide-duplicate)');
|
|
17
35
|
if (list.length >= 1) {
|
|
@@ -25,22 +43,23 @@ export class Swiper {
|
|
|
25
43
|
});
|
|
26
44
|
}
|
|
27
45
|
};
|
|
28
|
-
this.handleSwiperLoop =
|
|
29
|
-
var _a;
|
|
46
|
+
this.handleSwiperLoop = () => {
|
|
47
|
+
var _a, _b, _c, _d;
|
|
30
48
|
if (!this.swiper || !this.circular)
|
|
31
49
|
return;
|
|
32
50
|
const swiper = this.swiper; // Note: loop 相关的方法 swiper 未声明
|
|
33
51
|
const duplicates = ((_a = this.swiperWrapper) === null || _a === void 0 ? void 0 : _a.querySelectorAll('.swiper-slide-duplicate')) || [];
|
|
34
52
|
if (duplicates.length < 2) {
|
|
35
53
|
// Note: 循环模式下,但是前后垫片未注入
|
|
36
|
-
swiper.loopDestroy();
|
|
37
|
-
swiper.loopCreate();
|
|
54
|
+
(_b = swiper.loopDestroy) === null || _b === void 0 ? void 0 : _b.call(swiper);
|
|
55
|
+
(_c = swiper.loopCreate) === null || _c === void 0 ? void 0 : _c.call(swiper);
|
|
38
56
|
}
|
|
39
57
|
else {
|
|
40
|
-
swiper.loopFix();
|
|
58
|
+
(_d = swiper.loopFix) === null || _d === void 0 ? void 0 : _d.call(swiper);
|
|
41
59
|
}
|
|
42
|
-
}
|
|
43
|
-
this.
|
|
60
|
+
};
|
|
61
|
+
this.handleSwiperLoopDebounce = debounce(this.handleSwiperLoop, 50);
|
|
62
|
+
this.handleSwiperSizeDebounce = debounce(() => {
|
|
44
63
|
if (this.swiper && !this.circular) {
|
|
45
64
|
this.swiper.updateSlides();
|
|
46
65
|
}
|
|
@@ -131,9 +150,9 @@ export class Swiper {
|
|
|
131
150
|
this.el.removeChild = (oldChild) => {
|
|
132
151
|
return newVal.removeChild(oldChild);
|
|
133
152
|
};
|
|
134
|
-
this.el.addEventListener('DOMNodeInserted', this.
|
|
135
|
-
this.el.addEventListener('DOMNodeRemoved', this.
|
|
136
|
-
this.el.addEventListener('MutationObserver', this.
|
|
153
|
+
this.el.addEventListener('DOMNodeInserted', this.handleSwiperSizeDebounce);
|
|
154
|
+
this.el.addEventListener('DOMNodeRemoved', this.handleSwiperSizeDebounce);
|
|
155
|
+
this.el.addEventListener('MutationObserver', this.handleSwiperSizeDebounce);
|
|
137
156
|
}
|
|
138
157
|
watchCircular() {
|
|
139
158
|
if (this.swiper) {
|
|
@@ -175,9 +194,9 @@ export class Swiper {
|
|
|
175
194
|
}
|
|
176
195
|
disconnectedCallback() {
|
|
177
196
|
var _a, _b, _c, _d, _e, _f;
|
|
178
|
-
this.el.removeEventListener('DOMNodeInserted', this.
|
|
179
|
-
this.el.removeEventListener('DOMNodeRemoved', this.
|
|
180
|
-
this.el.removeEventListener('MutationObserver', this.
|
|
197
|
+
this.el.removeEventListener('DOMNodeInserted', this.handleSwiperSizeDebounce);
|
|
198
|
+
this.el.removeEventListener('DOMNodeRemoved', this.handleSwiperSizeDebounce);
|
|
199
|
+
this.el.removeEventListener('MutationObserver', this.handleSwiperSizeDebounce);
|
|
181
200
|
(_b = (_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
182
201
|
(_d = (_c = this.observerFirst) === null || _c === void 0 ? void 0 : _c.disconnect) === null || _d === void 0 ? void 0 : _d.call(_c);
|
|
183
202
|
(_f = (_e = this.observerLast) === null || _e === void 0 ? void 0 : _e.disconnect) === null || _f === void 0 ? void 0 : _f.call(_e);
|
|
@@ -187,7 +206,7 @@ export class Swiper {
|
|
|
187
206
|
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
188
207
|
const that = this;
|
|
189
208
|
const options = {
|
|
190
|
-
pagination: { el: `.taro-swiper-${this
|
|
209
|
+
pagination: { el: `.taro-swiper-${__classPrivateFieldGet(this, _Swiper_id, "f")} > .swiper-container > .swiper-pagination` },
|
|
191
210
|
direction: vertical ? 'vertical' : 'horizontal',
|
|
192
211
|
loop: circular,
|
|
193
212
|
slidesPerView: displayMultipleItems,
|
|
@@ -215,13 +234,22 @@ export class Swiper {
|
|
|
215
234
|
}
|
|
216
235
|
that.onChange.emit({
|
|
217
236
|
current: this.realIndex,
|
|
218
|
-
source:
|
|
237
|
+
source: __classPrivateFieldGet(that, _Swiper_source, "f"),
|
|
219
238
|
});
|
|
220
239
|
},
|
|
240
|
+
touchEnd: () => {
|
|
241
|
+
__classPrivateFieldSet(that, _Swiper_source, 'touch', "f");
|
|
242
|
+
},
|
|
243
|
+
autoplay() {
|
|
244
|
+
__classPrivateFieldSet(that, _Swiper_source, 'autoplay', "f");
|
|
245
|
+
},
|
|
221
246
|
transitionEnd() {
|
|
247
|
+
setTimeout(() => {
|
|
248
|
+
__classPrivateFieldSet(that, _Swiper_source, '', "f");
|
|
249
|
+
});
|
|
222
250
|
that.onAnimationFinish.emit({
|
|
223
251
|
current: this.realIndex,
|
|
224
|
-
source:
|
|
252
|
+
source: __classPrivateFieldGet(that, _Swiper_source, "f"),
|
|
225
253
|
});
|
|
226
254
|
},
|
|
227
255
|
observerUpdate(_swiper, e) {
|
|
@@ -247,8 +275,8 @@ export class Swiper {
|
|
|
247
275
|
disableOnInteraction: false
|
|
248
276
|
};
|
|
249
277
|
}
|
|
250
|
-
this.swiper = new SwiperJS(`.taro-swiper-${this
|
|
251
|
-
this.swiperWrapper = this.el.querySelector(`.taro-swiper-${this
|
|
278
|
+
this.swiper = new SwiperJS(`.taro-swiper-${__classPrivateFieldGet(this, _Swiper_id, "f")} > .swiper-container`, options);
|
|
279
|
+
this.swiperWrapper = this.el.querySelector(`.taro-swiper-${__classPrivateFieldGet(this, _Swiper_id, "f")} > .swiper-container > .swiper-wrapper`);
|
|
252
280
|
}
|
|
253
281
|
render() {
|
|
254
282
|
const { vertical, indicatorDots, indicatorColor, indicatorActiveColor } = this;
|
|
@@ -270,9 +298,9 @@ export class Swiper {
|
|
|
270
298
|
style.marginRight = `${nM}px`;
|
|
271
299
|
style.marginLeft = `${pM}px`;
|
|
272
300
|
}
|
|
273
|
-
return (h(Host, { class: `taro-swiper-${this
|
|
274
|
-
.taro-swiper-${this
|
|
275
|
-
.taro-swiper-${this
|
|
301
|
+
return (h(Host, { class: `taro-swiper-${__classPrivateFieldGet(this, _Swiper_id, "f")}`, style: hostStyle }, h("div", { class: 'swiper-container', style: style }, h("style", { type: 'text/css' }, `
|
|
302
|
+
.taro-swiper-${__classPrivateFieldGet(this, _Swiper_id, "f")} > .swiper-container > .swiper-pagination > .swiper-pagination-bullet { background: ${indicatorColor} }
|
|
303
|
+
.taro-swiper-${__classPrivateFieldGet(this, _Swiper_id, "f")} > .swiper-container > .swiper-pagination > .swiper-pagination-bullet-active { background: ${indicatorActiveColor} }
|
|
276
304
|
`), h("div", { class: 'swiper-wrapper' }, h("slot", null)), h("div", { class: classNames('swiper-pagination', {
|
|
277
305
|
'swiper-pagination-hidden': !indicatorDots,
|
|
278
306
|
'swiper-pagination-bullets': indicatorDots
|
|
@@ -614,3 +642,4 @@ export class Swiper {
|
|
|
614
642
|
}];
|
|
615
643
|
}
|
|
616
644
|
}
|
|
645
|
+
_Swiper_id = new WeakMap(), _Swiper_source = new WeakMap();
|
|
@@ -3,6 +3,10 @@ body {
|
|
|
3
3
|
height: 100%;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
+
:root {
|
|
7
|
+
--taro-tabbar-height: 50px;
|
|
8
|
+
}
|
|
9
|
+
|
|
6
10
|
#app {
|
|
7
11
|
height: 100%;
|
|
8
12
|
}
|
|
@@ -25,7 +29,7 @@ body {
|
|
|
25
29
|
.taro-tabbar__tabbar {
|
|
26
30
|
position: relative;
|
|
27
31
|
width: 100%;
|
|
28
|
-
height:
|
|
32
|
+
height: var(--taro-tabbar-height);
|
|
29
33
|
transition: bottom 0.2s, top 0.2s;
|
|
30
34
|
}
|
|
31
35
|
.taro-tabbar__tabbar-top {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import classNames from 'classnames';
|
|
2
1
|
import { h } from '@stencil/core';
|
|
3
2
|
import Taro from '@tarojs/taro';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
4
|
import { isVisible } from '../../utils';
|
|
5
5
|
export const TabbarItem = ({ index, isSelected = false, textColor, iconPath, badgeText, showRedDot = false, pagePath, text, onSelect }) => {
|
|
6
6
|
const className = classNames('weui-tabbar__item', {
|
|
@@ -300,11 +300,11 @@ export class Tabbar {
|
|
|
300
300
|
"type": "unknown",
|
|
301
301
|
"mutable": false,
|
|
302
302
|
"complexType": {
|
|
303
|
-
"original": "
|
|
304
|
-
"resolved": "
|
|
303
|
+
"original": "ITabBarConf",
|
|
304
|
+
"resolved": "ITabBarConf",
|
|
305
305
|
"references": {
|
|
306
|
-
"
|
|
307
|
-
"location": "
|
|
306
|
+
"ITabBarConf": {
|
|
307
|
+
"location": "global"
|
|
308
308
|
}
|
|
309
309
|
}
|
|
310
310
|
},
|