@tarojs/components 4.1.5 → 4.1.6-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/ad-6e5e6c21.js +18 -0
- package/dist/cjs/ad-custom-03478475.js +18 -0
- package/dist/cjs/animation-video-7fc33f99.js +18 -0
- package/dist/cjs/animation-view-80fa5d0f.js +18 -0
- package/dist/cjs/ar-camera-a5b4fc84.js +18 -0
- package/dist/cjs/audio-df2bacdd.js +56 -0
- package/dist/cjs/aweme-data-c526f1a1.js +18 -0
- package/dist/cjs/block-019beb65.js +14 -0
- package/dist/cjs/button-8f729d81.js +73 -0
- package/dist/cjs/camera-d82d6f4d.js +18 -0
- package/dist/cjs/canvas-5ed991dd.js +49 -0
- package/dist/cjs/channel-live-691e20a5.js +18 -0
- package/dist/cjs/channel-video-126a3305.js +18 -0
- package/dist/cjs/checkbox-ffc9c1a2.js +122 -0
- package/dist/cjs/comment-detail-87637299.js +18 -0
- package/dist/cjs/comment-list-a18163da.js +18 -0
- package/dist/cjs/contact-button-75ae4609.js +18 -0
- package/dist/cjs/cover-image-1bf95a9b.js +32 -0
- package/dist/cjs/cover-view-a0e4395c.js +65 -0
- package/dist/cjs/custom-wrapper-64a8245e.js +14 -0
- package/dist/cjs/draggable-sheet-749618d6.js +18 -0
- package/dist/cjs/editor-81a773f9.js +18 -0
- package/dist/cjs/follow-swan-794e3367.js +18 -0
- package/dist/cjs/form-f24b8935.js +141 -0
- package/dist/cjs/functional-page-navigator-db0aeeb5.js +18 -0
- package/dist/cjs/grid-builder-0757691d.js +18 -0
- package/dist/cjs/grid-view-b77da424.js +18 -0
- package/dist/cjs/icon-93e7c472.js +30 -0
- package/dist/cjs/image-4a828d57.js +106 -0
- package/dist/cjs/index.cjs.js +205 -0
- package/dist/cjs/inline-payment-panel-0068d0e4.js +18 -0
- package/dist/cjs/input-f39a63db.js +213 -0
- package/dist/cjs/keyboard-accessory-d7d227b7.js +18 -0
- package/dist/cjs/label-e54a79ee.js +15 -0
- package/dist/cjs/lifestyle-189b4b3a.js +18 -0
- package/dist/cjs/like-b6a72cb7.js +18 -0
- package/dist/cjs/list-builder-d7a3f023.js +18 -0
- package/dist/cjs/list-view-7cf454c7.js +18 -0
- package/dist/cjs/live-player-2115d649.js +18 -0
- package/dist/cjs/live-pusher-6a8da38c.js +18 -0
- package/dist/cjs/login-cd972083.js +18 -0
- package/dist/cjs/lottie-802328ca.js +18 -0
- package/dist/cjs/map-841765a9.js +1338 -0
- package/dist/cjs/match-media-6e2efc2f.js +18 -0
- package/dist/cjs/movable-view-9fa169e1.js +482 -0
- package/dist/cjs/native-slot-142506c1.js +18 -0
- package/dist/cjs/navigation-bar-b4ff564a.js +18 -0
- package/dist/cjs/navigator-43495d4f.js +77 -0
- package/dist/cjs/nested-scroll-body-9caab58f.js +18 -0
- package/dist/cjs/nested-scroll-header-c5b64f3d.js +18 -0
- package/dist/cjs/official-account-f53ef4c9.js +18 -0
- package/dist/cjs/open-container-dcb0756e.js +18 -0
- package/dist/cjs/open-data-295d2a0f.js +18 -0
- package/dist/cjs/page-container-c02ef21e.js +18 -0
- package/dist/cjs/page-meta-80a7a861.js +18 -0
- package/dist/cjs/picker-0b3ae89d.js +689 -0
- package/dist/cjs/picker-view-ee39f2b6.js +179 -0
- package/dist/cjs/progress-0434432f.js +39 -0
- package/dist/cjs/pull-to-refresh-a7a9d80c.js +269 -0
- package/dist/cjs/radio-fa441dee.js +136 -0
- package/dist/cjs/rich-text-f88b18dd.js +73 -0
- package/dist/cjs/root-portal-849d424f.js +18 -0
- package/dist/cjs/rtc-room-e32e8e93.js +18 -0
- package/dist/cjs/rtc-room-item-f2696f3e.js +18 -0
- package/dist/cjs/script-1d8392d2.js +18 -0
- package/dist/cjs/script-2eb2d361.js +18 -0
- package/dist/cjs/script-33ab1b9b.js +18 -0
- package/dist/cjs/script-66238de4.js +18 -0
- package/dist/cjs/script-7d8a337e.js +18 -0
- package/dist/cjs/script-9767d763.js +18 -0
- package/dist/cjs/script-aa62f496.js +18 -0
- package/dist/cjs/script-d39c17ed.js +18 -0
- package/dist/cjs/script-d7887902.js +18 -0
- package/dist/cjs/scroll-view-65cb8d5f.js +170 -0
- package/dist/cjs/share-element-68928fbf.js +18 -0
- package/dist/cjs/slider-4093049a.js +163 -0
- package/dist/cjs/slot-bb81659e.js +18 -0
- package/dist/cjs/snapshot-c2520c58.js +18 -0
- package/dist/cjs/span-fb1efcaf.js +18 -0
- package/dist/cjs/sticky-header-dcde70ca.js +18 -0
- package/dist/cjs/sticky-section-170bc892.js +18 -0
- package/dist/cjs/swiper-3ab835bb.js +427 -0
- package/dist/cjs/switch-586022a8.js +62 -0
- package/dist/cjs/tab-item-cfa3339e.js +18 -0
- package/dist/cjs/tabbar-41113df5.js +353 -0
- package/dist/cjs/tabs-be7f918d.js +18 -0
- package/dist/cjs/taro-ad-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-ad-custom-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-animation-video-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-animation-view-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-ar-camera-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-audio-core.cjs.entry.js +3 -51
- package/dist/cjs/taro-aweme-data-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-block-core.cjs.entry.js +4 -10
- package/dist/cjs/taro-button-core.cjs.entry.js +4 -68
- package/dist/cjs/taro-camera-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-canvas-core.cjs.entry.js +3 -44
- package/dist/cjs/taro-channel-live-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-channel-video-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-checkbox-core_2.cjs.entry.js +4 -117
- package/dist/cjs/taro-comment-detail-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-comment-list-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-contact-button-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-cover-image-core.cjs.entry.js +3 -27
- package/dist/cjs/taro-cover-view-core.cjs.entry.js +4 -60
- package/dist/cjs/taro-custom-wrapper-core.cjs.entry.js +4 -10
- package/dist/cjs/taro-double-tap-gesture-handler-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-draggable-sheet-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-editor-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-follow-swan-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-force-press-gesture-handler-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-form-core.cjs.entry.js +4 -137
- package/dist/cjs/taro-functional-page-navigator-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-grid-builder-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-grid-view-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-horizontal-drag-gesture-handler-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-icon-core.cjs.entry.js +4 -25
- package/dist/cjs/taro-image-core.cjs.entry.js +4 -55
- package/dist/cjs/taro-inline-payment-panel-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-input-core.cjs.entry.js +3 -208
- package/dist/cjs/taro-keyboard-accessory-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-label-core.cjs.entry.js +4 -11
- package/dist/cjs/taro-lifestyle-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-like-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-list-builder-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-list-view-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-live-player-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-live-pusher-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-login-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-long-press-gesture-handler-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-lottie-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-map-core.cjs.entry.js +4 -1333
- package/dist/cjs/taro-match-media-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-movable-area-core_2.cjs.entry.js +5 -477
- package/dist/cjs/taro-native-slot-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-navigation-bar-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-navigator-core.cjs.entry.js +5 -72
- package/dist/cjs/taro-nested-scroll-body-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-nested-scroll-header-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-official-account-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-open-container-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-open-data-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-page-container-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-page-meta-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-pan-gesture-handler-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-picker-core_2.cjs.entry.js +5 -684
- package/dist/cjs/taro-picker-view-column-core_2.cjs.entry.js +6 -174
- package/dist/cjs/taro-progress-core.cjs.entry.js +3 -34
- package/dist/cjs/taro-pull-to-refresh-core.cjs.entry.js +5 -264
- package/dist/cjs/taro-radio-core_2.cjs.entry.js +4 -131
- package/dist/cjs/taro-rich-text-core.cjs.entry.js +3 -68
- package/dist/cjs/taro-root-portal-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-rtc-room-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-rtc-room-item-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-scale-gesture-handler-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-script-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-scroll-view-core.cjs.entry.js +6 -165
- package/dist/cjs/taro-share-element-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-slider-core.cjs.entry.js +3 -158
- package/dist/cjs/taro-slot-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-snapshot-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-span-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-sticky-header-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-sticky-section-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-swiper-core_2.cjs.entry.js +8 -422
- package/dist/cjs/taro-switch-core.cjs.entry.js +3 -57
- package/dist/cjs/taro-tab-item-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-tabbar.cjs.entry.js +8 -347
- package/dist/cjs/taro-tabs-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-tap-gesture-handler-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-text-core.cjs.entry.js +3 -20
- package/dist/cjs/taro-textarea-core.cjs.entry.js +3 -156
- package/dist/cjs/taro-vertical-drag-gesture-handler-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-video-control_3.cjs.entry.js +8 -743
- package/dist/cjs/taro-view-core.cjs.entry.js +5 -65
- package/dist/cjs/taro-voip-room-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-web-view-core.cjs.entry.js +3 -22
- package/dist/cjs/text-642f2f48.js +25 -0
- package/dist/cjs/textarea-3f14df1c.js +161 -0
- package/dist/cjs/video-75aca914.js +748 -0
- package/dist/cjs/view-609adfc6.js +70 -0
- package/dist/cjs/voip-room-7f55d8a0.js +18 -0
- package/dist/cjs/web-view-be5a2d1d.js +27 -0
- package/dist/collection/components/ad/index.js +1 -0
- package/dist/collection/components/ad-custom/index.js +1 -0
- package/dist/collection/components/animation-video/index.js +1 -0
- package/dist/collection/components/animation-view/index.js +1 -0
- package/dist/collection/components/ar-camera/index.js +1 -0
- package/dist/collection/components/audio/index.js +1 -0
- package/dist/collection/components/aweme-data/index.js +1 -0
- package/dist/collection/components/block/index.js +1 -0
- package/dist/collection/components/button/index.js +1 -0
- package/dist/collection/components/camera/index.js +1 -0
- package/dist/collection/components/canvas/index.js +1 -0
- package/dist/collection/components/channel-live/index.js +1 -0
- package/dist/collection/components/channel-video/index.js +1 -0
- package/dist/collection/components/checkbox/index.js +2 -0
- package/dist/collection/components/comment/index.js +2 -0
- package/dist/collection/components/contact-button/index.js +1 -0
- package/dist/collection/components/cover-image/index.js +1 -0
- package/dist/collection/components/cover-view/index.js +1 -0
- package/dist/collection/components/custom-wrapper/index.js +1 -0
- package/dist/collection/components/double-tap-gesture-handler/index.js +1 -0
- package/dist/collection/components/draggable-sheet/index.js +1 -0
- package/dist/collection/components/editor/index.js +1 -0
- package/dist/collection/components/follow-swan/index.js +1 -0
- package/dist/collection/components/force-press-gesture-handler/index.js +1 -0
- package/dist/collection/components/form/index.js +1 -0
- package/dist/collection/components/functional-page-navigator/index.js +1 -0
- package/dist/collection/components/grid-builder/index.js +1 -0
- package/dist/collection/components/grid-view/index.js +1 -0
- package/dist/collection/components/horizontal-drag-gesture-handler/index.js +1 -0
- package/dist/collection/components/icon/index.js +1 -0
- package/dist/collection/components/image/image.js +46 -0
- package/dist/collection/components/image/index.js +1 -0
- package/dist/collection/components/index.js +87 -0
- package/dist/collection/components/inline-payment-panel/index.js +1 -0
- package/dist/collection/components/input/index.js +1 -0
- package/dist/collection/components/keyboard-accessory/index.js +1 -0
- package/dist/collection/components/label/index.js +1 -0
- package/dist/collection/components/lifestyle/index.js +1 -0
- package/dist/collection/components/like/index.js +1 -0
- package/dist/collection/components/list-builder/index.js +1 -0
- package/dist/collection/components/list-view/index.js +1 -0
- package/dist/collection/components/live-player/index.js +1 -0
- package/dist/collection/components/live-pusher/index.js +1 -0
- package/dist/collection/components/login/index.js +1 -0
- package/dist/collection/components/long-press-gesture-handler/index.js +1 -0
- package/dist/collection/components/lottie/index.js +1 -0
- package/dist/collection/components/map/index.js +1 -0
- package/dist/collection/components/match-media/index.js +1 -0
- package/dist/collection/components/movable-area/index.js +2 -0
- package/dist/collection/components/navigation-bar/index.js +1 -0
- package/dist/collection/components/navigator/index.js +1 -0
- package/dist/collection/components/nested-scroll-body/index.js +1 -0
- package/dist/collection/components/nested-scroll-header/index.js +1 -0
- package/dist/collection/components/official-account/index.js +1 -0
- package/dist/collection/components/open-container/index.js +1 -0
- package/dist/collection/components/open-data/index.js +1 -0
- package/dist/collection/components/page-container/index.js +1 -0
- package/dist/collection/components/page-meta/index.js +1 -0
- package/dist/collection/components/pan-gesture-handler/index.js +1 -0
- package/dist/collection/components/picker/index.js +2 -0
- package/dist/collection/components/picker-view/index.js +2 -0
- package/dist/collection/components/progress/index.js +1 -0
- package/dist/collection/components/pull-to-refresh/index.js +1 -0
- package/dist/collection/components/radio/index.js +2 -0
- package/dist/collection/components/rich-text/index.js +1 -0
- package/dist/collection/components/root-portal/index.js +1 -0
- package/dist/collection/components/rtc-room/index.js +2 -0
- package/dist/collection/components/scale-gesture-handler/index.js +1 -0
- package/dist/collection/components/script/index.js +1 -0
- package/dist/collection/components/scroll-view/index.js +1 -0
- package/dist/collection/components/share-element/index.js +1 -0
- package/dist/collection/components/slider/index.js +1 -0
- package/dist/collection/components/slot/index.js +2 -0
- package/dist/collection/components/snapshot/index.js +1 -0
- package/dist/collection/components/span/index.js +1 -0
- package/dist/collection/components/sticky-header/index.js +1 -0
- package/dist/collection/components/sticky-section/index.js +1 -0
- package/dist/collection/components/swiper/index.js +2 -0
- package/dist/collection/components/switch/index.js +1 -0
- package/dist/collection/components/tabbar/index.js +2 -0
- package/dist/collection/components/tabs/index.js +2 -0
- package/dist/collection/components/tap-gesture-handler/index.js +1 -0
- package/dist/collection/components/text/index.js +1 -0
- package/dist/collection/components/textarea/index.js +1 -0
- package/dist/collection/components/vertical-drag-gesture-handler/index.js +1 -0
- package/dist/collection/components/video/index.js +3 -0
- package/dist/collection/components/view/index.js +1 -0
- package/dist/collection/components/voip-room/index.js +1 -0
- package/dist/collection/components/web-view/index.js +1 -0
- package/dist/collection/index.js +1 -1
- package/dist/components/index.js +98 -96
- package/dist/components/taro-ad-core.js +1 -1
- package/dist/components/taro-ad-custom-core.js +1 -1
- package/dist/components/taro-animation-video-core.js +1 -1
- package/dist/components/taro-animation-view-core.js +1 -1
- package/dist/components/taro-ar-camera-core.js +1 -1
- package/dist/components/taro-audio-core.js +1 -1
- package/dist/components/taro-aweme-data-core.js +1 -1
- package/dist/components/taro-block-core.js +1 -1
- package/dist/components/taro-button-core.js +1 -1
- package/dist/components/taro-camera-core.js +1 -1
- package/dist/components/taro-canvas-core.js +1 -1
- package/dist/components/taro-channel-live-core.js +1 -1
- package/dist/components/taro-channel-video-core.js +1 -1
- package/dist/components/taro-checkbox-core.js +1 -1
- package/dist/components/taro-checkbox-group-core.js +1 -1
- package/dist/components/taro-comment-detail-core.js +1 -1
- package/dist/components/taro-comment-list-core.js +1 -1
- package/dist/components/taro-contact-button-core.js +1 -1
- package/dist/components/taro-cover-image-core.js +1 -1
- package/dist/components/taro-cover-view-core.js +1 -1
- package/dist/components/taro-custom-wrapper-core.js +1 -1
- package/dist/components/taro-double-tap-gesture-handler-core.js +1 -1
- package/dist/components/taro-draggable-sheet-core.js +1 -1
- package/dist/components/taro-editor-core.js +1 -1
- package/dist/components/taro-follow-swan-core.js +1 -1
- package/dist/components/taro-force-press-gesture-handler-core.js +1 -1
- package/dist/components/taro-form-core.js +1 -1
- package/dist/components/taro-functional-page-navigator-core.js +1 -1
- package/dist/components/taro-grid-builder-core.js +1 -1
- package/dist/components/taro-grid-view-core.js +1 -1
- package/dist/components/taro-horizontal-drag-gesture-handler-core.js +1 -1
- package/dist/components/taro-icon-core.js +1 -1
- package/dist/components/taro-image-core.js +47 -1
- package/dist/components/taro-inline-payment-panel-core.js +1 -1
- package/dist/components/taro-input-core.js +1 -1
- package/dist/components/taro-keyboard-accessory-core.js +1 -1
- package/dist/components/taro-label-core.js +1 -1
- package/dist/components/taro-lifestyle-core.js +1 -1
- package/dist/components/taro-like-core.js +1 -1
- package/dist/components/taro-list-builder-core.js +1 -1
- package/dist/components/taro-list-view-core.js +1 -1
- package/dist/components/taro-live-player-core.js +1 -1
- package/dist/components/taro-live-pusher-core.js +1 -1
- package/dist/components/taro-login-core.js +1 -1
- package/dist/components/taro-long-press-gesture-handler-core.js +1 -1
- package/dist/components/taro-lottie-core.js +1 -1
- package/dist/components/taro-map-core.js +1 -1
- package/dist/components/taro-match-media-core.js +1 -1
- package/dist/components/taro-movable-area-core.js +1 -1
- package/dist/components/taro-movable-view-core.js +1 -1
- package/dist/components/taro-native-slot-core.js +1 -1
- package/dist/components/taro-navigation-bar-core.js +1 -1
- package/dist/components/taro-navigator-core.js +1 -1
- package/dist/components/taro-nested-scroll-body-core.js +1 -1
- package/dist/components/taro-nested-scroll-header-core.js +1 -1
- package/dist/components/taro-official-account-core.js +1 -1
- package/dist/components/taro-open-container-core.js +1 -1
- package/dist/components/taro-open-data-core.js +1 -1
- package/dist/components/taro-page-container-core.js +1 -1
- package/dist/components/taro-page-meta-core.js +1 -1
- package/dist/components/taro-pan-gesture-handler-core.js +1 -1
- package/dist/components/taro-picker-core.js +1 -1
- package/dist/components/taro-picker-view-column-core.js +1 -1
- package/dist/components/taro-picker-view-core.js +1 -1
- package/dist/components/taro-progress-core.js +1 -1
- package/dist/components/taro-pull-to-refresh-core.js +1 -1
- package/dist/components/taro-radio-core.js +1 -1
- package/dist/components/taro-radio-group-core.js +1 -1
- package/dist/components/taro-rich-text-core.js +1 -1
- package/dist/components/taro-root-portal-core.js +1 -1
- package/dist/components/taro-rtc-room-core.js +1 -1
- package/dist/components/taro-rtc-room-item-core.js +1 -1
- package/dist/components/taro-scale-gesture-handler-core.js +1 -1
- package/dist/components/taro-script-core.js +1 -1
- package/dist/components/taro-scroll-view-core.js +1 -1
- package/dist/components/taro-share-element-core.js +1 -1
- package/dist/components/taro-slider-core.js +1 -1
- package/dist/components/taro-slot-core.js +1 -1
- package/dist/components/taro-snapshot-core.js +1 -1
- package/dist/components/taro-span-core.js +1 -1
- package/dist/components/taro-sticky-header-core.js +1 -1
- package/dist/components/taro-sticky-section-core.js +1 -1
- package/dist/components/taro-swiper-core.js +1 -1
- package/dist/components/taro-swiper-item-core.js +1 -1
- package/dist/components/taro-switch-core.js +1 -1
- package/dist/components/taro-tab-item-core.js +1 -1
- package/dist/components/taro-tabbar.js +1 -1
- package/dist/components/taro-tabs-core.js +1 -1
- package/dist/components/taro-tap-gesture-handler-core.js +1 -1
- package/dist/components/taro-text-core.js +1 -1
- package/dist/components/taro-textarea-core.js +1 -1
- package/dist/components/taro-vertical-drag-gesture-handler-core.js +1 -1
- package/dist/components/taro-video-core.js +2 -2
- package/dist/components/taro-view-core.js +1 -1
- package/dist/components/taro-voip-room-core.js +1 -1
- package/dist/components/taro-web-view-core.js +1 -1
- package/dist/esm/ad-cfb00041.js +16 -0
- package/dist/esm/ad-custom-4a0d4eb2.js +16 -0
- package/dist/esm/animation-video-5215c138.js +16 -0
- package/dist/esm/animation-view-a07c6ea9.js +16 -0
- package/dist/esm/ar-camera-d578c533.js +16 -0
- package/dist/esm/audio-fd0e719f.js +54 -0
- package/dist/esm/aweme-data-2e12d8c9.js +16 -0
- package/dist/esm/block-796aa7d8.js +12 -0
- package/dist/esm/button-cd801674.js +71 -0
- package/dist/esm/camera-1791b404.js +16 -0
- package/dist/esm/canvas-5531b496.js +47 -0
- package/dist/esm/channel-live-b63e080a.js +16 -0
- package/dist/esm/channel-video-d4ee7254.js +16 -0
- package/dist/esm/checkbox-da6b07ea.js +119 -0
- package/dist/esm/comment-detail-02a3e8ee.js +16 -0
- package/dist/esm/comment-list-a62325be.js +16 -0
- package/dist/esm/contact-button-68e95a69.js +16 -0
- package/dist/esm/cover-image-0783b2c1.js +30 -0
- package/dist/esm/cover-view-8330b60d.js +63 -0
- package/dist/esm/custom-wrapper-0bb13a12.js +12 -0
- package/dist/esm/draggable-sheet-67355f70.js +16 -0
- package/dist/esm/editor-743e35d0.js +16 -0
- package/dist/esm/follow-swan-dbdf5cc8.js +16 -0
- package/dist/esm/form-576398ba.js +139 -0
- package/dist/esm/functional-page-navigator-63f675f4.js +16 -0
- package/dist/esm/grid-builder-cf0aa856.js +16 -0
- package/dist/esm/grid-view-353586e4.js +16 -0
- package/dist/esm/icon-88383f2c.js +28 -0
- package/dist/esm/image-d9d8ed01.js +104 -0
- package/dist/esm/index.js +100 -1
- package/dist/esm/inline-payment-panel-73925dd2.js +16 -0
- package/dist/esm/input-4104e3ea.js +211 -0
- package/dist/esm/keyboard-accessory-fd485a31.js +16 -0
- package/dist/esm/label-94ef4b17.js +13 -0
- package/dist/esm/lifestyle-4db11299.js +16 -0
- package/dist/esm/like-d61fe792.js +16 -0
- package/dist/esm/list-builder-e0d9e871.js +16 -0
- package/dist/esm/list-view-84529418.js +16 -0
- package/dist/esm/live-player-e4dbe4cf.js +16 -0
- package/dist/esm/live-pusher-15c48b78.js +16 -0
- package/dist/esm/login-d932daf9.js +16 -0
- package/dist/esm/lottie-2ada69b7.js +16 -0
- package/dist/esm/map-c6cd24f4.js +1332 -0
- package/dist/esm/match-media-2cdc536a.js +16 -0
- package/dist/esm/movable-view-c1358d1e.js +479 -0
- package/dist/esm/native-slot-98020f54.js +16 -0
- package/dist/esm/navigation-bar-eda66236.js +16 -0
- package/dist/esm/navigator-65877bda.js +71 -0
- package/dist/esm/nested-scroll-body-b1053924.js +16 -0
- package/dist/esm/nested-scroll-header-10ba047c.js +16 -0
- package/dist/esm/official-account-75c8fa4e.js +16 -0
- package/dist/esm/open-container-d288ae08.js +16 -0
- package/dist/esm/open-data-9e1673e1.js +16 -0
- package/dist/esm/page-container-b5b82c32.js +16 -0
- package/dist/esm/page-meta-518b39b7.js +16 -0
- package/dist/esm/picker-6a565e02.js +686 -0
- package/dist/esm/picker-view-52390656.js +176 -0
- package/dist/esm/progress-f99ddb18.js +37 -0
- package/dist/esm/pull-to-refresh-e8972159.js +263 -0
- package/dist/esm/radio-9b356d76.js +133 -0
- package/dist/esm/rich-text-287554f4.js +71 -0
- package/dist/esm/root-portal-db801799.js +16 -0
- package/dist/esm/rtc-room-bcf23c91.js +16 -0
- package/dist/esm/rtc-room-item-052b16d2.js +16 -0
- package/dist/esm/script-11e3884a.js +16 -0
- package/dist/esm/script-1b22398f.js +16 -0
- package/dist/esm/script-1c3855bc.js +16 -0
- package/dist/esm/script-4b869172.js +16 -0
- package/dist/esm/script-4d587470.js +16 -0
- package/dist/esm/script-5c55afcb.js +16 -0
- package/dist/esm/script-661db6af.js +16 -0
- package/dist/esm/script-76fc8cf5.js +16 -0
- package/dist/esm/script-8f332177.js +16 -0
- package/dist/esm/scroll-view-43e9acfc.js +168 -0
- package/dist/esm/share-element-4f90ad5b.js +16 -0
- package/dist/esm/slider-47bbf797.js +161 -0
- package/dist/esm/slot-71ad33eb.js +16 -0
- package/dist/esm/snapshot-42feea7d.js +16 -0
- package/dist/esm/span-d4b171da.js +16 -0
- package/dist/esm/sticky-header-a99729bc.js +16 -0
- package/dist/esm/sticky-section-f8d75284.js +16 -0
- package/dist/esm/swiper-20b19ce0.js +420 -0
- package/dist/esm/switch-a538d85e.js +60 -0
- package/dist/esm/tab-item-f58dd1b0.js +16 -0
- package/dist/esm/tabbar-e6342392.js +345 -0
- package/dist/esm/tabs-da838bbd.js +16 -0
- package/dist/esm/taro-ad-core.entry.js +3 -16
- package/dist/esm/taro-ad-custom-core.entry.js +3 -16
- package/dist/esm/taro-animation-video-core.entry.js +3 -16
- package/dist/esm/taro-animation-view-core.entry.js +3 -16
- package/dist/esm/taro-ar-camera-core.entry.js +3 -16
- package/dist/esm/taro-audio-core.entry.js +2 -54
- package/dist/esm/taro-aweme-data-core.entry.js +3 -16
- package/dist/esm/taro-block-core.entry.js +2 -12
- package/dist/esm/taro-button-core.entry.js +3 -71
- package/dist/esm/taro-camera-core.entry.js +3 -16
- package/dist/esm/taro-canvas-core.entry.js +2 -47
- package/dist/esm/taro-channel-live-core.entry.js +3 -16
- package/dist/esm/taro-channel-video-core.entry.js +3 -16
- package/dist/esm/taro-checkbox-core_2.entry.js +2 -119
- package/dist/esm/taro-comment-detail-core.entry.js +3 -16
- package/dist/esm/taro-comment-list-core.entry.js +3 -16
- package/dist/esm/taro-contact-button-core.entry.js +3 -16
- package/dist/esm/taro-cover-image-core.entry.js +2 -30
- package/dist/esm/taro-cover-view-core.entry.js +3 -63
- package/dist/esm/taro-custom-wrapper-core.entry.js +2 -12
- package/dist/esm/taro-double-tap-gesture-handler-core.entry.js +3 -16
- package/dist/esm/taro-draggable-sheet-core.entry.js +3 -16
- package/dist/esm/taro-editor-core.entry.js +3 -16
- package/dist/esm/taro-follow-swan-core.entry.js +3 -16
- package/dist/esm/taro-force-press-gesture-handler-core.entry.js +3 -16
- package/dist/esm/taro-form-core.entry.js +2 -139
- package/dist/esm/taro-functional-page-navigator-core.entry.js +3 -16
- package/dist/esm/taro-grid-builder-core.entry.js +3 -16
- package/dist/esm/taro-grid-view-core.entry.js +3 -16
- package/dist/esm/taro-horizontal-drag-gesture-handler-core.entry.js +3 -16
- package/dist/esm/taro-icon-core.entry.js +3 -28
- package/dist/esm/taro-image-core.entry.js +3 -58
- package/dist/esm/taro-inline-payment-panel-core.entry.js +3 -16
- package/dist/esm/taro-input-core.entry.js +2 -211
- package/dist/esm/taro-keyboard-accessory-core.entry.js +3 -16
- package/dist/esm/taro-label-core.entry.js +2 -13
- package/dist/esm/taro-lifestyle-core.entry.js +3 -16
- package/dist/esm/taro-like-core.entry.js +3 -16
- package/dist/esm/taro-list-builder-core.entry.js +3 -16
- package/dist/esm/taro-list-view-core.entry.js +3 -16
- package/dist/esm/taro-live-player-core.entry.js +3 -16
- package/dist/esm/taro-live-pusher-core.entry.js +3 -16
- package/dist/esm/taro-login-core.entry.js +3 -16
- package/dist/esm/taro-long-press-gesture-handler-core.entry.js +3 -16
- package/dist/esm/taro-lottie-core.entry.js +3 -16
- package/dist/esm/taro-map-core.entry.js +3 -1332
- package/dist/esm/taro-match-media-core.entry.js +3 -16
- package/dist/esm/taro-movable-area-core_2.entry.js +3 -479
- package/dist/esm/taro-native-slot-core.entry.js +3 -16
- package/dist/esm/taro-navigation-bar-core.entry.js +3 -16
- package/dist/esm/taro-navigator-core.entry.js +4 -71
- package/dist/esm/taro-nested-scroll-body-core.entry.js +3 -16
- package/dist/esm/taro-nested-scroll-header-core.entry.js +3 -16
- package/dist/esm/taro-official-account-core.entry.js +3 -16
- package/dist/esm/taro-open-container-core.entry.js +3 -16
- package/dist/esm/taro-open-data-core.entry.js +3 -16
- package/dist/esm/taro-page-container-core.entry.js +3 -16
- package/dist/esm/taro-page-meta-core.entry.js +3 -16
- package/dist/esm/taro-pan-gesture-handler-core.entry.js +3 -16
- package/dist/esm/taro-picker-core_2.entry.js +3 -686
- package/dist/esm/taro-picker-view-column-core_2.entry.js +4 -176
- package/dist/esm/taro-progress-core.entry.js +2 -37
- package/dist/esm/taro-pull-to-refresh-core.entry.js +4 -263
- package/dist/esm/taro-radio-core_2.entry.js +2 -133
- package/dist/esm/taro-rich-text-core.entry.js +2 -71
- package/dist/esm/taro-root-portal-core.entry.js +3 -16
- package/dist/esm/taro-rtc-room-core.entry.js +3 -16
- package/dist/esm/taro-rtc-room-item-core.entry.js +3 -16
- package/dist/esm/taro-scale-gesture-handler-core.entry.js +3 -16
- package/dist/esm/taro-script-core.entry.js +3 -16
- package/dist/esm/taro-scroll-view-core.entry.js +5 -168
- package/dist/esm/taro-share-element-core.entry.js +3 -16
- package/dist/esm/taro-slider-core.entry.js +2 -161
- package/dist/esm/taro-slot-core.entry.js +3 -16
- package/dist/esm/taro-snapshot-core.entry.js +3 -16
- package/dist/esm/taro-span-core.entry.js +3 -16
- package/dist/esm/taro-sticky-header-core.entry.js +3 -16
- package/dist/esm/taro-sticky-section-core.entry.js +3 -16
- package/dist/esm/taro-swiper-core_2.entry.js +6 -420
- package/dist/esm/taro-switch-core.entry.js +2 -60
- package/dist/esm/taro-tab-item-core.entry.js +3 -16
- package/dist/esm/taro-tabbar.entry.js +7 -345
- package/dist/esm/taro-tabs-core.entry.js +3 -16
- package/dist/esm/taro-tap-gesture-handler-core.entry.js +3 -16
- package/dist/esm/taro-text-core.entry.js +2 -23
- package/dist/esm/taro-textarea-core.entry.js +2 -159
- package/dist/esm/taro-vertical-drag-gesture-handler-core.entry.js +3 -16
- package/dist/esm/taro-video-control_3.entry.js +5 -720
- package/dist/esm/taro-view-core.entry.js +4 -68
- package/dist/esm/taro-voip-room-core.entry.js +3 -16
- package/dist/esm/taro-web-view-core.entry.js +2 -25
- package/dist/esm/text-a3b91b23.js +23 -0
- package/dist/esm/textarea-c722fd22.js +159 -0
- package/dist/esm/video-c663f267.js +720 -0
- package/dist/esm/view-965a491b.js +68 -0
- package/dist/esm/voip-room-da8085ad.js +16 -0
- package/dist/esm/web-view-8f780a19.js +25 -0
- package/dist/hydrate/index.js +46 -0
- package/dist/taro-components/index.esm.js +1 -0
- package/dist/taro-components/p-00e72620.entry.js +1 -0
- package/dist/taro-components/p-03b54b0b.entry.js +1 -0
- package/dist/taro-components/p-046319d8.js +1 -0
- package/dist/taro-components/p-052dbbd9.entry.js +1 -0
- package/dist/taro-components/p-0543d7fe.entry.js +1 -0
- package/dist/taro-components/p-06b4ba14.entry.js +1 -0
- package/dist/taro-components/p-0741aa7f.entry.js +1 -0
- package/dist/taro-components/p-0795a339.entry.js +1 -0
- package/dist/taro-components/p-08cfc9f4.js +1 -0
- package/dist/taro-components/p-094ba888.entry.js +1 -0
- package/dist/taro-components/p-0a92117d.entry.js +1 -0
- package/dist/taro-components/p-0ecccbb4.entry.js +1 -0
- package/dist/taro-components/p-0f829f27.entry.js +1 -0
- package/dist/taro-components/p-127391cb.entry.js +1 -0
- package/dist/taro-components/p-137eb06b.js +1 -0
- package/dist/taro-components/p-13d455f5.js +1 -0
- package/dist/taro-components/p-145ba514.entry.js +1 -0
- package/dist/taro-components/p-14795db7.entry.js +1 -0
- package/dist/taro-components/p-150a55a3.js +1 -0
- package/dist/taro-components/p-168a6355.entry.js +1 -0
- package/dist/taro-components/p-1ad94bf6.entry.js +1 -0
- package/dist/taro-components/p-1c19d1dd.js +1 -0
- package/dist/taro-components/{p-5534e4e7.entry.js → p-1c317d71.js} +1 -1
- package/dist/taro-components/p-1d2b2125.entry.js +1 -0
- package/dist/taro-components/p-1d3cfd13.js +1 -0
- package/dist/taro-components/{p-bf7ed5a8.entry.js → p-1f517ad8.js} +1 -1
- package/dist/taro-components/p-24079388.js +1 -0
- package/dist/taro-components/p-245fcd36.js +1 -0
- package/dist/taro-components/{p-826f9f91.entry.js → p-24ef5f8c.js} +1 -1
- package/dist/taro-components/p-2602cd28.entry.js +1 -0
- package/dist/taro-components/p-27622761.js +1 -0
- package/dist/taro-components/p-2884aec2.js +1 -0
- package/dist/taro-components/{p-3b0507ef.entry.js → p-2b1afb2c.js} +1 -1
- package/dist/taro-components/p-2b8fae1c.entry.js +1 -0
- package/dist/taro-components/p-2bf24716.js +1 -0
- package/dist/taro-components/p-2c48f6cb.entry.js +1 -0
- package/dist/taro-components/p-2e5daff6.js +1 -0
- package/dist/taro-components/p-2e841a1d.js +1 -0
- package/dist/taro-components/p-2f7b8388.js +1 -0
- package/dist/taro-components/p-2f9a4db4.js +1 -0
- package/dist/taro-components/p-2ff21d39.entry.js +1 -0
- package/dist/taro-components/p-31c75fd5.js +1 -0
- package/dist/taro-components/p-31f2f332.entry.js +1 -0
- package/dist/taro-components/{p-a5b32f59.entry.js → p-35aac6e0.js} +1 -1
- package/dist/taro-components/p-36e83be9.js +1 -0
- package/dist/taro-components/p-3837f853.entry.js +1 -0
- package/dist/taro-components/p-38598f5b.entry.js +1 -0
- package/dist/taro-components/p-3a6ec908.js +1 -0
- package/dist/taro-components/p-3d450082.js +1 -0
- package/dist/taro-components/p-3f4449b0.entry.js +1 -0
- package/dist/taro-components/p-3f650751.entry.js +1 -0
- package/dist/taro-components/{p-dc6b5615.entry.js → p-45c3b3bf.js} +1 -1
- package/dist/taro-components/p-4818a4aa.js +1 -0
- package/dist/taro-components/p-496a9932.entry.js +1 -0
- package/dist/taro-components/p-49e4d6ae.js +1 -0
- package/dist/taro-components/p-4bb83c7d.js +1 -0
- package/dist/taro-components/p-4cf49968.js +1 -0
- package/dist/taro-components/{p-bd7ab2a5.entry.js → p-4d79a974.js} +1 -1
- package/dist/taro-components/p-4f4b08df.entry.js +1 -0
- package/dist/taro-components/p-50ffadb4.js +1 -0
- package/dist/taro-components/p-52c6b16d.js +1 -0
- package/dist/taro-components/{p-7717e485.entry.js → p-53b69659.js} +1 -1
- package/dist/taro-components/{p-12075d7a.entry.js → p-553b9dc1.js} +1 -1
- package/dist/taro-components/p-5570a53e.entry.js +1 -0
- package/dist/taro-components/p-582a0e0f.entry.js +1 -0
- package/dist/taro-components/p-582cbc31.js +1 -0
- package/dist/taro-components/p-58a709ad.js +1 -0
- package/dist/taro-components/p-5b216b21.entry.js +1 -0
- package/dist/taro-components/p-5bd11f73.entry.js +1 -0
- package/dist/taro-components/p-5bd1aed9.js +1 -0
- package/dist/taro-components/p-5cbc249f.entry.js +1 -0
- package/dist/taro-components/p-5ea030de.entry.js +1 -0
- package/dist/taro-components/p-5fe2d7cb.js +1 -0
- package/dist/taro-components/p-61b23b53.entry.js +1 -0
- package/dist/taro-components/p-6223811d.entry.js +1 -0
- package/dist/taro-components/p-64a5e7a7.js +1 -0
- package/dist/taro-components/p-65c51f07.entry.js +1 -0
- package/dist/taro-components/{p-82d74d01.entry.js → p-67c4cf7e.js} +1 -1
- package/dist/taro-components/p-680d07ac.js +1 -0
- package/dist/taro-components/p-69147844.entry.js +1 -0
- package/dist/taro-components/p-6c93b540.js +1 -0
- package/dist/taro-components/{p-a8d628f8.entry.js → p-6e2f460d.js} +1 -1
- package/dist/taro-components/p-73aae58b.entry.js +1 -0
- package/dist/taro-components/p-74ac6c91.entry.js +1 -0
- package/dist/taro-components/p-773bed49.entry.js +1 -0
- package/dist/taro-components/p-79d3e109.js +1 -0
- package/dist/taro-components/p-7bb097de.js +1 -0
- package/dist/taro-components/p-7c455a65.entry.js +1 -0
- package/dist/taro-components/p-7ea32cac.js +1 -0
- package/dist/taro-components/p-806e3c4f.entry.js +1 -0
- package/dist/taro-components/p-80fa0c7c.entry.js +1 -0
- package/dist/taro-components/p-81abb053.entry.js +1 -0
- package/dist/taro-components/p-88048df9.entry.js +1 -0
- package/dist/taro-components/p-8837c166.entry.js +1 -0
- package/dist/taro-components/p-8b1b513a.js +1 -0
- package/dist/taro-components/p-8bc13e66.entry.js +1 -0
- package/dist/taro-components/p-8c520f1e.entry.js +1 -0
- package/dist/taro-components/p-8d26b600.js +1 -0
- package/dist/taro-components/{p-e62af250.entry.js → p-8d996705.js} +1 -1
- package/dist/taro-components/p-8e3bac82.js +1 -0
- package/dist/taro-components/p-8f2a4c66.entry.js +1 -0
- package/dist/taro-components/p-915aa78c.js +1 -0
- package/dist/taro-components/p-922047dd.entry.js +1 -0
- package/dist/taro-components/p-92a39ad9.entry.js +1 -0
- package/dist/taro-components/p-931bba41.entry.js +1 -0
- package/dist/taro-components/p-93e3cefb.js +1 -0
- package/dist/taro-components/p-956bc9d5.js +1 -0
- package/dist/taro-components/p-9581e63b.entry.js +1 -0
- package/dist/taro-components/p-96f65f1d.js +1 -0
- package/dist/taro-components/p-975f1b0c.entry.js +1 -0
- package/dist/taro-components/p-99383bc2.js +1 -0
- package/dist/taro-components/p-99863698.js +1 -0
- package/dist/taro-components/p-9a0251c5.entry.js +1 -0
- package/dist/taro-components/p-9d4a6732.js +1 -0
- package/dist/taro-components/p-9f953e69.entry.js +1 -0
- package/dist/taro-components/p-a0ff43d9.entry.js +1 -0
- package/dist/taro-components/p-a17695f9.js +1 -0
- package/dist/taro-components/p-a293fa24.js +1 -0
- package/dist/taro-components/p-a2cb2d73.js +1 -0
- package/dist/taro-components/p-a3b266d5.entry.js +1 -0
- package/dist/taro-components/p-a5798672.js +1 -0
- package/dist/taro-components/{p-31998393.entry.js → p-a6c178f3.js} +1 -1
- package/dist/taro-components/p-ab09cecf.entry.js +1 -0
- package/dist/taro-components/p-aca7aea1.entry.js +1 -0
- package/dist/taro-components/p-ad865966.entry.js +1 -0
- package/dist/taro-components/p-ae203a0b.entry.js +1 -0
- package/dist/taro-components/p-af5e0304.js +1 -0
- package/dist/taro-components/p-b19ea38d.entry.js +1 -0
- package/dist/taro-components/{p-bf71dd37.entry.js → p-b2979101.js} +1 -1
- package/dist/taro-components/p-b70027b2.entry.js +1 -0
- package/dist/taro-components/p-b74ad8e4.js +1 -0
- package/dist/taro-components/p-b89414d7.entry.js +1 -0
- package/dist/taro-components/p-b90499e4.entry.js +1 -0
- package/dist/taro-components/p-b9446784.js +1 -0
- package/dist/taro-components/p-baed3510.js +1 -0
- package/dist/taro-components/p-bcceaa84.entry.js +1 -0
- package/dist/taro-components/{p-ee17fc14.entry.js → p-bd7613d0.js} +1 -1
- package/dist/taro-components/{p-f2fb4988.entry.js → p-beae3fe0.js} +1 -1
- package/dist/taro-components/p-c0687b94.js +1 -0
- package/dist/taro-components/p-c09eb36f.entry.js +1 -0
- package/dist/taro-components/p-c3a8af99.js +1 -0
- package/dist/taro-components/p-c3cf4884.js +1 -0
- package/dist/taro-components/p-c3d39813.entry.js +1 -0
- package/dist/taro-components/p-c48b7222.js +1 -0
- package/dist/taro-components/p-c5666cb2.js +1 -0
- package/dist/taro-components/p-c5c71b89.entry.js +1 -0
- package/dist/taro-components/p-c66f2363.entry.js +1 -0
- package/dist/taro-components/{p-27392e58.entry.js → p-c7f9e228.js} +1 -1
- package/dist/taro-components/p-c84153ae.entry.js +1 -0
- package/dist/taro-components/p-c872ed50.js +1 -0
- package/dist/taro-components/p-c9a01a1f.js +1 -0
- package/dist/taro-components/{p-ca3322c9.entry.js → p-cae824d1.js} +1 -1
- package/dist/taro-components/p-cdeebf36.entry.js +1 -0
- package/dist/taro-components/p-d11af89d.js +1 -0
- package/dist/taro-components/{p-07864e09.entry.js → p-d1a1274a.js} +1 -1
- package/dist/taro-components/p-d45a75d9.entry.js +1 -0
- package/dist/taro-components/p-d5773721.js +1 -0
- package/dist/taro-components/p-d5f0d48c.js +1 -0
- package/dist/taro-components/p-d6be1ceb.entry.js +1 -0
- package/dist/taro-components/p-da4fcba5.js +1 -0
- package/dist/taro-components/p-dd0d7e20.js +1 -0
- package/dist/taro-components/p-df86c576.entry.js +1 -0
- package/dist/taro-components/p-e0de8e35.entry.js +1 -0
- package/dist/taro-components/p-e298a2c3.entry.js +1 -0
- package/dist/taro-components/p-e3de8581.js +1 -0
- package/dist/taro-components/p-e6565988.entry.js +1 -0
- package/dist/taro-components/p-e6643dc0.entry.js +1 -0
- package/dist/taro-components/p-e87d4a75.entry.js +1 -0
- package/dist/taro-components/p-ea5d6d41.entry.js +1 -0
- package/dist/taro-components/p-eac9f475.entry.js +1 -0
- package/dist/taro-components/p-edab4852.entry.js +1 -0
- package/dist/taro-components/p-ee9bae70.js +1 -0
- package/dist/taro-components/p-eee2d2f9.entry.js +1 -0
- package/dist/taro-components/p-f441b5e7.js +1 -0
- package/dist/taro-components/p-f52b25aa.entry.js +1 -0
- package/dist/taro-components/p-f57bed55.entry.js +1 -0
- package/dist/taro-components/p-f6e5beeb.js +1 -0
- package/dist/taro-components/p-fa398c76.entry.js +1 -0
- package/dist/taro-components/p-fe1c20a9.entry.js +1 -0
- package/dist/taro-components/p-febc484e.js +1 -0
- package/dist/taro-components/p-ffcacf9a.entry.js +1 -0
- package/dist/taro-components/p-fff1a810.js +1 -0
- package/dist/taro-components/taro-components.esm.js +1 -1
- package/dist/types/components/ad/index.d.ts +1 -0
- package/dist/types/components/ad-custom/index.d.ts +1 -0
- package/dist/types/components/animation-video/index.d.ts +1 -0
- package/dist/types/components/animation-view/index.d.ts +1 -0
- package/dist/types/components/ar-camera/index.d.ts +1 -0
- package/dist/types/components/audio/index.d.ts +1 -0
- package/dist/types/components/aweme-data/index.d.ts +1 -0
- package/dist/types/components/block/index.d.ts +1 -0
- package/dist/types/components/button/index.d.ts +1 -0
- package/dist/types/components/camera/index.d.ts +1 -0
- package/dist/types/components/canvas/index.d.ts +1 -0
- package/dist/types/components/channel-live/index.d.ts +1 -0
- package/dist/types/components/channel-video/index.d.ts +1 -0
- package/dist/types/components/checkbox/index.d.ts +2 -0
- package/dist/types/components/comment/index.d.ts +2 -0
- package/dist/types/components/contact-button/index.d.ts +1 -0
- package/dist/types/components/cover-image/index.d.ts +1 -0
- package/dist/types/components/cover-view/index.d.ts +1 -0
- package/dist/types/components/custom-wrapper/index.d.ts +1 -0
- package/dist/types/components/double-tap-gesture-handler/index.d.ts +1 -0
- package/dist/types/components/draggable-sheet/index.d.ts +1 -0
- package/dist/types/components/editor/index.d.ts +1 -0
- package/dist/types/components/follow-swan/index.d.ts +1 -0
- package/dist/types/components/force-press-gesture-handler/index.d.ts +1 -0
- package/dist/types/components/form/index.d.ts +1 -0
- package/dist/types/components/functional-page-navigator/index.d.ts +1 -0
- package/dist/types/components/grid-builder/index.d.ts +1 -0
- package/dist/types/components/grid-view/index.d.ts +1 -0
- package/dist/types/components/horizontal-drag-gesture-handler/index.d.ts +1 -0
- package/dist/types/components/icon/index.d.ts +1 -0
- package/dist/types/components/image/index.d.ts +1 -0
- package/dist/types/components/index.d.ts +87 -0
- package/dist/types/components/inline-payment-panel/index.d.ts +1 -0
- package/dist/types/components/input/index.d.ts +1 -0
- package/dist/types/components/keyboard-accessory/index.d.ts +1 -0
- package/dist/types/components/label/index.d.ts +1 -0
- package/dist/types/components/lifestyle/index.d.ts +1 -0
- package/dist/types/components/like/index.d.ts +1 -0
- package/dist/types/components/list-builder/index.d.ts +1 -0
- package/dist/types/components/list-view/index.d.ts +1 -0
- package/dist/types/components/live-player/index.d.ts +1 -0
- package/dist/types/components/live-pusher/index.d.ts +1 -0
- package/dist/types/components/login/index.d.ts +1 -0
- package/dist/types/components/long-press-gesture-handler/index.d.ts +1 -0
- package/dist/types/components/lottie/index.d.ts +1 -0
- package/dist/types/components/map/index.d.ts +1 -0
- package/dist/types/components/match-media/index.d.ts +1 -0
- package/dist/types/components/movable-area/index.d.ts +2 -0
- package/dist/types/components/navigation-bar/index.d.ts +1 -0
- package/dist/types/components/navigator/index.d.ts +1 -0
- package/dist/types/components/nested-scroll-body/index.d.ts +1 -0
- package/dist/types/components/nested-scroll-header/index.d.ts +1 -0
- package/dist/types/components/official-account/index.d.ts +1 -0
- package/dist/types/components/open-container/index.d.ts +1 -0
- package/dist/types/components/open-data/index.d.ts +1 -0
- package/dist/types/components/page-container/index.d.ts +1 -0
- package/dist/types/components/page-meta/index.d.ts +1 -0
- package/dist/types/components/pan-gesture-handler/index.d.ts +1 -0
- package/dist/types/components/picker/index.d.ts +2 -0
- package/dist/types/components/picker-view/index.d.ts +2 -0
- package/dist/types/components/progress/index.d.ts +1 -0
- package/dist/types/components/pull-to-refresh/index.d.ts +1 -0
- package/dist/types/components/radio/index.d.ts +2 -0
- package/dist/types/components/rich-text/index.d.ts +1 -0
- package/dist/types/components/root-portal/index.d.ts +1 -0
- package/dist/types/components/rtc-room/index.d.ts +2 -0
- package/dist/types/components/scale-gesture-handler/index.d.ts +1 -0
- package/dist/types/components/script/index.d.ts +1 -0
- package/dist/types/components/scroll-view/index.d.ts +1 -0
- package/dist/types/components/share-element/index.d.ts +1 -0
- package/dist/types/components/slider/index.d.ts +1 -0
- package/dist/types/components/slot/index.d.ts +2 -0
- package/dist/types/components/snapshot/index.d.ts +1 -0
- package/dist/types/components/span/index.d.ts +1 -0
- package/dist/types/components/sticky-header/index.d.ts +1 -0
- package/dist/types/components/sticky-section/index.d.ts +1 -0
- package/dist/types/components/swiper/index.d.ts +2 -0
- package/dist/types/components/switch/index.d.ts +1 -0
- package/dist/types/components/tabbar/index.d.ts +2 -0
- package/dist/types/components/tabs/index.d.ts +2 -0
- package/dist/types/components/tap-gesture-handler/index.d.ts +1 -0
- package/dist/types/components/text/index.d.ts +1 -0
- package/dist/types/components/textarea/index.d.ts +1 -0
- package/dist/types/components/vertical-drag-gesture-handler/index.d.ts +1 -0
- package/dist/types/components/video/index.d.ts +3 -0
- package/dist/types/components/view/index.d.ts +1 -0
- package/dist/types/components/voip-room/index.d.ts +1 -0
- package/dist/types/components/web-view/index.d.ts +1 -0
- package/dist/types/index.d.ts +1 -1
- package/package.json +5 -5
- package/dist/taro-components/p-00ba8330.entry.js +0 -1
- package/dist/taro-components/p-01285c99.entry.js +0 -1
- package/dist/taro-components/p-028a06be.entry.js +0 -1
- package/dist/taro-components/p-02dfd28a.entry.js +0 -1
- package/dist/taro-components/p-041adaea.entry.js +0 -1
- package/dist/taro-components/p-053f9336.entry.js +0 -1
- package/dist/taro-components/p-0adabf61.entry.js +0 -1
- package/dist/taro-components/p-0ea53611.entry.js +0 -1
- package/dist/taro-components/p-1524f0a7.entry.js +0 -1
- package/dist/taro-components/p-1c499e26.entry.js +0 -1
- package/dist/taro-components/p-1ce39dc0.entry.js +0 -1
- package/dist/taro-components/p-1e0c4a2f.entry.js +0 -1
- package/dist/taro-components/p-1e8b1d53.entry.js +0 -1
- package/dist/taro-components/p-262d3cc6.entry.js +0 -1
- package/dist/taro-components/p-27e67e4c.entry.js +0 -1
- package/dist/taro-components/p-2f681c42.entry.js +0 -1
- package/dist/taro-components/p-2f7ecf80.entry.js +0 -1
- package/dist/taro-components/p-349011e5.entry.js +0 -1
- package/dist/taro-components/p-37774f52.entry.js +0 -1
- package/dist/taro-components/p-3a0afbaa.entry.js +0 -1
- package/dist/taro-components/p-3aabc29c.entry.js +0 -1
- package/dist/taro-components/p-3fe35d51.entry.js +0 -1
- package/dist/taro-components/p-41d62a49.entry.js +0 -1
- package/dist/taro-components/p-452f2d23.entry.js +0 -1
- package/dist/taro-components/p-45415f8a.entry.js +0 -1
- package/dist/taro-components/p-4db97a66.entry.js +0 -1
- package/dist/taro-components/p-523197fa.entry.js +0 -1
- package/dist/taro-components/p-53f2859c.entry.js +0 -1
- package/dist/taro-components/p-553ab0f6.entry.js +0 -1
- package/dist/taro-components/p-589e0de6.entry.js +0 -1
- package/dist/taro-components/p-5e4fa085.entry.js +0 -1
- package/dist/taro-components/p-5efcb8c2.entry.js +0 -1
- package/dist/taro-components/p-5efe8af4.entry.js +0 -1
- package/dist/taro-components/p-64476900.entry.js +0 -1
- package/dist/taro-components/p-64eab0b1.entry.js +0 -1
- package/dist/taro-components/p-67c93469.entry.js +0 -1
- package/dist/taro-components/p-6c93f8b0.entry.js +0 -1
- package/dist/taro-components/p-716f9758.entry.js +0 -1
- package/dist/taro-components/p-72dc94f1.entry.js +0 -1
- package/dist/taro-components/p-763b130b.entry.js +0 -1
- package/dist/taro-components/p-79a3916f.entry.js +0 -1
- package/dist/taro-components/p-82699c7b.entry.js +0 -1
- package/dist/taro-components/p-9108e872.entry.js +0 -1
- package/dist/taro-components/p-96054089.entry.js +0 -1
- package/dist/taro-components/p-98ce7aae.entry.js +0 -1
- package/dist/taro-components/p-9b1d4fbc.entry.js +0 -1
- package/dist/taro-components/p-9cfe7bc7.entry.js +0 -1
- package/dist/taro-components/p-a4b9f9b8.entry.js +0 -1
- package/dist/taro-components/p-aabad1f7.entry.js +0 -1
- package/dist/taro-components/p-ac41c34a.entry.js +0 -1
- package/dist/taro-components/p-b4eb9ea9.entry.js +0 -1
- package/dist/taro-components/p-bd725f0c.entry.js +0 -1
- package/dist/taro-components/p-c27955cc.entry.js +0 -1
- package/dist/taro-components/p-c56d7ae1.entry.js +0 -1
- package/dist/taro-components/p-c7457e18.entry.js +0 -1
- package/dist/taro-components/p-c7e2387f.entry.js +0 -1
- package/dist/taro-components/p-c961a230.entry.js +0 -1
- package/dist/taro-components/p-ced965cb.entry.js +0 -1
- package/dist/taro-components/p-d638dd70.entry.js +0 -1
- package/dist/taro-components/p-d8a90cf1.entry.js +0 -1
- package/dist/taro-components/p-e13bf240.entry.js +0 -1
- package/dist/taro-components/p-e1975260.entry.js +0 -1
- package/dist/taro-components/p-e3354af8.entry.js +0 -1
- package/dist/taro-components/p-e5615469.entry.js +0 -1
- package/dist/taro-components/p-e6f1912a.entry.js +0 -1
- package/dist/taro-components/p-ea77d5fe.entry.js +0 -1
- package/dist/taro-components/p-eb1fe297.entry.js +0 -1
- package/dist/taro-components/p-ecd3afe8.entry.js +0 -1
- package/dist/taro-components/p-f3de0aa9.entry.js +0 -1
- package/dist/taro-components/p-f997a7a2.entry.js +0 -1
- package/dist/taro-components/p-fd0a7b45.entry.js +0 -1
- package/dist/taro-components/p-ffab09c1.entry.js +0 -1
|
@@ -0,0 +1,689 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const index = require('./index-ae99cbcc.js');
|
|
4
|
+
const index$1 = require('./index-b873e40f.js');
|
|
5
|
+
|
|
6
|
+
const TOP = 102;
|
|
7
|
+
const LINE_HEIGHT = 34;
|
|
8
|
+
const MASK_HEIGHT = LINE_HEIGHT * 7;
|
|
9
|
+
|
|
10
|
+
const TaroPickerGroup = class {
|
|
11
|
+
constructor(hostRef) {
|
|
12
|
+
index.registerInstance(this, hostRef);
|
|
13
|
+
this.onColumnChange = index.createEvent(this, "columnChange", 7);
|
|
14
|
+
this.mode = undefined;
|
|
15
|
+
this.range = [];
|
|
16
|
+
this.rangeKey = undefined;
|
|
17
|
+
this.height = undefined;
|
|
18
|
+
this.columnId = undefined;
|
|
19
|
+
this.updateHeight = undefined;
|
|
20
|
+
this.updateDay = undefined;
|
|
21
|
+
this.startY = undefined;
|
|
22
|
+
this.preY = undefined;
|
|
23
|
+
this.hadMove = undefined;
|
|
24
|
+
this.touchEnd = undefined;
|
|
25
|
+
this.isMove = undefined;
|
|
26
|
+
}
|
|
27
|
+
getPosition() {
|
|
28
|
+
const transition = this.touchEnd ? 0.3 : 0;
|
|
29
|
+
const transformValue = `translate3d(0, ${this.height}px, 0)`;
|
|
30
|
+
const transitionValue = `transform ${transition}s`;
|
|
31
|
+
return {
|
|
32
|
+
transform: transformValue,
|
|
33
|
+
'-webkit-transform': transformValue,
|
|
34
|
+
transition: transitionValue,
|
|
35
|
+
'-webkit-transition': transitionValue
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
formulaUnlimitedScroll(range, absoluteHeight, direction) {
|
|
39
|
+
const { height, updateHeight, columnId } = this;
|
|
40
|
+
const factor = direction === 'up' ? 1 : -1;
|
|
41
|
+
this.touchEnd = false;
|
|
42
|
+
// 点击超过范围,点击到补帧时,先跳到另一端的补帧
|
|
43
|
+
updateHeight(-range * factor * LINE_HEIGHT + height, columnId);
|
|
44
|
+
// 再做过渡动画
|
|
45
|
+
requestAnimationFrame(() => {
|
|
46
|
+
this.touchEnd = true;
|
|
47
|
+
const index = Math.round(absoluteHeight / -LINE_HEIGHT) + range * factor;
|
|
48
|
+
const relativeHeight = TOP - LINE_HEIGHT * index;
|
|
49
|
+
updateHeight(relativeHeight, columnId, true);
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
async handleMoveStart(clientY) {
|
|
53
|
+
// 记录第一次的点击位置
|
|
54
|
+
this.startY = clientY;
|
|
55
|
+
this.preY = clientY;
|
|
56
|
+
this.hadMove = false;
|
|
57
|
+
}
|
|
58
|
+
async handleMoving(clientY) {
|
|
59
|
+
const y = clientY;
|
|
60
|
+
const deltaY = y - this.preY;
|
|
61
|
+
this.preY = y;
|
|
62
|
+
this.touchEnd = false;
|
|
63
|
+
if (Math.abs(y - this.startY) > 10)
|
|
64
|
+
this.hadMove = true;
|
|
65
|
+
let newPos = this.height + deltaY;
|
|
66
|
+
// 处理时间选择器的无限滚动
|
|
67
|
+
if (this.mode === 'time') {
|
|
68
|
+
if (this.columnId === '0') {
|
|
69
|
+
// 数字 28 来自于 4 格补帧 + 0 ~ 23 的 24 格,共 28 格
|
|
70
|
+
if (newPos > TOP - LINE_HEIGHT * 3) {
|
|
71
|
+
newPos = TOP - LINE_HEIGHT * 27 + deltaY;
|
|
72
|
+
}
|
|
73
|
+
if (newPos < TOP - LINE_HEIGHT * 28) {
|
|
74
|
+
newPos = TOP - LINE_HEIGHT * 4 + deltaY;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
else if (this.columnId === '1') {
|
|
78
|
+
if (newPos > TOP - LINE_HEIGHT * 3) {
|
|
79
|
+
newPos = TOP - LINE_HEIGHT * 63 + deltaY;
|
|
80
|
+
}
|
|
81
|
+
if (newPos < TOP - LINE_HEIGHT * 64) {
|
|
82
|
+
newPos = TOP - LINE_HEIGHT * 4 + deltaY;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
this.updateHeight(newPos, this.columnId);
|
|
87
|
+
}
|
|
88
|
+
async handleMoveEnd(clientY) {
|
|
89
|
+
const { mode, range, height, updateHeight, columnId } = this;
|
|
90
|
+
const max = 0;
|
|
91
|
+
const min = -LINE_HEIGHT * (range.length - 1);
|
|
92
|
+
const endY = clientY;
|
|
93
|
+
this.touchEnd = true;
|
|
94
|
+
// touchEnd 时的高度,可能带小数点,需要再处理
|
|
95
|
+
let absoluteHeight;
|
|
96
|
+
if (!this.hadMove) {
|
|
97
|
+
/** 点击 */
|
|
98
|
+
// 屏幕高度
|
|
99
|
+
const windowHeight = window.innerHeight;
|
|
100
|
+
// picker__mask 垂直方向距离屏幕顶部的高度
|
|
101
|
+
const relativeY = windowHeight - MASK_HEIGHT / 2;
|
|
102
|
+
absoluteHeight = height - TOP - (endY - relativeY);
|
|
103
|
+
// 处理时间选择器的无限滚动
|
|
104
|
+
if (mode === 'time') {
|
|
105
|
+
if (columnId === '0') {
|
|
106
|
+
// 点击上溢出
|
|
107
|
+
// absoluteHeight 是相对模块中点来算的,所以会算多半行,这时要减去这半行,即2.5行
|
|
108
|
+
if (absoluteHeight > -LINE_HEIGHT * 2.5) {
|
|
109
|
+
return this.formulaUnlimitedScroll(24, absoluteHeight, 'up');
|
|
110
|
+
}
|
|
111
|
+
// 点击下溢出
|
|
112
|
+
if (absoluteHeight < -LINE_HEIGHT * 28.5) {
|
|
113
|
+
return this.formulaUnlimitedScroll(24, absoluteHeight, 'down');
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
else if (columnId === '1') {
|
|
117
|
+
// 点击上溢出
|
|
118
|
+
if (absoluteHeight > -LINE_HEIGHT * 2.5) {
|
|
119
|
+
return this.formulaUnlimitedScroll(60, absoluteHeight, 'up');
|
|
120
|
+
}
|
|
121
|
+
// 点击下溢出
|
|
122
|
+
if (absoluteHeight < -LINE_HEIGHT * 64.5) {
|
|
123
|
+
return this.formulaUnlimitedScroll(60, absoluteHeight, 'down');
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
/** 滚动 */
|
|
130
|
+
absoluteHeight = height - TOP;
|
|
131
|
+
}
|
|
132
|
+
// 边界情况处理
|
|
133
|
+
if (absoluteHeight > max)
|
|
134
|
+
absoluteHeight = 0;
|
|
135
|
+
if (absoluteHeight < min)
|
|
136
|
+
absoluteHeight = min;
|
|
137
|
+
// 先按公式算出 index, 再用此 index 算出一个整数高度
|
|
138
|
+
const index = Math.round(absoluteHeight / -LINE_HEIGHT);
|
|
139
|
+
const relativeHeight = TOP - LINE_HEIGHT * index;
|
|
140
|
+
if (this.mode === 'date' && typeof this.updateDay === 'function') {
|
|
141
|
+
if (this.columnId === '0') {
|
|
142
|
+
this.updateDay(+this.range[index].replace(/[^0-9]/gi, ''), 0);
|
|
143
|
+
}
|
|
144
|
+
if (this.columnId === '1') {
|
|
145
|
+
this.updateDay(+this.range[index].replace(/[^0-9]/gi, ''), 1);
|
|
146
|
+
}
|
|
147
|
+
if (this.columnId === '2') {
|
|
148
|
+
this.updateDay(+this.range[index].replace(/[^0-9]/gi, ''), 2);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
updateHeight(relativeHeight, columnId, mode === 'time');
|
|
152
|
+
this.onColumnChange.emit({
|
|
153
|
+
columnId,
|
|
154
|
+
height: relativeHeight,
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
onMouseDown(e) {
|
|
158
|
+
this.isMove = true;
|
|
159
|
+
this.handleMoveStart(e.clientY);
|
|
160
|
+
}
|
|
161
|
+
onMouseMove(e) {
|
|
162
|
+
if (!this.isMove)
|
|
163
|
+
return;
|
|
164
|
+
this.handleMoving(e.clientY);
|
|
165
|
+
}
|
|
166
|
+
onMouseMoveEnd(e) {
|
|
167
|
+
if (!this.isMove)
|
|
168
|
+
return;
|
|
169
|
+
this.isMove = false;
|
|
170
|
+
this.handleMoveEnd(e.clientY);
|
|
171
|
+
}
|
|
172
|
+
onTouchStart(e) {
|
|
173
|
+
this.handleMoveStart(e.changedTouches[0].clientY);
|
|
174
|
+
}
|
|
175
|
+
onTouchMove(e) {
|
|
176
|
+
this.handleMoving(e.changedTouches[0].clientY);
|
|
177
|
+
}
|
|
178
|
+
onTouchEnd(e) {
|
|
179
|
+
this.handleMoveEnd(e.changedTouches[0].clientY);
|
|
180
|
+
}
|
|
181
|
+
render() {
|
|
182
|
+
const { range, rangeKey } = this;
|
|
183
|
+
const pickerItem = range.map(item => {
|
|
184
|
+
const content = rangeKey ? item[rangeKey] : item;
|
|
185
|
+
return (index.h("div", { class: 'weui-picker__item' }, content));
|
|
186
|
+
});
|
|
187
|
+
return (index.h(index.Host, { class: 'weui-picker__group' }, index.h("div", { class: 'weui-picker__mask' }), index.h("div", { class: 'weui-picker__indicator' }), index.h("div", { class: 'weui-picker__content', style: this.getPosition() }, pickerItem)));
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
function getTimeRange(begin, end) {
|
|
192
|
+
const range = [];
|
|
193
|
+
for (let i = begin; i <= end; i++) {
|
|
194
|
+
range.push(`${i < 10 ? '0' : ''}${i}`);
|
|
195
|
+
}
|
|
196
|
+
return range;
|
|
197
|
+
}
|
|
198
|
+
const hoursRange = [
|
|
199
|
+
'20',
|
|
200
|
+
'21',
|
|
201
|
+
'22',
|
|
202
|
+
'23',
|
|
203
|
+
...getTimeRange(0, 23),
|
|
204
|
+
'00',
|
|
205
|
+
'01',
|
|
206
|
+
'02',
|
|
207
|
+
'03'
|
|
208
|
+
];
|
|
209
|
+
const minutesRange = [
|
|
210
|
+
'56',
|
|
211
|
+
'57',
|
|
212
|
+
'58',
|
|
213
|
+
'59',
|
|
214
|
+
...getTimeRange(0, 59),
|
|
215
|
+
'00',
|
|
216
|
+
'01',
|
|
217
|
+
'02',
|
|
218
|
+
'03'
|
|
219
|
+
];
|
|
220
|
+
/**
|
|
221
|
+
* 校验传入的 value 是否合法
|
|
222
|
+
*/
|
|
223
|
+
function verifyValue(value, range) {
|
|
224
|
+
if (!isNaN(+value) && value >= 0 && value < range.length)
|
|
225
|
+
return true;
|
|
226
|
+
return false;
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* 检验传入的 time value 是否合法
|
|
230
|
+
*/
|
|
231
|
+
function verifyTime(value) {
|
|
232
|
+
if (!/^\d{1,2}:\d{1,2}$/.test(value))
|
|
233
|
+
return false;
|
|
234
|
+
const time = value.split(':').map(num => +num);
|
|
235
|
+
if (time[0] < 0 || time[0] > 23)
|
|
236
|
+
return false;
|
|
237
|
+
if (time[1] < 0 || time[1] > 59)
|
|
238
|
+
return false;
|
|
239
|
+
return true;
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* 比较时间
|
|
243
|
+
* return t1 <= t2
|
|
244
|
+
*/
|
|
245
|
+
function compareTime(t1, t2) {
|
|
246
|
+
const t1List = t1.split(':').map(i => +i);
|
|
247
|
+
const t2List = t2.split(':').map(i => +i);
|
|
248
|
+
if (t1List[0] < t2List[0])
|
|
249
|
+
return true;
|
|
250
|
+
if (t1List[0] === t2List[0] && t1List[1] <= t2List[1])
|
|
251
|
+
return true;
|
|
252
|
+
return false;
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* 校验日期合法性,返回合法性和日期数组
|
|
256
|
+
*/
|
|
257
|
+
function verifyDate(dateStr) {
|
|
258
|
+
if (!dateStr)
|
|
259
|
+
return false;
|
|
260
|
+
const date = new Date(dateStr.replace(/-/g, '/'));
|
|
261
|
+
return isNaN(date.getMonth()) ? false : date;
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* 获取当月最大天数
|
|
265
|
+
*/
|
|
266
|
+
function getMaxDay(year, month) {
|
|
267
|
+
if (month === 4 || month === 6 || month === 9 || month === 11)
|
|
268
|
+
return 30;
|
|
269
|
+
if (month === 2) {
|
|
270
|
+
if ((year % 4 === 0 && year % 100 !== 0) || year % 400 === 0)
|
|
271
|
+
return 29;
|
|
272
|
+
else
|
|
273
|
+
return 28;
|
|
274
|
+
}
|
|
275
|
+
return 31;
|
|
276
|
+
}
|
|
277
|
+
function formatValue(value) {
|
|
278
|
+
let res;
|
|
279
|
+
if (Array.isArray(value)) {
|
|
280
|
+
res = value.map(item => String(item));
|
|
281
|
+
}
|
|
282
|
+
else {
|
|
283
|
+
res = value;
|
|
284
|
+
}
|
|
285
|
+
return res;
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* 获取时间数组
|
|
289
|
+
*/
|
|
290
|
+
function getDateRange(start, end) {
|
|
291
|
+
const range = [];
|
|
292
|
+
for (let i = start; i <= end; i++) {
|
|
293
|
+
range.push(i);
|
|
294
|
+
}
|
|
295
|
+
return range;
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* 获取年份区间数组
|
|
299
|
+
*/
|
|
300
|
+
function getYearRange(start, end) {
|
|
301
|
+
return getDateRange(start, end);
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
304
|
+
* 获取月份区间数组
|
|
305
|
+
*/
|
|
306
|
+
function getMonthRange(start, end, year) {
|
|
307
|
+
let rangeStart = 1;
|
|
308
|
+
let rangeEnd = 12;
|
|
309
|
+
// 当前年份等于开始年份,由开始对应的月份约束开始值
|
|
310
|
+
if (start.getFullYear() === year) {
|
|
311
|
+
rangeStart = start.getMonth() + 1;
|
|
312
|
+
}
|
|
313
|
+
// 当前年份等于结束年份,由结束对应的月份约束结束值
|
|
314
|
+
if (end.getFullYear() === year) {
|
|
315
|
+
rangeEnd = end.getMonth() + 1;
|
|
316
|
+
}
|
|
317
|
+
return getDateRange(rangeStart, rangeEnd);
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* 获取日期区间数组
|
|
321
|
+
*/
|
|
322
|
+
function getDayRange(start, end, year, month) {
|
|
323
|
+
let rangeStart = 1;
|
|
324
|
+
let rangeEnd = getMaxDay(year, month);
|
|
325
|
+
if (start.getFullYear() === year && start.getMonth() + 1 === month) {
|
|
326
|
+
rangeStart = start.getDate();
|
|
327
|
+
}
|
|
328
|
+
if (end.getFullYear() === year && end.getMonth() + 1 === month) {
|
|
329
|
+
rangeEnd = end.getDate();
|
|
330
|
+
}
|
|
331
|
+
return getDateRange(rangeStart, rangeEnd);
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
const indexCss = ".weui-mask{z-index:1000;background:rgba(0,0,0,.6);position:fixed;inset:0}.weui-mask_transparent{z-index:1000;position:fixed;inset:0}@keyframes weuiSlideUp{0%{transform:translateY(100%)}to{transform:translate(0,0)}}.weui-animate-slide-up{animation:.3s forwards weuiSlideUp}@keyframes weuiSlideDown{0%{transform:translate(0,0)}to{transform:translateY(100%)}}.weui-animate-slide-down{animation:.3s forwards weuiSlideDown}@keyframes weuiFadeIn{0%{opacity:0}to{opacity:1}}.weui-animate-fade-in{animation:.3s forwards weuiFadeIn}@keyframes weuiFadeOut{0%{opacity:1}to{opacity:0}}.weui-animate-fade-out{animation:.3s forwards weuiFadeOut}.weui-picker{box-sizing:border-box;z-index:5000;background-color:var(--weui-BG-2);width:100%;padding-left:0;padding-left:constant(safe-area-inset-left);padding-left:env(safe-area-inset-left);padding-right:0;padding-right:constant(safe-area-inset-right);padding-right:env(safe-area-inset-right);backface-visibility:hidden;transition:transform .3s;position:fixed;bottom:0;left:0;transform:translateY(100%)}.weui-picker__hd{text-align:center;background-color:#fff;padding:9px 15px;font-size:17px;display:flex;position:relative}.weui-picker__hd:after{content:\" \";color:#e5e5e5;transform-origin:0 100%;border-bottom:1px solid #e5e5e5;height:1px;position:absolute;bottom:0;left:0;right:0;transform:scaleY(.5)}.weui-picker__action{color:#1aad19;flex:1;display:block}.weui-picker__action:first-child{text-align:left;color:#888}.weui-picker__action:last-child{text-align:right}.weui-picker__bd{background-color:#fff;height:238px;display:flex;position:relative;overflow:hidden}.weui-picker__group{flex:1;height:100%;position:relative}.weui-picker__mask{z-index:3;background-color:transparent;background-image:linear-gradient(rgba(255,255,255,.95),rgba(255,255,255,.6)),linear-gradient(rgba(255,255,255,.6),rgba(255,255,255,.95));background-position:top,bottom;background-repeat:no-repeat;background-size:100% 102px;background-attachment:scroll,scroll;background-origin:padding-box,padding-box;background-clip:border-box,border-box;width:100%;height:100%;margin:0 auto;position:absolute;top:0;left:0;transform:translateZ(0)}.weui-picker__indicator{z-index:3;width:100%;height:34px;position:absolute;top:102px;left:0}.weui-picker__indicator:before{content:\" \";color:#e5e5e5;transform-origin:0 0;border-top:1px solid #e5e5e5;height:1px;position:absolute;top:0;left:0;right:0;transform:scaleY(.5)}.weui-picker__indicator:after{content:\" \";color:#e5e5e5;transform-origin:0 100%;border-bottom:1px solid #e5e5e5;height:1px;position:absolute;bottom:0;left:0;right:0;transform:scaleY(.5)}.weui-picker__content{width:100%;position:absolute;top:0;left:0}.weui-picker__item{text-align:center;color:#000;text-overflow:ellipsis;white-space:nowrap;height:34px;padding:0;line-height:34px;overflow:hidden}.weui-picker__item_disabled{color:#999}.weui-picker,.weui-picker__hd{font-size:12px}";
|
|
335
|
+
|
|
336
|
+
const Picker = class {
|
|
337
|
+
constructor(hostRef) {
|
|
338
|
+
index.registerInstance(this, hostRef);
|
|
339
|
+
this.onChange = index.createEvent(this, "change", 7);
|
|
340
|
+
this.onColumnChange = index.createEvent(this, "columnchange", 7);
|
|
341
|
+
this.onCancel = index.createEvent(this, "cancel", 7);
|
|
342
|
+
this.index = [];
|
|
343
|
+
// 展示 Picker
|
|
344
|
+
this.showPicker = () => {
|
|
345
|
+
if (this.disabled)
|
|
346
|
+
return;
|
|
347
|
+
this.height = this.getHeightByIndex();
|
|
348
|
+
this.hidden = false;
|
|
349
|
+
};
|
|
350
|
+
this.getHeightByIndex = () => {
|
|
351
|
+
const height = this.index.map(i => {
|
|
352
|
+
let factor = 0;
|
|
353
|
+
if (this.mode === 'time') {
|
|
354
|
+
factor = LINE_HEIGHT * 4;
|
|
355
|
+
}
|
|
356
|
+
return TOP - LINE_HEIGHT * i - factor;
|
|
357
|
+
});
|
|
358
|
+
return height;
|
|
359
|
+
};
|
|
360
|
+
// 隐藏 picker
|
|
361
|
+
this.hidePicker = () => {
|
|
362
|
+
this.fadeOut = true;
|
|
363
|
+
setTimeout(() => {
|
|
364
|
+
this.hidden = true;
|
|
365
|
+
this.fadeOut = false;
|
|
366
|
+
}, 350);
|
|
367
|
+
};
|
|
368
|
+
// 点击确定按钮
|
|
369
|
+
this.handleChange = () => {
|
|
370
|
+
this.hidePicker();
|
|
371
|
+
this.index = this.height.map(h => (TOP - h) / LINE_HEIGHT);
|
|
372
|
+
let value = this.index.length && this.mode !== 'selector'
|
|
373
|
+
? this.index
|
|
374
|
+
: this.index[0];
|
|
375
|
+
if (this.mode === 'time') {
|
|
376
|
+
const range = [hoursRange.slice(), minutesRange.slice()];
|
|
377
|
+
const timeArr = this.index.map((n, i) => range[i][n]);
|
|
378
|
+
this.index = timeArr.map(item => parseInt(item));
|
|
379
|
+
value = timeArr.join(':');
|
|
380
|
+
}
|
|
381
|
+
if (this.mode === 'date') {
|
|
382
|
+
const { _start, _end, _updateValue } = this.pickerDate;
|
|
383
|
+
const currentYear = _updateValue[0];
|
|
384
|
+
const currentMonth = _updateValue[1];
|
|
385
|
+
const yearRange = getYearRange(_start.getFullYear(), _end.getFullYear());
|
|
386
|
+
const monthRange = getMonthRange(_start, _end, currentYear);
|
|
387
|
+
const dayRange = getDayRange(_start, _end, currentYear, currentMonth);
|
|
388
|
+
const year = yearRange[this.index[0]];
|
|
389
|
+
const month = monthRange[this.index[1]];
|
|
390
|
+
const day = dayRange[this.index[2]];
|
|
391
|
+
if (this.fields === 'year') {
|
|
392
|
+
value = [year];
|
|
393
|
+
}
|
|
394
|
+
else if (this.fields === 'month') {
|
|
395
|
+
value = [year, month];
|
|
396
|
+
}
|
|
397
|
+
else {
|
|
398
|
+
value = [year, month, day];
|
|
399
|
+
}
|
|
400
|
+
value = value
|
|
401
|
+
.map(item => {
|
|
402
|
+
return item < 10 ? `0${item}` : item;
|
|
403
|
+
})
|
|
404
|
+
.join('-');
|
|
405
|
+
}
|
|
406
|
+
this.value = value;
|
|
407
|
+
this.pickerValue = this.value;
|
|
408
|
+
this.onChange.emit({
|
|
409
|
+
value
|
|
410
|
+
});
|
|
411
|
+
};
|
|
412
|
+
this.handleColumnChange = (e) => {
|
|
413
|
+
const { columnId, height } = e.detail;
|
|
414
|
+
this.onColumnChange.emit({
|
|
415
|
+
column: Number(columnId),
|
|
416
|
+
value: (TOP - height) / LINE_HEIGHT
|
|
417
|
+
});
|
|
418
|
+
};
|
|
419
|
+
// 点击取消按钮或蒙层
|
|
420
|
+
this.handleCancel = () => {
|
|
421
|
+
this.hidePicker();
|
|
422
|
+
this.onCancel.emit();
|
|
423
|
+
};
|
|
424
|
+
this.updateHeight = (height, columnId, needRevise = false) => {
|
|
425
|
+
const temp = [...this.height];
|
|
426
|
+
temp[columnId] = height;
|
|
427
|
+
this.height = temp;
|
|
428
|
+
// time picker 必须在规定时间范围内,因此需要在 touchEnd 做修正
|
|
429
|
+
if (needRevise) {
|
|
430
|
+
let { start, end } = this;
|
|
431
|
+
if (!verifyTime(start))
|
|
432
|
+
start = '00:00';
|
|
433
|
+
if (!verifyTime(end))
|
|
434
|
+
end = '23:59';
|
|
435
|
+
if (!compareTime(start, end))
|
|
436
|
+
return;
|
|
437
|
+
const range = [hoursRange.slice(), minutesRange.slice()];
|
|
438
|
+
const timeList = this.height.map(h => (TOP - h) / LINE_HEIGHT);
|
|
439
|
+
const timeStr = timeList.map((n, i) => range[i][n]).join(':');
|
|
440
|
+
if (!compareTime(start, timeStr)) {
|
|
441
|
+
// 修正到 start
|
|
442
|
+
const height = start
|
|
443
|
+
.split(':')
|
|
444
|
+
.map(i => TOP - LINE_HEIGHT * (+i + 4));
|
|
445
|
+
requestAnimationFrame(() => (this.height = height));
|
|
446
|
+
}
|
|
447
|
+
else if (!compareTime(timeStr, end)) {
|
|
448
|
+
// 修正到 end
|
|
449
|
+
const height = end
|
|
450
|
+
.split(':')
|
|
451
|
+
.map(i => TOP - LINE_HEIGHT * (+i + 4));
|
|
452
|
+
requestAnimationFrame(() => (this.height = height));
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
};
|
|
456
|
+
this.updateDay = (value, fields) => {
|
|
457
|
+
const { _start, _end, _updateValue } = this.pickerDate;
|
|
458
|
+
_updateValue[fields] = value;
|
|
459
|
+
const currentYear = _updateValue[0];
|
|
460
|
+
const currentMonth = _updateValue[1];
|
|
461
|
+
const currentDay = _updateValue[2];
|
|
462
|
+
// 滚动年份
|
|
463
|
+
if (fields === 0) {
|
|
464
|
+
const monthRange = getMonthRange(_start, _end, currentYear);
|
|
465
|
+
const max = monthRange[monthRange.length - 1];
|
|
466
|
+
const min = monthRange[0];
|
|
467
|
+
if (currentMonth > max)
|
|
468
|
+
_updateValue[1] = max;
|
|
469
|
+
if (currentMonth < min)
|
|
470
|
+
_updateValue[1] = min;
|
|
471
|
+
const index = monthRange.indexOf(_updateValue[1]);
|
|
472
|
+
const height = TOP - LINE_HEIGHT * index;
|
|
473
|
+
this.updateDay(_updateValue[1], 1);
|
|
474
|
+
this.updateHeight(height, '1');
|
|
475
|
+
}
|
|
476
|
+
else if (fields === 1) {
|
|
477
|
+
const dayRange = getDayRange(_start, _end, currentYear, currentMonth);
|
|
478
|
+
const max = dayRange[dayRange.length - 1];
|
|
479
|
+
const min = dayRange[0];
|
|
480
|
+
if (currentDay > max)
|
|
481
|
+
_updateValue[2] = max;
|
|
482
|
+
if (currentDay < min)
|
|
483
|
+
_updateValue[2] = min;
|
|
484
|
+
const index = dayRange.indexOf(_updateValue[2]);
|
|
485
|
+
const height = TOP - LINE_HEIGHT * index;
|
|
486
|
+
this.updateDay(_updateValue[2], 2);
|
|
487
|
+
this.updateHeight(height, '2');
|
|
488
|
+
}
|
|
489
|
+
};
|
|
490
|
+
// 单列选择器
|
|
491
|
+
this.getSelector = () => {
|
|
492
|
+
return (index.h("taro-picker-group", { range: this.range, rangeKey: this.rangeKey, height: this.height[0], updateHeight: this.updateHeight, columnId: '0' }));
|
|
493
|
+
};
|
|
494
|
+
// 多列选择器
|
|
495
|
+
this.getMultiSelector = () => {
|
|
496
|
+
return this.range.map((range, index$1) => {
|
|
497
|
+
return (index.h("taro-picker-group", { range: range, rangeKey: this.rangeKey, height: this.height[index$1], updateHeight: this.updateHeight, onColumnChange: this.handleColumnChange, columnId: String(index$1) }));
|
|
498
|
+
});
|
|
499
|
+
};
|
|
500
|
+
// 时间选择器
|
|
501
|
+
this.getTimeSelector = () => {
|
|
502
|
+
const hourRange = hoursRange.slice();
|
|
503
|
+
const minRange = minutesRange.slice();
|
|
504
|
+
return [
|
|
505
|
+
index.h("taro-picker-group", { mode: 'time', range: hourRange, height: this.height[0], updateHeight: this.updateHeight, columnId: '0' }),
|
|
506
|
+
index.h("taro-picker-group", { mode: 'time', range: minRange, height: this.height[1], updateHeight: this.updateHeight, columnId: '1' })
|
|
507
|
+
];
|
|
508
|
+
};
|
|
509
|
+
// 日期选择器
|
|
510
|
+
this.getDateSelector = () => {
|
|
511
|
+
const { fields, height } = this;
|
|
512
|
+
const { _start, _end, _updateValue } = this.pickerDate;
|
|
513
|
+
const currentYear = _updateValue[0];
|
|
514
|
+
const currentMonth = _updateValue[1];
|
|
515
|
+
const yearRange = getYearRange(_start.getFullYear(), _end.getFullYear())
|
|
516
|
+
.map(item => `${item}年`);
|
|
517
|
+
const monthRange = getMonthRange(_start, _end, currentYear)
|
|
518
|
+
.map(item => `${item < 10 ? `0${item}` : item}月`);
|
|
519
|
+
const dayRange = getDayRange(_start, _end, currentYear, currentMonth)
|
|
520
|
+
.map(item => `${item < 10 ? `0${item}` : item}日`);
|
|
521
|
+
const renderView = [
|
|
522
|
+
index.h("taro-picker-group", { mode: 'date', range: yearRange, height: height[0], updateDay: this.updateDay, updateHeight: this.updateHeight, columnId: '0' })
|
|
523
|
+
];
|
|
524
|
+
if (fields === 'month' || fields === 'day') {
|
|
525
|
+
renderView.push(index.h("taro-picker-group", { mode: 'date', range: monthRange, height: height[1], updateDay: this.updateDay, updateHeight: this.updateHeight, columnId: '1' }));
|
|
526
|
+
}
|
|
527
|
+
if (fields === 'day') {
|
|
528
|
+
renderView.push(index.h("taro-picker-group", { mode: 'date', range: dayRange, height: height[2], updateDay: this.updateDay, updateHeight: this.updateHeight, columnId: '2' }));
|
|
529
|
+
}
|
|
530
|
+
return renderView;
|
|
531
|
+
};
|
|
532
|
+
this.mode = 'selector';
|
|
533
|
+
this.disabled = false;
|
|
534
|
+
this.range = [];
|
|
535
|
+
this.rangeKey = undefined;
|
|
536
|
+
this.value = undefined;
|
|
537
|
+
this.start = '';
|
|
538
|
+
this.end = '';
|
|
539
|
+
this.fields = 'day';
|
|
540
|
+
this.name = '';
|
|
541
|
+
this.textProps = {};
|
|
542
|
+
this.pickerValue = [];
|
|
543
|
+
this.height = [];
|
|
544
|
+
this.hidden = true;
|
|
545
|
+
this.fadeOut = false;
|
|
546
|
+
this.isWillLoadCalled = false;
|
|
547
|
+
}
|
|
548
|
+
componentWillLoad() {
|
|
549
|
+
this.isWillLoadCalled = true;
|
|
550
|
+
this.handleProps();
|
|
551
|
+
}
|
|
552
|
+
componentDidLoad() {
|
|
553
|
+
if (this.overlay) {
|
|
554
|
+
document.body.appendChild(this.overlay);
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
disconnectedCallback() {
|
|
558
|
+
var _a;
|
|
559
|
+
if (this.overlay) {
|
|
560
|
+
(_a = this.overlay.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(this.overlay);
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
onPropsChange() {
|
|
564
|
+
if (!this.isWillLoadCalled)
|
|
565
|
+
return;
|
|
566
|
+
this.handleProps();
|
|
567
|
+
}
|
|
568
|
+
handleProps() {
|
|
569
|
+
const { mode, start, end } = this;
|
|
570
|
+
if (mode === 'selector') {
|
|
571
|
+
const value = this.value;
|
|
572
|
+
this.index = [verifyValue(value, this.range) ? Math.floor(value) : 0];
|
|
573
|
+
}
|
|
574
|
+
else if (mode === 'multiSelector') {
|
|
575
|
+
const value = this.value;
|
|
576
|
+
this.index = [];
|
|
577
|
+
this.range.forEach((range, index) => {
|
|
578
|
+
const val = value === null || value === void 0 ? void 0 : value[index];
|
|
579
|
+
const item = verifyValue(val, range) ? Math.floor(val) : 0;
|
|
580
|
+
this.index.push(item);
|
|
581
|
+
});
|
|
582
|
+
}
|
|
583
|
+
else if (mode === 'time') {
|
|
584
|
+
let value = this.value;
|
|
585
|
+
// check value...
|
|
586
|
+
if (!verifyTime(value)) {
|
|
587
|
+
console.warn('time picker value illegal');
|
|
588
|
+
value = '0:0';
|
|
589
|
+
}
|
|
590
|
+
const time = value.split(':').map(n => +n);
|
|
591
|
+
this.index = time;
|
|
592
|
+
}
|
|
593
|
+
else if (mode === 'date') {
|
|
594
|
+
const value = this.value;
|
|
595
|
+
let _value = verifyDate(value) || new Date(new Date().setHours(0, 0, 0, 0)); // 没传值或值的合法性错误默认今天时间
|
|
596
|
+
const _start = verifyDate(start) || new Date('1970/01/01');
|
|
597
|
+
const _end = verifyDate(end) || new Date('2999/01/01');
|
|
598
|
+
// 时间区间有效性
|
|
599
|
+
if (!(_start <= _end)) {
|
|
600
|
+
throw new Error(`Picker start time must be less than end time.`);
|
|
601
|
+
}
|
|
602
|
+
if (!(_value >= _start && _value <= _end)) {
|
|
603
|
+
_value = _start;
|
|
604
|
+
}
|
|
605
|
+
const currentYear = _value.getFullYear();
|
|
606
|
+
const currentMonth = _value.getMonth() + 1;
|
|
607
|
+
const currentDay = _value.getDate();
|
|
608
|
+
const yearRange = getYearRange(_start.getFullYear(), _end.getFullYear());
|
|
609
|
+
const monthRange = getMonthRange(_start, _end, currentYear);
|
|
610
|
+
const dayRange = getDayRange(_start, _end, currentYear, currentMonth);
|
|
611
|
+
this.index = [
|
|
612
|
+
yearRange.indexOf(currentYear),
|
|
613
|
+
monthRange.indexOf(currentMonth),
|
|
614
|
+
dayRange.indexOf(currentDay)
|
|
615
|
+
];
|
|
616
|
+
if (!this.pickerDate ||
|
|
617
|
+
this.pickerDate._value.getTime() !== _value.getTime() ||
|
|
618
|
+
this.pickerDate._start.getTime() !== _start.getTime() ||
|
|
619
|
+
this.pickerDate._end.getTime() !== _end.getTime()) {
|
|
620
|
+
this.pickerDate = {
|
|
621
|
+
_value,
|
|
622
|
+
_start,
|
|
623
|
+
_end,
|
|
624
|
+
_updateValue: [
|
|
625
|
+
currentYear,
|
|
626
|
+
currentMonth,
|
|
627
|
+
currentDay
|
|
628
|
+
]
|
|
629
|
+
};
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
else {
|
|
633
|
+
throw new Error(`Picker not support "${mode}" mode.`);
|
|
634
|
+
}
|
|
635
|
+
// Prop 变化时,无论是否正在显示弹层,都更新 height 值
|
|
636
|
+
this.height = this.getHeightByIndex();
|
|
637
|
+
// 同步表单 value 值,用于 form submit
|
|
638
|
+
this.pickerValue = this.value;
|
|
639
|
+
if (mode === 'date') {
|
|
640
|
+
const val = this.pickerValue;
|
|
641
|
+
if (this.fields === 'month') {
|
|
642
|
+
this.pickerValue = val.split('-').slice(0, 2).join('-');
|
|
643
|
+
}
|
|
644
|
+
else if (this.fields === 'year') {
|
|
645
|
+
this.pickerValue = val.split('-')[0];
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
render() {
|
|
650
|
+
var _a, _b;
|
|
651
|
+
const { name, mode, fadeOut, hidden } = this;
|
|
652
|
+
// 选项条
|
|
653
|
+
let pickerGroup;
|
|
654
|
+
switch (mode) {
|
|
655
|
+
case 'multiSelector':
|
|
656
|
+
pickerGroup = this.getMultiSelector();
|
|
657
|
+
break;
|
|
658
|
+
case 'time':
|
|
659
|
+
pickerGroup = this.getTimeSelector();
|
|
660
|
+
break;
|
|
661
|
+
case 'date':
|
|
662
|
+
pickerGroup = this.getDateSelector();
|
|
663
|
+
break;
|
|
664
|
+
default:
|
|
665
|
+
pickerGroup = this.getSelector();
|
|
666
|
+
}
|
|
667
|
+
// 动画类名控制逻辑
|
|
668
|
+
const clsMask = index$1.classnames('weui-mask', 'weui-animate-fade-in', {
|
|
669
|
+
'weui-animate-fade-out': fadeOut
|
|
670
|
+
});
|
|
671
|
+
const clsSlider = index$1.classnames('weui-picker', 'weui-animate-slide-up', {
|
|
672
|
+
'weui-animate-slide-down': fadeOut
|
|
673
|
+
});
|
|
674
|
+
const shouldDivHidden = hidden ? { display: 'none' } : {};
|
|
675
|
+
return (index.h(index.Host, null, index.h("div", { onClick: this.showPicker }, index.h("slot", null), index.h("input", { type: 'hidden', name: name, value: formatValue(this.pickerValue) })), index.h("div", { class: 'weui-picker__overlay', style: shouldDivHidden, ref: el => { this.overlay = el; } }, index.h("div", { class: clsMask, onClick: this.handleCancel }), index.h("div", { class: clsSlider }, index.h("div", { class: 'weui-picker__hd' }, index.h("div", { class: 'weui-picker__action', onClick: this.handleCancel }, (_a = this.textProps.cancelText) !== null && _a !== void 0 ? _a : '取消'), index.h("div", { class: 'weui-picker__action', onClick: this.handleChange }, (_b = this.textProps.okText) !== null && _b !== void 0 ? _b : '确定')), index.h("div", { class: 'weui-picker__bd' }, pickerGroup), index.h("input", { type: 'hidden', name: name, value: formatValue(this.pickerValue) })))));
|
|
676
|
+
}
|
|
677
|
+
get el() { return index.getElement(this); }
|
|
678
|
+
static get watchers() { return {
|
|
679
|
+
"mode": ["onPropsChange"],
|
|
680
|
+
"value": ["onPropsChange"],
|
|
681
|
+
"range": ["onPropsChange"],
|
|
682
|
+
"start": ["onPropsChange"],
|
|
683
|
+
"end": ["onPropsChange"]
|
|
684
|
+
}; }
|
|
685
|
+
};
|
|
686
|
+
Picker.style = indexCss;
|
|
687
|
+
|
|
688
|
+
exports.Picker = Picker;
|
|
689
|
+
exports.TaroPickerGroup = TaroPickerGroup;
|