vant 4.0.0-rc.6 → 4.0.0-rc.8
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/types.d.ts +1 -1
- package/es/action-bar-button/ActionBarButton.d.ts +1 -1
- package/es/action-bar-button/types.d.ts +1 -1
- package/es/action-bar-icon/ActionBarIcon.d.ts +1 -1
- package/es/action-bar-icon/types.d.ts +1 -1
- package/es/action-sheet/ActionSheet.d.ts +3 -3
- package/es/action-sheet/index.css +1 -1
- package/es/action-sheet/index.d.ts +1 -1
- package/es/action-sheet/types.d.ts +1 -1
- package/es/address-edit/AddressEdit.d.ts +1 -1
- package/es/address-edit/types.d.ts +5 -5
- package/es/address-list/AddressList.d.ts +1 -1
- package/es/address-list/AddressListItem.d.ts +1 -1
- package/es/address-list/types.d.ts +1 -1
- package/es/area/Area.d.ts +2 -2
- package/es/area/index.d.ts +1 -1
- package/es/area/types.d.ts +2 -2
- package/es/back-top/BackTop.d.ts +66 -0
- package/es/back-top/BackTop.mjs +99 -0
- package/es/back-top/index.css +1 -0
- package/es/back-top/index.d.ts +53 -0
- package/es/back-top/index.mjs +10 -0
- package/es/back-top/style/index.d.ts +1 -0
- package/es/back-top/style/index.mjs +4 -0
- package/es/back-top/types.d.ts +6 -0
- package/es/back-top/types.mjs +0 -0
- package/es/badge/Badge.d.ts +2 -2
- package/es/badge/types.d.ts +1 -1
- package/es/button/Button.d.ts +1 -1
- package/es/button/types.d.ts +5 -5
- package/es/calendar/Calendar.d.ts +1 -1
- package/es/calendar/CalendarMonth.d.ts +1 -1
- package/es/calendar/types.d.ts +7 -7
- package/es/card/Card.d.ts +1 -1
- package/es/card/types.d.ts +1 -1
- package/es/cascader/Cascader.d.ts +1 -1
- package/es/cascader/types.d.ts +4 -4
- package/es/cell/Cell.d.ts +4 -4
- package/es/cell/index.d.ts +1 -1
- package/es/cell/types.d.ts +1 -1
- package/es/cell-group/CellGroup.d.ts +1 -1
- package/es/cell-group/types.d.ts +1 -1
- package/es/checkbox/Checkbox.d.ts +1 -1
- package/es/checkbox/Checker.d.ts +4 -4
- package/es/checkbox/types.d.ts +5 -5
- package/es/checkbox-group/CheckboxGroup.d.ts +1 -1
- package/es/checkbox-group/types.d.ts +5 -5
- package/es/circle/Circle.d.ts +2 -2
- package/es/circle/types.d.ts +1 -1
- package/es/col/Col.d.ts +1 -1
- package/es/collapse/Collapse.d.ts +4 -4
- package/es/collapse-item/CollapseItem.d.ts +2 -2
- package/es/collapse-item/index.d.ts +1 -1
- package/es/collapse-item/types.d.ts +3 -3
- package/es/composables/use-route.d.ts +1 -1
- package/es/composables/use-sync-prop-ref.d.ts +2 -0
- package/es/composables/use-sync-prop-ref.mjs +18 -0
- package/es/composables/use-touch.d.ts +1 -1
- package/es/config-provider/ConfigProvider.d.ts +4 -4
- package/es/config-provider/types.d.ts +1 -1
- package/es/contact-card/ContactCard.d.ts +2 -2
- package/es/contact-card/types.d.ts +1 -1
- package/es/contact-edit/ContactEdit.d.ts +2 -2
- package/es/contact-edit/types.d.ts +1 -1
- package/es/contact-list/ContactList.d.ts +2 -2
- package/es/contact-list/types.d.ts +1 -1
- package/es/count-down/CountDown.d.ts +1 -1
- package/es/count-down/types.d.ts +4 -4
- package/es/coupon/Coupon.d.ts +1 -1
- package/es/coupon/types.d.ts +1 -1
- package/es/coupon-cell/CouponCell.d.ts +1 -1
- package/es/coupon-cell/types.d.ts +1 -1
- package/es/coupon-list/CouponList.d.ts +1 -1
- package/es/coupon-list/types.d.ts +1 -1
- package/es/date-picker/DatePicker.d.ts +3 -3
- package/es/date-picker/DatePicker.mjs +4 -1
- package/es/date-picker/index.d.ts +1 -1
- package/es/date-picker/utils.d.ts +2 -2
- package/es/dialog/Dialog.d.ts +2 -2
- package/es/dialog/index.d.ts +1 -1
- package/es/dialog/types.d.ts +6 -6
- package/es/divider/Divider.d.ts +2 -2
- package/es/divider/types.d.ts +1 -1
- package/es/dropdown-item/DropdownItem.d.ts +3 -3
- package/es/dropdown-item/DropdownItem.mjs +6 -4
- package/es/dropdown-item/index.d.ts +2 -2
- package/es/dropdown-item/types.d.ts +4 -4
- package/es/dropdown-menu/DropdownMenu.d.ts +1 -1
- package/es/dropdown-menu/types.d.ts +3 -3
- package/es/empty/Empty.d.ts +1 -1
- package/es/empty/types.d.ts +1 -1
- package/es/field/Field.d.ts +2 -2
- package/es/field/index.d.ts +1 -1
- package/es/field/types.d.ts +16 -16
- package/es/form/Form.d.ts +1 -1
- package/es/form/types.d.ts +3 -3
- package/es/grid/Grid.d.ts +3 -3
- package/es/grid-item/GridItem.d.ts +1 -1
- package/es/grid-item/types.d.ts +1 -1
- package/es/icon/Icon.d.ts +1 -1
- package/es/image/Image.d.ts +3 -3
- package/es/image/types.d.ts +1 -1
- package/es/image-preview/ImagePreview.d.ts +3 -2
- package/es/image-preview/ImagePreview.mjs +6 -3
- package/es/image-preview/ImagePreviewItem.d.ts +2 -1
- package/es/image-preview/ImagePreviewItem.mjs +15 -11
- package/es/image-preview/index.d.ts +2 -1
- package/es/image-preview/types.d.ts +5 -5
- package/es/index-anchor/IndexAnchor.d.ts +1 -1
- package/es/index-anchor/types.d.ts +1 -1
- package/es/index-bar/IndexBar.d.ts +1 -1
- package/es/index-bar/types.d.ts +4 -4
- package/es/index.d.ts +2 -1
- package/es/index.mjs +4 -1
- package/es/lazyload/vue-lazyload/lazy-image.mjs +5 -5
- package/es/lazyload/vue-lazyload/util.d.ts +25 -0
- package/es/list/List.d.ts +1 -1
- package/es/list/List.mjs +1 -1
- package/es/list/types.d.ts +4 -4
- package/es/loading/Loading.d.ts +2 -2
- package/es/loading/types.d.ts +1 -1
- package/es/locale/index.d.ts +1 -1
- package/es/nav-bar/NavBar.d.ts +1 -1
- package/es/nav-bar/types.d.ts +1 -1
- package/es/notice-bar/NoticeBar.d.ts +1 -1
- package/es/notice-bar/types.d.ts +4 -4
- package/es/notify/Notify.d.ts +1 -1
- package/es/notify/types.d.ts +5 -5
- package/es/number-keyboard/NumberKeyboard.d.ts +2 -2
- package/es/number-keyboard/NumberKeyboard.mjs +6 -4
- package/es/number-keyboard/NumberKeyboardKey.d.ts +1 -1
- package/es/number-keyboard/types.d.ts +1 -1
- package/es/overlay/Overlay.d.ts +1 -1
- package/es/overlay/types.d.ts +1 -1
- package/es/pagination/Pagination.d.ts +2 -2
- package/es/pagination/types.d.ts +1 -1
- package/es/password-input/PasswordInput.d.ts +1 -1
- package/es/password-input/types.d.ts +1 -1
- package/es/picker/Picker.d.ts +2 -2
- package/es/picker/Picker.mjs +4 -2
- package/es/picker/PickerColumn.mjs +5 -4
- package/es/picker/PickerToolbar.d.ts +1 -1
- package/es/picker/index.d.ts +1 -1
- package/es/picker/types.d.ts +11 -11
- package/es/picker-group/PickerGroup.d.ts +2 -2
- package/es/picker-group/types.d.ts +1 -1
- package/es/popover/Popover.d.ts +1 -1
- package/es/popover/Popover.mjs +13 -8
- package/es/popover/types.d.ts +5 -5
- package/es/popup/Popup.d.ts +3 -3
- package/es/popup/index.d.ts +2 -2
- package/es/popup/shared.d.ts +1 -1
- package/es/popup/types.d.ts +5 -5
- package/es/progress/Progress.d.ts +1 -1
- package/es/progress/types.d.ts +3 -3
- package/es/pull-refresh/PullRefresh.d.ts +1 -1
- package/es/pull-refresh/types.d.ts +1 -1
- package/es/radio/Radio.d.ts +3 -3
- package/es/radio/types.d.ts +1 -1
- package/es/radio-group/RadioGroup.d.ts +3 -3
- package/es/rate/Rate.d.ts +1 -1
- package/es/rate/types.d.ts +1 -1
- package/es/row/Row.d.ts +5 -5
- package/es/search/Search.d.ts +1 -1
- package/es/search/types.d.ts +4 -4
- package/es/share-sheet/ShareSheet.d.ts +4 -4
- package/es/share-sheet/index.d.ts +1 -1
- package/es/share-sheet/types.d.ts +1 -1
- package/es/sidebar/Sidebar.d.ts +2 -2
- package/es/sidebar/types.d.ts +1 -1
- package/es/sidebar-item/SidebarItem.d.ts +1 -1
- package/es/sidebar-item/types.d.ts +1 -1
- package/es/skeleton/Skeleton.d.ts +24 -24
- package/es/skeleton/Skeleton.mjs +28 -23
- package/es/skeleton/SkeletonAvatar.d.ts +26 -0
- package/es/skeleton/SkeletonAvatar.mjs +22 -0
- package/es/skeleton/SkeletonImage.d.ts +26 -0
- package/es/skeleton/SkeletonImage.mjs +26 -0
- package/es/skeleton/SkeletonParagraph.d.ts +27 -0
- package/es/skeleton/SkeletonParagraph.mjs +31 -0
- package/es/skeleton/SkeletonTitle.d.ts +16 -0
- package/es/skeleton/SkeletonTitle.mjs +26 -0
- package/es/skeleton/index.css +1 -1
- package/es/skeleton/index.d.ts +85 -18
- package/es/skeleton/index.mjs +22 -2
- package/es/skeleton/style/index.mjs +2 -0
- package/es/skeleton/types.d.ts +8 -4
- package/es/slider/Slider.d.ts +3 -3
- package/es/slider/types.d.ts +1 -1
- package/es/space/Space.d.ts +3 -3
- package/es/step/types.d.ts +1 -1
- package/es/stepper/Stepper.d.ts +3 -3
- package/es/stepper/Stepper.mjs +1 -2
- package/es/stepper/index.d.ts +1 -1
- package/es/stepper/types.d.ts +1 -1
- package/es/steps/Steps.d.ts +3 -3
- package/es/steps/types.d.ts +1 -1
- package/es/sticky/Sticky.d.ts +2 -2
- package/es/sticky/types.d.ts +1 -1
- package/es/submit-bar/SubmitBar.d.ts +2 -2
- package/es/submit-bar/types.d.ts +1 -1
- package/es/swipe/Swipe.d.ts +1 -1
- package/es/swipe/types.d.ts +6 -6
- package/es/swipe-cell/SwipeCell.d.ts +3 -3
- package/es/swipe-cell/index.d.ts +2 -2
- package/es/swipe-cell/types.d.ts +4 -4
- package/es/switch/Switch.d.ts +1 -1
- package/es/switch/types.d.ts +1 -1
- package/es/tab/Tab.d.ts +1 -1
- package/es/tabbar/Tabbar.d.ts +2 -2
- package/es/tabbar/types.d.ts +1 -1
- package/es/tabbar-item/TabbarItem.d.ts +1 -1
- package/es/tabbar-item/types.d.ts +1 -1
- package/es/tabs/Tabs.d.ts +1 -1
- package/es/tabs/types.d.ts +6 -6
- package/es/tag/Tag.d.ts +1 -1
- package/es/tag/types.d.ts +3 -3
- package/es/time-picker/TimePicker.d.ts +3 -3
- package/es/time-picker/TimePicker.mjs +4 -1
- package/es/time-picker/index.d.ts +1 -1
- package/es/toast/Toast.d.ts +1 -1
- package/es/toast/types.d.ts +6 -6
- package/es/tree-select/TreeSelect.d.ts +3 -3
- package/es/tree-select/types.d.ts +1 -1
- package/es/uploader/Uploader.d.ts +1 -1
- package/es/uploader/Uploader.mjs +4 -4
- package/es/uploader/types.d.ts +8 -8
- package/es/utils/basic.d.ts +3 -3
- package/es/utils/constant.d.ts +1 -0
- package/es/utils/constant.mjs +3 -1
- package/es/utils/create.d.ts +4 -4
- package/es/utils/deep-assign.d.ts +1 -1
- package/es/utils/dom.d.ts +1 -1
- package/es/utils/interceptor.d.ts +1 -1
- package/es/utils/mount-component.d.ts +1 -1
- package/es/utils/with-install.d.ts +2 -2
- package/lib/action-bar/ActionBar.d.ts +1 -1
- package/lib/action-bar/types.d.ts +1 -1
- package/lib/action-bar-button/ActionBarButton.d.ts +1 -1
- package/lib/action-bar-button/types.d.ts +1 -1
- package/lib/action-bar-icon/ActionBarIcon.d.ts +1 -1
- package/lib/action-bar-icon/types.d.ts +1 -1
- package/lib/action-sheet/ActionSheet.d.ts +3 -3
- package/lib/action-sheet/index.css +1 -1
- package/lib/action-sheet/index.d.ts +1 -1
- package/lib/action-sheet/types.d.ts +1 -1
- package/lib/address-edit/AddressEdit.d.ts +1 -1
- package/lib/address-edit/types.d.ts +5 -5
- package/lib/address-list/AddressList.d.ts +1 -1
- package/lib/address-list/AddressListItem.d.ts +1 -1
- package/lib/address-list/types.d.ts +1 -1
- package/lib/area/Area.d.ts +2 -2
- package/lib/area/index.d.ts +1 -1
- package/lib/area/types.d.ts +2 -2
- package/lib/back-top/BackTop.d.ts +66 -0
- package/lib/back-top/BackTop.js +118 -0
- package/lib/back-top/index.css +1 -0
- package/lib/back-top/index.d.ts +53 -0
- package/lib/back-top/index.js +35 -0
- package/lib/back-top/style/index.d.ts +1 -0
- package/lib/back-top/style/index.js +4 -0
- package/lib/back-top/types.d.ts +6 -0
- package/lib/back-top/types.js +15 -0
- package/lib/badge/Badge.d.ts +2 -2
- package/lib/badge/types.d.ts +1 -1
- package/lib/button/Button.d.ts +1 -1
- package/lib/button/types.d.ts +5 -5
- package/lib/calendar/Calendar.d.ts +1 -1
- package/lib/calendar/CalendarMonth.d.ts +1 -1
- package/lib/calendar/types.d.ts +7 -7
- package/lib/card/Card.d.ts +1 -1
- package/lib/card/types.d.ts +1 -1
- package/lib/cascader/Cascader.d.ts +1 -1
- package/lib/cascader/types.d.ts +4 -4
- package/lib/cell/Cell.d.ts +4 -4
- package/lib/cell/index.d.ts +1 -1
- package/lib/cell/types.d.ts +1 -1
- package/lib/cell-group/CellGroup.d.ts +1 -1
- package/lib/cell-group/types.d.ts +1 -1
- package/lib/checkbox/Checkbox.d.ts +1 -1
- package/lib/checkbox/Checker.d.ts +4 -4
- package/lib/checkbox/types.d.ts +5 -5
- package/lib/checkbox-group/CheckboxGroup.d.ts +1 -1
- package/lib/checkbox-group/types.d.ts +5 -5
- package/lib/circle/Circle.d.ts +2 -2
- package/lib/circle/types.d.ts +1 -1
- package/lib/col/Col.d.ts +1 -1
- package/lib/collapse/Collapse.d.ts +4 -4
- package/lib/collapse-item/CollapseItem.d.ts +2 -2
- package/lib/collapse-item/index.d.ts +1 -1
- package/lib/collapse-item/types.d.ts +3 -3
- package/lib/composables/use-route.d.ts +1 -1
- package/lib/composables/use-sync-prop-ref.d.ts +2 -0
- package/lib/composables/use-sync-prop-ref.js +37 -0
- package/lib/composables/use-touch.d.ts +1 -1
- package/lib/config-provider/ConfigProvider.d.ts +4 -4
- package/lib/config-provider/types.d.ts +1 -1
- package/lib/contact-card/ContactCard.d.ts +2 -2
- package/lib/contact-card/types.d.ts +1 -1
- package/lib/contact-edit/ContactEdit.d.ts +2 -2
- package/lib/contact-edit/types.d.ts +1 -1
- package/lib/contact-list/ContactList.d.ts +2 -2
- package/lib/contact-list/types.d.ts +1 -1
- package/lib/count-down/CountDown.d.ts +1 -1
- package/lib/count-down/types.d.ts +4 -4
- package/lib/coupon/Coupon.d.ts +1 -1
- package/lib/coupon/types.d.ts +1 -1
- package/lib/coupon-cell/CouponCell.d.ts +1 -1
- package/lib/coupon-cell/types.d.ts +1 -1
- package/lib/coupon-list/CouponList.d.ts +1 -1
- package/lib/coupon-list/types.d.ts +1 -1
- package/lib/date-picker/DatePicker.d.ts +3 -3
- package/lib/date-picker/DatePicker.js +4 -1
- package/lib/date-picker/index.d.ts +1 -1
- package/lib/date-picker/utils.d.ts +2 -2
- package/lib/dialog/Dialog.d.ts +2 -2
- package/lib/dialog/index.d.ts +1 -1
- package/lib/dialog/types.d.ts +6 -6
- package/lib/divider/Divider.d.ts +2 -2
- package/lib/divider/types.d.ts +1 -1
- package/lib/dropdown-item/DropdownItem.d.ts +3 -3
- package/lib/dropdown-item/DropdownItem.js +5 -3
- package/lib/dropdown-item/index.d.ts +2 -2
- package/lib/dropdown-item/types.d.ts +4 -4
- package/lib/dropdown-menu/DropdownMenu.d.ts +1 -1
- package/lib/dropdown-menu/types.d.ts +3 -3
- package/lib/empty/Empty.d.ts +1 -1
- package/lib/empty/types.d.ts +1 -1
- package/lib/field/Field.d.ts +2 -2
- package/lib/field/index.d.ts +1 -1
- package/lib/field/types.d.ts +16 -16
- package/lib/form/Form.d.ts +1 -1
- package/lib/form/types.d.ts +3 -3
- package/lib/grid/Grid.d.ts +3 -3
- package/lib/grid-item/GridItem.d.ts +1 -1
- package/lib/grid-item/types.d.ts +1 -1
- package/lib/icon/Icon.d.ts +1 -1
- package/lib/image/Image.d.ts +3 -3
- package/lib/image/types.d.ts +1 -1
- package/lib/image-preview/ImagePreview.d.ts +3 -2
- package/lib/image-preview/ImagePreview.js +6 -3
- package/lib/image-preview/ImagePreviewItem.d.ts +2 -1
- package/lib/image-preview/ImagePreviewItem.js +14 -10
- package/lib/image-preview/index.d.ts +2 -1
- package/lib/image-preview/types.d.ts +5 -5
- package/lib/index-anchor/IndexAnchor.d.ts +1 -1
- package/lib/index-anchor/types.d.ts +1 -1
- package/lib/index-bar/IndexBar.d.ts +1 -1
- package/lib/index-bar/types.d.ts +4 -4
- package/lib/index.css +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.js +4 -1
- package/lib/lazyload/vue-lazyload/lazy-image.js +6 -6
- package/lib/lazyload/vue-lazyload/util.d.ts +25 -0
- package/lib/list/List.d.ts +1 -1
- package/lib/list/List.js +1 -1
- package/lib/list/types.d.ts +4 -4
- package/lib/loading/Loading.d.ts +2 -2
- package/lib/loading/types.d.ts +1 -1
- package/lib/locale/index.d.ts +1 -1
- package/lib/nav-bar/NavBar.d.ts +1 -1
- package/lib/nav-bar/types.d.ts +1 -1
- package/lib/notice-bar/NoticeBar.d.ts +1 -1
- package/lib/notice-bar/types.d.ts +4 -4
- package/lib/notify/Notify.d.ts +1 -1
- package/lib/notify/types.d.ts +5 -5
- package/lib/number-keyboard/NumberKeyboard.d.ts +2 -2
- package/lib/number-keyboard/NumberKeyboard.js +5 -3
- package/lib/number-keyboard/NumberKeyboardKey.d.ts +1 -1
- package/lib/number-keyboard/types.d.ts +1 -1
- package/lib/overlay/Overlay.d.ts +1 -1
- package/lib/overlay/types.d.ts +1 -1
- package/lib/pagination/Pagination.d.ts +2 -2
- package/lib/pagination/types.d.ts +1 -1
- package/lib/password-input/PasswordInput.d.ts +1 -1
- package/lib/password-input/types.d.ts +1 -1
- package/lib/picker/Picker.d.ts +2 -2
- package/lib/picker/Picker.js +3 -1
- package/lib/picker/PickerColumn.js +5 -4
- package/lib/picker/PickerToolbar.d.ts +1 -1
- package/lib/picker/index.d.ts +1 -1
- package/lib/picker/types.d.ts +11 -11
- package/lib/picker-group/PickerGroup.d.ts +2 -2
- package/lib/picker-group/types.d.ts +1 -1
- package/lib/popover/Popover.d.ts +1 -1
- package/lib/popover/Popover.js +13 -8
- package/lib/popover/types.d.ts +5 -5
- package/lib/popup/Popup.d.ts +3 -3
- package/lib/popup/index.d.ts +2 -2
- package/lib/popup/shared.d.ts +1 -1
- package/lib/popup/types.d.ts +5 -5
- package/lib/progress/Progress.d.ts +1 -1
- package/lib/progress/types.d.ts +3 -3
- package/lib/pull-refresh/PullRefresh.d.ts +1 -1
- package/lib/pull-refresh/types.d.ts +1 -1
- package/lib/radio/Radio.d.ts +3 -3
- package/lib/radio/types.d.ts +1 -1
- package/lib/radio-group/RadioGroup.d.ts +3 -3
- package/lib/rate/Rate.d.ts +1 -1
- package/lib/rate/types.d.ts +1 -1
- package/lib/row/Row.d.ts +5 -5
- package/lib/search/Search.d.ts +1 -1
- package/lib/search/types.d.ts +4 -4
- package/lib/share-sheet/ShareSheet.d.ts +4 -4
- package/lib/share-sheet/index.d.ts +1 -1
- package/lib/share-sheet/types.d.ts +1 -1
- package/lib/sidebar/Sidebar.d.ts +2 -2
- package/lib/sidebar/types.d.ts +1 -1
- package/lib/sidebar-item/SidebarItem.d.ts +1 -1
- package/lib/sidebar-item/types.d.ts +1 -1
- package/lib/skeleton/Skeleton.d.ts +24 -24
- package/lib/skeleton/Skeleton.js +34 -23
- package/lib/skeleton/SkeletonAvatar.d.ts +26 -0
- package/lib/skeleton/SkeletonAvatar.js +41 -0
- package/lib/skeleton/SkeletonImage.d.ts +26 -0
- package/lib/skeleton/SkeletonImage.js +45 -0
- package/lib/skeleton/SkeletonParagraph.d.ts +27 -0
- package/lib/skeleton/SkeletonParagraph.js +50 -0
- package/lib/skeleton/SkeletonTitle.d.ts +16 -0
- package/lib/skeleton/SkeletonTitle.js +45 -0
- package/lib/skeleton/index.css +1 -1
- package/lib/skeleton/index.d.ts +85 -18
- package/lib/skeleton/index.js +22 -2
- package/lib/skeleton/style/index.js +2 -0
- package/lib/skeleton/types.d.ts +8 -4
- package/lib/slider/Slider.d.ts +3 -3
- package/lib/slider/types.d.ts +1 -1
- package/lib/space/Space.d.ts +3 -3
- package/lib/step/types.d.ts +1 -1
- package/lib/stepper/Stepper.d.ts +3 -3
- package/lib/stepper/Stepper.js +1 -2
- package/lib/stepper/index.d.ts +1 -1
- package/lib/stepper/types.d.ts +1 -1
- package/lib/steps/Steps.d.ts +3 -3
- package/lib/steps/types.d.ts +1 -1
- package/lib/sticky/Sticky.d.ts +2 -2
- package/lib/sticky/types.d.ts +1 -1
- package/lib/submit-bar/SubmitBar.d.ts +2 -2
- package/lib/submit-bar/types.d.ts +1 -1
- package/lib/swipe/Swipe.d.ts +1 -1
- package/lib/swipe/types.d.ts +6 -6
- package/lib/swipe-cell/SwipeCell.d.ts +3 -3
- package/lib/swipe-cell/index.d.ts +2 -2
- package/lib/swipe-cell/types.d.ts +4 -4
- package/lib/switch/Switch.d.ts +1 -1
- package/lib/switch/types.d.ts +1 -1
- package/lib/tab/Tab.d.ts +1 -1
- package/lib/tabbar/Tabbar.d.ts +2 -2
- package/lib/tabbar/types.d.ts +1 -1
- package/lib/tabbar-item/TabbarItem.d.ts +1 -1
- package/lib/tabbar-item/types.d.ts +1 -1
- package/lib/tabs/Tabs.d.ts +1 -1
- package/lib/tabs/types.d.ts +6 -6
- package/lib/tag/Tag.d.ts +1 -1
- package/lib/tag/types.d.ts +3 -3
- package/lib/time-picker/TimePicker.d.ts +3 -3
- package/lib/time-picker/TimePicker.js +4 -1
- package/lib/time-picker/index.d.ts +1 -1
- package/lib/toast/Toast.d.ts +1 -1
- package/lib/toast/types.d.ts +6 -6
- package/lib/tree-select/TreeSelect.d.ts +3 -3
- package/lib/tree-select/types.d.ts +1 -1
- package/lib/uploader/Uploader.d.ts +1 -1
- package/lib/uploader/Uploader.js +3 -3
- package/lib/uploader/types.d.ts +8 -8
- package/lib/utils/basic.d.ts +3 -3
- package/lib/utils/constant.d.ts +1 -0
- package/lib/utils/constant.js +3 -1
- package/lib/utils/create.d.ts +4 -4
- package/lib/utils/deep-assign.d.ts +1 -1
- package/lib/utils/dom.d.ts +1 -1
- package/lib/utils/interceptor.d.ts +1 -1
- package/lib/utils/mount-component.d.ts +1 -1
- package/lib/utils/with-install.d.ts +2 -2
- package/lib/vant.cjs.js +1182 -963
- package/lib/vant.es.js +1183 -964
- package/lib/vant.js +1176 -963
- package/lib/vant.min.js +1 -1
- package/lib/web-types.json +1 -12164
- package/package.json +2 -2
package/lib/index.d.ts
CHANGED
@@ -5,6 +5,7 @@ export * from "./action-sheet";
|
|
5
5
|
export * from "./address-edit";
|
6
6
|
export * from "./address-list";
|
7
7
|
export * from "./area";
|
8
|
+
export * from "./back-top";
|
8
9
|
export * from "./badge";
|
9
10
|
export * from "./button";
|
10
11
|
export * from "./calendar";
|
@@ -93,4 +94,4 @@ declare namespace _default {
|
|
93
94
|
}
|
94
95
|
export default _default;
|
95
96
|
export function install(app: any): void;
|
96
|
-
export const version: "4.0.0-rc.
|
97
|
+
export const version: "4.0.0-rc.8";
|
package/lib/index.js
CHANGED
@@ -30,6 +30,7 @@ var import_action_sheet = require("./action-sheet");
|
|
30
30
|
var import_address_edit = require("./address-edit");
|
31
31
|
var import_address_list = require("./address-list");
|
32
32
|
var import_area = require("./area");
|
33
|
+
var import_back_top = require("./back-top");
|
33
34
|
var import_badge = require("./badge");
|
34
35
|
var import_button = require("./button");
|
35
36
|
var import_calendar = require("./calendar");
|
@@ -118,6 +119,7 @@ __reExport(stdin_exports, require("./action-sheet"), module.exports);
|
|
118
119
|
__reExport(stdin_exports, require("./address-edit"), module.exports);
|
119
120
|
__reExport(stdin_exports, require("./address-list"), module.exports);
|
120
121
|
__reExport(stdin_exports, require("./area"), module.exports);
|
122
|
+
__reExport(stdin_exports, require("./back-top"), module.exports);
|
121
123
|
__reExport(stdin_exports, require("./badge"), module.exports);
|
122
124
|
__reExport(stdin_exports, require("./button"), module.exports);
|
123
125
|
__reExport(stdin_exports, require("./calendar"), module.exports);
|
@@ -200,7 +202,7 @@ __reExport(stdin_exports, require("./time-picker"), module.exports);
|
|
200
202
|
__reExport(stdin_exports, require("./toast"), module.exports);
|
201
203
|
__reExport(stdin_exports, require("./tree-select"), module.exports);
|
202
204
|
__reExport(stdin_exports, require("./uploader"), module.exports);
|
203
|
-
const version = "4.0.0-rc.
|
205
|
+
const version = "4.0.0-rc.8";
|
204
206
|
function install(app) {
|
205
207
|
const components = [
|
206
208
|
import_action_bar.ActionBar,
|
@@ -210,6 +212,7 @@ function install(app) {
|
|
210
212
|
import_address_edit.AddressEdit,
|
211
213
|
import_address_list.AddressList,
|
212
214
|
import_area.Area,
|
215
|
+
import_back_top.BackTop,
|
213
216
|
import_badge.Badge,
|
214
217
|
import_button.Button,
|
215
218
|
import_calendar.Calendar,
|
@@ -23,6 +23,7 @@ module.exports = __toCommonJS(stdin_exports);
|
|
23
23
|
var import_use = require("@vant/use");
|
24
24
|
var import_util = require("./util");
|
25
25
|
var import_utils = require("../../utils");
|
26
|
+
var import_vue = require("vue");
|
26
27
|
var stdin_default = (lazyManager) => ({
|
27
28
|
props: {
|
28
29
|
src: [String, Object],
|
@@ -31,15 +32,14 @@ var stdin_default = (lazyManager) => ({
|
|
31
32
|
default: "img"
|
32
33
|
}
|
33
34
|
},
|
34
|
-
render(
|
35
|
-
|
35
|
+
render() {
|
36
|
+
var _a, _b;
|
37
|
+
return (0, import_vue.h)(
|
36
38
|
this.tag,
|
37
39
|
{
|
38
|
-
|
39
|
-
src: this.renderSrc
|
40
|
-
}
|
40
|
+
src: this.renderSrc
|
41
41
|
},
|
42
|
-
this.$slots.default
|
42
|
+
(_b = (_a = this.$slots).default) == null ? void 0 : _b.call(_a)
|
43
43
|
);
|
44
44
|
},
|
45
45
|
data() {
|
@@ -0,0 +1,25 @@
|
|
1
|
+
export function remove(arr: any, item: any): any;
|
2
|
+
export function getBestSelectionFromSrcset(el: any, scale: any): string | undefined;
|
3
|
+
export function supportWebp(): boolean;
|
4
|
+
export function throttle(action: any, delay: any): (...args: any[]) => void;
|
5
|
+
export function on(el: any, type: any, func: any): void;
|
6
|
+
export function off(el: any, type: any, func: any): void;
|
7
|
+
export const hasIntersectionObserver: boolean;
|
8
|
+
export namespace modeType {
|
9
|
+
const event: string;
|
10
|
+
const observer: string;
|
11
|
+
}
|
12
|
+
export function getDPR(scale?: number): number;
|
13
|
+
export function loadImageAsync(item: any, resolve: any, reject: any): any;
|
14
|
+
export class ImageCache {
|
15
|
+
constructor({ max }: {
|
16
|
+
max: any;
|
17
|
+
});
|
18
|
+
options: {
|
19
|
+
max: any;
|
20
|
+
};
|
21
|
+
caches: any[];
|
22
|
+
has(key: any): boolean;
|
23
|
+
add(key: any): void;
|
24
|
+
free(): void;
|
25
|
+
}
|
package/lib/list/List.d.ts
CHANGED
@@ -20,7 +20,7 @@ export declare const listProps: {
|
|
20
20
|
default: true;
|
21
21
|
};
|
22
22
|
};
|
23
|
-
export
|
23
|
+
export type ListProps = ExtractPropTypes<typeof listProps>;
|
24
24
|
declare const _default: import("vue").DefineComponent<{
|
25
25
|
error: BooleanConstructor;
|
26
26
|
offset: {
|
package/lib/list/List.js
CHANGED
@@ -48,7 +48,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
48
48
|
emit,
|
49
49
|
slots
|
50
50
|
}) {
|
51
|
-
const loading = (0, import_vue2.ref)(
|
51
|
+
const loading = (0, import_vue2.ref)(props.loading);
|
52
52
|
const root = (0, import_vue2.ref)();
|
53
53
|
const placeholder = (0, import_vue2.ref)();
|
54
54
|
const tabStatus = (0, import_use_tab_status.useTabStatus)();
|
package/lib/list/types.d.ts
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
import type { ComponentPublicInstance } from 'vue';
|
2
2
|
import type { ListProps } from './List';
|
3
|
-
export
|
4
|
-
export
|
3
|
+
export type ListDirection = 'up' | 'down';
|
4
|
+
export type ListExpose = {
|
5
5
|
check: () => void;
|
6
6
|
};
|
7
|
-
export
|
8
|
-
export
|
7
|
+
export type ListInstance = ComponentPublicInstance<ListProps, ListExpose>;
|
8
|
+
export type ListThemeVars = {
|
9
9
|
listTextColor?: string;
|
10
10
|
listTextFontSize?: string;
|
11
11
|
listTextLineHeight?: number | string;
|
package/lib/loading/Loading.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { type ExtractPropTypes } from 'vue';
|
2
|
-
export
|
2
|
+
export type LoadingType = 'circular' | 'spinner';
|
3
3
|
export declare const loadingProps: {
|
4
4
|
size: (NumberConstructor | StringConstructor)[];
|
5
5
|
type: {
|
@@ -11,7 +11,7 @@ export declare const loadingProps: {
|
|
11
11
|
textSize: (NumberConstructor | StringConstructor)[];
|
12
12
|
textColor: StringConstructor;
|
13
13
|
};
|
14
|
-
export
|
14
|
+
export type LoadingProps = ExtractPropTypes<typeof loadingProps>;
|
15
15
|
declare const _default: import("vue").DefineComponent<{
|
16
16
|
size: (NumberConstructor | StringConstructor)[];
|
17
17
|
type: {
|
package/lib/loading/types.d.ts
CHANGED
package/lib/locale/index.d.ts
CHANGED
package/lib/nav-bar/NavBar.d.ts
CHANGED
@@ -17,7 +17,7 @@ export declare const navBarProps: {
|
|
17
17
|
default: true;
|
18
18
|
};
|
19
19
|
};
|
20
|
-
export
|
20
|
+
export type NavBarProps = ExtractPropTypes<typeof navBarProps>;
|
21
21
|
declare const _default: import("vue").DefineComponent<{
|
22
22
|
title: StringConstructor;
|
23
23
|
fixed: BooleanConstructor;
|
package/lib/nav-bar/types.d.ts
CHANGED
@@ -20,7 +20,7 @@ export declare const noticeBarProps: {
|
|
20
20
|
default: null;
|
21
21
|
};
|
22
22
|
};
|
23
|
-
export
|
23
|
+
export type NoticeBarProps = ExtractPropTypes<typeof noticeBarProps>;
|
24
24
|
declare const _default: import("vue").DefineComponent<{
|
25
25
|
text: StringConstructor;
|
26
26
|
mode: PropType<NoticeBarMode>;
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import type { ComponentPublicInstance } from 'vue';
|
2
2
|
import type { NoticeBarProps } from './NoticeBar';
|
3
|
-
export
|
4
|
-
export
|
3
|
+
export type NoticeBarMode = 'closeable' | 'link';
|
4
|
+
export type NoticeBarExpose = {
|
5
5
|
reset: () => void;
|
6
6
|
};
|
7
|
-
export
|
8
|
-
export
|
7
|
+
export type NoticeBarInstance = ComponentPublicInstance<NoticeBarProps, NoticeBarExpose>;
|
8
|
+
export type NoticeBarThemeVars = {
|
9
9
|
noticeBarHeight?: string;
|
10
10
|
noticeBarPadding?: string;
|
11
11
|
noticeBarWrapablePadding?: string;
|
package/lib/notify/Notify.d.ts
CHANGED
@@ -40,7 +40,7 @@ export declare const notifyProps: {
|
|
40
40
|
background: StringConstructor;
|
41
41
|
lockScroll: BooleanConstructor;
|
42
42
|
};
|
43
|
-
export
|
43
|
+
export type NotifyProps = ExtractPropTypes<typeof notifyProps>;
|
44
44
|
declare const _default: import("vue").DefineComponent<{
|
45
45
|
show: BooleanConstructor;
|
46
46
|
zIndex: (NumberConstructor | StringConstructor)[];
|
package/lib/notify/types.d.ts
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
import type { Numeric } from '../utils';
|
2
|
-
export
|
3
|
-
export
|
4
|
-
export
|
5
|
-
export
|
2
|
+
export type NotifyMessage = Numeric;
|
3
|
+
export type NotifyType = 'primary' | 'success' | 'danger' | 'warning';
|
4
|
+
export type NotifyPosition = 'top' | 'bottom';
|
5
|
+
export type NotifyOptions = {
|
6
6
|
type?: NotifyType;
|
7
7
|
color?: string;
|
8
8
|
message?: NotifyMessage;
|
@@ -15,7 +15,7 @@ export declare type NotifyOptions = {
|
|
15
15
|
onClose?: () => void;
|
16
16
|
onOpened?: () => void;
|
17
17
|
};
|
18
|
-
export
|
18
|
+
export type NotifyThemeVars = {
|
19
19
|
notifyTextColor?: string;
|
20
20
|
notifyPadding?: string;
|
21
21
|
notifyFontSize?: string;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { type PropType, type ExtractPropTypes } from 'vue';
|
2
|
-
export
|
2
|
+
export type NumberKeyboardTheme = 'default' | 'custom';
|
3
3
|
export declare const numberKeyboardProps: {
|
4
4
|
show: BooleanConstructor;
|
5
5
|
title: StringConstructor;
|
@@ -46,7 +46,7 @@ export declare const numberKeyboardProps: {
|
|
46
46
|
default: string;
|
47
47
|
};
|
48
48
|
};
|
49
|
-
export
|
49
|
+
export type NumberKeyboardProps = ExtractPropTypes<typeof numberKeyboardProps>;
|
50
50
|
declare const _default: import("vue").DefineComponent<{
|
51
51
|
show: BooleanConstructor;
|
52
52
|
title: StringConstructor;
|
@@ -66,11 +66,13 @@ function shuffle(array) {
|
|
66
66
|
}
|
67
67
|
var stdin_default = (0, import_vue2.defineComponent)({
|
68
68
|
name,
|
69
|
+
inheritAttrs: false,
|
69
70
|
props: numberKeyboardProps,
|
70
71
|
emits: ["show", "hide", "blur", "input", "close", "delete", "update:modelValue"],
|
71
72
|
setup(props, {
|
72
73
|
emit,
|
73
|
-
slots
|
74
|
+
slots,
|
75
|
+
attrs
|
74
76
|
}) {
|
75
77
|
const root = (0, import_vue2.ref)();
|
76
78
|
const genBasicKeys = () => {
|
@@ -226,7 +228,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
226
228
|
const Content = (0, import_vue.createVNode)(import_vue2.Transition, {
|
227
229
|
"name": props.transition ? "van-slide-up" : ""
|
228
230
|
}, {
|
229
|
-
default: () => [(0, import_vue.withDirectives)((0, import_vue.createVNode)("div", {
|
231
|
+
default: () => [(0, import_vue.withDirectives)((0, import_vue.createVNode)("div", (0, import_vue.mergeProps)({
|
230
232
|
"ref": root,
|
231
233
|
"style": (0, import_utils.getZIndexStyle)(props.zIndex),
|
232
234
|
"class": bem({
|
@@ -235,7 +237,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
235
237
|
}),
|
236
238
|
"onAnimationend": onAnimationEnd,
|
237
239
|
"onTouchstartPassive": import_utils.stopPropagation
|
238
|
-
}, [Title, (0, import_vue.createVNode)("div", {
|
240
|
+
}, attrs), [Title, (0, import_vue.createVNode)("div", {
|
239
241
|
"class": bem("body")
|
240
242
|
}, [(0, import_vue.createVNode)("div", {
|
241
243
|
"class": bem("keys")
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { type PropType } from 'vue';
|
2
|
-
export
|
2
|
+
export type KeyType = '' | 'delete' | 'extra' | 'close';
|
3
3
|
declare const _default: import("vue").DefineComponent<{
|
4
4
|
type: PropType<KeyType>;
|
5
5
|
text: (NumberConstructor | StringConstructor)[];
|
package/lib/overlay/Overlay.d.ts
CHANGED
@@ -14,7 +14,7 @@ export declare const overlayProps: {
|
|
14
14
|
};
|
15
15
|
customStyle: PropType<CSSProperties>;
|
16
16
|
};
|
17
|
-
export
|
17
|
+
export type OverlayProps = ExtractPropTypes<typeof overlayProps>;
|
18
18
|
declare const _default: import("vue").DefineComponent<{
|
19
19
|
show: BooleanConstructor;
|
20
20
|
zIndex: (NumberConstructor | StringConstructor)[];
|
package/lib/overlay/types.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { type ExtractPropTypes } from 'vue';
|
2
|
-
export
|
2
|
+
export type PaginationMode = 'simple' | 'multi';
|
3
3
|
export declare const paginationProps: {
|
4
4
|
mode: {
|
5
5
|
type: import("vue").PropType<PaginationMode>;
|
@@ -29,7 +29,7 @@ export declare const paginationProps: {
|
|
29
29
|
};
|
30
30
|
forceEllipses: BooleanConstructor;
|
31
31
|
};
|
32
|
-
export
|
32
|
+
export type PaginationProps = ExtractPropTypes<typeof paginationProps>;
|
33
33
|
declare const _default: import("vue").DefineComponent<{
|
34
34
|
mode: {
|
35
35
|
type: import("vue").PropType<PaginationMode>;
|
@@ -17,7 +17,7 @@ export declare const passwordInputProps: {
|
|
17
17
|
focused: BooleanConstructor;
|
18
18
|
errorInfo: StringConstructor;
|
19
19
|
};
|
20
|
-
export
|
20
|
+
export type PasswordInputProps = ExtractPropTypes<typeof passwordInputProps>;
|
21
21
|
declare const _default: import("vue").DefineComponent<{
|
22
22
|
info: StringConstructor;
|
23
23
|
mask: {
|
package/lib/picker/Picker.d.ts
CHANGED
@@ -65,7 +65,7 @@ export declare const pickerProps: {
|
|
65
65
|
};
|
66
66
|
columnsFieldNames: PropType<PickerFieldNames>;
|
67
67
|
};
|
68
|
-
export
|
68
|
+
export type PickerProps = ExtractPropTypes<typeof pickerProps>;
|
69
69
|
declare const _default: import("vue").DefineComponent<{
|
70
70
|
loading: BooleanConstructor;
|
71
71
|
readonly: BooleanConstructor;
|
@@ -104,7 +104,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
104
104
|
default: PickerToolbarPosition;
|
105
105
|
};
|
106
106
|
columnsFieldNames: PropType<PickerFieldNames>;
|
107
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "
|
107
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "cancel" | "change" | "clickOption" | "confirm")[], "update:modelValue" | "cancel" | "change" | "clickOption" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
108
108
|
loading: BooleanConstructor;
|
109
109
|
readonly: BooleanConstructor;
|
110
110
|
allowHtml: BooleanConstructor;
|
package/lib/picker/Picker.js
CHANGED
@@ -121,7 +121,9 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
121
121
|
const confirm = () => {
|
122
122
|
children.forEach((child) => child.stopMomentum());
|
123
123
|
const params = getEventParams();
|
124
|
-
|
124
|
+
(0, import_vue2.nextTick)(() => {
|
125
|
+
emit("confirm", params);
|
126
|
+
});
|
125
127
|
return params;
|
126
128
|
};
|
127
129
|
const cancel = () => emit("cancel", getEventParams());
|
@@ -78,8 +78,9 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
78
78
|
}
|
79
79
|
currentOffset.value = offset;
|
80
80
|
};
|
81
|
+
const isReadonly = () => props.readonly || !props.options.length;
|
81
82
|
const onClickOption = (index) => {
|
82
|
-
if (moving ||
|
83
|
+
if (moving || isReadonly()) {
|
83
84
|
return;
|
84
85
|
}
|
85
86
|
transitionEndTrigger = null;
|
@@ -104,7 +105,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
104
105
|
}
|
105
106
|
};
|
106
107
|
const onTouchStart = (event) => {
|
107
|
-
if (
|
108
|
+
if (isReadonly()) {
|
108
109
|
return;
|
109
110
|
}
|
110
111
|
touch.start(event);
|
@@ -119,7 +120,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
119
120
|
transitionEndTrigger = null;
|
120
121
|
};
|
121
122
|
const onTouchMove = (event) => {
|
122
|
-
if (
|
123
|
+
if (isReadonly()) {
|
123
124
|
return;
|
124
125
|
}
|
125
126
|
touch.move(event);
|
@@ -135,7 +136,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
135
136
|
}
|
136
137
|
};
|
137
138
|
const onTouchEnd = () => {
|
138
|
-
if (
|
139
|
+
if (isReadonly()) {
|
139
140
|
return;
|
140
141
|
}
|
141
142
|
const distance = currentOffset.value - momentumOffset;
|
@@ -4,7 +4,7 @@ export declare const pickerToolbarProps: {
|
|
4
4
|
confirmButtonText: StringConstructor;
|
5
5
|
};
|
6
6
|
export declare const pickerToolbarSlots: string[];
|
7
|
-
export
|
7
|
+
export type PickerToolbarPropKeys = Array<keyof typeof pickerToolbarProps>;
|
8
8
|
export declare const pickerToolbarPropKeys: PickerToolbarPropKeys;
|
9
9
|
declare const _default: import("vue").DefineComponent<{
|
10
10
|
title: StringConstructor;
|
package/lib/picker/index.d.ts
CHANGED
@@ -37,7 +37,7 @@ export declare const Picker: import("../utils").WithInstall<import("vue").Define
|
|
37
37
|
default: import("./types").PickerToolbarPosition;
|
38
38
|
};
|
39
39
|
columnsFieldNames: import("vue").PropType<import("./types").PickerFieldNames>;
|
40
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "
|
40
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "cancel" | "change" | "clickOption" | "confirm")[], "update:modelValue" | "cancel" | "change" | "clickOption" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
41
41
|
loading: BooleanConstructor;
|
42
42
|
readonly: BooleanConstructor;
|
43
43
|
allowHtml: BooleanConstructor;
|
package/lib/picker/types.d.ts
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
import type { ComponentPublicInstance } from 'vue';
|
2
2
|
import type { Numeric } from '../utils';
|
3
3
|
import type { PickerProps } from './Picker';
|
4
|
-
export
|
5
|
-
export
|
4
|
+
export type PickerToolbarPosition = 'top' | 'bottom';
|
5
|
+
export type PickerFieldNames = {
|
6
6
|
text?: string;
|
7
7
|
value?: string;
|
8
8
|
children?: string;
|
9
9
|
};
|
10
|
-
export
|
10
|
+
export type PickerOption = {
|
11
11
|
text?: Numeric;
|
12
12
|
value?: Numeric;
|
13
13
|
disabled?: boolean;
|
@@ -15,12 +15,12 @@ export declare type PickerOption = {
|
|
15
15
|
className?: unknown;
|
16
16
|
[key: PropertyKey]: any;
|
17
17
|
};
|
18
|
-
export
|
19
|
-
export
|
18
|
+
export type PickerColumn = PickerOption[];
|
19
|
+
export type PickerExpose = {
|
20
20
|
confirm: () => void;
|
21
21
|
getSelectedOptions: () => Array<PickerOption | undefined>;
|
22
22
|
};
|
23
|
-
export
|
23
|
+
export type PickerColumnProvide = {
|
24
24
|
state: {
|
25
25
|
index: number;
|
26
26
|
offset: number;
|
@@ -33,16 +33,16 @@ export declare type PickerColumnProvide = {
|
|
33
33
|
setOptions: (options: PickerOption[]) => void;
|
34
34
|
stopMomentum: () => void;
|
35
35
|
};
|
36
|
-
export
|
37
|
-
export
|
36
|
+
export type PickerInstance = ComponentPublicInstance<PickerProps, PickerExpose>;
|
37
|
+
export type PickerConfirmEventParams = {
|
38
38
|
selectedValues: Numeric[];
|
39
39
|
selectedOptions: Array<PickerOption | undefined>;
|
40
40
|
};
|
41
|
-
export
|
42
|
-
export
|
41
|
+
export type PickerCancelEventParams = PickerConfirmEventParams;
|
42
|
+
export type PickerChangeEventParams = PickerConfirmEventParams & {
|
43
43
|
columnIndex: number;
|
44
44
|
};
|
45
|
-
export
|
45
|
+
export type PickerThemeVars = {
|
46
46
|
pickerBackground?: string;
|
47
47
|
pickerToolbarHeight?: string;
|
48
48
|
pickerTitleFontSize?: string;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { type InjectionKey, type ExtractPropTypes } from 'vue';
|
2
|
-
export
|
2
|
+
export type PickerGroupProvide = Record<string, string>;
|
3
3
|
export declare const PICKER_GROUP_KEY: InjectionKey<PickerGroupProvide>;
|
4
4
|
export declare const pickerGroupProps: {
|
5
5
|
tabs: {
|
@@ -11,7 +11,7 @@ export declare const pickerGroupProps: {
|
|
11
11
|
cancelButtonText: StringConstructor;
|
12
12
|
confirmButtonText: StringConstructor;
|
13
13
|
};
|
14
|
-
export
|
14
|
+
export type PickerGroupProps = ExtractPropTypes<typeof pickerGroupProps>;
|
15
15
|
declare const _default: import("vue").DefineComponent<{
|
16
16
|
tabs: {
|
17
17
|
type: import("vue").PropType<string[]>;
|
package/lib/popover/Popover.d.ts
CHANGED
@@ -48,7 +48,7 @@ export declare const popoverProps: {
|
|
48
48
|
default: string;
|
49
49
|
};
|
50
50
|
};
|
51
|
-
export
|
51
|
+
export type PopoverProps = ExtractPropTypes<typeof popoverProps>;
|
52
52
|
declare const _default: import("vue").DefineComponent<{
|
53
53
|
show: BooleanConstructor;
|
54
54
|
theme: {
|
package/lib/popover/Popover.js
CHANGED
@@ -26,10 +26,11 @@ var import_vue2 = require("vue");
|
|
26
26
|
var import_popperjs = require("@vant/popperjs");
|
27
27
|
var import_utils = require("../utils");
|
28
28
|
var import_use = require("@vant/use");
|
29
|
+
var import_use_sync_prop_ref = require("../composables/use-sync-prop-ref");
|
29
30
|
var import_icon = require("../icon");
|
30
31
|
var import_popup = require("../popup");
|
31
32
|
const [name, bem] = (0, import_utils.createNamespace)("popover");
|
32
|
-
const popupProps = ["
|
33
|
+
const popupProps = ["overlay", "duration", "teleport", "overlayStyle", "overlayClass", "closeOnClickOverlay"];
|
33
34
|
const popoverProps = {
|
34
35
|
show: Boolean,
|
35
36
|
theme: (0, import_utils.makeStringProp)("light"),
|
@@ -67,6 +68,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
67
68
|
const popupRef = (0, import_vue2.ref)();
|
68
69
|
const wrapperRef = (0, import_vue2.ref)();
|
69
70
|
const popoverRef = (0, import_vue2.ref)();
|
71
|
+
const show = (0, import_use_sync_prop_ref.useSyncPropRef)(() => props.show, (value) => emit("update:show", value));
|
70
72
|
const getPopoverOptions = () => ({
|
71
73
|
placement: props.placement,
|
72
74
|
modifiers: [{
|
@@ -89,7 +91,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
89
91
|
};
|
90
92
|
const updateLocation = () => {
|
91
93
|
(0, import_vue2.nextTick)(() => {
|
92
|
-
if (!
|
94
|
+
if (!show.value) {
|
93
95
|
return;
|
94
96
|
}
|
95
97
|
if (!popper) {
|
@@ -99,10 +101,12 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
99
101
|
}
|
100
102
|
});
|
101
103
|
};
|
102
|
-
const updateShow = (value) =>
|
104
|
+
const updateShow = (value) => {
|
105
|
+
show.value = value;
|
106
|
+
};
|
103
107
|
const onClickWrapper = () => {
|
104
108
|
if (props.trigger === "click") {
|
105
|
-
|
109
|
+
show.value = !show.value;
|
106
110
|
}
|
107
111
|
};
|
108
112
|
const onClickAction = (action, index) => {
|
@@ -111,12 +115,12 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
111
115
|
}
|
112
116
|
emit("select", action, index);
|
113
117
|
if (props.closeOnClickAction) {
|
114
|
-
|
118
|
+
show.value = false;
|
115
119
|
}
|
116
120
|
};
|
117
121
|
const onClickAway = () => {
|
118
|
-
if (
|
119
|
-
|
122
|
+
if (show.value && props.closeOnClickOutside && (!props.overlay || props.closeOnClickOverlay)) {
|
123
|
+
show.value = false;
|
120
124
|
}
|
121
125
|
};
|
122
126
|
const renderActionContent = (action, index) => {
|
@@ -168,7 +172,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
168
172
|
popper = null;
|
169
173
|
}
|
170
174
|
});
|
171
|
-
(0, import_vue2.watch)(() => [
|
175
|
+
(0, import_vue2.watch)(() => [show.value, props.offset, props.placement], updateLocation);
|
172
176
|
(0, import_use.useClickAway)([wrapperRef, popupRef], onClickAway, {
|
173
177
|
eventName: "touchstart"
|
174
178
|
});
|
@@ -180,6 +184,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
180
184
|
"onClick": onClickWrapper
|
181
185
|
}, [(_a = slots.reference) == null ? void 0 : _a.call(slots)]), (0, import_vue.createVNode)(import_popup.Popup, (0, import_vue.mergeProps)({
|
182
186
|
"ref": popoverRef,
|
187
|
+
"show": show.value,
|
183
188
|
"class": bem([props.theme]),
|
184
189
|
"position": "",
|
185
190
|
"transition": "van-popover-zoom",
|