vant 4.0.0-beta.0 → 4.0.0-rc.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/README.md +13 -9
- package/changelog.generated.md +207 -163
- package/es/action-bar/ActionBar.d.ts +2 -2
- package/es/action-bar/ActionBar.mjs +1 -0
- 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.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.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.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.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.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 +2 -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.d.ts +1 -0
- package/es/button/index.mjs +2 -0
- package/es/calendar/Calendar.d.ts +1 -1
- package/es/calendar/Calendar.mjs +8 -7
- 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.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.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.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.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.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.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 +9 -2
- package/es/collapse/Collapse.mjs +29 -1
- package/es/collapse/index.d.ts +2 -1
- package/es/collapse/index.mjs +2 -0
- package/es/collapse-item/CollapseItem.d.ts +2 -2
- package/es/collapse-item/CollapseItem.mjs +4 -1
- package/es/collapse-item/index.d.ts +2 -1
- package/es/collapse-item/index.mjs +2 -0
- package/es/composables/use-global-z-index.d.ts +4 -0
- package/es/composables/use-global-z-index.mjs +9 -0
- package/es/composables/use-height.d.ts +1 -1
- package/es/composables/use-height.mjs +8 -2
- package/es/composables/use-lazy-render.mjs +9 -5
- package/es/composables/use-lock-scroll.mjs +7 -2
- package/es/composables/use-placeholder.mjs +1 -1
- package/es/composables/use-visibility-change.mjs +6 -3
- package/es/config-provider/ConfigProvider.d.ts +15 -5
- package/es/config-provider/ConfigProvider.mjs +26 -9
- package/es/config-provider/index.d.ts +10 -3
- 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.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.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.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.d.ts +1 -0
- package/es/count-down/index.mjs +2 -0
- package/es/coupon/Coupon.d.ts +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.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.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.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.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 +4 -2
- package/es/dropdown-menu/index.d.ts +2 -1
- package/es/dropdown-menu/index.mjs +3 -1
- package/es/empty/Empty.d.ts +3 -3
- package/es/empty/Empty.mjs +283 -17
- 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 +15 -4
- package/es/field/index.d.ts +1 -0
- package/es/field/index.mjs +3 -1
- package/es/field/types.d.ts +1 -0
- package/es/field/utils.d.ts +1 -0
- package/es/field/utils.mjs +8 -2
- 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.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 +11 -3
- 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.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 +11 -5
- package/es/index-bar/index.d.ts +1 -0
- package/es/index-bar/index.mjs +3 -1
- package/es/index.d.ts +3 -1
- package/es/index.mjs +7 -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 +4 -2
- 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.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.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.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.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 +3 -3
- package/es/number-keyboard/NumberKeyboardKey.mjs +2 -2
- 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.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.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 +3 -2
- package/es/password-input/index.d.ts +1 -0
- package/es/password-input/index.mjs +3 -1
- package/es/picker/Picker.d.ts +11 -6
- package/es/picker/Picker.mjs +51 -65
- package/es/picker/PickerColumn.d.ts +2 -1
- package/es/picker/PickerColumn.mjs +11 -6
- package/es/picker/PickerToolbar.d.ts +21 -0
- package/es/picker/PickerToolbar.mjs +59 -0
- package/es/picker/index.d.ts +7 -3
- 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 +30 -28
- 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 +8 -6
- 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.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 +9 -4
- 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.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.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.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.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.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.d.ts +2 -1
- package/es/skeleton/index.mjs +3 -1
- package/es/slider/Slider.d.ts +1 -1
- package/es/slider/Slider.mjs +9 -4
- package/es/slider/index.d.ts +1 -0
- package/es/slider/index.mjs +3 -1
- package/es/space/Space.d.ts +48 -0
- package/es/space/Space.mjs +88 -0
- package/es/space/index.css +1 -0
- package/es/space/index.d.ts +38 -0
- package/es/space/index.mjs +10 -0
- package/es/space/style/index.d.ts +1 -0
- package/es/space/style/index.mjs +2 -0
- package/es/step/Step.d.ts +1 -1
- package/es/step/index.d.ts +1 -1
- package/es/stepper/Stepper.d.ts +1 -1
- package/es/stepper/Stepper.mjs +3 -2
- 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.d.ts +1 -0
- package/es/steps/index.mjs +3 -1
- package/es/sticky/Sticky.d.ts +1 -1
- package/es/sticky/Sticky.mjs +4 -2
- package/es/sticky/index.d.ts +1 -0
- package/es/sticky/index.mjs +3 -1
- package/es/submit-bar/SubmitBar.d.ts +1 -1
- package/es/submit-bar/SubmitBar.mjs +2 -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 +16 -8
- 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 +7 -4
- 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.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.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.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 +14 -3
- package/es/tabs/TabsContent.mjs +4 -0
- package/es/tabs/TabsTitle.d.ts +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.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.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.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.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/es/vue-tsx-shim.d.ts +7 -0
- package/lib/action-bar/ActionBar.d.ts +2 -2
- package/lib/action-bar/ActionBar.js +1 -0
- 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.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.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.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.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.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 +2 -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.d.ts +1 -0
- package/lib/button/index.js +6 -1
- package/lib/calendar/Calendar.d.ts +1 -1
- package/lib/calendar/Calendar.js +12 -8
- package/lib/calendar/CalendarMonth.js +4 -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.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.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.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.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.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.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 +9 -2
- package/lib/collapse/Collapse.js +29 -1
- package/lib/collapse/index.d.ts +2 -1
- package/lib/collapse/index.js +6 -1
- package/lib/collapse-item/CollapseItem.d.ts +2 -2
- package/lib/collapse-item/CollapseItem.js +4 -1
- package/lib/collapse-item/index.d.ts +2 -1
- package/lib/collapse-item/index.js +6 -1
- package/lib/composables/use-global-z-index.d.ts +4 -0
- package/lib/composables/use-global-z-index.js +28 -0
- package/lib/composables/use-height.d.ts +1 -1
- package/lib/composables/use-height.js +8 -2
- package/lib/composables/use-lazy-render.js +9 -5
- package/lib/composables/use-lock-scroll.js +7 -2
- package/lib/composables/use-placeholder.js +1 -1
- package/lib/composables/use-visibility-change.js +6 -3
- package/lib/config-provider/ConfigProvider.d.ts +15 -5
- package/lib/config-provider/ConfigProvider.js +24 -7
- package/lib/config-provider/index.d.ts +10 -3
- 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.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.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.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.d.ts +1 -0
- package/lib/count-down/index.js +6 -1
- package/lib/coupon/Coupon.d.ts +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.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.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.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.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 +4 -2
- package/lib/dropdown-menu/index.d.ts +2 -1
- package/lib/dropdown-menu/index.js +7 -2
- package/lib/empty/Empty.d.ts +3 -3
- package/lib/empty/Empty.js +283 -17
- 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 +13 -2
- package/lib/field/index.d.ts +1 -0
- package/lib/field/index.js +7 -2
- package/lib/field/types.d.ts +1 -0
- package/lib/field/utils.d.ts +1 -0
- package/lib/field/utils.js +8 -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.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 +10 -2
- 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.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 +11 -5
- 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 +3 -1
- package/lib/index.js +7 -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 +4 -2
- 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.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.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.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.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 +7 -4
- package/lib/number-keyboard/NumberKeyboardKey.js +2 -2
- 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.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.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 +3 -2
- package/lib/password-input/index.d.ts +1 -0
- package/lib/password-input/index.js +7 -2
- package/lib/picker/Picker.d.ts +11 -6
- package/lib/picker/Picker.js +57 -68
- package/lib/picker/PickerColumn.d.ts +2 -1
- package/lib/picker/PickerColumn.js +10 -5
- package/lib/picker/PickerToolbar.d.ts +21 -0
- package/lib/picker/PickerToolbar.js +78 -0
- package/lib/picker/index.d.ts +7 -3
- 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 +29 -27
- 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 +8 -6
- 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.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 +8 -3
- 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.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.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.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.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.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.d.ts +2 -1
- package/lib/skeleton/index.js +7 -2
- package/lib/slider/Slider.d.ts +1 -1
- package/lib/slider/Slider.js +8 -3
- package/lib/slider/index.d.ts +1 -0
- package/lib/slider/index.js +7 -2
- package/lib/space/Space.d.ts +48 -0
- package/lib/space/Space.js +107 -0
- package/lib/space/index.css +1 -0
- package/lib/space/index.d.ts +38 -0
- package/lib/space/index.js +35 -0
- package/lib/space/style/index.d.ts +1 -0
- package/lib/space/style/index.js +2 -0
- package/lib/step/Step.d.ts +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 +3 -2
- 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.d.ts +1 -0
- package/lib/steps/index.js +7 -2
- package/lib/sticky/Sticky.d.ts +1 -1
- package/lib/sticky/Sticky.js +4 -2
- package/lib/sticky/index.d.ts +1 -0
- package/lib/sticky/index.js +7 -2
- package/lib/submit-bar/SubmitBar.d.ts +1 -1
- package/lib/submit-bar/SubmitBar.js +2 -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 +15 -7
- 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 +6 -3
- 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.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.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.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 +18 -4
- package/lib/tabs/TabsContent.js +4 -0
- package/lib/tabs/TabsTitle.d.ts +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.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.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.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.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 +5416 -4902
- package/lib/vant.es.js +5547 -4924
- package/lib/vant.js +5431 -4948
- package/lib/vant.min.js +1 -1
- package/lib/vue-tsx-shim.d.ts +7 -0
- package/{vetur → lib}/web-types.json +1237 -1061
- package/package.json +14 -19
- package/es/empty/Images.d.ts +0 -4
- package/es/empty/Images.mjs +0 -271
- package/lib/empty/Images.d.ts +0 -4
- package/lib/empty/Images.js +0 -290
- package/vetur/attributes.json +0 -3530
- package/vetur/tags.json +0 -1212
@@ -204,9 +204,8 @@ var stdin_default = defineComponent({
|
|
204
204
|
unfit: !props.safeAreaInsetBottom,
|
205
205
|
"with-title": !!Title
|
206
206
|
}),
|
207
|
-
"onTouchstart": stopPropagation,
|
208
207
|
"onAnimationend": onAnimationEnd,
|
209
|
-
"
|
208
|
+
"onTouchstartPassive": stopPropagation
|
210
209
|
}, [Title, _createVNode("div", {
|
211
210
|
"class": bem("body")
|
212
211
|
}, [_createVNode("div", {
|
@@ -225,5 +224,6 @@ var stdin_default = defineComponent({
|
|
225
224
|
}
|
226
225
|
});
|
227
226
|
export {
|
228
|
-
stdin_default as default
|
227
|
+
stdin_default as default,
|
228
|
+
numberKeyboardProps
|
229
229
|
};
|
@@ -74,8 +74,8 @@ var stdin_default = defineComponent({
|
|
74
74
|
"class": bem("wrapper", {
|
75
75
|
wider: props.wider
|
76
76
|
}),
|
77
|
-
"
|
78
|
-
"
|
77
|
+
"onTouchstartPassive": onTouchStart,
|
78
|
+
"onTouchmovePassive": onTouchMove,
|
79
79
|
"onTouchend": onTouchEnd,
|
80
80
|
"onTouchcancel": onTouchEnd
|
81
81
|
}, [_createVNode("div", {
|
@@ -43,7 +43,7 @@ export declare const NumberKeyboard: import("../utils").WithInstall<import("vue"
|
|
43
43
|
type: import("vue").PropType<string | string[]>;
|
44
44
|
default: string;
|
45
45
|
};
|
46
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("input" | "blur" | "update:modelValue" | "
|
46
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("input" | "blur" | "update:modelValue" | "close" | "hide" | "show" | "delete")[], "input" | "blur" | "update:modelValue" | "close" | "hide" | "show" | "delete", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
47
47
|
show: BooleanConstructor;
|
48
48
|
title: StringConstructor;
|
49
49
|
theme: {
|
@@ -111,6 +111,7 @@ export declare const NumberKeyboard: import("../utils").WithInstall<import("vue"
|
|
111
111
|
extraKey: string | string[];
|
112
112
|
}>>;
|
113
113
|
export default NumberKeyboard;
|
114
|
+
export { numberKeyboardProps } from './NumberKeyboard';
|
114
115
|
export type { NumberKeyboardProps, NumberKeyboardTheme, } from './NumberKeyboard';
|
115
116
|
declare module 'vue' {
|
116
117
|
interface GlobalComponents {
|
@@ -2,7 +2,9 @@ import { withInstall } from "../utils/index.mjs";
|
|
2
2
|
import _NumberKeyboard from "./NumberKeyboard.mjs";
|
3
3
|
const NumberKeyboard = withInstall(_NumberKeyboard);
|
4
4
|
var stdin_default = NumberKeyboard;
|
5
|
+
import { numberKeyboardProps } from "./NumberKeyboard.mjs";
|
5
6
|
export {
|
6
7
|
NumberKeyboard,
|
7
|
-
stdin_default as default
|
8
|
+
stdin_default as default,
|
9
|
+
numberKeyboardProps
|
8
10
|
};
|
package/es/overlay/Overlay.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { type PropType, type CSSProperties, type ExtractPropTypes } from 'vue';
|
2
|
-
declare const overlayProps: {
|
2
|
+
export declare const overlayProps: {
|
3
3
|
show: BooleanConstructor;
|
4
4
|
zIndex: (NumberConstructor | StringConstructor)[];
|
5
5
|
duration: (NumberConstructor | StringConstructor)[];
|
@@ -29,7 +29,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
29
29
|
default: true;
|
30
30
|
};
|
31
31
|
customStyle: PropType<CSSProperties>;
|
32
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
32
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
33
33
|
show: BooleanConstructor;
|
34
34
|
zIndex: (NumberConstructor | StringConstructor)[];
|
35
35
|
duration: (NumberConstructor | StringConstructor)[];
|
package/es/overlay/Overlay.mjs
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
import { withDirectives as _withDirectives, createVNode as _createVNode, vShow as _vShow } from "vue";
|
2
|
-
import { Transition, defineComponent } from "vue";
|
3
|
-
import {
|
2
|
+
import { ref, Transition, defineComponent } from "vue";
|
3
|
+
import { isDef, extend, truthProp, numericProp, unknownProp, preventDefault, createNamespace, getZIndexStyle } from "../utils/index.mjs";
|
4
|
+
import { useEventListener } from "@vant/use";
|
4
5
|
import { useLazyRender } from "../composables/use-lazy-render.mjs";
|
5
6
|
const [name, bem] = createNamespace("overlay");
|
6
7
|
const overlayProps = {
|
@@ -18,9 +19,12 @@ var stdin_default = defineComponent({
|
|
18
19
|
setup(props, {
|
19
20
|
slots
|
20
21
|
}) {
|
22
|
+
const root = ref();
|
21
23
|
const lazyRender = useLazyRender(() => props.show || !props.lazyRender);
|
22
|
-
const
|
23
|
-
|
24
|
+
const onTouchMove = (event) => {
|
25
|
+
if (props.lockScroll) {
|
26
|
+
preventDefault(event, true);
|
27
|
+
}
|
24
28
|
};
|
25
29
|
const renderOverlay = lazyRender(() => {
|
26
30
|
var _a;
|
@@ -29,11 +33,14 @@ var stdin_default = defineComponent({
|
|
29
33
|
style.animationDuration = `${props.duration}s`;
|
30
34
|
}
|
31
35
|
return _withDirectives(_createVNode("div", {
|
36
|
+
"ref": root,
|
32
37
|
"style": style,
|
33
|
-
"class": [bem(), props.className]
|
34
|
-
"onTouchmove": props.lockScroll ? preventTouchMove : noop
|
38
|
+
"class": [bem(), props.className]
|
35
39
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]), [[_vShow, props.show]]);
|
36
40
|
});
|
41
|
+
useEventListener("touchmove", onTouchMove, {
|
42
|
+
target: root
|
43
|
+
});
|
37
44
|
return () => _createVNode(Transition, {
|
38
45
|
"name": "van-fade",
|
39
46
|
"appear": true
|
@@ -43,5 +50,6 @@ var stdin_default = defineComponent({
|
|
43
50
|
}
|
44
51
|
});
|
45
52
|
export {
|
46
|
-
stdin_default as default
|
53
|
+
stdin_default as default,
|
54
|
+
overlayProps
|
47
55
|
};
|
package/es/overlay/index.d.ts
CHANGED
@@ -12,7 +12,7 @@ export declare const Overlay: import("../utils").WithInstall<import("vue").Defin
|
|
12
12
|
default: true;
|
13
13
|
};
|
14
14
|
customStyle: import("vue").PropType<import("vue").CSSProperties>;
|
15
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
15
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
16
16
|
show: BooleanConstructor;
|
17
17
|
zIndex: (NumberConstructor | StringConstructor)[];
|
18
18
|
duration: (NumberConstructor | StringConstructor)[];
|
@@ -32,6 +32,7 @@ export declare const Overlay: import("../utils").WithInstall<import("vue").Defin
|
|
32
32
|
lazyRender: boolean;
|
33
33
|
}>>;
|
34
34
|
export default Overlay;
|
35
|
+
export { overlayProps } from './Overlay';
|
35
36
|
export type { OverlayProps } from './Overlay';
|
36
37
|
declare module 'vue' {
|
37
38
|
interface GlobalComponents {
|
package/es/overlay/index.mjs
CHANGED
@@ -2,7 +2,9 @@ import { withInstall } from "../utils/index.mjs";
|
|
2
2
|
import _Overlay from "./Overlay.mjs";
|
3
3
|
const Overlay = withInstall(_Overlay);
|
4
4
|
var stdin_default = Overlay;
|
5
|
+
import { overlayProps } from "./Overlay.mjs";
|
5
6
|
export {
|
6
7
|
Overlay,
|
7
|
-
stdin_default as default
|
8
|
+
stdin_default as default,
|
9
|
+
overlayProps
|
8
10
|
};
|
package/es/pagination/index.d.ts
CHANGED
@@ -67,6 +67,7 @@ export declare const Pagination: import("../utils").WithInstall<import("vue").De
|
|
67
67
|
forceEllipses: boolean;
|
68
68
|
}>>;
|
69
69
|
export default Pagination;
|
70
|
+
export { paginationProps } from './Pagination';
|
70
71
|
export type { PaginationMode, PaginationProps } from './Pagination';
|
71
72
|
declare module 'vue' {
|
72
73
|
interface GlobalComponents {
|
package/es/pagination/index.mjs
CHANGED
@@ -2,7 +2,9 @@ import { withInstall } from "../utils/index.mjs";
|
|
2
2
|
import _Pagination from "./Pagination.mjs";
|
3
3
|
const Pagination = withInstall(_Pagination);
|
4
4
|
var stdin_default = Pagination;
|
5
|
+
import { paginationProps } from "./Pagination.mjs";
|
5
6
|
export {
|
6
7
|
Pagination,
|
7
|
-
stdin_default as default
|
8
|
+
stdin_default as default,
|
9
|
+
paginationProps
|
8
10
|
};
|
@@ -66,7 +66,7 @@ var stdin_default = defineComponent({
|
|
66
66
|
"class": [bem("security"), {
|
67
67
|
[BORDER_SURROUND]: !props.gutter
|
68
68
|
}],
|
69
|
-
"
|
69
|
+
"onTouchstartPassive": onTouchStart
|
70
70
|
}, [renderPoints()]), info && _createVNode("div", {
|
71
71
|
"class": bem(props.errorInfo ? "error-info" : "info")
|
72
72
|
}, [info])]);
|
@@ -74,5 +74,6 @@ var stdin_default = defineComponent({
|
|
74
74
|
}
|
75
75
|
});
|
76
76
|
export {
|
77
|
-
stdin_default as default
|
77
|
+
stdin_default as default,
|
78
|
+
passwordInputProps
|
78
79
|
};
|
@@ -41,6 +41,7 @@ export declare const PasswordInput: import("../utils").WithInstall<import("vue")
|
|
41
41
|
focused: boolean;
|
42
42
|
}>>;
|
43
43
|
export default PasswordInput;
|
44
|
+
export { passwordInputProps } from './PasswordInput';
|
44
45
|
export type { PasswordInputProps } from './PasswordInput';
|
45
46
|
declare module 'vue' {
|
46
47
|
interface GlobalComponents {
|
@@ -2,7 +2,9 @@ import { withInstall } from "../utils/index.mjs";
|
|
2
2
|
import _PasswordInput from "./PasswordInput.mjs";
|
3
3
|
const PasswordInput = withInstall(_PasswordInput);
|
4
4
|
var stdin_default = PasswordInput;
|
5
|
+
import { passwordInputProps } from "./PasswordInput.mjs";
|
5
6
|
export {
|
6
7
|
PasswordInput,
|
7
|
-
stdin_default as default
|
8
|
+
stdin_default as default,
|
9
|
+
passwordInputProps
|
8
10
|
};
|
package/es/picker/Picker.d.ts
CHANGED
@@ -2,7 +2,6 @@ import { type PropType, type ExtractPropTypes } from 'vue';
|
|
2
2
|
import { type Numeric } from '../utils';
|
3
3
|
import type { PickerColumn, PickerOption, PickerFieldNames, PickerToolbarPosition } from './types';
|
4
4
|
export declare const pickerSharedProps: {
|
5
|
-
title: StringConstructor;
|
6
5
|
loading: BooleanConstructor;
|
7
6
|
readonly: BooleanConstructor;
|
8
7
|
allowHtml: BooleanConstructor;
|
@@ -22,11 +21,12 @@ export declare const pickerSharedProps: {
|
|
22
21
|
type: (NumberConstructor | StringConstructor)[];
|
23
22
|
default: number;
|
24
23
|
};
|
24
|
+
} & {
|
25
|
+
title: StringConstructor;
|
25
26
|
cancelButtonText: StringConstructor;
|
26
27
|
confirmButtonText: StringConstructor;
|
27
28
|
};
|
28
|
-
declare const pickerProps: {
|
29
|
-
title: StringConstructor;
|
29
|
+
export declare const pickerProps: {
|
30
30
|
loading: BooleanConstructor;
|
31
31
|
readonly: BooleanConstructor;
|
32
32
|
allowHtml: BooleanConstructor;
|
@@ -46,6 +46,8 @@ declare const pickerProps: {
|
|
46
46
|
type: (NumberConstructor | StringConstructor)[];
|
47
47
|
default: number;
|
48
48
|
};
|
49
|
+
} & {
|
50
|
+
title: StringConstructor;
|
49
51
|
cancelButtonText: StringConstructor;
|
50
52
|
confirmButtonText: StringConstructor;
|
51
53
|
} & {
|
@@ -65,7 +67,6 @@ declare const pickerProps: {
|
|
65
67
|
};
|
66
68
|
export declare type PickerProps = ExtractPropTypes<typeof pickerProps>;
|
67
69
|
declare const _default: import("vue").DefineComponent<{
|
68
|
-
title: StringConstructor;
|
69
70
|
loading: BooleanConstructor;
|
70
71
|
readonly: BooleanConstructor;
|
71
72
|
allowHtml: BooleanConstructor;
|
@@ -85,6 +86,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
85
86
|
type: (NumberConstructor | StringConstructor)[];
|
86
87
|
default: number;
|
87
88
|
};
|
89
|
+
} & {
|
90
|
+
title: StringConstructor;
|
88
91
|
cancelButtonText: StringConstructor;
|
89
92
|
confirmButtonText: StringConstructor;
|
90
93
|
} & {
|
@@ -101,8 +104,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
101
104
|
default: PickerToolbarPosition;
|
102
105
|
};
|
103
106
|
columnsFieldNames: PropType<PickerFieldNames>;
|
104
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change" | "cancel" | "confirm")[], "update:modelValue" | "change" | "cancel" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
105
|
-
title: StringConstructor;
|
107
|
+
}, () => 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<ExtractPropTypes<{
|
106
108
|
loading: BooleanConstructor;
|
107
109
|
readonly: BooleanConstructor;
|
108
110
|
allowHtml: BooleanConstructor;
|
@@ -122,6 +124,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
122
124
|
type: (NumberConstructor | StringConstructor)[];
|
123
125
|
default: number;
|
124
126
|
};
|
127
|
+
} & {
|
128
|
+
title: StringConstructor;
|
125
129
|
cancelButtonText: StringConstructor;
|
126
130
|
confirmButtonText: StringConstructor;
|
127
131
|
} & {
|
@@ -142,6 +146,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
142
146
|
onChange?: ((...args: any[]) => any) | undefined;
|
143
147
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
144
148
|
onCancel?: ((...args: any[]) => any) | undefined;
|
149
|
+
onClickOption?: ((...args: any[]) => any) | undefined;
|
145
150
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
146
151
|
}, {
|
147
152
|
modelValue: Numeric[];
|
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(),
|
@@ -28,12 +26,16 @@ const pickerProps = extend({}, pickerSharedProps, {
|
|
28
26
|
var stdin_default = defineComponent({
|
29
27
|
name,
|
30
28
|
props: pickerProps,
|
31
|
-
emits: ["confirm", "cancel", "change", "update:modelValue"],
|
29
|
+
emits: ["confirm", "cancel", "change", "clickOption", "update:modelValue"],
|
32
30
|
setup(props, {
|
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,56 +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
|
};
|
87
|
+
const onClickOption = (currentOption, columnIndex) => emit("clickOption", extend({
|
88
|
+
columnIndex,
|
89
|
+
currentOption
|
90
|
+
}, getEventParams()));
|
83
91
|
const confirm = () => {
|
84
92
|
children.forEach((child) => child.stopMomentum());
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
});
|
89
|
-
};
|
90
|
-
const cancel = () => emit("cancel", {
|
91
|
-
selectedValues: selectedValues.value,
|
92
|
-
selectedOptions: selectedOptions.value
|
93
|
-
});
|
94
|
-
const renderTitle = () => {
|
95
|
-
if (slots.title) {
|
96
|
-
return slots.title();
|
97
|
-
}
|
98
|
-
if (props.title) {
|
99
|
-
return _createVNode("div", {
|
100
|
-
"class": [bem("title"), "van-ellipsis"]
|
101
|
-
}, [props.title]);
|
102
|
-
}
|
103
|
-
};
|
104
|
-
const renderCancel = () => {
|
105
|
-
const text = props.cancelButtonText || t("cancel");
|
106
|
-
return _createVNode("button", {
|
107
|
-
"type": "button",
|
108
|
-
"class": [bem("cancel"), HAPTICS_FEEDBACK],
|
109
|
-
"onClick": cancel
|
110
|
-
}, [slots.cancel ? slots.cancel() : text]);
|
111
|
-
};
|
112
|
-
const renderConfirm = () => {
|
113
|
-
const text = props.confirmButtonText || t("confirm");
|
114
|
-
return _createVNode("button", {
|
115
|
-
"type": "button",
|
116
|
-
"class": [bem("confirm"), HAPTICS_FEEDBACK],
|
117
|
-
"onClick": confirm
|
118
|
-
}, [slots.confirm ? slots.confirm() : text]);
|
119
|
-
};
|
120
|
-
const renderToolbar = () => {
|
121
|
-
if (props.showToolbar) {
|
122
|
-
return _createVNode("div", {
|
123
|
-
"class": bem("toolbar")
|
124
|
-
}, [slots.toolbar ? slots.toolbar() : [renderCancel(), renderTitle(), renderConfirm()]]);
|
125
|
-
}
|
93
|
+
const params = getEventParams();
|
94
|
+
emit("confirm", params);
|
95
|
+
return params;
|
126
96
|
};
|
97
|
+
const cancel = () => emit("cancel", getEventParams());
|
127
98
|
const renderColumnItems = () => currentColumns.value.map((options, columnIndex) => _createVNode(Column, {
|
128
99
|
"value": selectedValues.value[columnIndex],
|
129
100
|
"fields": fields.value,
|
@@ -133,7 +104,8 @@ var stdin_default = defineComponent({
|
|
133
104
|
"optionHeight": optionHeight.value,
|
134
105
|
"swipeDuration": props.swipeDuration,
|
135
106
|
"visibleOptionNum": props.visibleOptionNum,
|
136
|
-
"onChange": (value) => onChange(value, columnIndex)
|
107
|
+
"onChange": (value) => onChange(value, columnIndex),
|
108
|
+
"onClickOption": (option) => onClickOption(option, columnIndex)
|
137
109
|
}, {
|
138
110
|
option: slots.option
|
139
111
|
}));
|
@@ -160,11 +132,19 @@ var stdin_default = defineComponent({
|
|
160
132
|
height: `${wrapHeight}px`
|
161
133
|
};
|
162
134
|
return _createVNode("div", {
|
135
|
+
"ref": columnsRef,
|
163
136
|
"class": bem("columns"),
|
164
|
-
"style": columnsStyle
|
165
|
-
"onTouchmove": preventDefault
|
137
|
+
"style": columnsStyle
|
166
138
|
}, [renderColumnItems(), renderMask(wrapHeight)]);
|
167
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
|
+
};
|
168
148
|
watch(currentColumns, (columns) => {
|
169
149
|
columns.forEach((options, index) => {
|
170
150
|
if (options.length && !isOptionExist(options, selectedValues.value[index], fields.value)) {
|
@@ -174,20 +154,25 @@ var stdin_default = defineComponent({
|
|
174
154
|
}, {
|
175
155
|
immediate: true
|
176
156
|
});
|
157
|
+
let lastEmittedModelValue;
|
177
158
|
watch(() => props.modelValue, (newValues) => {
|
178
|
-
if (!isSameValue(newValues, selectedValues.value)) {
|
179
|
-
selectedValues.value = newValues;
|
159
|
+
if (!isSameValue(newValues, selectedValues.value) && !isSameValue(newValues, lastEmittedModelValue)) {
|
160
|
+
selectedValues.value = newValues.slice(0);
|
180
161
|
}
|
181
162
|
}, {
|
182
163
|
deep: true
|
183
164
|
});
|
184
165
|
watch(selectedValues, (newValues) => {
|
185
166
|
if (!isSameValue(newValues, props.modelValue)) {
|
186
|
-
|
167
|
+
lastEmittedModelValue = newValues.slice(0);
|
168
|
+
emit("update:modelValue", lastEmittedModelValue);
|
187
169
|
}
|
188
170
|
}, {
|
189
171
|
immediate: true
|
190
172
|
});
|
173
|
+
useEventListener("touchmove", preventDefault, {
|
174
|
+
target: columnsRef
|
175
|
+
});
|
191
176
|
const getSelectedOptions = () => selectedOptions.value;
|
192
177
|
useExpose({
|
193
178
|
confirm,
|
@@ -205,5 +190,6 @@ var stdin_default = defineComponent({
|
|
205
190
|
});
|
206
191
|
export {
|
207
192
|
stdin_default as default,
|
193
|
+
pickerProps,
|
208
194
|
pickerSharedProps
|
209
195
|
};
|
@@ -25,7 +25,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
25
25
|
type: (NumberConstructor | StringConstructor)[];
|
26
26
|
required: true;
|
27
27
|
};
|
28
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "change"[], "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
28
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "clickOption")[], "change" | "clickOption", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
29
29
|
value: (NumberConstructor | StringConstructor)[];
|
30
30
|
fields: {
|
31
31
|
type: PropType<Required<PickerFieldNames>>;
|
@@ -51,6 +51,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
51
51
|
};
|
52
52
|
}>> & {
|
53
53
|
onChange?: ((...args: any[]) => any) | undefined;
|
54
|
+
onClickOption?: ((...args: any[]) => any) | undefined;
|
54
55
|
}, {
|
55
56
|
readonly: boolean;
|
56
57
|
allowHtml: boolean;
|
@@ -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;
|
@@ -22,7 +22,7 @@ var stdin_default = defineComponent({
|
|
22
22
|
swipeDuration: makeRequiredProp(numericProp),
|
23
23
|
visibleOptionNum: makeRequiredProp(numericProp)
|
24
24
|
},
|
25
|
-
emits: ["change"],
|
25
|
+
emits: ["change", "clickOption"],
|
26
26
|
setup(props, {
|
27
27
|
emit,
|
28
28
|
slots
|
@@ -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);
|
@@ -54,13 +55,14 @@ var stdin_default = defineComponent({
|
|
54
55
|
}
|
55
56
|
currentOffset.value = offset;
|
56
57
|
};
|
57
|
-
const
|
58
|
+
const onClickOption = (index) => {
|
58
59
|
if (moving || props.readonly) {
|
59
60
|
return;
|
60
61
|
}
|
61
62
|
transitionEndTrigger = null;
|
62
63
|
currentDuration.value = DEFAULT_DURATION;
|
63
64
|
updateValueByIndex(index);
|
65
|
+
emit("clickOption", props.options[index]);
|
64
66
|
};
|
65
67
|
const getIndexByOffset = (offset) => clamp(Math.round(-offset / props.optionHeight), 0, count() - 1);
|
66
68
|
const momentum = (distance, duration) => {
|
@@ -145,7 +147,7 @@ var stdin_default = defineComponent({
|
|
145
147
|
disabled,
|
146
148
|
selected: value === props.value
|
147
149
|
}), option.className],
|
148
|
-
onClick: () =>
|
150
|
+
onClick: () => onClickOption(index)
|
149
151
|
};
|
150
152
|
const childData = {
|
151
153
|
class: "van-ellipsis",
|
@@ -164,10 +166,13 @@ var stdin_default = defineComponent({
|
|
164
166
|
const offset = -enabledIndex * props.optionHeight;
|
165
167
|
currentOffset.value = offset;
|
166
168
|
});
|
169
|
+
useEventListener("touchmove", onTouchMove, {
|
170
|
+
target: root
|
171
|
+
});
|
167
172
|
return () => _createVNode("div", {
|
173
|
+
"ref": root,
|
168
174
|
"class": bem(),
|
169
|
-
"
|
170
|
-
"onTouchmove": onTouchMove,
|
175
|
+
"onTouchstartPassive": onTouchStart,
|
171
176
|
"onTouchend": onTouchEnd,
|
172
177
|
"onTouchcancel": onTouchEnd
|
173
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;
|