vant 4.0.0-beta.1 → 4.0.0-rc.2
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/changelog.generated.md +24 -268
- package/es/action-bar/ActionBar.d.ts +2 -2
- package/es/action-bar/ActionBar.mjs +1 -0
- package/es/action-bar/index.css +1 -1
- package/es/action-bar/index.d.ts +2 -1
- package/es/action-bar/index.mjs +2 -0
- package/es/action-bar-button/ActionBarButton.d.ts +2 -2
- package/es/action-bar-button/ActionBarButton.mjs +1 -0
- package/es/action-bar-button/index.css +1 -1
- package/es/action-bar-button/index.d.ts +2 -1
- package/es/action-bar-button/index.mjs +2 -0
- package/es/action-bar-icon/ActionBarIcon.d.ts +2 -2
- package/es/action-bar-icon/ActionBarIcon.mjs +1 -0
- package/es/action-bar-icon/index.css +1 -1
- package/es/action-bar-icon/index.d.ts +2 -1
- package/es/action-bar-icon/index.mjs +2 -0
- package/es/action-sheet/ActionSheet.d.ts +1 -1
- package/es/action-sheet/ActionSheet.mjs +1 -0
- package/es/action-sheet/index.css +1 -1
- package/es/action-sheet/index.d.ts +1 -0
- package/es/action-sheet/index.mjs +2 -0
- package/es/address-edit/AddressEdit.d.ts +1 -1
- package/es/address-edit/AddressEdit.mjs +1 -0
- package/es/address-edit/index.css +1 -1
- package/es/address-edit/index.d.ts +1 -0
- package/es/address-edit/index.mjs +2 -0
- package/es/address-edit/style/index.mjs +7 -1
- package/es/address-list/AddressList.d.ts +1 -1
- package/es/address-list/AddressList.mjs +1 -0
- package/es/address-list/index.css +1 -1
- package/es/address-list/index.d.ts +1 -0
- package/es/address-list/index.mjs +2 -0
- package/es/area/Area.d.ts +7 -4
- package/es/area/Area.mjs +1 -0
- package/es/area/index.d.ts +5 -2
- package/es/area/index.mjs +2 -0
- package/es/area/style/index.mjs +7 -0
- package/es/area/utils.mjs +9 -2
- package/es/badge/Badge.d.ts +2 -2
- package/es/badge/Badge.mjs +1 -0
- package/es/badge/index.css +1 -1
- package/es/badge/index.d.ts +2 -1
- package/es/badge/index.mjs +2 -0
- package/es/button/Button.d.ts +1 -1
- package/es/button/Button.mjs +1 -0
- package/es/button/index.css +1 -1
- package/es/button/index.d.ts +1 -0
- package/es/button/index.mjs +2 -0
- package/es/calendar/Calendar.d.ts +1 -1
- package/es/calendar/Calendar.mjs +5 -3
- package/es/calendar/index.css +1 -1
- package/es/calendar/index.d.ts +1 -0
- package/es/calendar/index.mjs +2 -0
- package/es/calendar/style/index.mjs +7 -1
- package/es/card/Card.d.ts +1 -1
- package/es/card/Card.mjs +1 -0
- package/es/card/index.css +1 -1
- package/es/card/index.d.ts +1 -0
- package/es/card/index.mjs +2 -0
- package/es/cascader/Cascader.d.ts +1 -1
- package/es/cascader/Cascader.mjs +1 -0
- package/es/cascader/index.css +1 -1
- package/es/cascader/index.d.ts +1 -0
- package/es/cascader/index.mjs +2 -0
- package/es/cell/Cell.d.ts +2 -2
- package/es/cell/Cell.mjs +1 -0
- package/es/cell/index.css +1 -1
- package/es/cell/index.d.ts +2 -1
- package/es/cell/index.mjs +2 -0
- package/es/cell-group/CellGroup.d.ts +2 -2
- package/es/cell-group/CellGroup.mjs +1 -0
- package/es/cell-group/index.css +1 -1
- package/es/cell-group/index.d.ts +2 -1
- package/es/cell-group/index.mjs +2 -0
- package/es/checkbox/Checkbox.d.ts +1 -1
- package/es/checkbox/Checkbox.mjs +1 -0
- package/es/checkbox/index.css +1 -1
- package/es/checkbox/index.d.ts +1 -0
- package/es/checkbox/index.mjs +2 -0
- package/es/checkbox-group/CheckboxGroup.d.ts +1 -1
- package/es/checkbox-group/CheckboxGroup.mjs +1 -0
- package/es/checkbox-group/index.d.ts +1 -0
- package/es/checkbox-group/index.mjs +2 -0
- package/es/circle/Circle.d.ts +1 -1
- package/es/circle/Circle.mjs +1 -0
- package/es/circle/index.css +1 -1
- package/es/circle/index.d.ts +1 -0
- package/es/circle/index.mjs +2 -0
- package/es/col/Col.d.ts +2 -2
- package/es/col/Col.mjs +1 -0
- package/es/col/index.d.ts +2 -1
- package/es/col/index.mjs +2 -0
- package/es/collapse/Collapse.d.ts +1 -1
- package/es/collapse/Collapse.mjs +1 -0
- package/es/collapse/index.d.ts +1 -0
- package/es/collapse/index.mjs +2 -0
- package/es/collapse-item/CollapseItem.d.ts +2 -2
- package/es/collapse-item/CollapseItem.mjs +1 -0
- package/es/collapse-item/index.css +1 -1
- package/es/collapse-item/index.d.ts +2 -1
- package/es/collapse-item/index.mjs +2 -0
- package/es/composables/use-lazy-render.mjs +9 -5
- package/es/composables/use-lock-scroll.mjs +4 -1
- package/es/composables/use-visibility-change.mjs +6 -3
- package/es/config-provider/ConfigProvider.d.ts +2 -2
- package/es/config-provider/ConfigProvider.mjs +3 -2
- package/es/config-provider/index.d.ts +2 -1
- package/es/config-provider/index.mjs +2 -0
- package/es/contact-card/ContactCard.d.ts +1 -1
- package/es/contact-card/ContactCard.mjs +1 -0
- package/es/contact-card/index.css +1 -1
- package/es/contact-card/index.d.ts +1 -0
- package/es/contact-card/index.mjs +2 -0
- package/es/contact-edit/ContactEdit.d.ts +1 -1
- package/es/contact-edit/ContactEdit.mjs +1 -0
- package/es/contact-edit/index.css +1 -1
- package/es/contact-edit/index.d.ts +1 -0
- package/es/contact-edit/index.mjs +2 -0
- package/es/contact-list/ContactList.d.ts +1 -1
- package/es/contact-list/ContactList.mjs +1 -0
- package/es/contact-list/index.css +1 -1
- package/es/contact-list/index.d.ts +1 -0
- package/es/contact-list/index.mjs +2 -0
- package/es/count-down/CountDown.d.ts +1 -1
- package/es/count-down/CountDown.mjs +1 -0
- package/es/count-down/index.css +1 -1
- package/es/count-down/index.d.ts +1 -0
- package/es/count-down/index.mjs +2 -0
- package/es/coupon/Coupon.d.ts +1 -1
- package/es/coupon/index.css +1 -1
- package/es/coupon/index.d.ts +1 -1
- package/es/coupon/utils.mjs +3 -1
- package/es/coupon-cell/CouponCell.d.ts +2 -2
- package/es/coupon-cell/CouponCell.mjs +1 -0
- package/es/coupon-cell/index.css +1 -1
- package/es/coupon-cell/index.d.ts +2 -1
- package/es/coupon-cell/index.mjs +2 -0
- package/es/coupon-list/CouponList.d.ts +1 -1
- package/es/coupon-list/CouponList.mjs +1 -0
- package/es/coupon-list/index.css +1 -1
- package/es/coupon-list/index.d.ts +1 -0
- package/es/coupon-list/index.mjs +2 -0
- package/es/coupon-list/style/index.mjs +3 -3
- package/es/date-picker/DatePicker.d.ts +7 -4
- package/es/date-picker/DatePicker.mjs +11 -10
- package/es/date-picker/index.d.ts +5 -2
- package/es/date-picker/index.mjs +2 -0
- package/es/date-picker/style/index.mjs +7 -0
- package/es/date-picker/utils.d.ts +2 -1
- package/es/dialog/Dialog.d.ts +1 -1
- package/es/dialog/Dialog.mjs +2 -1
- package/es/dialog/index.css +1 -1
- package/es/dialog/index.d.ts +1 -0
- package/es/dialog/index.mjs +2 -0
- package/es/dialog/types.d.ts +1 -1
- package/es/divider/Divider.d.ts +2 -2
- package/es/divider/Divider.mjs +2 -1
- package/es/divider/index.css +1 -1
- package/es/divider/index.d.ts +2 -1
- package/es/divider/index.mjs +3 -1
- package/es/dropdown-item/DropdownItem.d.ts +3 -3
- package/es/dropdown-item/DropdownItem.mjs +2 -1
- package/es/dropdown-item/index.css +1 -1
- package/es/dropdown-item/index.d.ts +3 -2
- package/es/dropdown-item/index.mjs +3 -1
- package/es/dropdown-menu/DropdownMenu.d.ts +2 -2
- package/es/dropdown-menu/DropdownMenu.mjs +2 -1
- package/es/dropdown-menu/index.css +1 -1
- package/es/dropdown-menu/index.d.ts +2 -1
- package/es/dropdown-menu/index.mjs +3 -1
- package/es/empty/Empty.d.ts +2 -2
- package/es/empty/Empty.mjs +2 -1
- package/es/empty/index.css +1 -1
- package/es/empty/index.d.ts +2 -1
- package/es/empty/index.mjs +3 -1
- package/es/field/Field.d.ts +1 -1
- package/es/field/Field.mjs +11 -3
- package/es/field/index.css +1 -1
- package/es/field/index.d.ts +1 -0
- package/es/field/index.mjs +3 -1
- package/es/form/Form.d.ts +1 -1
- package/es/form/Form.mjs +2 -1
- package/es/form/index.d.ts +1 -0
- package/es/form/index.mjs +3 -1
- package/es/grid/Grid.d.ts +2 -2
- package/es/grid/Grid.mjs +2 -1
- package/es/grid/index.d.ts +2 -1
- package/es/grid/index.mjs +3 -1
- package/es/grid-item/GridItem.d.ts +2 -2
- package/es/grid-item/GridItem.mjs +2 -1
- package/es/grid-item/index.css +1 -1
- package/es/grid-item/index.d.ts +2 -1
- package/es/grid-item/index.mjs +3 -1
- package/es/icon/Icon.d.ts +2 -2
- package/es/icon/Icon.mjs +2 -1
- package/es/icon/index.d.ts +2 -1
- package/es/icon/index.mjs +3 -1
- package/es/image/Image.d.ts +5 -1
- package/es/image/Image.mjs +5 -2
- package/es/image/index.css +1 -1
- package/es/image/index.d.ts +4 -0
- package/es/image/index.mjs +3 -1
- package/es/image-preview/ImagePreview.d.ts +1 -1
- package/es/image-preview/ImagePreview.mjs +2 -1
- package/es/image-preview/ImagePreviewItem.mjs +10 -2
- package/es/image-preview/index.css +1 -1
- package/es/image-preview/index.d.ts +1 -0
- package/es/image-preview/index.mjs +2 -0
- package/es/index-anchor/IndexAnchor.d.ts +2 -2
- package/es/index-anchor/IndexAnchor.mjs +2 -1
- package/es/index-anchor/index.css +1 -1
- package/es/index-anchor/index.d.ts +2 -1
- package/es/index-anchor/index.mjs +3 -1
- package/es/index-bar/IndexBar.d.ts +1 -1
- package/es/index-bar/IndexBar.mjs +9 -4
- package/es/index-bar/index.css +1 -1
- package/es/index-bar/index.d.ts +1 -0
- package/es/index-bar/index.mjs +3 -1
- package/es/index.d.ts +2 -1
- package/es/index.mjs +4 -1
- package/es/lazyload/vue-lazyload/lazy-component.mjs +4 -1
- package/es/lazyload/vue-lazyload/lazy-container.mjs +11 -7
- package/es/lazyload/vue-lazyload/lazy-image.mjs +24 -14
- package/es/lazyload/vue-lazyload/lazy.mjs +11 -3
- package/es/lazyload/vue-lazyload/listener.mjs +45 -33
- package/es/lazyload/vue-lazyload/util.mjs +4 -1
- package/es/list/List.d.ts +1 -1
- package/es/list/List.mjs +2 -1
- package/es/list/index.css +1 -1
- package/es/list/index.d.ts +1 -0
- package/es/list/index.mjs +3 -1
- package/es/loading/Loading.d.ts +2 -2
- package/es/loading/Loading.mjs +2 -1
- package/es/loading/index.css +1 -1
- package/es/loading/index.d.ts +2 -1
- package/es/loading/index.mjs +3 -1
- package/es/nav-bar/NavBar.d.ts +1 -1
- package/es/nav-bar/NavBar.mjs +2 -1
- package/es/nav-bar/index.css +1 -1
- package/es/nav-bar/index.d.ts +1 -0
- package/es/nav-bar/index.mjs +3 -1
- package/es/notice-bar/NoticeBar.d.ts +1 -1
- package/es/notice-bar/NoticeBar.mjs +2 -1
- package/es/notice-bar/index.css +1 -1
- package/es/notice-bar/index.d.ts +1 -0
- package/es/notice-bar/index.mjs +3 -1
- package/es/notify/Notify.d.ts +1 -1
- package/es/notify/Notify.mjs +2 -1
- package/es/notify/index.css +1 -1
- package/es/notify/index.d.ts +1 -0
- package/es/notify/index.mjs +2 -0
- package/es/number-keyboard/NumberKeyboard.d.ts +2 -2
- package/es/number-keyboard/NumberKeyboard.mjs +2 -1
- package/es/number-keyboard/index.css +1 -1
- package/es/number-keyboard/index.d.ts +2 -1
- package/es/number-keyboard/index.mjs +3 -1
- package/es/overlay/Overlay.d.ts +2 -2
- package/es/overlay/Overlay.mjs +15 -7
- package/es/overlay/index.css +1 -1
- package/es/overlay/index.d.ts +2 -1
- package/es/overlay/index.mjs +3 -1
- package/es/pagination/Pagination.d.ts +1 -1
- package/es/pagination/Pagination.mjs +2 -1
- package/es/pagination/index.css +1 -1
- package/es/pagination/index.d.ts +1 -0
- package/es/pagination/index.mjs +3 -1
- package/es/password-input/PasswordInput.d.ts +1 -1
- package/es/password-input/PasswordInput.mjs +2 -1
- package/es/password-input/index.css +1 -1
- package/es/password-input/index.d.ts +1 -0
- package/es/password-input/index.mjs +3 -1
- package/es/picker/Picker.d.ts +9 -5
- package/es/picker/Picker.mjs +47 -68
- package/es/picker/PickerColumn.mjs +6 -2
- package/es/picker/PickerToolbar.d.ts +21 -0
- package/es/picker/PickerToolbar.mjs +59 -0
- package/es/picker/index.css +1 -1
- package/es/picker/index.d.ts +5 -2
- package/es/picker/index.mjs +3 -1
- package/es/picker/style/index.mjs +7 -0
- package/es/picker/utils.d.ts +2 -0
- package/es/picker/utils.mjs +14 -7
- package/es/picker-group/PickerGroup.d.ts +39 -0
- package/es/picker-group/PickerGroup.mjs +57 -0
- package/es/picker-group/index.css +1 -0
- package/es/picker-group/index.d.ts +33 -0
- package/es/picker-group/index.mjs +10 -0
- package/es/picker-group/style/index.d.ts +1 -0
- package/es/picker-group/style/index.mjs +9 -0
- package/es/popover/Popover.d.ts +1 -1
- package/es/popover/Popover.mjs +2 -1
- package/es/popover/index.css +1 -1
- package/es/popover/index.d.ts +1 -0
- package/es/popover/index.mjs +3 -1
- package/es/popup/Popup.d.ts +3 -3
- package/es/popup/Popup.mjs +2 -1
- package/es/popup/index.css +1 -1
- package/es/popup/index.d.ts +3 -2
- package/es/popup/index.mjs +3 -1
- package/es/popup/shared.mjs +3 -1
- package/es/progress/Progress.d.ts +2 -2
- package/es/progress/Progress.mjs +2 -1
- package/es/progress/index.css +1 -1
- package/es/progress/index.d.ts +2 -1
- package/es/progress/index.mjs +3 -1
- package/es/pull-refresh/PullRefresh.d.ts +1 -1
- package/es/pull-refresh/PullRefresh.mjs +2 -1
- package/es/pull-refresh/index.css +1 -1
- package/es/pull-refresh/index.d.ts +1 -0
- package/es/pull-refresh/index.mjs +3 -1
- package/es/radio/Radio.d.ts +15 -2
- package/es/radio/Radio.mjs +3 -1
- package/es/radio/index.css +1 -1
- package/es/radio/index.d.ts +1 -0
- package/es/radio/index.mjs +3 -1
- package/es/radio-group/RadioGroup.d.ts +1 -1
- package/es/radio-group/RadioGroup.mjs +2 -1
- package/es/radio-group/index.d.ts +1 -0
- package/es/radio-group/index.mjs +3 -1
- package/es/rate/Rate.d.ts +1 -1
- package/es/rate/Rate.mjs +7 -4
- package/es/rate/index.css +1 -1
- package/es/rate/index.d.ts +1 -0
- package/es/rate/index.mjs +3 -1
- package/es/row/Row.d.ts +2 -2
- package/es/row/Row.mjs +2 -1
- package/es/row/index.d.ts +2 -1
- package/es/row/index.mjs +3 -1
- package/es/search/Search.d.ts +1 -1
- package/es/search/Search.mjs +2 -1
- package/es/search/index.css +1 -1
- package/es/search/index.d.ts +1 -0
- package/es/search/index.mjs +3 -1
- package/es/share-sheet/ShareSheet.d.ts +1 -1
- package/es/share-sheet/ShareSheet.mjs +2 -1
- package/es/share-sheet/index.css +1 -1
- package/es/share-sheet/index.d.ts +1 -0
- package/es/share-sheet/index.mjs +3 -1
- package/es/sidebar/Sidebar.d.ts +1 -1
- package/es/sidebar/Sidebar.mjs +2 -1
- package/es/sidebar/index.css +1 -1
- package/es/sidebar/index.d.ts +1 -0
- package/es/sidebar/index.mjs +3 -1
- package/es/sidebar-item/SidebarItem.d.ts +1 -1
- package/es/sidebar-item/SidebarItem.mjs +2 -1
- package/es/sidebar-item/index.css +1 -1
- package/es/sidebar-item/index.d.ts +1 -0
- package/es/sidebar-item/index.mjs +3 -1
- package/es/skeleton/Skeleton.d.ts +2 -2
- package/es/skeleton/Skeleton.mjs +2 -1
- package/es/skeleton/index.css +1 -1
- package/es/skeleton/index.d.ts +2 -1
- package/es/skeleton/index.mjs +3 -1
- package/es/slider/Slider.d.ts +1 -1
- package/es/slider/Slider.mjs +8 -3
- package/es/slider/index.css +1 -1
- package/es/slider/index.d.ts +1 -0
- package/es/slider/index.mjs +3 -1
- package/es/space/Space.d.ts +2 -2
- package/es/space/Space.mjs +2 -1
- package/es/space/index.d.ts +2 -1
- package/es/space/index.mjs +3 -1
- package/es/step/Step.d.ts +1 -1
- package/es/step/index.css +1 -1
- package/es/step/index.d.ts +1 -1
- package/es/stepper/Stepper.d.ts +1 -1
- package/es/stepper/Stepper.mjs +2 -1
- package/es/stepper/index.css +1 -1
- package/es/stepper/index.d.ts +1 -0
- package/es/stepper/index.mjs +3 -1
- package/es/steps/Steps.d.ts +1 -1
- package/es/steps/Steps.mjs +2 -1
- package/es/steps/index.css +1 -1
- package/es/steps/index.d.ts +1 -0
- package/es/steps/index.mjs +3 -1
- package/es/sticky/Sticky.d.ts +1 -1
- package/es/sticky/Sticky.mjs +2 -1
- package/es/sticky/index.css +1 -1
- package/es/sticky/index.d.ts +1 -0
- package/es/sticky/index.mjs +3 -1
- package/es/style/base.css +1 -1
- package/es/style/css-variables.css +1 -1
- package/es/style/normalize.css +1 -1
- package/es/submit-bar/SubmitBar.d.ts +1 -1
- package/es/submit-bar/SubmitBar.mjs +2 -1
- package/es/submit-bar/index.css +1 -1
- package/es/submit-bar/index.d.ts +1 -0
- package/es/submit-bar/index.mjs +3 -1
- package/es/swipe/Swipe.d.ts +1 -1
- package/es/swipe/Swipe.mjs +15 -7
- package/es/swipe/index.css +1 -1
- package/es/swipe/index.d.ts +1 -0
- package/es/swipe/index.mjs +3 -1
- package/es/swipe-cell/SwipeCell.d.ts +3 -3
- package/es/swipe-cell/SwipeCell.mjs +6 -3
- package/es/swipe-cell/index.d.ts +3 -2
- package/es/swipe-cell/index.mjs +3 -1
- package/es/swipe-item/SwipeItem.d.ts +1 -1
- package/es/swipe-item/index.d.ts +1 -1
- package/es/switch/Switch.d.ts +1 -1
- package/es/switch/Switch.mjs +2 -1
- package/es/switch/index.css +1 -1
- package/es/switch/index.d.ts +1 -0
- package/es/switch/index.mjs +3 -1
- package/es/tab/Tab.d.ts +2 -2
- package/es/tab/Tab.mjs +2 -1
- package/es/tab/index.d.ts +2 -1
- package/es/tab/index.mjs +3 -1
- package/es/tabbar/Tabbar.d.ts +1 -1
- package/es/tabbar/Tabbar.mjs +2 -1
- package/es/tabbar/index.css +1 -1
- package/es/tabbar/index.d.ts +1 -0
- package/es/tabbar/index.mjs +3 -1
- package/es/tabbar-item/TabbarItem.d.ts +1 -1
- package/es/tabbar-item/TabbarItem.mjs +2 -1
- package/es/tabbar-item/index.css +1 -1
- package/es/tabbar-item/index.d.ts +1 -0
- package/es/tabbar-item/index.mjs +3 -1
- package/es/tabs/Tabs.d.ts +1 -1
- package/es/tabs/Tabs.mjs +2 -1
- package/es/tabs/TabsTitle.d.ts +1 -1
- package/es/tabs/index.css +1 -1
- package/es/tabs/index.d.ts +1 -0
- package/es/tabs/index.mjs +3 -1
- package/es/tag/Tag.d.ts +1 -1
- package/es/tag/Tag.mjs +2 -1
- package/es/tag/index.css +1 -1
- package/es/tag/index.d.ts +1 -0
- package/es/tag/index.mjs +3 -1
- package/es/time-picker/TimePicker.d.ts +7 -4
- package/es/time-picker/TimePicker.mjs +2 -1
- package/es/time-picker/index.d.ts +5 -2
- package/es/time-picker/index.mjs +3 -1
- package/es/time-picker/style/index.mjs +7 -0
- package/es/toast/Toast.d.ts +1 -1
- package/es/toast/Toast.mjs +9 -2
- package/es/toast/index.css +1 -1
- package/es/toast/index.d.ts +1 -0
- package/es/toast/index.mjs +3 -1
- package/es/tree-select/TreeSelect.d.ts +1 -1
- package/es/tree-select/TreeSelect.mjs +2 -1
- package/es/tree-select/index.css +1 -1
- package/es/tree-select/index.d.ts +1 -0
- package/es/tree-select/index.mjs +3 -1
- package/es/uploader/Uploader.d.ts +1 -1
- package/es/uploader/Uploader.mjs +2 -1
- package/es/uploader/index.css +1 -1
- package/es/uploader/index.d.ts +1 -0
- package/es/uploader/index.mjs +3 -1
- package/es/utils/basic.mjs +2 -1
- package/es/utils/create.mjs +8 -2
- package/es/utils/with-install.d.ts +2 -2
- package/es/utils/with-install.mjs +4 -2
- package/lib/action-bar/ActionBar.d.ts +2 -2
- package/lib/action-bar/ActionBar.js +1 -0
- package/lib/action-bar/index.css +1 -1
- package/lib/action-bar/index.d.ts +2 -1
- package/lib/action-bar/index.js +6 -1
- package/lib/action-bar-button/ActionBarButton.d.ts +2 -2
- package/lib/action-bar-button/ActionBarButton.js +1 -0
- package/lib/action-bar-button/index.css +1 -1
- package/lib/action-bar-button/index.d.ts +2 -1
- package/lib/action-bar-button/index.js +6 -1
- package/lib/action-bar-icon/ActionBarIcon.d.ts +2 -2
- package/lib/action-bar-icon/ActionBarIcon.js +1 -0
- package/lib/action-bar-icon/index.css +1 -1
- package/lib/action-bar-icon/index.d.ts +2 -1
- package/lib/action-bar-icon/index.js +6 -1
- package/lib/action-sheet/ActionSheet.d.ts +1 -1
- package/lib/action-sheet/ActionSheet.js +1 -0
- package/lib/action-sheet/index.css +1 -1
- package/lib/action-sheet/index.d.ts +1 -0
- package/lib/action-sheet/index.js +6 -1
- package/lib/address-edit/AddressEdit.d.ts +1 -1
- package/lib/address-edit/AddressEdit.js +5 -1
- package/lib/address-edit/index.css +1 -1
- package/lib/address-edit/index.d.ts +1 -0
- package/lib/address-edit/index.js +6 -1
- package/lib/address-edit/style/index.js +7 -1
- package/lib/address-list/AddressList.d.ts +1 -1
- package/lib/address-list/AddressList.js +5 -1
- package/lib/address-list/index.css +1 -1
- package/lib/address-list/index.d.ts +1 -0
- package/lib/address-list/index.js +6 -1
- package/lib/area/Area.d.ts +7 -4
- package/lib/area/Area.js +1 -0
- package/lib/area/index.d.ts +5 -2
- package/lib/area/index.js +6 -1
- package/lib/area/style/index.js +7 -0
- package/lib/area/utils.js +9 -2
- package/lib/badge/Badge.d.ts +2 -2
- package/lib/badge/Badge.js +1 -0
- package/lib/badge/index.css +1 -1
- package/lib/badge/index.d.ts +2 -1
- package/lib/badge/index.js +6 -1
- package/lib/button/Button.d.ts +1 -1
- package/lib/button/Button.js +1 -0
- package/lib/button/index.css +1 -1
- package/lib/button/index.d.ts +1 -0
- package/lib/button/index.js +6 -1
- package/lib/calendar/Calendar.d.ts +1 -1
- package/lib/calendar/Calendar.js +9 -4
- package/lib/calendar/CalendarMonth.js +4 -1
- package/lib/calendar/index.css +1 -1
- package/lib/calendar/index.d.ts +1 -0
- package/lib/calendar/index.js +6 -1
- package/lib/calendar/style/index.js +7 -1
- package/lib/card/Card.d.ts +1 -1
- package/lib/card/Card.js +1 -0
- package/lib/card/index.css +1 -1
- package/lib/card/index.d.ts +1 -0
- package/lib/card/index.js +6 -1
- package/lib/cascader/Cascader.d.ts +1 -1
- package/lib/cascader/Cascader.js +1 -0
- package/lib/cascader/index.css +1 -1
- package/lib/cascader/index.d.ts +1 -0
- package/lib/cascader/index.js +6 -1
- package/lib/cell/Cell.d.ts +2 -2
- package/lib/cell/Cell.js +1 -0
- package/lib/cell/index.css +1 -1
- package/lib/cell/index.d.ts +2 -1
- package/lib/cell/index.js +6 -1
- package/lib/cell-group/CellGroup.d.ts +2 -2
- package/lib/cell-group/CellGroup.js +1 -0
- package/lib/cell-group/index.css +1 -1
- package/lib/cell-group/index.d.ts +2 -1
- package/lib/cell-group/index.js +6 -1
- package/lib/checkbox/Checkbox.d.ts +1 -1
- package/lib/checkbox/Checkbox.js +5 -1
- package/lib/checkbox/index.css +1 -1
- package/lib/checkbox/index.d.ts +1 -0
- package/lib/checkbox/index.js +6 -1
- package/lib/checkbox-group/CheckboxGroup.d.ts +1 -1
- package/lib/checkbox-group/CheckboxGroup.js +1 -0
- package/lib/checkbox-group/index.d.ts +1 -0
- package/lib/checkbox-group/index.js +6 -1
- package/lib/circle/Circle.d.ts +1 -1
- package/lib/circle/Circle.js +1 -0
- package/lib/circle/index.css +1 -1
- package/lib/circle/index.d.ts +1 -0
- package/lib/circle/index.js +6 -1
- package/lib/col/Col.d.ts +2 -2
- package/lib/col/Col.js +1 -0
- package/lib/col/index.d.ts +2 -1
- package/lib/col/index.js +6 -1
- package/lib/collapse/Collapse.d.ts +1 -1
- package/lib/collapse/Collapse.js +1 -0
- package/lib/collapse/index.d.ts +1 -0
- package/lib/collapse/index.js +6 -1
- package/lib/collapse-item/CollapseItem.d.ts +2 -2
- package/lib/collapse-item/CollapseItem.js +1 -0
- package/lib/collapse-item/index.css +1 -1
- package/lib/collapse-item/index.d.ts +2 -1
- package/lib/collapse-item/index.js +6 -1
- package/lib/composables/use-lazy-render.js +9 -5
- package/lib/composables/use-lock-scroll.js +4 -1
- package/lib/composables/use-visibility-change.js +6 -3
- package/lib/config-provider/ConfigProvider.d.ts +2 -2
- package/lib/config-provider/ConfigProvider.js +3 -2
- package/lib/config-provider/index.d.ts +2 -1
- package/lib/config-provider/index.js +6 -1
- package/lib/contact-card/ContactCard.d.ts +1 -1
- package/lib/contact-card/ContactCard.js +1 -0
- package/lib/contact-card/index.css +1 -1
- package/lib/contact-card/index.d.ts +1 -0
- package/lib/contact-card/index.js +6 -1
- package/lib/contact-edit/ContactEdit.d.ts +1 -1
- package/lib/contact-edit/ContactEdit.js +1 -0
- package/lib/contact-edit/index.css +1 -1
- package/lib/contact-edit/index.d.ts +1 -0
- package/lib/contact-edit/index.js +6 -1
- package/lib/contact-list/ContactList.d.ts +1 -1
- package/lib/contact-list/ContactList.js +1 -0
- package/lib/contact-list/index.css +1 -1
- package/lib/contact-list/index.d.ts +1 -0
- package/lib/contact-list/index.js +6 -1
- package/lib/count-down/CountDown.d.ts +1 -1
- package/lib/count-down/CountDown.js +1 -0
- package/lib/count-down/index.css +1 -1
- package/lib/count-down/index.d.ts +1 -0
- package/lib/count-down/index.js +6 -1
- package/lib/coupon/Coupon.d.ts +1 -1
- package/lib/coupon/index.css +1 -1
- package/lib/coupon/index.d.ts +1 -1
- package/lib/coupon/index.js +4 -1
- package/lib/coupon/utils.js +3 -1
- package/lib/coupon-cell/CouponCell.d.ts +2 -2
- package/lib/coupon-cell/CouponCell.js +1 -0
- package/lib/coupon-cell/index.css +1 -1
- package/lib/coupon-cell/index.d.ts +2 -1
- package/lib/coupon-cell/index.js +6 -1
- package/lib/coupon-list/CouponList.d.ts +1 -1
- package/lib/coupon-list/CouponList.js +1 -0
- package/lib/coupon-list/index.css +1 -1
- package/lib/coupon-list/index.d.ts +1 -0
- package/lib/coupon-list/index.js +6 -1
- package/lib/coupon-list/style/index.js +3 -3
- package/lib/date-picker/DatePicker.d.ts +7 -4
- package/lib/date-picker/DatePicker.js +11 -10
- package/lib/date-picker/index.d.ts +5 -2
- package/lib/date-picker/index.js +6 -1
- package/lib/date-picker/style/index.js +7 -0
- package/lib/date-picker/utils.d.ts +2 -1
- package/lib/dialog/Dialog.d.ts +1 -1
- package/lib/dialog/Dialog.js +2 -1
- package/lib/dialog/function-call.js +4 -1
- package/lib/dialog/index.css +1 -1
- package/lib/dialog/index.d.ts +1 -0
- package/lib/dialog/index.js +6 -1
- package/lib/dialog/types.d.ts +1 -1
- package/lib/divider/Divider.d.ts +2 -2
- package/lib/divider/Divider.js +2 -1
- package/lib/divider/index.css +1 -1
- package/lib/divider/index.d.ts +2 -1
- package/lib/divider/index.js +7 -2
- package/lib/dropdown-item/DropdownItem.d.ts +3 -3
- package/lib/dropdown-item/DropdownItem.js +2 -1
- package/lib/dropdown-item/index.css +1 -1
- package/lib/dropdown-item/index.d.ts +3 -2
- package/lib/dropdown-item/index.js +7 -2
- package/lib/dropdown-menu/DropdownMenu.d.ts +2 -2
- package/lib/dropdown-menu/DropdownMenu.js +2 -1
- package/lib/dropdown-menu/index.css +1 -1
- package/lib/dropdown-menu/index.d.ts +2 -1
- package/lib/dropdown-menu/index.js +7 -2
- package/lib/empty/Empty.d.ts +2 -2
- package/lib/empty/Empty.js +2 -1
- package/lib/empty/index.css +1 -1
- package/lib/empty/index.d.ts +2 -1
- package/lib/empty/index.js +7 -2
- package/lib/field/Field.d.ts +1 -1
- package/lib/field/Field.js +10 -2
- package/lib/field/index.css +1 -1
- package/lib/field/index.d.ts +1 -0
- package/lib/field/index.js +7 -2
- package/lib/form/Form.d.ts +1 -1
- package/lib/form/Form.js +2 -1
- package/lib/form/index.d.ts +1 -0
- package/lib/form/index.js +7 -2
- package/lib/grid/Grid.d.ts +2 -2
- package/lib/grid/Grid.js +2 -1
- package/lib/grid/index.d.ts +2 -1
- package/lib/grid/index.js +7 -2
- package/lib/grid-item/GridItem.d.ts +2 -2
- package/lib/grid-item/GridItem.js +2 -1
- package/lib/grid-item/index.css +1 -1
- package/lib/grid-item/index.d.ts +2 -1
- package/lib/grid-item/index.js +7 -2
- package/lib/icon/Icon.d.ts +2 -2
- package/lib/icon/Icon.js +2 -1
- package/lib/icon/index.d.ts +2 -1
- package/lib/icon/index.js +7 -2
- package/lib/image/Image.d.ts +5 -1
- package/lib/image/Image.js +5 -2
- package/lib/image/index.css +1 -1
- package/lib/image/index.d.ts +4 -0
- package/lib/image/index.js +7 -2
- package/lib/image-preview/ImagePreview.d.ts +1 -1
- package/lib/image-preview/ImagePreview.js +6 -2
- package/lib/image-preview/ImagePreviewItem.js +9 -1
- package/lib/image-preview/function-call.js +4 -1
- package/lib/image-preview/index.css +1 -1
- package/lib/image-preview/index.d.ts +1 -0
- package/lib/image-preview/index.js +6 -1
- package/lib/index-anchor/IndexAnchor.d.ts +2 -2
- package/lib/index-anchor/IndexAnchor.js +2 -1
- package/lib/index-anchor/index.css +1 -1
- package/lib/index-anchor/index.d.ts +2 -1
- package/lib/index-anchor/index.js +7 -2
- package/lib/index-bar/IndexBar.d.ts +1 -1
- package/lib/index-bar/IndexBar.js +9 -4
- package/lib/index-bar/index.css +1 -1
- package/lib/index-bar/index.d.ts +1 -0
- package/lib/index-bar/index.js +7 -2
- package/lib/index.css +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.js +4 -1
- package/lib/lazyload/vue-lazyload/index.js +4 -1
- package/lib/lazyload/vue-lazyload/lazy-component.js +4 -1
- package/lib/lazyload/vue-lazyload/lazy-container.js +11 -7
- package/lib/lazyload/vue-lazyload/lazy-image.js +24 -14
- package/lib/lazyload/vue-lazyload/lazy.js +15 -4
- package/lib/lazyload/vue-lazyload/listener.js +45 -33
- package/lib/lazyload/vue-lazyload/util.js +4 -1
- package/lib/list/List.d.ts +1 -1
- package/lib/list/List.js +2 -1
- package/lib/list/index.css +1 -1
- package/lib/list/index.d.ts +1 -0
- package/lib/list/index.js +7 -2
- package/lib/loading/Loading.d.ts +2 -2
- package/lib/loading/Loading.js +2 -1
- package/lib/loading/index.css +1 -1
- package/lib/loading/index.d.ts +2 -1
- package/lib/loading/index.js +7 -2
- package/lib/locale/index.js +4 -1
- package/lib/nav-bar/NavBar.d.ts +1 -1
- package/lib/nav-bar/NavBar.js +2 -1
- package/lib/nav-bar/index.css +1 -1
- package/lib/nav-bar/index.d.ts +1 -0
- package/lib/nav-bar/index.js +7 -2
- package/lib/notice-bar/NoticeBar.d.ts +1 -1
- package/lib/notice-bar/NoticeBar.js +2 -1
- package/lib/notice-bar/index.css +1 -1
- package/lib/notice-bar/index.d.ts +1 -0
- package/lib/notice-bar/index.js +7 -2
- package/lib/notify/Notify.d.ts +1 -1
- package/lib/notify/Notify.js +2 -1
- package/lib/notify/function-call.js +4 -1
- package/lib/notify/index.css +1 -1
- package/lib/notify/index.d.ts +1 -0
- package/lib/notify/index.js +6 -1
- package/lib/number-keyboard/NumberKeyboard.d.ts +2 -2
- package/lib/number-keyboard/NumberKeyboard.js +6 -2
- package/lib/number-keyboard/index.css +1 -1
- package/lib/number-keyboard/index.d.ts +2 -1
- package/lib/number-keyboard/index.js +7 -2
- package/lib/overlay/Overlay.d.ts +2 -2
- package/lib/overlay/Overlay.js +13 -5
- package/lib/overlay/index.css +1 -1
- package/lib/overlay/index.d.ts +2 -1
- package/lib/overlay/index.js +7 -2
- package/lib/pagination/Pagination.d.ts +1 -1
- package/lib/pagination/Pagination.js +2 -1
- package/lib/pagination/index.css +1 -1
- package/lib/pagination/index.d.ts +1 -0
- package/lib/pagination/index.js +7 -2
- package/lib/password-input/PasswordInput.d.ts +1 -1
- package/lib/password-input/PasswordInput.js +2 -1
- package/lib/password-input/index.css +1 -1
- package/lib/password-input/index.d.ts +1 -0
- package/lib/password-input/index.js +7 -2
- package/lib/picker/Picker.d.ts +9 -5
- package/lib/picker/Picker.js +53 -71
- package/lib/picker/PickerColumn.js +5 -1
- package/lib/picker/PickerToolbar.d.ts +21 -0
- package/lib/picker/PickerToolbar.js +78 -0
- package/lib/picker/index.css +1 -1
- package/lib/picker/index.d.ts +5 -2
- package/lib/picker/index.js +7 -2
- package/lib/picker/style/index.js +7 -0
- package/lib/picker/utils.d.ts +2 -0
- package/lib/picker/utils.js +15 -8
- package/lib/picker-group/PickerGroup.d.ts +39 -0
- package/lib/picker-group/PickerGroup.js +82 -0
- package/lib/picker-group/index.css +1 -0
- package/lib/picker-group/index.d.ts +33 -0
- package/lib/picker-group/index.js +35 -0
- package/lib/picker-group/style/index.d.ts +1 -0
- package/lib/picker-group/style/index.js +9 -0
- package/lib/popover/Popover.d.ts +1 -1
- package/lib/popover/Popover.js +2 -1
- package/lib/popover/index.css +1 -1
- package/lib/popover/index.d.ts +1 -0
- package/lib/popover/index.js +7 -2
- package/lib/popup/Popup.d.ts +3 -3
- package/lib/popup/Popup.js +2 -1
- package/lib/popup/index.css +1 -1
- package/lib/popup/index.d.ts +3 -2
- package/lib/popup/index.js +7 -2
- package/lib/popup/shared.js +3 -1
- package/lib/progress/Progress.d.ts +2 -2
- package/lib/progress/Progress.js +2 -1
- package/lib/progress/index.css +1 -1
- package/lib/progress/index.d.ts +2 -1
- package/lib/progress/index.js +7 -2
- package/lib/pull-refresh/PullRefresh.d.ts +1 -1
- package/lib/pull-refresh/PullRefresh.js +2 -1
- package/lib/pull-refresh/index.css +1 -1
- package/lib/pull-refresh/index.d.ts +1 -0
- package/lib/pull-refresh/index.js +7 -2
- package/lib/radio/Radio.d.ts +15 -2
- package/lib/radio/Radio.js +7 -2
- package/lib/radio/index.css +1 -1
- package/lib/radio/index.d.ts +1 -0
- package/lib/radio/index.js +7 -2
- package/lib/radio-group/RadioGroup.d.ts +1 -1
- package/lib/radio-group/RadioGroup.js +2 -1
- package/lib/radio-group/index.d.ts +1 -0
- package/lib/radio-group/index.js +7 -2
- package/lib/rate/Rate.d.ts +1 -1
- package/lib/rate/Rate.js +6 -3
- package/lib/rate/index.css +1 -1
- package/lib/rate/index.d.ts +1 -0
- package/lib/rate/index.js +7 -2
- package/lib/row/Row.d.ts +2 -2
- package/lib/row/Row.js +2 -1
- package/lib/row/index.d.ts +2 -1
- package/lib/row/index.js +7 -2
- package/lib/search/Search.d.ts +1 -1
- package/lib/search/Search.js +2 -1
- package/lib/search/index.css +1 -1
- package/lib/search/index.d.ts +1 -0
- package/lib/search/index.js +7 -2
- package/lib/share-sheet/ShareSheet.d.ts +1 -1
- package/lib/share-sheet/ShareSheet.js +2 -1
- package/lib/share-sheet/index.css +1 -1
- package/lib/share-sheet/index.d.ts +1 -0
- package/lib/share-sheet/index.js +7 -2
- package/lib/sidebar/Sidebar.d.ts +1 -1
- package/lib/sidebar/Sidebar.js +2 -1
- package/lib/sidebar/index.css +1 -1
- package/lib/sidebar/index.d.ts +1 -0
- package/lib/sidebar/index.js +7 -2
- package/lib/sidebar-item/SidebarItem.d.ts +1 -1
- package/lib/sidebar-item/SidebarItem.js +2 -1
- package/lib/sidebar-item/index.css +1 -1
- package/lib/sidebar-item/index.d.ts +1 -0
- package/lib/sidebar-item/index.js +7 -2
- package/lib/skeleton/Skeleton.d.ts +2 -2
- package/lib/skeleton/Skeleton.js +2 -1
- package/lib/skeleton/index.css +1 -1
- package/lib/skeleton/index.d.ts +2 -1
- package/lib/skeleton/index.js +7 -2
- package/lib/slider/Slider.d.ts +1 -1
- package/lib/slider/Slider.js +7 -2
- package/lib/slider/index.css +1 -1
- package/lib/slider/index.d.ts +1 -0
- package/lib/slider/index.js +7 -2
- package/lib/space/Space.d.ts +2 -2
- package/lib/space/Space.js +2 -1
- package/lib/space/index.d.ts +2 -1
- package/lib/space/index.js +7 -2
- package/lib/step/Step.d.ts +1 -1
- package/lib/step/index.css +1 -1
- package/lib/step/index.d.ts +1 -1
- package/lib/step/index.js +4 -1
- package/lib/stepper/Stepper.d.ts +1 -1
- package/lib/stepper/Stepper.js +2 -1
- package/lib/stepper/index.css +1 -1
- package/lib/stepper/index.d.ts +1 -0
- package/lib/stepper/index.js +7 -2
- package/lib/steps/Steps.d.ts +1 -1
- package/lib/steps/Steps.js +2 -1
- package/lib/steps/index.css +1 -1
- package/lib/steps/index.d.ts +1 -0
- package/lib/steps/index.js +7 -2
- package/lib/sticky/Sticky.d.ts +1 -1
- package/lib/sticky/Sticky.js +2 -1
- package/lib/sticky/index.css +1 -1
- package/lib/sticky/index.d.ts +1 -0
- package/lib/sticky/index.js +7 -2
- package/lib/style/base.css +1 -1
- package/lib/style/css-variables.css +1 -1
- package/lib/style/normalize.css +1 -1
- package/lib/submit-bar/SubmitBar.d.ts +1 -1
- package/lib/submit-bar/SubmitBar.js +2 -1
- package/lib/submit-bar/index.css +1 -1
- package/lib/submit-bar/index.d.ts +1 -0
- package/lib/submit-bar/index.js +7 -2
- package/lib/swipe/Swipe.d.ts +1 -1
- package/lib/swipe/Swipe.js +14 -6
- package/lib/swipe/index.css +1 -1
- package/lib/swipe/index.d.ts +1 -0
- package/lib/swipe/index.js +7 -2
- package/lib/swipe-cell/SwipeCell.d.ts +3 -3
- package/lib/swipe-cell/SwipeCell.js +5 -2
- package/lib/swipe-cell/index.d.ts +3 -2
- package/lib/swipe-cell/index.js +7 -2
- package/lib/swipe-item/SwipeItem.d.ts +1 -1
- package/lib/swipe-item/index.d.ts +1 -1
- package/lib/swipe-item/index.js +4 -1
- package/lib/switch/Switch.d.ts +1 -1
- package/lib/switch/Switch.js +2 -1
- package/lib/switch/index.css +1 -1
- package/lib/switch/index.d.ts +1 -0
- package/lib/switch/index.js +7 -2
- package/lib/tab/Tab.d.ts +2 -2
- package/lib/tab/Tab.js +2 -1
- package/lib/tab/index.d.ts +2 -1
- package/lib/tab/index.js +7 -2
- package/lib/tabbar/Tabbar.d.ts +1 -1
- package/lib/tabbar/Tabbar.js +2 -1
- package/lib/tabbar/index.css +1 -1
- package/lib/tabbar/index.d.ts +1 -0
- package/lib/tabbar/index.js +7 -2
- package/lib/tabbar-item/TabbarItem.d.ts +1 -1
- package/lib/tabbar-item/TabbarItem.js +2 -1
- package/lib/tabbar-item/index.css +1 -1
- package/lib/tabbar-item/index.d.ts +1 -0
- package/lib/tabbar-item/index.js +7 -2
- package/lib/tabs/Tabs.d.ts +1 -1
- package/lib/tabs/Tabs.js +6 -2
- package/lib/tabs/TabsTitle.d.ts +1 -1
- package/lib/tabs/index.css +1 -1
- package/lib/tabs/index.d.ts +1 -0
- package/lib/tabs/index.js +7 -2
- package/lib/tag/Tag.d.ts +1 -1
- package/lib/tag/Tag.js +2 -1
- package/lib/tag/index.css +1 -1
- package/lib/tag/index.d.ts +1 -0
- package/lib/tag/index.js +7 -2
- package/lib/time-picker/TimePicker.d.ts +7 -4
- package/lib/time-picker/TimePicker.js +2 -1
- package/lib/time-picker/index.d.ts +5 -2
- package/lib/time-picker/index.js +7 -2
- package/lib/time-picker/style/index.js +7 -0
- package/lib/toast/Toast.d.ts +1 -1
- package/lib/toast/Toast.js +9 -2
- package/lib/toast/function-call.js +4 -1
- package/lib/toast/index.css +1 -1
- package/lib/toast/index.d.ts +1 -0
- package/lib/toast/index.js +7 -2
- package/lib/tree-select/TreeSelect.d.ts +1 -1
- package/lib/tree-select/TreeSelect.js +2 -1
- package/lib/tree-select/index.css +1 -1
- package/lib/tree-select/index.d.ts +1 -0
- package/lib/tree-select/index.js +7 -2
- package/lib/uploader/Uploader.d.ts +1 -1
- package/lib/uploader/Uploader.js +6 -2
- package/lib/uploader/index.css +1 -1
- package/lib/uploader/index.d.ts +1 -0
- package/lib/uploader/index.js +7 -2
- package/lib/utils/basic.js +2 -1
- package/lib/utils/create.js +12 -3
- package/lib/utils/with-install.d.ts +2 -2
- package/lib/utils/with-install.js +4 -2
- package/lib/vant.cjs.js +4481 -4198
- package/lib/vant.es.js +4483 -4200
- package/lib/vant.js +4509 -4209
- package/lib/vant.min.js +1 -1
- package/lib/web-types.json +2445 -2370
- package/package.json +9 -9
package/es/picker/Picker.mjs
CHANGED
@@ -1,24 +1,22 @@
|
|
1
|
-
import { createVNode as _createVNode } from "vue";
|
1
|
+
import { mergeProps as _mergeProps, createVNode as _createVNode } from "vue";
|
2
2
|
import { ref, watch, computed, defineComponent } from "vue";
|
3
|
-
import { extend, unitToPx, truthProp, isSameValue, makeArrayProp, preventDefault, makeStringProp, makeNumericProp,
|
4
|
-
import { isOptionExist, getColumnsType, findOptionByValue, formatCascadeColumns, getFirstEnabledOption
|
5
|
-
import { useChildren } from "@vant/use";
|
3
|
+
import { pick, extend, unitToPx, truthProp, isSameValue, makeArrayProp, preventDefault, makeStringProp, makeNumericProp, BORDER_UNSET_TOP_BOTTOM } from "../utils/index.mjs";
|
4
|
+
import { bem, name, isOptionExist, getColumnsType, findOptionByValue, assignDefaultFields, formatCascadeColumns, getFirstEnabledOption } from "./utils.mjs";
|
5
|
+
import { useChildren, useEventListener, useParent } from "@vant/use";
|
6
6
|
import { useExpose } from "../composables/use-expose.mjs";
|
7
7
|
import { Loading } from "../loading/index.mjs";
|
8
8
|
import Column, { PICKER_KEY } from "./PickerColumn.mjs";
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
import Toolbar, { pickerToolbarPropKeys, pickerToolbarProps, pickerToolbarSlots } from "./PickerToolbar.mjs";
|
10
|
+
import { PICKER_GROUP_KEY } from "../picker-group/PickerGroup.mjs";
|
11
|
+
const pickerSharedProps = extend({
|
12
12
|
loading: Boolean,
|
13
13
|
readonly: Boolean,
|
14
14
|
allowHtml: Boolean,
|
15
15
|
optionHeight: makeNumericProp(44),
|
16
16
|
showToolbar: truthProp,
|
17
17
|
swipeDuration: makeNumericProp(1e3),
|
18
|
-
visibleOptionNum: makeNumericProp(6)
|
19
|
-
|
20
|
-
confirmButtonText: String
|
21
|
-
};
|
18
|
+
visibleOptionNum: makeNumericProp(6)
|
19
|
+
}, pickerToolbarProps);
|
22
20
|
const pickerProps = extend({}, pickerSharedProps, {
|
23
21
|
columns: makeArrayProp(),
|
24
22
|
modelValue: makeArrayProp(),
|
@@ -33,7 +31,11 @@ var stdin_default = defineComponent({
|
|
33
31
|
emit,
|
34
32
|
slots
|
35
33
|
}) {
|
36
|
-
const
|
34
|
+
const columnsRef = ref();
|
35
|
+
const selectedValues = ref(props.modelValue.slice(0));
|
36
|
+
const {
|
37
|
+
parent
|
38
|
+
} = useParent(PICKER_GROUP_KEY);
|
37
39
|
const {
|
38
40
|
children,
|
39
41
|
linkChildren
|
@@ -64,6 +66,10 @@ var stdin_default = defineComponent({
|
|
64
66
|
selectedValues.value = newValues;
|
65
67
|
}
|
66
68
|
};
|
69
|
+
const getEventParams = () => ({
|
70
|
+
selectedValues: selectedValues.value.slice(0),
|
71
|
+
selectedOptions: selectedOptions.value
|
72
|
+
});
|
67
73
|
const onChange = (value, columnIndex) => {
|
68
74
|
setValue(columnIndex, value);
|
69
75
|
if (columnsType.value === "cascade") {
|
@@ -74,62 +80,21 @@ var stdin_default = defineComponent({
|
|
74
80
|
}
|
75
81
|
});
|
76
82
|
}
|
77
|
-
emit("change", {
|
78
|
-
columnIndex
|
79
|
-
|
80
|
-
selectedOptions: selectedOptions.value
|
81
|
-
});
|
83
|
+
emit("change", extend({
|
84
|
+
columnIndex
|
85
|
+
}, getEventParams()));
|
82
86
|
};
|
83
|
-
const onClickOption = (currentOption, columnIndex) => emit("clickOption", {
|
87
|
+
const onClickOption = (currentOption, columnIndex) => emit("clickOption", extend({
|
84
88
|
columnIndex,
|
85
|
-
currentOption
|
86
|
-
|
87
|
-
selectedOptions: selectedOptions.value
|
88
|
-
});
|
89
|
+
currentOption
|
90
|
+
}, getEventParams()));
|
89
91
|
const confirm = () => {
|
90
92
|
children.forEach((child) => child.stopMomentum());
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
});
|
95
|
-
};
|
96
|
-
const cancel = () => emit("cancel", {
|
97
|
-
selectedValues: selectedValues.value,
|
98
|
-
selectedOptions: selectedOptions.value
|
99
|
-
});
|
100
|
-
const renderTitle = () => {
|
101
|
-
if (slots.title) {
|
102
|
-
return slots.title();
|
103
|
-
}
|
104
|
-
if (props.title) {
|
105
|
-
return _createVNode("div", {
|
106
|
-
"class": [bem("title"), "van-ellipsis"]
|
107
|
-
}, [props.title]);
|
108
|
-
}
|
109
|
-
};
|
110
|
-
const renderCancel = () => {
|
111
|
-
const text = props.cancelButtonText || t("cancel");
|
112
|
-
return _createVNode("button", {
|
113
|
-
"type": "button",
|
114
|
-
"class": [bem("cancel"), HAPTICS_FEEDBACK],
|
115
|
-
"onClick": cancel
|
116
|
-
}, [slots.cancel ? slots.cancel() : text]);
|
117
|
-
};
|
118
|
-
const renderConfirm = () => {
|
119
|
-
const text = props.confirmButtonText || t("confirm");
|
120
|
-
return _createVNode("button", {
|
121
|
-
"type": "button",
|
122
|
-
"class": [bem("confirm"), HAPTICS_FEEDBACK],
|
123
|
-
"onClick": confirm
|
124
|
-
}, [slots.confirm ? slots.confirm() : text]);
|
125
|
-
};
|
126
|
-
const renderToolbar = () => {
|
127
|
-
if (props.showToolbar) {
|
128
|
-
return _createVNode("div", {
|
129
|
-
"class": bem("toolbar")
|
130
|
-
}, [slots.toolbar ? slots.toolbar() : [renderCancel(), renderTitle(), renderConfirm()]]);
|
131
|
-
}
|
93
|
+
const params = getEventParams();
|
94
|
+
emit("confirm", params);
|
95
|
+
return params;
|
132
96
|
};
|
97
|
+
const cancel = () => emit("cancel", getEventParams());
|
133
98
|
const renderColumnItems = () => currentColumns.value.map((options, columnIndex) => _createVNode(Column, {
|
134
99
|
"value": selectedValues.value[columnIndex],
|
135
100
|
"fields": fields.value,
|
@@ -167,11 +132,19 @@ var stdin_default = defineComponent({
|
|
167
132
|
height: `${wrapHeight}px`
|
168
133
|
};
|
169
134
|
return _createVNode("div", {
|
135
|
+
"ref": columnsRef,
|
170
136
|
"class": bem("columns"),
|
171
|
-
"style": columnsStyle
|
172
|
-
"onTouchmove": preventDefault
|
137
|
+
"style": columnsStyle
|
173
138
|
}, [renderColumnItems(), renderMask(wrapHeight)]);
|
174
139
|
};
|
140
|
+
const renderToolbar = () => {
|
141
|
+
if (props.showToolbar && !parent) {
|
142
|
+
return _createVNode(Toolbar, _mergeProps(pick(props, pickerToolbarPropKeys), {
|
143
|
+
"onConfirm": confirm,
|
144
|
+
"onCancel": cancel
|
145
|
+
}), pick(slots, pickerToolbarSlots));
|
146
|
+
}
|
147
|
+
};
|
175
148
|
watch(currentColumns, (columns) => {
|
176
149
|
columns.forEach((options, index) => {
|
177
150
|
if (options.length && !isOptionExist(options, selectedValues.value[index], fields.value)) {
|
@@ -181,20 +154,25 @@ var stdin_default = defineComponent({
|
|
181
154
|
}, {
|
182
155
|
immediate: true
|
183
156
|
});
|
157
|
+
let lastEmittedModelValue;
|
184
158
|
watch(() => props.modelValue, (newValues) => {
|
185
|
-
if (!isSameValue(newValues, selectedValues.value)) {
|
186
|
-
selectedValues.value = newValues;
|
159
|
+
if (!isSameValue(newValues, selectedValues.value) && !isSameValue(newValues, lastEmittedModelValue)) {
|
160
|
+
selectedValues.value = newValues.slice(0);
|
187
161
|
}
|
188
162
|
}, {
|
189
163
|
deep: true
|
190
164
|
});
|
191
165
|
watch(selectedValues, (newValues) => {
|
192
166
|
if (!isSameValue(newValues, props.modelValue)) {
|
193
|
-
|
167
|
+
lastEmittedModelValue = newValues.slice(0);
|
168
|
+
emit("update:modelValue", lastEmittedModelValue);
|
194
169
|
}
|
195
170
|
}, {
|
196
171
|
immediate: true
|
197
172
|
});
|
173
|
+
useEventListener("touchmove", preventDefault, {
|
174
|
+
target: columnsRef
|
175
|
+
});
|
198
176
|
const getSelectedOptions = () => selectedOptions.value;
|
199
177
|
useExpose({
|
200
178
|
confirm,
|
@@ -212,5 +190,6 @@ var stdin_default = defineComponent({
|
|
212
190
|
});
|
213
191
|
export {
|
214
192
|
stdin_default as default,
|
193
|
+
pickerProps,
|
215
194
|
pickerSharedProps
|
216
195
|
};
|
@@ -2,7 +2,7 @@ import { createVNode as _createVNode } from "vue";
|
|
2
2
|
import { ref, watchEffect, defineComponent } from "vue";
|
3
3
|
import { clamp, numericProp, makeArrayProp, preventDefault, createNamespace, makeRequiredProp } from "../utils/index.mjs";
|
4
4
|
import { getElementTranslateY, findIndexOfEnabledOption } from "./utils.mjs";
|
5
|
-
import { useParent } from "@vant/use";
|
5
|
+
import { useEventListener, useParent } from "@vant/use";
|
6
6
|
import { useTouch } from "../composables/use-touch.mjs";
|
7
7
|
import { useExpose } from "../composables/use-expose.mjs";
|
8
8
|
const DEFAULT_DURATION = 200;
|
@@ -32,6 +32,7 @@ var stdin_default = defineComponent({
|
|
32
32
|
let touchStartTime;
|
33
33
|
let momentumOffset;
|
34
34
|
let transitionEndTrigger;
|
35
|
+
const root = ref();
|
35
36
|
const wrapper = ref();
|
36
37
|
const currentOffset = ref(0);
|
37
38
|
const currentDuration = ref(0);
|
@@ -165,10 +166,13 @@ var stdin_default = defineComponent({
|
|
165
166
|
const offset = -enabledIndex * props.optionHeight;
|
166
167
|
currentOffset.value = offset;
|
167
168
|
});
|
169
|
+
useEventListener("touchmove", onTouchMove, {
|
170
|
+
target: root
|
171
|
+
});
|
168
172
|
return () => _createVNode("div", {
|
173
|
+
"ref": root,
|
169
174
|
"class": bem(),
|
170
175
|
"onTouchstartPassive": onTouchStart,
|
171
|
-
"onTouchmove": onTouchMove,
|
172
176
|
"onTouchend": onTouchEnd,
|
173
177
|
"onTouchcancel": onTouchEnd
|
174
178
|
}, [_createVNode("ul", {
|
@@ -0,0 +1,21 @@
|
|
1
|
+
export declare const pickerToolbarProps: {
|
2
|
+
title: StringConstructor;
|
3
|
+
cancelButtonText: StringConstructor;
|
4
|
+
confirmButtonText: StringConstructor;
|
5
|
+
};
|
6
|
+
export declare const pickerToolbarSlots: string[];
|
7
|
+
export declare type PickerToolbarPropKeys = Array<keyof typeof pickerToolbarProps>;
|
8
|
+
export declare const pickerToolbarPropKeys: PickerToolbarPropKeys;
|
9
|
+
declare const _default: import("vue").DefineComponent<{
|
10
|
+
title: StringConstructor;
|
11
|
+
cancelButtonText: StringConstructor;
|
12
|
+
confirmButtonText: StringConstructor;
|
13
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("cancel" | "confirm")[], "cancel" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
14
|
+
title: StringConstructor;
|
15
|
+
cancelButtonText: StringConstructor;
|
16
|
+
confirmButtonText: StringConstructor;
|
17
|
+
}>> & {
|
18
|
+
onCancel?: ((...args: any[]) => any) | undefined;
|
19
|
+
onConfirm?: ((...args: any[]) => any) | undefined;
|
20
|
+
}, {}>;
|
21
|
+
export default _default;
|
@@ -0,0 +1,59 @@
|
|
1
|
+
import { createVNode as _createVNode } from "vue";
|
2
|
+
import { defineComponent } from "vue";
|
3
|
+
import { bem, t } from "./utils.mjs";
|
4
|
+
import { createNamespace, HAPTICS_FEEDBACK } from "../utils/index.mjs";
|
5
|
+
const [name] = createNamespace("picker-toolbar");
|
6
|
+
const pickerToolbarProps = {
|
7
|
+
title: String,
|
8
|
+
cancelButtonText: String,
|
9
|
+
confirmButtonText: String
|
10
|
+
};
|
11
|
+
const pickerToolbarSlots = ["cancel", "confirm", "title", "toolbar"];
|
12
|
+
const pickerToolbarPropKeys = Object.keys(pickerToolbarProps);
|
13
|
+
var stdin_default = defineComponent({
|
14
|
+
name,
|
15
|
+
props: pickerToolbarProps,
|
16
|
+
emits: ["confirm", "cancel"],
|
17
|
+
setup(props, {
|
18
|
+
emit,
|
19
|
+
slots
|
20
|
+
}) {
|
21
|
+
const renderTitle = () => {
|
22
|
+
if (slots.title) {
|
23
|
+
return slots.title();
|
24
|
+
}
|
25
|
+
if (props.title) {
|
26
|
+
return _createVNode("div", {
|
27
|
+
"class": [bem("title"), "van-ellipsis"]
|
28
|
+
}, [props.title]);
|
29
|
+
}
|
30
|
+
};
|
31
|
+
const onCancel = () => emit("cancel");
|
32
|
+
const onConfirm = () => emit("confirm");
|
33
|
+
const renderCancel = () => {
|
34
|
+
const text = props.cancelButtonText || t("cancel");
|
35
|
+
return _createVNode("button", {
|
36
|
+
"type": "button",
|
37
|
+
"class": [bem("cancel"), HAPTICS_FEEDBACK],
|
38
|
+
"onClick": onCancel
|
39
|
+
}, [slots.cancel ? slots.cancel() : text]);
|
40
|
+
};
|
41
|
+
const renderConfirm = () => {
|
42
|
+
const text = props.confirmButtonText || t("confirm");
|
43
|
+
return _createVNode("button", {
|
44
|
+
"type": "button",
|
45
|
+
"class": [bem("confirm"), HAPTICS_FEEDBACK],
|
46
|
+
"onClick": onConfirm
|
47
|
+
}, [slots.confirm ? slots.confirm() : text]);
|
48
|
+
};
|
49
|
+
return () => _createVNode("div", {
|
50
|
+
"class": bem("toolbar")
|
51
|
+
}, [slots.toolbar ? slots.toolbar() : [renderCancel(), renderTitle(), renderConfirm()]]);
|
52
|
+
}
|
53
|
+
});
|
54
|
+
export {
|
55
|
+
stdin_default as default,
|
56
|
+
pickerToolbarPropKeys,
|
57
|
+
pickerToolbarProps,
|
58
|
+
pickerToolbarSlots
|
59
|
+
};
|
package/es/picker/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
:root{--van-picker-background: var(--van-background-2);--van-picker-toolbar-height: 44px;--van-picker-title-font-size: var(--van-font-size-lg);--van-picker-title-line-height: var(--van-line-height-md);--van-picker-action-padding: 0 var(--van-padding-md);--van-picker-action-font-size: var(--van-font-size-md);--van-picker-confirm-action-color: var(--van-link-color);--van-picker-cancel-action-color: var(--van-text-color-2);--van-picker-option-font-size: var(--van-font-size-lg);--van-picker-option-padding: 0 var(--van-padding-base);--van-picker-option-text-color: var(--van-text-color);--van-picker-option-disabled-opacity: .3;--van-picker-loading-icon-color: var(--van-primary-color);--van-picker-loading-mask-color: rgba(255, 255, 255, .9);--van-picker-mask-color: linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .4)), linear-gradient(0deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .4))}.van-theme-dark{--van-picker-mask-color: linear-gradient(180deg, rgba(0, 0, 0, .6), rgba(0, 0, 0, .1)), linear-gradient(0deg, rgba(0, 0, 0, .6), rgba(0, 0, 0, .1))}.van-picker{position:relative;background:var(--van-picker-background);-webkit-user-select:none;user-select:none}.van-picker__toolbar{display:flex;align-items:center;justify-content:space-between;height:var(--van-picker-toolbar-height)}.van-picker__cancel,.van-picker__confirm{height:100%;padding:var(--van-picker-action-padding);font-size:var(--van-picker-action-font-size);background-color:transparent;border:none}.van-picker__confirm{color:var(--van-picker-confirm-action-color)}.van-picker__cancel{color:var(--van-picker-cancel-action-color)}.van-picker__title{color:var(--van-text-color);max-width:50%;font-weight:var(--van-font-bold);font-size:var(--van-picker-title-font-size);line-height:var(--van-picker-title-line-height);text-align:center}.van-picker__columns{position:relative;display:flex;cursor:-webkit-grab;cursor:grab}.van-picker__loading{position:absolute;top:0;right:0;bottom:0;left:0;z-index:3;display:flex;align-items:center;justify-content:center;color:var(--van-picker-loading-icon-color);background:var(--van-picker-loading-mask-color)}.van-picker__frame{position:absolute;top:50%;right:var(--van-padding-md);left:var(--van-padding-md);z-index:2;transform:translateY(-50%);pointer-events:none}.van-picker__mask{position:absolute;top:0;left:0;z-index:1;width:100%;height:100%;background-image:var(--van-picker-mask-color);background-repeat:no-repeat;background-position:top,bottom;transform:translateZ(0);pointer-events:none}.van-picker-column{flex:1;overflow:hidden;font-size:var(--van-picker-option-font-size)}.van-picker-column__wrapper{transition-timing-function:cubic-bezier(.23,1,.68,1)}.van-picker-column__item{display:flex;align-items:center;justify-content:center;padding:var(--van-picker-option-padding);color:var(--van-picker-option-text-color)}.van-picker-column__item--disabled{cursor:not-allowed;opacity:var(--van-picker-option-disabled-opacity)}
|
package/es/picker/index.d.ts
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
import { PickerProps } from './Picker';
|
2
2
|
export declare const Picker: import("../utils").WithInstall<import("vue").DefineComponent<{
|
3
|
-
title: StringConstructor;
|
4
3
|
loading: BooleanConstructor;
|
5
4
|
readonly: BooleanConstructor;
|
6
5
|
allowHtml: BooleanConstructor;
|
@@ -20,6 +19,8 @@ export declare const Picker: import("../utils").WithInstall<import("vue").Define
|
|
20
19
|
type: (NumberConstructor | StringConstructor)[];
|
21
20
|
default: number;
|
22
21
|
};
|
22
|
+
} & {
|
23
|
+
title: StringConstructor;
|
23
24
|
cancelButtonText: StringConstructor;
|
24
25
|
confirmButtonText: StringConstructor;
|
25
26
|
} & {
|
@@ -37,7 +38,6 @@ export declare const Picker: import("../utils").WithInstall<import("vue").Define
|
|
37
38
|
};
|
38
39
|
columnsFieldNames: import("vue").PropType<import("./types").PickerFieldNames>;
|
39
40
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change" | "cancel" | "clickOption" | "confirm")[], "update:modelValue" | "change" | "cancel" | "clickOption" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
40
|
-
title: StringConstructor;
|
41
41
|
loading: BooleanConstructor;
|
42
42
|
readonly: BooleanConstructor;
|
43
43
|
allowHtml: BooleanConstructor;
|
@@ -57,6 +57,8 @@ export declare const Picker: import("../utils").WithInstall<import("vue").Define
|
|
57
57
|
type: (NumberConstructor | StringConstructor)[];
|
58
58
|
default: number;
|
59
59
|
};
|
60
|
+
} & {
|
61
|
+
title: StringConstructor;
|
60
62
|
cancelButtonText: StringConstructor;
|
61
63
|
confirmButtonText: StringConstructor;
|
62
64
|
} & {
|
@@ -92,6 +94,7 @@ export declare const Picker: import("../utils").WithInstall<import("vue").Define
|
|
92
94
|
toolbarPosition: import("./types").PickerToolbarPosition;
|
93
95
|
}>>;
|
94
96
|
export default Picker;
|
97
|
+
export { pickerProps } from './Picker';
|
95
98
|
export type { PickerProps };
|
96
99
|
export type { PickerColumn, PickerOption, PickerInstance, PickerFieldNames, PickerToolbarPosition, PickerCancelEventParams, PickerChangeEventParams, PickerConfirmEventParams, } from './types';
|
97
100
|
declare module 'vue' {
|
package/es/picker/index.mjs
CHANGED
@@ -2,7 +2,9 @@ import { withInstall } from "../utils/index.mjs";
|
|
2
2
|
import _Picker from "./Picker.mjs";
|
3
3
|
const Picker = withInstall(_Picker);
|
4
4
|
var stdin_default = Picker;
|
5
|
+
import { pickerProps } from "./Picker.mjs";
|
5
6
|
export {
|
6
7
|
Picker,
|
7
|
-
stdin_default as default
|
8
|
+
stdin_default as default,
|
9
|
+
pickerProps
|
8
10
|
};
|
@@ -1,3 +1,10 @@
|
|
1
1
|
import "../../style/base.css";
|
2
|
+
import "../../badge/index.css";
|
2
3
|
import "../../loading/index.css";
|
4
|
+
import "../../sticky/index.css";
|
5
|
+
import "../../swipe/index.css";
|
6
|
+
import "../../swipe-item/index.css";
|
7
|
+
import "../../tabs/index.css";
|
8
|
+
import "../../tab/index.css";
|
9
|
+
import "../../picker-group/index.css";
|
3
10
|
import "../index.css";
|
package/es/picker/utils.d.ts
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
import { type Numeric } from '../utils';
|
2
2
|
import type { Ref } from 'vue';
|
3
3
|
import type { PickerOption, PickerColumn, PickerFieldNames } from './types';
|
4
|
+
declare const name: string, bem: (el?: import("../utils").Mods | undefined, mods?: import("../utils").Mods | undefined) => import("../utils").Mods, t: (path: string, ...args: unknown[]) => any;
|
5
|
+
export { name, bem, t };
|
4
6
|
export declare const getFirstEnabledOption: (options: PickerOption[]) => PickerOption | undefined;
|
5
7
|
export declare function getColumnsType(columns: PickerColumn | PickerColumn[], fields: Required<PickerFieldNames>): "default" | "multiple" | "cascade";
|
6
8
|
export declare function findIndexOfEnabledOption(options: PickerOption[], index: number): number;
|
package/es/picker/utils.mjs
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
import { isDef, clamp, extend } from "../utils/index.mjs";
|
1
|
+
import { isDef, clamp, extend, createNamespace } from "../utils/index.mjs";
|
2
|
+
const [name, bem, t] = createNamespace("picker");
|
2
3
|
const getFirstEnabledOption = (options) => options.find((option) => !option.disabled) || options[0];
|
3
4
|
function getColumnsType(columns, fields) {
|
4
5
|
const firstColumn = columns[0];
|
@@ -55,19 +56,25 @@ function getElementTranslateY(element) {
|
|
55
56
|
return Number(translateY);
|
56
57
|
}
|
57
58
|
function assignDefaultFields(fields) {
|
58
|
-
return extend(
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
59
|
+
return extend(
|
60
|
+
{
|
61
|
+
text: "text",
|
62
|
+
value: "value",
|
63
|
+
children: "children"
|
64
|
+
},
|
65
|
+
fields
|
66
|
+
);
|
63
67
|
}
|
64
68
|
export {
|
65
69
|
assignDefaultFields,
|
70
|
+
bem,
|
66
71
|
findIndexOfEnabledOption,
|
67
72
|
findOptionByValue,
|
68
73
|
formatCascadeColumns,
|
69
74
|
getColumnsType,
|
70
75
|
getElementTranslateY,
|
71
76
|
getFirstEnabledOption,
|
72
|
-
isOptionExist
|
77
|
+
isOptionExist,
|
78
|
+
name,
|
79
|
+
t
|
73
80
|
};
|
@@ -0,0 +1,39 @@
|
|
1
|
+
import { type InjectionKey, type ExtractPropTypes } from 'vue';
|
2
|
+
export declare type PickerGroupProvide = Record<string, string>;
|
3
|
+
export declare const PICKER_GROUP_KEY: InjectionKey<PickerGroupProvide>;
|
4
|
+
export declare const pickerGroupProps: {
|
5
|
+
tabs: {
|
6
|
+
type: import("vue").PropType<string[]>;
|
7
|
+
default: () => never[];
|
8
|
+
};
|
9
|
+
} & {
|
10
|
+
title: StringConstructor;
|
11
|
+
cancelButtonText: StringConstructor;
|
12
|
+
confirmButtonText: StringConstructor;
|
13
|
+
};
|
14
|
+
export declare type PickerGroupProps = ExtractPropTypes<typeof pickerGroupProps>;
|
15
|
+
declare const _default: import("vue").DefineComponent<{
|
16
|
+
tabs: {
|
17
|
+
type: import("vue").PropType<string[]>;
|
18
|
+
default: () => never[];
|
19
|
+
};
|
20
|
+
} & {
|
21
|
+
title: StringConstructor;
|
22
|
+
cancelButtonText: StringConstructor;
|
23
|
+
confirmButtonText: StringConstructor;
|
24
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("cancel" | "confirm")[], "cancel" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
25
|
+
tabs: {
|
26
|
+
type: import("vue").PropType<string[]>;
|
27
|
+
default: () => never[];
|
28
|
+
};
|
29
|
+
} & {
|
30
|
+
title: StringConstructor;
|
31
|
+
cancelButtonText: StringConstructor;
|
32
|
+
confirmButtonText: StringConstructor;
|
33
|
+
}>> & {
|
34
|
+
onCancel?: ((...args: any[]) => any) | undefined;
|
35
|
+
onConfirm?: ((...args: any[]) => any) | undefined;
|
36
|
+
}, {
|
37
|
+
tabs: string[];
|
38
|
+
}>;
|
39
|
+
export default _default;
|
@@ -0,0 +1,57 @@
|
|
1
|
+
import { createVNode as _createVNode, mergeProps as _mergeProps } from "vue";
|
2
|
+
import { defineComponent } from "vue";
|
3
|
+
import { extend, makeArrayProp, createNamespace } from "../utils/index.mjs";
|
4
|
+
import { useChildren } from "@vant/use";
|
5
|
+
import { Tab } from "../tab/index.mjs";
|
6
|
+
import { Tabs } from "../tabs/index.mjs";
|
7
|
+
import Toolbar, { pickerToolbarProps } from "../picker/PickerToolbar.mjs";
|
8
|
+
const [name, bem] = createNamespace("picker-group");
|
9
|
+
const PICKER_GROUP_KEY = Symbol(name);
|
10
|
+
const pickerGroupProps = extend({
|
11
|
+
tabs: makeArrayProp()
|
12
|
+
}, pickerToolbarProps);
|
13
|
+
var stdin_default = defineComponent({
|
14
|
+
name,
|
15
|
+
props: pickerGroupProps,
|
16
|
+
emits: ["confirm", "cancel"],
|
17
|
+
setup(props, {
|
18
|
+
emit,
|
19
|
+
slots
|
20
|
+
}) {
|
21
|
+
const {
|
22
|
+
children,
|
23
|
+
linkChildren
|
24
|
+
} = useChildren(PICKER_GROUP_KEY);
|
25
|
+
linkChildren();
|
26
|
+
const onConfirm = () => {
|
27
|
+
emit("confirm", children.map((item) => item.confirm()));
|
28
|
+
};
|
29
|
+
const onCancel = () => emit("cancel");
|
30
|
+
return () => {
|
31
|
+
var _a;
|
32
|
+
const childNodes = (_a = slots.default) == null ? void 0 : _a.call(slots);
|
33
|
+
return _createVNode("div", {
|
34
|
+
"class": bem()
|
35
|
+
}, [_createVNode(Toolbar, _mergeProps(props, {
|
36
|
+
"onConfirm": onConfirm,
|
37
|
+
"onCancel": onCancel
|
38
|
+
}), null), _createVNode(Tabs, {
|
39
|
+
"shrink": true,
|
40
|
+
"class": bem("tabs"),
|
41
|
+
"animated": true
|
42
|
+
}, {
|
43
|
+
default: () => [props.tabs.map((title, index) => _createVNode(Tab, {
|
44
|
+
"title": title,
|
45
|
+
"titleClass": bem("tab-title")
|
46
|
+
}, {
|
47
|
+
default: () => [childNodes == null ? void 0 : childNodes[index]]
|
48
|
+
}))]
|
49
|
+
})]);
|
50
|
+
};
|
51
|
+
}
|
52
|
+
});
|
53
|
+
export {
|
54
|
+
PICKER_GROUP_KEY,
|
55
|
+
stdin_default as default,
|
56
|
+
pickerGroupProps
|
57
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
:root{--van-picker-group-background: var(--van-background-2)}.van-picker-group{background:var(--van-picker-group-background)}.van-picker-group__tabs{margin-top:var(--van-padding-base)}.van-picker-group__tab-title{margin-right:16px}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
import { PickerGroupProps } from './PickerGroup';
|
2
|
+
export declare const PickerGroup: import("../utils").WithInstall<import("vue").DefineComponent<{
|
3
|
+
tabs: {
|
4
|
+
type: import("vue").PropType<string[]>;
|
5
|
+
default: () => never[];
|
6
|
+
};
|
7
|
+
} & {
|
8
|
+
title: StringConstructor;
|
9
|
+
cancelButtonText: StringConstructor;
|
10
|
+
confirmButtonText: StringConstructor;
|
11
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("cancel" | "confirm")[], "cancel" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
12
|
+
tabs: {
|
13
|
+
type: import("vue").PropType<string[]>;
|
14
|
+
default: () => never[];
|
15
|
+
};
|
16
|
+
} & {
|
17
|
+
title: StringConstructor;
|
18
|
+
cancelButtonText: StringConstructor;
|
19
|
+
confirmButtonText: StringConstructor;
|
20
|
+
}>> & {
|
21
|
+
onCancel?: ((...args: any[]) => any) | undefined;
|
22
|
+
onConfirm?: ((...args: any[]) => any) | undefined;
|
23
|
+
}, {
|
24
|
+
tabs: string[];
|
25
|
+
}>>;
|
26
|
+
export default PickerGroup;
|
27
|
+
export { pickerGroupProps } from './PickerGroup';
|
28
|
+
export type { PickerGroupProps };
|
29
|
+
declare module 'vue' {
|
30
|
+
interface GlobalComponents {
|
31
|
+
VanPickerGroup: typeof PickerGroup;
|
32
|
+
}
|
33
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { withInstall } from "../utils/index.mjs";
|
2
|
+
import _PickerGroup from "./PickerGroup.mjs";
|
3
|
+
const PickerGroup = withInstall(_PickerGroup);
|
4
|
+
var stdin_default = PickerGroup;
|
5
|
+
import { pickerGroupProps } from "./PickerGroup.mjs";
|
6
|
+
export {
|
7
|
+
PickerGroup,
|
8
|
+
stdin_default as default,
|
9
|
+
pickerGroupProps
|
10
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import "../../style/base.css";
|
2
|
+
import "../../badge/index.css";
|
3
|
+
import "../../sticky/index.css";
|
4
|
+
import "../../swipe/index.css";
|
5
|
+
import "../../swipe-item/index.css";
|
6
|
+
import "../../tabs/index.css";
|
7
|
+
import "../../tab/index.css";
|
8
|
+
import "../../picker/index.css";
|
9
|
+
import "../index.css";
|
package/es/popover/Popover.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { type PropType, type CSSProperties, type ExtractPropTypes } from 'vue';
|
2
2
|
import { PopoverTheme, PopoverAction, PopoverTrigger, PopoverPlacement } from './types';
|
3
|
-
declare const popoverProps: {
|
3
|
+
export declare const popoverProps: {
|
4
4
|
show: BooleanConstructor;
|
5
5
|
theme: {
|
6
6
|
type: PropType<PopoverTheme>;
|
package/es/popover/Popover.mjs
CHANGED
package/es/popover/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
:root{--van-popover-arrow-size: 6px;--van-popover-radius: var(--van-radius-lg);--van-popover-action-width: 128px;--van-popover-action-height: 44px;--van-popover-action-font-size: var(--van-font-size-md);--van-popover-action-line-height: var(--van-line-height-md);--van-popover-action-icon-size: 20px;--van-popover-light-text-color: var(--van-text-color);--van-popover-light-background: var(--van-background-2);--van-popover-light-action-disabled-text-color: var(--van-text-color-3);--van-popover-dark-text-color: var(--van-white);--van-popover-dark-background: #4a4a4a;--van-popover-dark-action-disabled-text-color: var(--van-text-color-2)}.van-popover{position:absolute;overflow:visible;background-color:transparent;transition:opacity .15s,transform .15s}.van-popover__wrapper{display:inline-block}.van-popover__arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid;border-width:var(--van-popover-arrow-size)}.van-popover__content{overflow:hidden;border-radius:var(--van-popover-radius)}.van-popover__action{position:relative;display:flex;align-items:center;box-sizing:border-box;width:var(--van-popover-action-width);height:var(--van-popover-action-height);padding:0 var(--van-padding-md);font-size:var(--van-popover-action-font-size);line-height:var(--van-line-height-md);cursor:pointer}.van-popover__action:last-child .van-popover__action-text:after{display:none}.van-popover__action-text{display:flex;flex:1;align-items:center;justify-content:center;height:100%}.van-popover__action-icon{margin-right:var(--van-padding-xs);font-size:var(--van-popover-action-icon-size)}.van-popover__action--with-icon .van-popover__action-text{justify-content:flex-start}.van-popover[data-popper-placement^=top] .van-popover__arrow{bottom:0;border-top-color:currentColor;border-bottom-width:0;transform:translate(-50%);margin-bottom:calc(var(--van-popover-arrow-size) * -1)}.van-popover[data-popper-placement=top]{transform-origin:50% 100%}.van-popover[data-popper-placement=top] .van-popover__arrow{left:50%}.van-popover[data-popper-placement=top-start]{transform-origin:0 100%}.van-popover[data-popper-placement=top-start] .van-popover__arrow{left:var(--van-padding-md)}.van-popover[data-popper-placement=top-end]{transform-origin:100% 100%}.van-popover[data-popper-placement=top-end] .van-popover__arrow{right:var(--van-padding-md)}.van-popover[data-popper-placement^=left] .van-popover__arrow{right:0;border-right-width:0;border-left-color:currentColor;transform:translateY(-50%);margin-right:calc(var(--van-popover-arrow-size) * -1)}.van-popover[data-popper-placement=left]{transform-origin:100% 50%}.van-popover[data-popper-placement=left] .van-popover__arrow{top:50%}.van-popover[data-popper-placement=left-start]{transform-origin:100% 0}.van-popover[data-popper-placement=left-start] .van-popover__arrow{top:var(--van-padding-md)}.van-popover[data-popper-placement=left-end]{transform-origin:100% 100%}.van-popover[data-popper-placement=left-end] .van-popover__arrow{bottom:var(--van-padding-md)}.van-popover[data-popper-placement^=right] .van-popover__arrow{left:0;border-right-color:currentColor;border-left-width:0;transform:translateY(-50%);margin-left:calc(var(--van-popover-arrow-size) * -1)}.van-popover[data-popper-placement=right]{transform-origin:0 50%}.van-popover[data-popper-placement=right] .van-popover__arrow{top:50%}.van-popover[data-popper-placement=right-start]{transform-origin:0 0}.van-popover[data-popper-placement=right-start] .van-popover__arrow{top:var(--van-padding-md)}.van-popover[data-popper-placement=right-end]{transform-origin:0 100%}.van-popover[data-popper-placement=right-end] .van-popover__arrow{bottom:var(--van-padding-md)}.van-popover[data-popper-placement^=bottom] .van-popover__arrow{top:0;border-top-width:0;border-bottom-color:currentColor;transform:translate(-50%);margin-top:calc(var(--van-popover-arrow-size) * -1)}.van-popover[data-popper-placement=bottom]{transform-origin:50% 0}.van-popover[data-popper-placement=bottom] .van-popover__arrow{left:50%}.van-popover[data-popper-placement=bottom-start]{transform-origin:0 0}.van-popover[data-popper-placement=bottom-start] .van-popover__arrow{left:var(--van-padding-md)}.van-popover[data-popper-placement=bottom-end]{transform-origin:100% 0}.van-popover[data-popper-placement=bottom-end] .van-popover__arrow{right:var(--van-padding-md)}.van-popover--light{color:var(--van-popover-light-text-color)}.van-popover--light .van-popover__content{background:var(--van-popover-light-background);box-shadow:0 2px 12px rgba(50,50,51,.12)}.van-popover--light .van-popover__arrow{color:var(--van-popover-light-background)}.van-popover--light .van-popover__action:active{background-color:var(--van-active-color)}.van-popover--light .van-popover__action--disabled{color:var(--van-popover-light-action-disabled-text-color);cursor:not-allowed}.van-popover--light .van-popover__action--disabled:active{background-color:transparent}.van-popover--dark{color:var(--van-popover-dark-text-color)}.van-popover--dark .van-popover__content{background:var(--van-popover-dark-background)}.van-popover--dark .van-popover__arrow{color:var(--van-popover-dark-background)}.van-popover--dark .van-popover__action:active{background-color:rgba(0,0,0,.2)}.van-popover--dark .van-popover__action--disabled{color:var(--van-popover-dark-action-disabled-text-color)}.van-popover--dark .van-popover__action--disabled:active{background-color:transparent}.van-popover--dark .van-popover__action-text:after{border-color:var(--van-gray-7)}.van-popover-zoom-enter-from,.van-popover-zoom-leave-active{transform:scale(.8);opacity:0}.van-popover-zoom-enter-active{transition-timing-function:var(--van-ease-out)}.van-popover-zoom-leave-active{transition-timing-function:var(--van-ease-in)}
|
package/es/popover/index.d.ts
CHANGED
@@ -111,6 +111,7 @@ export declare const Popover: import("../utils").WithInstall<import("vue").Defin
|
|
111
111
|
placement: import("./types").PopoverPlacement;
|
112
112
|
}>>;
|
113
113
|
export default Popover;
|
114
|
+
export { popoverProps } from './Popover';
|
114
115
|
export type { PopoverProps } from './Popover';
|
115
116
|
export type { PopoverTheme, PopoverAction, PopoverTrigger, PopoverPlacement, } from './types';
|
116
117
|
declare module 'vue' {
|