vant 4.4.0 → 4.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/action-bar/ActionBar.d.ts +1 -1
- package/es/action-bar/index.d.ts +1 -1
- package/es/action-bar-button/ActionBarButton.d.ts +1 -1
- package/es/action-bar-button/index.d.ts +1 -1
- package/es/action-bar-icon/ActionBarIcon.d.ts +1 -1
- package/es/action-bar-icon/index.d.ts +1 -1
- package/es/action-sheet/ActionSheet.d.ts +1 -1
- package/es/action-sheet/index.d.ts +1 -1
- package/es/address-edit/AddressEdit.d.ts +1 -1
- package/es/address-edit/AddressEditDetail.d.ts +1 -1
- package/es/address-edit/index.d.ts +1 -1
- package/es/address-list/AddressList.d.ts +14 -1
- package/es/address-list/AddressList.mjs +4 -2
- package/es/address-list/AddressListItem.d.ts +10 -1
- package/es/address-list/AddressListItem.mjs +4 -3
- package/es/address-list/index.d.ts +10 -1
- package/es/area/Area.d.ts +1 -1
- package/es/area/index.d.ts +1 -1
- package/es/back-top/BackTop.d.ts +1 -1
- package/es/back-top/BackTop.mjs +14 -1
- package/es/back-top/index.d.ts +1 -1
- package/es/badge/Badge.d.ts +1 -1
- package/es/badge/index.d.ts +1 -1
- package/es/barrage/Barrage.d.ts +1 -1
- package/es/barrage/index.d.ts +1 -1
- package/es/button/Button.d.ts +1 -1
- package/es/button/index.d.ts +1 -1
- package/es/calendar/Calendar.d.ts +1 -1
- package/es/calendar/CalendarDay.d.ts +1 -1
- package/es/calendar/CalendarHeader.d.ts +1 -1
- package/es/calendar/CalendarMonth.d.ts +1 -1
- package/es/calendar/index.d.ts +1 -1
- package/es/card/Card.d.ts +1 -1
- package/es/card/index.d.ts +1 -1
- package/es/cascader/Cascader.d.ts +1 -1
- package/es/cascader/index.d.ts +1 -1
- package/es/cell/Cell.d.ts +1 -1
- package/es/cell/index.d.ts +1 -1
- package/es/cell-group/CellGroup.d.ts +1 -1
- package/es/cell-group/index.d.ts +1 -1
- package/es/checkbox/Checkbox.d.ts +1 -1
- package/es/checkbox/Checker.d.ts +1 -1
- package/es/checkbox/index.d.ts +1 -1
- package/es/checkbox-group/CheckboxGroup.d.ts +1 -1
- package/es/checkbox-group/index.d.ts +1 -1
- package/es/circle/Circle.d.ts +1 -1
- package/es/circle/index.d.ts +1 -1
- package/es/col/Col.d.ts +1 -1
- package/es/col/index.d.ts +1 -1
- package/es/collapse/Collapse.d.ts +1 -1
- package/es/collapse/index.d.ts +1 -1
- package/es/collapse-item/CollapseItem.d.ts +1 -1
- package/es/collapse-item/index.d.ts +1 -1
- package/es/config-provider/ConfigProvider.d.ts +1 -1
- package/es/config-provider/index.d.ts +1 -1
- package/es/contact-card/ContactCard.d.ts +1 -1
- package/es/contact-card/index.d.ts +1 -1
- package/es/contact-edit/ContactEdit.d.ts +1 -1
- package/es/contact-edit/index.d.ts +1 -1
- package/es/contact-list/ContactList.d.ts +1 -1
- package/es/contact-list/index.d.ts +1 -1
- package/es/count-down/CountDown.d.ts +1 -1
- package/es/count-down/index.d.ts +1 -1
- package/es/coupon/Coupon.d.ts +1 -1
- package/es/coupon/index.d.ts +1 -1
- package/es/coupon-cell/CouponCell.d.ts +1 -1
- package/es/coupon-cell/index.d.ts +1 -1
- package/es/coupon-list/CouponList.d.ts +1 -1
- package/es/coupon-list/index.d.ts +1 -1
- package/es/date-picker/DatePicker.d.ts +4 -4
- package/es/date-picker/index.d.ts +3 -3
- package/es/date-picker/utils.d.ts +4 -2
- package/es/date-picker/utils.mjs +8 -3
- package/es/dialog/Dialog.d.ts +1 -1
- package/es/dialog/index.d.ts +1 -1
- package/es/divider/Divider.d.ts +1 -1
- package/es/divider/index.d.ts +1 -1
- package/es/dropdown-item/DropdownItem.d.ts +1 -1
- package/es/dropdown-item/index.d.ts +1 -1
- package/es/dropdown-menu/DropdownMenu.d.ts +1 -1
- package/es/dropdown-menu/DropdownMenu.mjs +10 -3
- package/es/dropdown-menu/index.d.ts +1 -1
- package/es/dropdown-menu/types.d.ts +5 -1
- package/es/empty/Empty.d.ts +1 -1
- package/es/empty/index.d.ts +1 -1
- package/es/field/Field.d.ts +1 -1
- package/es/field/index.d.ts +1 -1
- package/es/floating-panel/FloatingPanel.d.ts +77 -0
- package/es/floating-panel/FloatingPanel.mjs +126 -0
- package/es/floating-panel/index.css +1 -0
- package/es/floating-panel/index.d.ts +60 -0
- package/es/floating-panel/index.mjs +8 -0
- package/es/floating-panel/style/index.d.ts +1 -0
- package/es/floating-panel/style/index.mjs +2 -0
- package/es/form/Form.d.ts +1 -1
- package/es/form/index.d.ts +1 -1
- package/es/grid/Grid.d.ts +1 -1
- package/es/grid/index.d.ts +1 -1
- package/es/grid-item/GridItem.d.ts +1 -1
- package/es/grid-item/index.d.ts +1 -1
- package/es/icon/Icon.d.ts +1 -1
- package/es/icon/index.d.ts +1 -1
- package/es/image/Image.d.ts +1 -1
- package/es/image/index.d.ts +1 -1
- package/es/image-preview/ImagePreview.d.ts +1 -1
- package/es/image-preview/ImagePreviewItem.d.ts +1 -1
- package/es/image-preview/ImagePreviewItem.mjs +9 -3
- package/es/image-preview/index.d.ts +1 -1
- package/es/index-anchor/IndexAnchor.d.ts +1 -1
- package/es/index-anchor/index.d.ts +1 -1
- package/es/index-bar/IndexBar.d.ts +1 -1
- package/es/index-bar/index.d.ts +1 -1
- package/es/index.d.ts +2 -1
- package/es/index.mjs +4 -1
- package/es/list/List.d.ts +1 -1
- package/es/list/index.d.ts +1 -1
- package/es/loading/Loading.d.ts +1 -1
- package/es/loading/index.d.ts +1 -1
- package/es/nav-bar/NavBar.d.ts +1 -1
- package/es/nav-bar/index.d.ts +1 -1
- package/es/notice-bar/NoticeBar.d.ts +1 -1
- package/es/notice-bar/index.d.ts +1 -1
- package/es/notify/Notify.d.ts +1 -1
- package/es/notify/index.d.ts +1 -1
- package/es/number-keyboard/NumberKeyboard.d.ts +1 -1
- package/es/number-keyboard/NumberKeyboardKey.d.ts +1 -1
- package/es/number-keyboard/index.d.ts +1 -1
- package/es/overlay/Overlay.d.ts +1 -1
- package/es/overlay/index.d.ts +1 -1
- package/es/pagination/Pagination.d.ts +1 -1
- package/es/pagination/index.d.ts +1 -1
- package/es/password-input/PasswordInput.d.ts +1 -1
- package/es/password-input/index.d.ts +1 -1
- package/es/picker/Picker.d.ts +1 -1
- package/es/picker/PickerColumn.d.ts +1 -1
- package/es/picker/PickerToolbar.d.ts +1 -1
- package/es/picker/index.d.ts +1 -1
- package/es/picker-group/PickerGroup.d.ts +1 -1
- package/es/picker-group/index.d.ts +1 -1
- package/es/popover/Popover.d.ts +15 -2
- package/es/popover/Popover.mjs +9 -4
- package/es/popover/index.css +1 -1
- package/es/popover/index.d.ts +10 -1
- package/es/popover/types.d.ts +1 -0
- package/es/popup/Popup.d.ts +1 -1
- package/es/popup/Popup.mjs +8 -1
- package/es/popup/index.d.ts +1 -1
- package/es/progress/Progress.d.ts +1 -1
- package/es/progress/index.d.ts +1 -1
- package/es/pull-refresh/PullRefresh.d.ts +1 -1
- package/es/pull-refresh/index.d.ts +1 -1
- package/es/radio/Radio.d.ts +1 -1
- package/es/radio/index.d.ts +1 -1
- package/es/radio-group/RadioGroup.d.ts +1 -1
- package/es/radio-group/index.d.ts +1 -1
- package/es/rate/Rate.d.ts +1 -1
- package/es/rate/index.d.ts +1 -1
- package/es/row/Row.d.ts +1 -1
- package/es/row/index.d.ts +1 -1
- package/es/search/Search.d.ts +1 -1
- package/es/search/index.d.ts +1 -1
- package/es/share-sheet/ShareSheet.d.ts +1 -1
- package/es/share-sheet/index.d.ts +1 -1
- package/es/sidebar/Sidebar.d.ts +1 -1
- package/es/sidebar/index.d.ts +1 -1
- package/es/sidebar-item/SidebarItem.d.ts +1 -1
- package/es/sidebar-item/index.d.ts +1 -1
- package/es/signature/Signature.d.ts +1 -1
- package/es/signature/index.d.ts +1 -1
- package/es/skeleton/Skeleton.d.ts +1 -1
- package/es/skeleton/index.d.ts +1 -1
- package/es/skeleton-avatar/SkeletonAvatar.d.ts +1 -1
- package/es/skeleton-avatar/index.d.ts +1 -1
- package/es/skeleton-image/SkeletonImage.d.ts +1 -1
- package/es/skeleton-image/index.d.ts +1 -1
- package/es/skeleton-paragraph/SkeletonParagraph.d.ts +1 -1
- package/es/skeleton-paragraph/index.d.ts +1 -1
- package/es/skeleton-title/SkeletonTitle.d.ts +1 -1
- package/es/skeleton-title/index.d.ts +1 -1
- package/es/slider/Slider.d.ts +1 -1
- package/es/slider/Slider.mjs +20 -7
- package/es/slider/index.d.ts +1 -1
- package/es/space/Space.d.ts +1 -1
- package/es/space/index.d.ts +1 -1
- 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/index.d.ts +1 -1
- package/es/steps/Steps.d.ts +1 -1
- package/es/steps/index.d.ts +1 -1
- package/es/sticky/Sticky.d.ts +1 -1
- package/es/sticky/index.d.ts +1 -1
- package/es/submit-bar/SubmitBar.d.ts +1 -1
- package/es/submit-bar/index.d.ts +1 -1
- package/es/swipe/Swipe.d.ts +1 -1
- package/es/swipe/index.d.ts +1 -1
- package/es/swipe-cell/SwipeCell.d.ts +1 -1
- package/es/swipe-cell/index.d.ts +1 -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/index.d.ts +1 -1
- package/es/tab/Tab.d.ts +1 -1
- package/es/tab/Tab.mjs +14 -3
- package/es/tab/TabTitle.d.ts +1 -1
- package/es/tab/index.d.ts +1 -1
- package/es/tabbar/Tabbar.d.ts +1 -1
- package/es/tabbar/index.d.ts +1 -1
- package/es/tabbar-item/TabbarItem.d.ts +1 -1
- package/es/tabbar-item/index.d.ts +1 -1
- package/es/tabs/Tabs.d.ts +1 -1
- package/es/tabs/TabsContent.d.ts +1 -1
- package/es/tabs/index.d.ts +1 -1
- package/es/tag/Tag.d.ts +1 -1
- package/es/tag/index.d.ts +1 -1
- package/es/text-ellipsis/TextEllipsis.d.ts +1 -1
- package/es/text-ellipsis/index.d.ts +1 -1
- package/es/time-picker/TimePicker.d.ts +32 -5
- package/es/time-picker/TimePicker.mjs +73 -21
- package/es/time-picker/index.d.ts +21 -3
- package/es/toast/Toast.d.ts +1 -1
- package/es/toast/index.d.ts +1 -1
- package/es/tree-select/TreeSelect.d.ts +1 -1
- package/es/tree-select/index.d.ts +1 -1
- package/es/uploader/Uploader.d.ts +1 -1
- package/es/uploader/UploaderPreviewItem.d.ts +1 -1
- package/es/uploader/index.d.ts +1 -1
- package/es/utils/basic.d.ts +3 -0
- package/es/utils/constant.d.ts +1 -0
- package/es/utils/constant.mjs +2 -0
- package/es/utils/mount-component.d.ts +1 -1
- package/es/watermark/Watermark.d.ts +1 -1
- package/es/watermark/index.d.ts +1 -1
- package/lib/action-bar/ActionBar.d.ts +1 -1
- package/lib/action-bar/index.d.ts +1 -1
- package/lib/action-bar-button/ActionBarButton.d.ts +1 -1
- package/lib/action-bar-button/index.d.ts +1 -1
- package/lib/action-bar-icon/ActionBarIcon.d.ts +1 -1
- package/lib/action-bar-icon/index.d.ts +1 -1
- package/lib/action-sheet/ActionSheet.d.ts +1 -1
- package/lib/action-sheet/index.d.ts +1 -1
- package/lib/address-edit/AddressEdit.d.ts +1 -1
- package/lib/address-edit/AddressEditDetail.d.ts +1 -1
- package/lib/address-edit/index.d.ts +1 -1
- package/lib/address-list/AddressList.d.ts +14 -1
- package/lib/address-list/AddressList.js +3 -1
- package/lib/address-list/AddressListItem.d.ts +10 -1
- package/lib/address-list/AddressListItem.js +3 -2
- package/lib/address-list/index.d.ts +10 -1
- package/lib/area/Area.d.ts +1 -1
- package/lib/area/index.d.ts +1 -1
- package/lib/back-top/BackTop.d.ts +1 -1
- package/lib/back-top/BackTop.js +13 -0
- package/lib/back-top/index.d.ts +1 -1
- package/lib/badge/Badge.d.ts +1 -1
- package/lib/badge/index.d.ts +1 -1
- package/lib/barrage/Barrage.d.ts +1 -1
- package/lib/barrage/index.d.ts +1 -1
- package/lib/button/Button.d.ts +1 -1
- package/lib/button/index.d.ts +1 -1
- package/lib/calendar/Calendar.d.ts +1 -1
- package/lib/calendar/CalendarDay.d.ts +1 -1
- package/lib/calendar/CalendarHeader.d.ts +1 -1
- package/lib/calendar/CalendarMonth.d.ts +1 -1
- package/lib/calendar/index.d.ts +1 -1
- package/lib/card/Card.d.ts +1 -1
- package/lib/card/index.d.ts +1 -1
- package/lib/cascader/Cascader.d.ts +1 -1
- package/lib/cascader/index.d.ts +1 -1
- package/lib/cell/Cell.d.ts +1 -1
- package/lib/cell/index.d.ts +1 -1
- package/lib/cell-group/CellGroup.d.ts +1 -1
- package/lib/cell-group/index.d.ts +1 -1
- package/lib/checkbox/Checkbox.d.ts +1 -1
- package/lib/checkbox/Checker.d.ts +1 -1
- package/lib/checkbox/index.d.ts +1 -1
- package/lib/checkbox-group/CheckboxGroup.d.ts +1 -1
- package/lib/checkbox-group/index.d.ts +1 -1
- package/lib/circle/Circle.d.ts +1 -1
- package/lib/circle/index.d.ts +1 -1
- package/lib/col/Col.d.ts +1 -1
- package/lib/col/index.d.ts +1 -1
- package/lib/collapse/Collapse.d.ts +1 -1
- package/lib/collapse/index.d.ts +1 -1
- package/lib/collapse-item/CollapseItem.d.ts +1 -1
- package/lib/collapse-item/index.d.ts +1 -1
- package/lib/config-provider/ConfigProvider.d.ts +1 -1
- package/lib/config-provider/index.d.ts +1 -1
- package/lib/contact-card/ContactCard.d.ts +1 -1
- package/lib/contact-card/index.d.ts +1 -1
- package/lib/contact-edit/ContactEdit.d.ts +1 -1
- package/lib/contact-edit/index.d.ts +1 -1
- package/lib/contact-list/ContactList.d.ts +1 -1
- package/lib/contact-list/index.d.ts +1 -1
- package/lib/count-down/CountDown.d.ts +1 -1
- package/lib/count-down/index.d.ts +1 -1
- package/lib/coupon/Coupon.d.ts +1 -1
- package/lib/coupon/index.d.ts +1 -1
- package/lib/coupon-cell/CouponCell.d.ts +1 -1
- package/lib/coupon-cell/index.d.ts +1 -1
- package/lib/coupon-list/CouponList.d.ts +1 -1
- package/lib/coupon-list/index.d.ts +1 -1
- package/lib/date-picker/DatePicker.d.ts +4 -4
- package/lib/date-picker/index.d.ts +3 -3
- package/lib/date-picker/utils.d.ts +4 -2
- package/lib/date-picker/utils.js +2 -2
- package/lib/dialog/Dialog.d.ts +1 -1
- package/lib/dialog/index.d.ts +1 -1
- package/lib/divider/Divider.d.ts +1 -1
- package/lib/divider/index.d.ts +1 -1
- package/lib/dropdown-item/DropdownItem.d.ts +1 -1
- package/lib/dropdown-item/index.d.ts +1 -1
- package/lib/dropdown-menu/DropdownMenu.d.ts +1 -1
- package/lib/dropdown-menu/DropdownMenu.js +10 -3
- package/lib/dropdown-menu/index.d.ts +1 -1
- package/lib/dropdown-menu/types.d.ts +5 -1
- package/lib/empty/Empty.d.ts +1 -1
- package/lib/empty/index.d.ts +1 -1
- package/lib/field/Field.d.ts +1 -1
- package/lib/field/index.d.ts +1 -1
- package/lib/floating-panel/FloatingPanel.d.ts +77 -0
- package/lib/floating-panel/FloatingPanel.js +145 -0
- package/lib/floating-panel/index.css +1 -0
- package/lib/floating-panel/index.d.ts +60 -0
- package/lib/floating-panel/index.js +37 -0
- package/lib/floating-panel/style/index.d.ts +1 -0
- package/lib/floating-panel/style/index.js +2 -0
- package/lib/form/Form.d.ts +1 -1
- package/lib/form/index.d.ts +1 -1
- package/lib/grid/Grid.d.ts +1 -1
- package/lib/grid/index.d.ts +1 -1
- package/lib/grid-item/GridItem.d.ts +1 -1
- package/lib/grid-item/index.d.ts +1 -1
- package/lib/icon/Icon.d.ts +1 -1
- package/lib/icon/index.d.ts +1 -1
- package/lib/image/Image.d.ts +1 -1
- package/lib/image/index.d.ts +1 -1
- package/lib/image-preview/ImagePreview.d.ts +1 -1
- package/lib/image-preview/ImagePreviewItem.d.ts +1 -1
- package/lib/image-preview/ImagePreviewItem.js +8 -2
- package/lib/image-preview/index.d.ts +1 -1
- package/lib/index-anchor/IndexAnchor.d.ts +1 -1
- package/lib/index-anchor/index.d.ts +1 -1
- package/lib/index-bar/IndexBar.d.ts +1 -1
- package/lib/index-bar/index.d.ts +1 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.js +4 -1
- package/lib/list/List.d.ts +1 -1
- package/lib/list/index.d.ts +1 -1
- package/lib/loading/Loading.d.ts +1 -1
- package/lib/loading/index.d.ts +1 -1
- package/lib/nav-bar/NavBar.d.ts +1 -1
- package/lib/nav-bar/index.d.ts +1 -1
- package/lib/notice-bar/NoticeBar.d.ts +1 -1
- package/lib/notice-bar/index.d.ts +1 -1
- package/lib/notify/Notify.d.ts +1 -1
- package/lib/notify/index.d.ts +1 -1
- package/lib/number-keyboard/NumberKeyboard.d.ts +1 -1
- package/lib/number-keyboard/NumberKeyboardKey.d.ts +1 -1
- package/lib/number-keyboard/index.d.ts +1 -1
- package/lib/overlay/Overlay.d.ts +1 -1
- package/lib/overlay/index.d.ts +1 -1
- package/lib/pagination/Pagination.d.ts +1 -1
- package/lib/pagination/index.d.ts +1 -1
- package/lib/password-input/PasswordInput.d.ts +1 -1
- package/lib/password-input/index.d.ts +1 -1
- package/lib/picker/Picker.d.ts +1 -1
- package/lib/picker/PickerColumn.d.ts +1 -1
- package/lib/picker/PickerToolbar.d.ts +1 -1
- package/lib/picker/index.d.ts +1 -1
- package/lib/picker-group/PickerGroup.d.ts +1 -1
- package/lib/picker-group/index.d.ts +1 -1
- package/lib/popover/Popover.d.ts +15 -2
- package/lib/popover/Popover.js +8 -3
- package/lib/popover/index.css +1 -1
- package/lib/popover/index.d.ts +10 -1
- package/lib/popover/types.d.ts +1 -0
- package/lib/popup/Popup.d.ts +1 -1
- package/lib/popup/Popup.js +8 -1
- package/lib/popup/index.d.ts +1 -1
- package/lib/progress/Progress.d.ts +1 -1
- package/lib/progress/index.d.ts +1 -1
- package/lib/pull-refresh/PullRefresh.d.ts +1 -1
- package/lib/pull-refresh/index.d.ts +1 -1
- package/lib/radio/Radio.d.ts +1 -1
- package/lib/radio/index.d.ts +1 -1
- package/lib/radio-group/RadioGroup.d.ts +1 -1
- package/lib/radio-group/index.d.ts +1 -1
- package/lib/rate/Rate.d.ts +1 -1
- package/lib/rate/index.d.ts +1 -1
- package/lib/row/Row.d.ts +1 -1
- package/lib/row/index.d.ts +1 -1
- package/lib/search/Search.d.ts +1 -1
- package/lib/search/index.d.ts +1 -1
- package/lib/share-sheet/ShareSheet.d.ts +1 -1
- package/lib/share-sheet/index.d.ts +1 -1
- package/lib/sidebar/Sidebar.d.ts +1 -1
- package/lib/sidebar/index.d.ts +1 -1
- package/lib/sidebar-item/SidebarItem.d.ts +1 -1
- package/lib/sidebar-item/index.d.ts +1 -1
- package/lib/signature/Signature.d.ts +1 -1
- package/lib/signature/index.d.ts +1 -1
- package/lib/skeleton/Skeleton.d.ts +1 -1
- package/lib/skeleton/index.d.ts +1 -1
- package/lib/skeleton-avatar/SkeletonAvatar.d.ts +1 -1
- package/lib/skeleton-avatar/index.d.ts +1 -1
- package/lib/skeleton-image/SkeletonImage.d.ts +1 -1
- package/lib/skeleton-image/index.d.ts +1 -1
- package/lib/skeleton-paragraph/SkeletonParagraph.d.ts +1 -1
- package/lib/skeleton-paragraph/index.d.ts +1 -1
- package/lib/skeleton-title/SkeletonTitle.d.ts +1 -1
- package/lib/skeleton-title/index.d.ts +1 -1
- package/lib/slider/Slider.d.ts +1 -1
- package/lib/slider/Slider.js +20 -7
- package/lib/slider/index.d.ts +1 -1
- package/lib/space/Space.d.ts +1 -1
- package/lib/space/index.d.ts +1 -1
- package/lib/step/Step.d.ts +1 -1
- package/lib/step/index.d.ts +1 -1
- package/lib/stepper/Stepper.d.ts +1 -1
- package/lib/stepper/index.d.ts +1 -1
- package/lib/steps/Steps.d.ts +1 -1
- package/lib/steps/index.d.ts +1 -1
- package/lib/sticky/Sticky.d.ts +1 -1
- package/lib/sticky/index.d.ts +1 -1
- package/lib/submit-bar/SubmitBar.d.ts +1 -1
- package/lib/submit-bar/index.d.ts +1 -1
- package/lib/swipe/Swipe.d.ts +1 -1
- package/lib/swipe/index.d.ts +1 -1
- package/lib/swipe-cell/SwipeCell.d.ts +1 -1
- package/lib/swipe-cell/index.d.ts +1 -1
- package/lib/swipe-item/SwipeItem.d.ts +1 -1
- package/lib/swipe-item/index.d.ts +1 -1
- package/lib/switch/Switch.d.ts +1 -1
- package/lib/switch/index.d.ts +1 -1
- package/lib/tab/Tab.d.ts +1 -1
- package/lib/tab/Tab.js +13 -2
- package/lib/tab/TabTitle.d.ts +1 -1
- package/lib/tab/index.d.ts +1 -1
- package/lib/tabbar/Tabbar.d.ts +1 -1
- package/lib/tabbar/index.d.ts +1 -1
- package/lib/tabbar-item/TabbarItem.d.ts +1 -1
- package/lib/tabbar-item/index.d.ts +1 -1
- package/lib/tabs/Tabs.d.ts +1 -1
- package/lib/tabs/TabsContent.d.ts +1 -1
- package/lib/tabs/index.d.ts +1 -1
- package/lib/tag/Tag.d.ts +1 -1
- package/lib/tag/index.d.ts +1 -1
- package/lib/text-ellipsis/TextEllipsis.d.ts +1 -1
- package/lib/text-ellipsis/index.d.ts +1 -1
- package/lib/time-picker/TimePicker.d.ts +32 -5
- package/lib/time-picker/TimePicker.js +84 -32
- package/lib/time-picker/index.d.ts +21 -3
- package/lib/toast/Toast.d.ts +1 -1
- package/lib/toast/index.d.ts +1 -1
- package/lib/tree-select/TreeSelect.d.ts +1 -1
- package/lib/tree-select/index.d.ts +1 -1
- package/lib/uploader/Uploader.d.ts +1 -1
- package/lib/uploader/UploaderPreviewItem.d.ts +1 -1
- package/lib/uploader/index.d.ts +1 -1
- package/lib/utils/basic.d.ts +3 -0
- package/lib/utils/constant.d.ts +1 -0
- package/lib/utils/constant.js +2 -0
- package/lib/utils/mount-component.d.ts +1 -1
- package/lib/vant.cjs.js +818 -583
- package/lib/vant.es.js +819 -584
- package/lib/vant.js +839 -579
- package/lib/vant.min.js +1 -1
- package/lib/watermark/Watermark.d.ts +1 -1
- package/lib/watermark/index.d.ts +1 -1
- package/lib/web-types.json +1 -1
- package/package.json +5 -4
@@ -29,7 +29,7 @@ export declare const ConfigProvider: import("../utils").WithInstall<import("vue"
|
|
29
29
|
}>>, {
|
30
30
|
tag: keyof HTMLElementTagNameMap;
|
31
31
|
theme: import("./ConfigProvider").ConfigProviderTheme;
|
32
|
-
}>>;
|
32
|
+
}, {}>>;
|
33
33
|
export default ConfigProvider;
|
34
34
|
export { configProviderProps } from './ConfigProvider';
|
35
35
|
export type { ConfigProviderProps, ConfigProviderTheme, } from './ConfigProvider';
|
@@ -27,7 +27,7 @@ export declare const ContactCard: import("../utils").WithInstall<import("vue").D
|
|
27
27
|
}, {
|
28
28
|
type: import("./ContactCard").ContactCardType;
|
29
29
|
editable: boolean;
|
30
|
-
}>>;
|
30
|
+
}, {}>>;
|
31
31
|
export default ContactCard;
|
32
32
|
export { contactCardProps } from './ContactCard';
|
33
33
|
export type { ContactCardType, ContactCardProps } from './ContactCard';
|
@@ -37,7 +37,7 @@ export declare const ContactEdit: import("../utils").WithInstall<import("vue").D
|
|
37
37
|
telValidator: (val: string) => boolean;
|
38
38
|
isEdit: boolean;
|
39
39
|
contactInfo: import("./ContactEdit").ContactEditInfo;
|
40
|
-
}>>;
|
40
|
+
}, {}>>;
|
41
41
|
export default ContactEdit;
|
42
42
|
export { contactEditProps } from './ContactEdit';
|
43
43
|
export type { ContactEditInfo, ContactEditProps } from './ContactEdit';
|
@@ -28,5 +28,5 @@ declare const _default: import("vue").DefineComponent<{
|
|
28
28
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
29
29
|
onEdit?: ((...args: any[]) => any) | undefined;
|
30
30
|
onAdd?: ((...args: any[]) => any) | undefined;
|
31
|
-
}, {}>;
|
31
|
+
}, {}, {}>;
|
32
32
|
export default _default;
|
@@ -13,7 +13,7 @@ export declare const ContactList: import("../utils").WithInstall<import("vue").D
|
|
13
13
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
14
14
|
onEdit?: ((...args: any[]) => any) | undefined;
|
15
15
|
onAdd?: ((...args: any[]) => any) | undefined;
|
16
|
-
}, {}>>;
|
16
|
+
}, {}, {}>>;
|
17
17
|
export default ContactList;
|
18
18
|
export { contactListProps } from './ContactList';
|
19
19
|
export type { ContactListItem, ContactListProps } from './ContactList';
|
package/es/count-down/index.d.ts
CHANGED
@@ -34,7 +34,7 @@ export declare const CountDown: import("../utils").WithInstall<import("vue").Def
|
|
34
34
|
format: string;
|
35
35
|
autoStart: boolean;
|
36
36
|
millisecond: boolean;
|
37
|
-
}>>;
|
37
|
+
}, {}>>;
|
38
38
|
export default CountDown;
|
39
39
|
export { countDownProps } from './CountDown';
|
40
40
|
export type { CountDownProps } from './CountDown';
|
package/es/coupon/Coupon.d.ts
CHANGED
package/es/coupon/index.d.ts
CHANGED
@@ -24,7 +24,7 @@ export declare const Coupon: import("../utils").WithInstall<import("vue").Define
|
|
24
24
|
disabled: boolean;
|
25
25
|
currency: string;
|
26
26
|
chosen: boolean;
|
27
|
-
}>>;
|
27
|
+
}, {}>>;
|
28
28
|
export default Coupon;
|
29
29
|
export type { CouponInfo } from './Coupon';
|
30
30
|
export type { CouponThemeVars } from './types';
|
@@ -48,7 +48,7 @@ export declare const CouponCell: import("../utils").WithInstall<import("vue").De
|
|
48
48
|
editable: boolean;
|
49
49
|
coupons: import("..").CouponInfo[];
|
50
50
|
chosenCoupon: string | number;
|
51
|
-
}>>;
|
51
|
+
}, {}>>;
|
52
52
|
export default CouponCell;
|
53
53
|
export { couponCellProps } from './CouponCell';
|
54
54
|
export type { CouponCellProps } from './CouponCell';
|
@@ -113,7 +113,7 @@ export declare const CouponList: import("../utils").WithInstall<import("vue").De
|
|
113
113
|
displayedCouponIndex: number;
|
114
114
|
exchangeButtonLoading: boolean;
|
115
115
|
exchangeButtonDisabled: boolean;
|
116
|
-
}>>;
|
116
|
+
}, {}>>;
|
117
117
|
export default CouponList;
|
118
118
|
export { couponListProps } from './CouponList';
|
119
119
|
export type { CouponListProps } from './CouponList';
|
@@ -29,7 +29,7 @@ export declare const datePickerProps: {
|
|
29
29
|
type: PropType<string[]>;
|
30
30
|
default: () => never[];
|
31
31
|
};
|
32
|
-
filter: PropType<(columnType: string, options: import("../picker").PickerOption[]) => import("../picker").PickerOption[]>;
|
32
|
+
filter: PropType<(columnType: string, options: import("../picker").PickerOption[], values?: string[] | undefined) => import("../picker").PickerOption[]>;
|
33
33
|
formatter: {
|
34
34
|
type: PropType<(type: string, option: import("../picker").PickerOption) => import("../picker").PickerOption>;
|
35
35
|
default: (type: string, option: import("../picker").PickerOption) => import("../picker").PickerOption;
|
@@ -80,7 +80,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
80
80
|
type: PropType<string[]>;
|
81
81
|
default: () => never[];
|
82
82
|
};
|
83
|
-
filter: PropType<(columnType: string, options: import("../picker").PickerOption[]) => import("../picker").PickerOption[]>;
|
83
|
+
filter: PropType<(columnType: string, options: import("../picker").PickerOption[], values?: string[] | undefined) => import("../picker").PickerOption[]>;
|
84
84
|
formatter: {
|
85
85
|
type: PropType<(type: string, option: import("../picker").PickerOption) => import("../picker").PickerOption>;
|
86
86
|
default: (type: string, option: import("../picker").PickerOption) => import("../picker").PickerOption;
|
@@ -129,7 +129,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
129
129
|
type: PropType<string[]>;
|
130
130
|
default: () => never[];
|
131
131
|
};
|
132
|
-
filter: PropType<(columnType: string, options: import("../picker").PickerOption[]) => import("../picker").PickerOption[]>;
|
132
|
+
filter: PropType<(columnType: string, options: import("../picker").PickerOption[], values?: string[] | undefined) => import("../picker").PickerOption[]>;
|
133
133
|
formatter: {
|
134
134
|
type: PropType<(type: string, option: import("../picker").PickerOption) => import("../picker").PickerOption>;
|
135
135
|
default: (type: string, option: import("../picker").PickerOption) => import("../picker").PickerOption;
|
@@ -167,5 +167,5 @@ declare const _default: import("vue").DefineComponent<{
|
|
167
167
|
minDate: Date;
|
168
168
|
maxDate: Date;
|
169
169
|
columnsType: DatePickerColumnType[];
|
170
|
-
}>;
|
170
|
+
}, {}>;
|
171
171
|
export default _default;
|
@@ -28,7 +28,7 @@ export declare const DatePicker: import("../utils").WithInstall<import("vue").De
|
|
28
28
|
type: import("vue").PropType<string[]>;
|
29
29
|
default: () => never[];
|
30
30
|
};
|
31
|
-
filter: import("vue").PropType<(columnType: string, options: import("..").PickerOption[]) => import("..").PickerOption[]>;
|
31
|
+
filter: import("vue").PropType<(columnType: string, options: import("..").PickerOption[], values?: string[] | undefined) => import("..").PickerOption[]>;
|
32
32
|
formatter: {
|
33
33
|
type: import("vue").PropType<(type: string, option: import("..").PickerOption) => import("..").PickerOption>;
|
34
34
|
default: (type: string, option: import("..").PickerOption) => import("..").PickerOption;
|
@@ -77,7 +77,7 @@ export declare const DatePicker: import("../utils").WithInstall<import("vue").De
|
|
77
77
|
type: import("vue").PropType<string[]>;
|
78
78
|
default: () => never[];
|
79
79
|
};
|
80
|
-
filter: import("vue").PropType<(columnType: string, options: import("..").PickerOption[]) => import("..").PickerOption[]>;
|
80
|
+
filter: import("vue").PropType<(columnType: string, options: import("..").PickerOption[], values?: string[] | undefined) => import("..").PickerOption[]>;
|
81
81
|
formatter: {
|
82
82
|
type: import("vue").PropType<(type: string, option: import("..").PickerOption) => import("..").PickerOption>;
|
83
83
|
default: (type: string, option: import("..").PickerOption) => import("..").PickerOption;
|
@@ -115,7 +115,7 @@ export declare const DatePicker: import("../utils").WithInstall<import("vue").De
|
|
115
115
|
minDate: Date;
|
116
116
|
maxDate: Date;
|
117
117
|
columnsType: import("./DatePicker").DatePickerColumnType[];
|
118
|
-
}>>;
|
118
|
+
}, {}>>;
|
119
119
|
export default DatePicker;
|
120
120
|
export { datePickerProps } from './DatePicker';
|
121
121
|
export type { DatePickerProps };
|
@@ -1,6 +1,8 @@
|
|
1
|
+
import { type RequiredParams } from '../utils';
|
1
2
|
import type { PropType } from 'vue';
|
2
3
|
import type { PickerOption } from '../picker';
|
3
|
-
type Filter = (columnType: string, options: PickerOption[]) => PickerOption[];
|
4
|
+
type Filter = (columnType: string, options: PickerOption[], values?: string[]) => PickerOption[];
|
5
|
+
export type TimeFilter = RequiredParams<Filter>;
|
4
6
|
type Formatter = (type: string, option: PickerOption) => PickerOption;
|
5
7
|
export declare const sharedProps: {
|
6
8
|
loading: BooleanConstructor;
|
@@ -40,6 +42,6 @@ export declare const sharedProps: {
|
|
40
42
|
export declare const pickerInheritKeys: ("title" | "readonly" | "loading" | "allowHtml" | "optionHeight" | "showToolbar" | "swipeDuration" | "visibleOptionNum" | "cancelButtonText" | "confirmButtonText")[];
|
41
43
|
export declare function times<T>(n: number, iteratee: (index: number) => T): T[];
|
42
44
|
export declare const getMonthEndDay: (year: number, month: number) => number;
|
43
|
-
export declare const genOptions: <T extends string>(min: number, max: number, type: T, formatter: Formatter, filter?: Filter) => PickerOption[];
|
45
|
+
export declare const genOptions: <T extends string>(min: number, max: number, type: T, formatter: Formatter, filter?: Filter | TimeFilter, values?: string[]) => PickerOption[];
|
44
46
|
export declare const formatValueRange: (values: string[], columns: PickerOption[][]) => string[];
|
45
47
|
export {};
|
package/es/date-picker/utils.mjs
CHANGED
@@ -1,4 +1,9 @@
|
|
1
|
-
import {
|
1
|
+
import {
|
2
|
+
extend,
|
3
|
+
padZero,
|
4
|
+
makeArrayProp,
|
5
|
+
clamp
|
6
|
+
} from "../utils/index.mjs";
|
2
7
|
import { pickerSharedProps } from "../picker/Picker.mjs";
|
3
8
|
const sharedProps = extend({}, pickerSharedProps, {
|
4
9
|
modelValue: makeArrayProp(),
|
@@ -21,7 +26,7 @@ function times(n, iteratee) {
|
|
21
26
|
return result;
|
22
27
|
}
|
23
28
|
const getMonthEndDay = (year, month) => 32 - new Date(year, month - 1, 32).getDate();
|
24
|
-
const genOptions = (min, max, type, formatter, filter) => {
|
29
|
+
const genOptions = (min, max, type, formatter, filter, values) => {
|
25
30
|
const options = times(max - min + 1, (index) => {
|
26
31
|
const value = padZero(min + index);
|
27
32
|
return formatter(type, {
|
@@ -29,7 +34,7 @@ const genOptions = (min, max, type, formatter, filter) => {
|
|
29
34
|
value
|
30
35
|
});
|
31
36
|
});
|
32
|
-
return filter ? filter(type, options) : options;
|
37
|
+
return filter ? filter(type, options, values) : options;
|
33
38
|
};
|
34
39
|
const formatValueRange = (values, columns) => values.map((value, index) => {
|
35
40
|
const column = columns[index];
|
package/es/dialog/Dialog.d.ts
CHANGED
package/es/dialog/index.d.ts
CHANGED
@@ -125,7 +125,7 @@ export declare const Dialog: import("../utils").WithInstall<import("vue").Define
|
|
125
125
|
cancelButtonDisabled: boolean;
|
126
126
|
confirmButtonDisabled: boolean;
|
127
127
|
showConfirmButton: boolean;
|
128
|
-
}>>;
|
128
|
+
}, {}>>;
|
129
129
|
export default Dialog;
|
130
130
|
export { dialogProps } from './Dialog';
|
131
131
|
export { showDialog, closeDialog, showConfirmDialog, setDialogDefaultOptions, resetDialogDefaultOptions, } from './function-call';
|
package/es/divider/Divider.d.ts
CHANGED
package/es/divider/index.d.ts
CHANGED
@@ -25,7 +25,7 @@ export declare const Divider: import("../utils").WithInstall<import("vue").Defin
|
|
25
25
|
hairline: boolean;
|
26
26
|
dashed: boolean;
|
27
27
|
contentPosition: import("./Divider").DividerContentPosition;
|
28
|
-
}>>;
|
28
|
+
}, {}>>;
|
29
29
|
export default Divider;
|
30
30
|
export { dividerProps } from './Divider';
|
31
31
|
export type { DividerProps, DividerContentPosition } from './Divider';
|
@@ -38,7 +38,7 @@ export declare const DropdownItem: import("../utils").WithInstall<import("vue").
|
|
38
38
|
disabled: boolean;
|
39
39
|
lazyRender: boolean;
|
40
40
|
options: import("./types").DropdownItemOption[];
|
41
|
-
}>>;
|
41
|
+
}, {}>>;
|
42
42
|
export default DropdownItem;
|
43
43
|
export { dropdownItemProps } from './DropdownItem';
|
44
44
|
export type { DropdownItemProps };
|
@@ -2,6 +2,7 @@ import { createVNode as _createVNode } from "vue";
|
|
2
2
|
import { ref, computed, defineComponent } from "vue";
|
3
3
|
import { isDef, truthProp, numericProp, windowHeight, makeStringProp, makeNumericProp, createNamespace, HAPTICS_FEEDBACK } from "../utils/index.mjs";
|
4
4
|
import { useId } from "../composables/use-id.mjs";
|
5
|
+
import { useExpose } from "../composables/use-expose.mjs";
|
5
6
|
import { useRect, useChildren, useClickAway, useScrollParent, useEventListener } from "@vant/use";
|
6
7
|
const [name, bem] = createNamespace("dropdown-menu");
|
7
8
|
const dropdownMenuProps = {
|
@@ -37,11 +38,14 @@ var stdin_default = defineComponent({
|
|
37
38
|
};
|
38
39
|
}
|
39
40
|
});
|
41
|
+
const close = () => {
|
42
|
+
children.forEach((item) => {
|
43
|
+
item.toggle(false);
|
44
|
+
});
|
45
|
+
};
|
40
46
|
const onClickAway = () => {
|
41
47
|
if (props.closeOnClickOutside) {
|
42
|
-
|
43
|
-
item.toggle(false);
|
44
|
-
});
|
48
|
+
close();
|
45
49
|
}
|
46
50
|
};
|
47
51
|
const updateOffset = () => {
|
@@ -104,6 +108,9 @@ var stdin_default = defineComponent({
|
|
104
108
|
"class": "van-ellipsis"
|
105
109
|
}, [item.renderTitle()])])]);
|
106
110
|
};
|
111
|
+
useExpose({
|
112
|
+
close
|
113
|
+
});
|
107
114
|
linkChildren({
|
108
115
|
id,
|
109
116
|
props,
|
@@ -51,7 +51,7 @@ export declare const DropdownMenu: import("../utils").WithInstall<import("vue").
|
|
51
51
|
closeOnClickOverlay: boolean;
|
52
52
|
direction: import("./types").DropdownMenuDirection;
|
53
53
|
closeOnClickOutside: boolean;
|
54
|
-
}>>;
|
54
|
+
}, {}>>;
|
55
55
|
export default DropdownMenu;
|
56
56
|
export { dropdownMenuProps } from './DropdownMenu';
|
57
57
|
export type { DropdownMenuProps };
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { Ref } from 'vue';
|
1
|
+
import type { ComponentPublicInstance, Ref } from 'vue';
|
2
2
|
import type { DropdownMenuProps } from './DropdownMenu';
|
3
3
|
export type DropdownMenuDirection = 'up' | 'down';
|
4
4
|
export type DropdownMenuProvide = {
|
@@ -7,6 +7,10 @@ export type DropdownMenuProvide = {
|
|
7
7
|
offset: Ref<number>;
|
8
8
|
updateOffset: () => void;
|
9
9
|
};
|
10
|
+
export type DropdownMenuExpose = {
|
11
|
+
close: () => void;
|
12
|
+
};
|
13
|
+
export type DropdownMenuInstance = ComponentPublicInstance<DropdownMenuProps, DropdownMenuExpose>;
|
10
14
|
export type DropdownMenuThemeVars = {
|
11
15
|
dropdownMenuHeight?: string;
|
12
16
|
dropdownMenuBackground?: string;
|
package/es/empty/Empty.d.ts
CHANGED
package/es/empty/index.d.ts
CHANGED
@@ -14,7 +14,7 @@ export declare const Empty: import("../utils").WithInstall<import("vue").DefineC
|
|
14
14
|
description: StringConstructor;
|
15
15
|
}>>, {
|
16
16
|
image: string;
|
17
|
-
}>>;
|
17
|
+
}, {}>>;
|
18
18
|
export default Empty;
|
19
19
|
export { emptyProps } from './Empty';
|
20
20
|
export type { EmptyProps } from './Empty';
|
package/es/field/Field.d.ts
CHANGED
package/es/field/index.d.ts
CHANGED
@@ -201,7 +201,7 @@ export declare const Field: import("../utils").WithInstall<import("vue").DefineC
|
|
201
201
|
readonly: boolean;
|
202
202
|
showWordLimit: boolean;
|
203
203
|
colon: boolean;
|
204
|
-
}>>;
|
204
|
+
}, {}>>;
|
205
205
|
export default Field;
|
206
206
|
export { fieldProps } from './Field';
|
207
207
|
export type { FieldProps };
|
@@ -0,0 +1,77 @@
|
|
1
|
+
import { type ExtractPropTypes } from 'vue';
|
2
|
+
export declare const floatingPanelProps: {
|
3
|
+
height: {
|
4
|
+
type: (NumberConstructor | StringConstructor)[];
|
5
|
+
default: number;
|
6
|
+
};
|
7
|
+
anchors: {
|
8
|
+
type: import("vue").PropType<number[]>;
|
9
|
+
default: () => never[];
|
10
|
+
};
|
11
|
+
duration: {
|
12
|
+
type: (NumberConstructor | StringConstructor)[];
|
13
|
+
default: number;
|
14
|
+
};
|
15
|
+
contentDraggable: {
|
16
|
+
type: BooleanConstructor;
|
17
|
+
default: true;
|
18
|
+
};
|
19
|
+
safeAreaInsetBottom: {
|
20
|
+
type: BooleanConstructor;
|
21
|
+
default: true;
|
22
|
+
};
|
23
|
+
};
|
24
|
+
export type FloatingPanelProps = ExtractPropTypes<typeof floatingPanelProps>;
|
25
|
+
declare const _default: import("vue").DefineComponent<{
|
26
|
+
height: {
|
27
|
+
type: (NumberConstructor | StringConstructor)[];
|
28
|
+
default: number;
|
29
|
+
};
|
30
|
+
anchors: {
|
31
|
+
type: import("vue").PropType<number[]>;
|
32
|
+
default: () => never[];
|
33
|
+
};
|
34
|
+
duration: {
|
35
|
+
type: (NumberConstructor | StringConstructor)[];
|
36
|
+
default: number;
|
37
|
+
};
|
38
|
+
contentDraggable: {
|
39
|
+
type: BooleanConstructor;
|
40
|
+
default: true;
|
41
|
+
};
|
42
|
+
safeAreaInsetBottom: {
|
43
|
+
type: BooleanConstructor;
|
44
|
+
default: true;
|
45
|
+
};
|
46
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("heightChange" | "update:height")[], "heightChange" | "update:height", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
47
|
+
height: {
|
48
|
+
type: (NumberConstructor | StringConstructor)[];
|
49
|
+
default: number;
|
50
|
+
};
|
51
|
+
anchors: {
|
52
|
+
type: import("vue").PropType<number[]>;
|
53
|
+
default: () => never[];
|
54
|
+
};
|
55
|
+
duration: {
|
56
|
+
type: (NumberConstructor | StringConstructor)[];
|
57
|
+
default: number;
|
58
|
+
};
|
59
|
+
contentDraggable: {
|
60
|
+
type: BooleanConstructor;
|
61
|
+
default: true;
|
62
|
+
};
|
63
|
+
safeAreaInsetBottom: {
|
64
|
+
type: BooleanConstructor;
|
65
|
+
default: true;
|
66
|
+
};
|
67
|
+
}>> & {
|
68
|
+
onHeightChange?: ((...args: any[]) => any) | undefined;
|
69
|
+
"onUpdate:height"?: ((...args: any[]) => any) | undefined;
|
70
|
+
}, {
|
71
|
+
height: string | number;
|
72
|
+
safeAreaInsetBottom: boolean;
|
73
|
+
duration: string | number;
|
74
|
+
anchors: number[];
|
75
|
+
contentDraggable: boolean;
|
76
|
+
}, {}>;
|
77
|
+
export default _default;
|
@@ -0,0 +1,126 @@
|
|
1
|
+
import { createVNode as _createVNode } from "vue";
|
2
|
+
import { computed, defineComponent, ref, watch } from "vue";
|
3
|
+
import { addUnit, createNamespace, makeArrayProp, makeNumericProp, truthProp } from "../utils/index.mjs";
|
4
|
+
import { useWindowSize } from "@vant/use";
|
5
|
+
import { useLockScroll } from "../composables/use-lock-scroll.mjs";
|
6
|
+
import { useTouch } from "../composables/use-touch.mjs";
|
7
|
+
import { useSyncPropRef } from "../composables/use-sync-prop-ref.mjs";
|
8
|
+
const {
|
9
|
+
height: windowHeight
|
10
|
+
} = useWindowSize();
|
11
|
+
const floatingPanelProps = {
|
12
|
+
height: makeNumericProp(0),
|
13
|
+
anchors: makeArrayProp(),
|
14
|
+
duration: makeNumericProp(0.2),
|
15
|
+
contentDraggable: truthProp,
|
16
|
+
safeAreaInsetBottom: truthProp
|
17
|
+
};
|
18
|
+
const [name, bem] = createNamespace("floating-panel");
|
19
|
+
const DAMP = 0.2;
|
20
|
+
var stdin_default = defineComponent({
|
21
|
+
name,
|
22
|
+
props: floatingPanelProps,
|
23
|
+
emits: ["heightChange", "update:height"],
|
24
|
+
setup(props, {
|
25
|
+
emit,
|
26
|
+
slots
|
27
|
+
}) {
|
28
|
+
const rootRef = ref();
|
29
|
+
const contentRef = ref();
|
30
|
+
const height = useSyncPropRef(() => +props.height, (value) => emit("update:height", value));
|
31
|
+
const boundary = computed(() => {
|
32
|
+
var _a, _b;
|
33
|
+
return {
|
34
|
+
min: (_a = props.anchors[0]) != null ? _a : 100,
|
35
|
+
max: (_b = props.anchors[props.anchors.length - 1]) != null ? _b : Math.round(windowHeight.value * 0.6)
|
36
|
+
};
|
37
|
+
});
|
38
|
+
const anchors = computed(() => props.anchors.length >= 2 ? props.anchors : [boundary.value.min, boundary.value.max]);
|
39
|
+
const dragging = ref(false);
|
40
|
+
const rootStyle = computed(() => ({
|
41
|
+
height: addUnit(boundary.value.max),
|
42
|
+
transform: `translateY(calc(100% + ${addUnit(-height.value)}))`,
|
43
|
+
transition: !dragging.value ? `transform ${props.duration}s` : "none"
|
44
|
+
}));
|
45
|
+
const ease = (moveY) => {
|
46
|
+
const absDistance = Math.abs(moveY);
|
47
|
+
const {
|
48
|
+
min,
|
49
|
+
max
|
50
|
+
} = boundary.value;
|
51
|
+
if (absDistance > max) {
|
52
|
+
return -(max + (absDistance - max) * DAMP);
|
53
|
+
}
|
54
|
+
if (absDistance < min) {
|
55
|
+
return -(min - (min - absDistance) * DAMP);
|
56
|
+
}
|
57
|
+
return moveY;
|
58
|
+
};
|
59
|
+
const closest = (arr, target) => arr.reduce((pre, cur) => Math.abs(pre - target) < Math.abs(cur - target) ? pre : cur);
|
60
|
+
let startY;
|
61
|
+
const touch = useTouch();
|
62
|
+
const onTouchstart = (e) => {
|
63
|
+
touch.start(e);
|
64
|
+
dragging.value = true;
|
65
|
+
startY = -height.value;
|
66
|
+
};
|
67
|
+
const onTouchmove = (e) => {
|
68
|
+
var _a;
|
69
|
+
touch.move(e);
|
70
|
+
const target = e.target;
|
71
|
+
if (contentRef.value === target || ((_a = contentRef.value) == null ? void 0 : _a.contains(target))) {
|
72
|
+
if (!props.contentDraggable)
|
73
|
+
return;
|
74
|
+
if (-startY < boundary.value.max) {
|
75
|
+
if (e.cancelable)
|
76
|
+
e.preventDefault();
|
77
|
+
e.stopPropagation();
|
78
|
+
} else if (!(contentRef.value.scrollTop <= 0 && touch.deltaY.value > 0)) {
|
79
|
+
return;
|
80
|
+
}
|
81
|
+
}
|
82
|
+
const moveY = touch.deltaY.value + startY;
|
83
|
+
height.value = -ease(moveY);
|
84
|
+
};
|
85
|
+
const onTouchend = () => {
|
86
|
+
dragging.value = false;
|
87
|
+
height.value = closest(anchors.value, height.value);
|
88
|
+
if (height.value !== -startY) {
|
89
|
+
emit("heightChange", {
|
90
|
+
height: height.value
|
91
|
+
});
|
92
|
+
}
|
93
|
+
};
|
94
|
+
watch(boundary, () => {
|
95
|
+
height.value = closest(anchors.value, height.value);
|
96
|
+
}, {
|
97
|
+
immediate: true
|
98
|
+
});
|
99
|
+
useLockScroll(rootRef, () => true);
|
100
|
+
return () => {
|
101
|
+
var _a;
|
102
|
+
return _createVNode("div", {
|
103
|
+
"class": [bem(), {
|
104
|
+
"van-safe-area-bottom": props.safeAreaInsetBottom
|
105
|
+
}],
|
106
|
+
"ref": rootRef,
|
107
|
+
"style": rootStyle.value,
|
108
|
+
"onTouchstartPassive": onTouchstart,
|
109
|
+
"onTouchmove": onTouchmove,
|
110
|
+
"onTouchend": onTouchend,
|
111
|
+
"onTouchcancel": onTouchend
|
112
|
+
}, [_createVNode("div", {
|
113
|
+
"class": bem("header")
|
114
|
+
}, [_createVNode("div", {
|
115
|
+
"class": bem("header-bar")
|
116
|
+
}, null)]), _createVNode("div", {
|
117
|
+
"class": bem("content"),
|
118
|
+
"ref": contentRef
|
119
|
+
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)])]);
|
120
|
+
};
|
121
|
+
}
|
122
|
+
});
|
123
|
+
export {
|
124
|
+
stdin_default as default,
|
125
|
+
floatingPanelProps
|
126
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
:root{--van-floating-panel-border-radius: 16px;--van-floating-panel-header-height: 30px;--van-floating-panel-z-index: 999;--van-floating-panel-background: var(--van-background-2);--van-floating-panel-bar-width: 20px;--van-floating-panel-bar-height: 3px;--van-floating-panel-bar-color: var(--van-gray-5)}.van-floating-panel{position:fixed;left:0;bottom:0;width:100vw;z-index:var(--van-floating-panel-z-index);display:flex;flex-direction:column;touch-action:none;border-top-left-radius:var(--van-floating-panel-border-radius);border-top-right-radius:var(--van-floating-panel-border-radius);background:var(--van-floating-panel-background)}.van-floating-panel:after{content:"";display:block;position:absolute;bottom:-100vh;height:100vh;width:100vw;background-color:inherit}.van-floating-panel__header{height:var(--van-floating-panel-header-height);display:flex;justify-content:center;align-items:center;cursor:-webkit-grab;cursor:grab;-webkit-user-select:none;user-select:none}.van-floating-panel__header-bar{height:var(--van-floating-panel-bar-height);width:var(--van-floating-panel-bar-width);border-radius:var(--van-radius-md);background:var(--van-floating-panel-bar-color)}.van-floating-panel__content{flex:1;overflow-y:auto;background-color:var(--van-floating-panel-background)}
|