vant 3.4.6 → 3.4.9
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 +141 -0
- package/changelog.generated.md +44 -65
- package/es/address-list/AddressListItem.d.ts +3 -2
- package/es/address-list/AddressListItem.js +1 -1
- package/es/badge/Badge.d.ts +4 -3
- package/es/badge/index.d.ts +2 -2
- package/es/calendar/Calendar.js +1 -1
- package/es/calendar/CalendarDay.js +4 -0
- package/es/calendar/index.css +1 -1
- package/es/calendar/index.less +2 -0
- package/es/calendar/types.d.ts +2 -1
- package/es/calendar/var.less +1 -0
- package/es/cascader/types.d.ts +2 -1
- package/es/checkbox/Checker.d.ts +2 -1
- package/es/collapse/Collapse.d.ts +7 -6
- package/es/collapse/index.d.ts +3 -3
- package/es/composables/use-touch.js +1 -1
- package/es/config-provider/ConfigProvider.d.ts +4 -3
- package/es/config-provider/index.d.ts +2 -2
- package/es/contact-list/ContactList.d.ts +3 -2
- package/es/coupon/Coupon.d.ts +2 -1
- package/es/coupon-list/CouponList.d.ts +3 -13
- package/es/coupon-list/CouponList.js +9 -7
- package/es/coupon-list/index.css +1 -1
- package/es/coupon-list/index.d.ts +2 -9
- package/es/coupon-list/index.less +4 -16
- package/es/coupon-list/style/index.js +1 -0
- package/es/coupon-list/style/less.js +1 -0
- package/es/coupon-list/var.less +0 -1
- package/es/datetime-picker/DatePicker.js +2 -2
- package/es/dialog/index.css +1 -1
- package/es/dialog/types.d.ts +2 -2
- package/es/dropdown-item/types.d.ts +2 -1
- package/es/empty/Empty.d.ts +8 -7
- package/es/empty/Empty.js +12 -15
- package/es/empty/Images.d.ts +4 -0
- package/es/empty/Images.js +271 -0
- package/es/empty/index.d.ts +2 -2
- package/es/field/Field.d.ts +4 -0
- package/es/field/Field.js +8 -3
- package/es/field/index.d.ts +2 -0
- package/es/field/types.d.ts +1 -1
- package/es/form/Form.d.ts +13 -13
- package/es/form/Form.js +7 -3
- package/es/form/index.d.ts +9 -9
- package/es/form/types.d.ts +1 -0
- package/es/icon/index.css +1 -1
- package/es/index-bar/IndexBar.d.ts +5 -4
- package/es/index-bar/IndexBar.js +25 -4
- package/es/index-bar/index.d.ts +3 -3
- package/es/index-bar/types.d.ts +2 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/loading/Loading.js +3 -1
- package/es/locale/lang/da-DK.d.ts +64 -0
- package/es/locale/lang/da-DK.js +66 -0
- package/es/locale/lang/is-IS.d.ts +64 -0
- package/es/locale/lang/is-IS.js +74 -0
- package/es/locale/lang/la-LA.d.ts +64 -0
- package/es/locale/lang/la-LA.js +66 -0
- package/es/locale/lang/sv-SE.d.ts +64 -0
- package/es/locale/lang/sv-SE.js +66 -0
- package/es/notify/types.d.ts +2 -1
- package/es/number-keyboard/NumberKeyboard.js +10 -1
- package/es/picker/types.d.ts +3 -2
- package/es/popup/index.css +1 -1
- package/es/progress/Progress.d.ts +4 -3
- package/es/progress/index.d.ts +2 -2
- package/es/rate/Rate.js +32 -10
- package/es/search/Search.d.ts +3 -0
- package/es/search/index.d.ts +2 -0
- package/es/share-sheet/ShareSheet.js +25 -11
- package/es/share-sheet/index.css +1 -1
- package/es/share-sheet/index.less +45 -1
- package/es/skeleton/Skeleton.d.ts +5 -4
- package/es/skeleton/index.d.ts +3 -3
- package/es/slider/index.css +1 -1
- package/es/style/animation.css +1 -1
- package/es/style/base.css +1 -1
- package/es/swipe-cell/index.css +1 -1
- package/es/tabbar/Tabbar.d.ts +2 -2
- package/es/tabs/Tabs.d.ts +1 -1
- package/es/tabs/Tabs.js +1 -0
- package/es/tabs/types.d.ts +5 -4
- package/es/toast/types.d.ts +3 -2
- package/es/tree-select/TreeSelect.d.ts +7 -6
- package/es/tree-select/index.d.ts +3 -3
- package/es/uploader/Uploader.d.ts +4 -4
- package/es/uploader/Uploader.js +3 -3
- package/es/uploader/UploaderPreviewItem.d.ts +3 -3
- package/es/uploader/UploaderPreviewItem.js +9 -6
- package/es/uploader/index.d.ts +2 -2
- package/es/uploader/types.d.ts +5 -5
- package/es/uploader/utils.d.ts +0 -1
- package/es/uploader/utils.js +2 -4
- package/es/utils/basic.d.ts +2 -0
- package/es/utils/basic.js +3 -1
- package/es/utils/format.d.ts +7 -6
- package/es/utils/format.js +6 -0
- package/es/utils/validate.d.ts +2 -1
- package/lib/action-bar/ActionBar.js +8 -13
- package/lib/action-bar/index.js +9 -16
- package/lib/action-bar-button/ActionBarButton.js +8 -13
- package/lib/action-bar-button/index.js +9 -16
- package/lib/action-bar-icon/ActionBarIcon.js +8 -13
- package/lib/action-bar-icon/index.js +9 -16
- package/lib/action-sheet/ActionSheet.js +8 -13
- package/lib/action-sheet/index.js +9 -16
- package/lib/address-edit/AddressEdit.js +9 -16
- package/lib/address-edit/AddressEditDetail.js +8 -13
- package/lib/address-edit/index.js +9 -16
- package/lib/address-edit/types.js +7 -12
- package/lib/address-list/AddressList.js +9 -16
- package/lib/address-list/AddressListItem.d.ts +3 -2
- package/lib/address-list/AddressListItem.js +8 -13
- package/lib/address-list/index.js +9 -16
- package/lib/area/Area.js +8 -13
- package/lib/area/index.js +9 -16
- package/lib/area/types.js +7 -12
- package/lib/badge/Badge.d.ts +4 -3
- package/lib/badge/Badge.js +8 -13
- package/lib/badge/index.d.ts +2 -2
- package/lib/badge/index.js +9 -16
- package/lib/button/Button.js +8 -13
- package/lib/button/index.js +9 -16
- package/lib/button/types.js +7 -12
- package/lib/calendar/Calendar.js +10 -17
- package/lib/calendar/CalendarDay.js +12 -13
- package/lib/calendar/CalendarHeader.js +8 -13
- package/lib/calendar/CalendarMonth.js +9 -16
- package/lib/calendar/index.css +1 -1
- package/lib/calendar/index.js +9 -16
- package/lib/calendar/index.less +2 -0
- package/lib/calendar/types.d.ts +2 -1
- package/lib/calendar/types.js +7 -12
- package/lib/calendar/utils.js +8 -13
- package/lib/calendar/var.less +1 -0
- package/lib/card/Card.js +8 -13
- package/lib/card/index.js +9 -16
- package/lib/cascader/Cascader.js +8 -13
- package/lib/cascader/index.js +9 -16
- package/lib/cascader/types.d.ts +2 -1
- package/lib/cascader/types.js +7 -12
- package/lib/cell/Cell.js +8 -13
- package/lib/cell/index.js +9 -16
- package/lib/cell-group/CellGroup.js +8 -13
- package/lib/cell-group/index.js +9 -16
- package/lib/checkbox/Checkbox.js +9 -16
- package/lib/checkbox/Checker.d.ts +2 -1
- package/lib/checkbox/Checker.js +8 -13
- package/lib/checkbox/index.js +9 -16
- package/lib/checkbox/types.js +7 -12
- package/lib/checkbox-group/CheckboxGroup.js +8 -13
- package/lib/checkbox-group/index.js +9 -16
- package/lib/checkbox-group/types.js +7 -12
- package/lib/circle/Circle.js +8 -13
- package/lib/circle/index.js +9 -16
- package/lib/col/Col.js +8 -13
- package/lib/col/index.js +9 -16
- package/lib/collapse/Collapse.d.ts +7 -6
- package/lib/collapse/Collapse.js +8 -13
- package/lib/collapse/index.d.ts +3 -3
- package/lib/collapse/index.js +9 -16
- package/lib/collapse-item/CollapseItem.js +8 -13
- package/lib/collapse-item/index.js +9 -16
- package/lib/collapse-item/types.js +7 -12
- package/lib/composables/on-popup-reopen.js +8 -13
- package/lib/composables/use-expose.js +8 -13
- package/lib/composables/use-height.js +8 -13
- package/lib/composables/use-id.js +8 -13
- package/lib/composables/use-lazy-render.js +8 -13
- package/lib/composables/use-lock-scroll.js +8 -13
- package/lib/composables/use-placeholder.js +8 -13
- package/lib/composables/use-refs.js +8 -13
- package/lib/composables/use-route.js +8 -13
- package/lib/composables/use-tab-status.js +8 -13
- package/lib/composables/use-touch.js +9 -14
- package/lib/composables/use-visibility-change.js +8 -13
- package/lib/config-provider/ConfigProvider.d.ts +4 -3
- package/lib/config-provider/ConfigProvider.js +8 -13
- package/lib/config-provider/index.d.ts +2 -2
- package/lib/config-provider/index.js +9 -16
- package/lib/contact-card/ContactCard.js +8 -13
- package/lib/contact-card/index.js +9 -16
- package/lib/contact-edit/ContactEdit.js +8 -13
- package/lib/contact-edit/index.js +9 -16
- package/lib/contact-list/ContactList.d.ts +3 -2
- package/lib/contact-list/ContactList.js +8 -13
- package/lib/contact-list/index.js +9 -16
- package/lib/count-down/CountDown.js +8 -13
- package/lib/count-down/index.js +9 -16
- package/lib/count-down/types.js +7 -12
- package/lib/count-down/utils.js +8 -13
- package/lib/coupon/Coupon.d.ts +2 -1
- package/lib/coupon/Coupon.js +8 -13
- package/lib/coupon/index.js +9 -16
- package/lib/coupon/utils.js +8 -13
- package/lib/coupon-cell/CouponCell.js +8 -13
- package/lib/coupon-cell/index.js +9 -16
- package/lib/coupon-list/CouponList.d.ts +3 -13
- package/lib/coupon-list/CouponList.js +17 -20
- package/lib/coupon-list/index.css +1 -1
- package/lib/coupon-list/index.d.ts +2 -9
- package/lib/coupon-list/index.js +9 -16
- package/lib/coupon-list/index.less +4 -16
- package/lib/coupon-list/style/index.js +1 -0
- package/lib/coupon-list/style/less.js +1 -0
- package/lib/coupon-list/var.less +0 -1
- package/lib/datetime-picker/DatePicker.js +10 -15
- package/lib/datetime-picker/DatetimePicker.js +9 -16
- package/lib/datetime-picker/TimePicker.js +8 -13
- package/lib/datetime-picker/index.js +9 -16
- package/lib/datetime-picker/types.js +7 -12
- package/lib/datetime-picker/utils.js +8 -13
- package/lib/dialog/Dialog.js +8 -13
- package/lib/dialog/function-call.js +9 -16
- package/lib/dialog/index.css +1 -1
- package/lib/dialog/index.js +8 -13
- package/lib/dialog/types.d.ts +2 -2
- package/lib/dialog/types.js +7 -12
- package/lib/divider/Divider.js +8 -13
- package/lib/divider/index.js +9 -16
- package/lib/dropdown-item/DropdownItem.js +8 -13
- package/lib/dropdown-item/index.js +9 -16
- package/lib/dropdown-item/types.d.ts +2 -1
- package/lib/dropdown-item/types.js +7 -12
- package/lib/dropdown-menu/DropdownMenu.js +8 -13
- package/lib/dropdown-menu/index.js +9 -16
- package/lib/dropdown-menu/types.js +7 -12
- package/lib/empty/Empty.d.ts +8 -7
- package/lib/empty/Empty.js +19 -27
- package/lib/empty/Images.d.ts +4 -0
- package/lib/empty/Images.js +290 -0
- package/lib/empty/index.d.ts +2 -2
- package/lib/empty/index.js +9 -16
- package/lib/field/Field.d.ts +4 -0
- package/lib/field/Field.js +15 -15
- package/lib/field/index.d.ts +2 -0
- package/lib/field/index.js +9 -16
- package/lib/field/types.d.ts +1 -1
- package/lib/field/types.js +7 -12
- package/lib/field/utils.js +8 -13
- package/lib/form/Form.d.ts +13 -13
- package/lib/form/Form.js +14 -15
- package/lib/form/index.d.ts +9 -9
- package/lib/form/index.js +9 -16
- package/lib/form/types.d.ts +1 -0
- package/lib/form/types.js +7 -12
- package/lib/grid/Grid.js +8 -13
- package/lib/grid/index.js +9 -16
- package/lib/grid-item/GridItem.js +8 -13
- package/lib/grid-item/index.js +9 -16
- package/lib/icon/Icon.js +8 -13
- package/lib/icon/index.css +1 -1
- package/lib/icon/index.js +9 -16
- package/lib/image/Image.js +8 -13
- package/lib/image/index.js +9 -16
- package/lib/image-preview/ImagePreview.js +9 -16
- package/lib/image-preview/ImagePreviewItem.js +8 -13
- package/lib/image-preview/function-call.js +9 -16
- package/lib/image-preview/index.js +8 -13
- package/lib/image-preview/types.js +7 -12
- package/lib/index-anchor/IndexAnchor.js +8 -13
- package/lib/index-anchor/index.js +9 -16
- package/lib/index-bar/IndexBar.d.ts +5 -4
- package/lib/index-bar/IndexBar.js +33 -17
- package/lib/index-bar/index.d.ts +3 -3
- package/lib/index-bar/index.js +9 -16
- package/lib/index-bar/types.d.ts +2 -1
- package/lib/index-bar/types.js +7 -12
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +96 -100
- package/lib/index.less +2 -2
- package/lib/lazyload/index.js +8 -13
- package/lib/lazyload/vue-lazyload/index.js +9 -16
- package/lib/lazyload/vue-lazyload/lazy-component.js +8 -13
- package/lib/lazyload/vue-lazyload/lazy-container.js +8 -13
- package/lib/lazyload/vue-lazyload/lazy-image.js +8 -13
- package/lib/lazyload/vue-lazyload/lazy.js +9 -16
- package/lib/lazyload/vue-lazyload/listener.js +8 -13
- package/lib/lazyload/vue-lazyload/util.js +8 -13
- package/lib/list/List.js +8 -13
- package/lib/list/index.js +9 -16
- package/lib/list/types.js +7 -12
- package/lib/loading/Loading.js +11 -14
- package/lib/loading/index.js +9 -16
- package/lib/locale/index.js +9 -16
- package/lib/locale/lang/bn-BD.js +8 -13
- package/lib/locale/lang/da-DK.d.ts +64 -0
- package/lib/locale/lang/da-DK.js +85 -0
- package/lib/locale/lang/de-DE-formal.js +8 -13
- package/lib/locale/lang/de-DE.js +8 -13
- package/lib/locale/lang/en-US.js +8 -13
- package/lib/locale/lang/es-ES.js +8 -13
- package/lib/locale/lang/fr-FR.js +8 -13
- package/lib/locale/lang/hi-IN.js +8 -13
- package/lib/locale/lang/id-ID.js +8 -13
- package/lib/locale/lang/is-IS.d.ts +64 -0
- package/lib/locale/lang/is-IS.js +93 -0
- package/lib/locale/lang/it-IT.js +8 -13
- package/lib/locale/lang/ja-JP.js +8 -13
- package/lib/locale/lang/ko-KR.js +8 -13
- package/lib/locale/lang/la-LA.d.ts +64 -0
- package/lib/locale/lang/la-LA.js +85 -0
- package/lib/locale/lang/nb-NO.js +8 -13
- package/lib/locale/lang/pt-BR.js +8 -13
- package/lib/locale/lang/ro-RO.js +8 -13
- package/lib/locale/lang/ru-RU.js +8 -13
- package/lib/locale/lang/sv-SE.d.ts +64 -0
- package/lib/locale/lang/sv-SE.js +85 -0
- package/lib/locale/lang/th-TH.js +8 -13
- package/lib/locale/lang/tr-TR.js +8 -13
- package/lib/locale/lang/uk-UA.js +8 -13
- package/lib/locale/lang/vi-VN.js +8 -13
- package/lib/locale/lang/zh-CN.js +8 -13
- package/lib/locale/lang/zh-HK.js +8 -13
- package/lib/locale/lang/zh-TW.js +8 -13
- package/lib/nav-bar/NavBar.js +8 -13
- package/lib/nav-bar/index.js +9 -16
- package/lib/notice-bar/NoticeBar.js +8 -13
- package/lib/notice-bar/index.js +9 -16
- package/lib/notice-bar/types.js +7 -12
- package/lib/notify/Notify.js +8 -13
- package/lib/notify/function-call.js +9 -16
- package/lib/notify/index.js +8 -13
- package/lib/notify/types.d.ts +2 -1
- package/lib/notify/types.js +7 -12
- package/lib/number-keyboard/NumberKeyboard.js +19 -17
- package/lib/number-keyboard/NumberKeyboardKey.js +8 -13
- package/lib/number-keyboard/index.js +9 -16
- package/lib/overlay/Overlay.js +8 -13
- package/lib/overlay/index.js +9 -16
- package/lib/pagination/Pagination.js +8 -13
- package/lib/pagination/index.js +9 -16
- package/lib/password-input/PasswordInput.js +8 -13
- package/lib/password-input/index.js +9 -16
- package/lib/picker/Picker.js +9 -16
- package/lib/picker/PickerColumn.js +8 -13
- package/lib/picker/index.js +9 -16
- package/lib/picker/types.d.ts +3 -2
- package/lib/picker/types.js +7 -12
- package/lib/popover/Popover.js +8 -13
- package/lib/popover/index.js +9 -16
- package/lib/popover/types.js +7 -12
- package/lib/popup/Popup.js +8 -13
- package/lib/popup/index.css +1 -1
- package/lib/popup/index.js +9 -16
- package/lib/popup/shared.js +8 -13
- package/lib/popup/types.js +7 -12
- package/lib/progress/Progress.d.ts +4 -3
- package/lib/progress/Progress.js +8 -13
- package/lib/progress/index.d.ts +2 -2
- package/lib/progress/index.js +9 -16
- package/lib/progress/types.js +7 -12
- package/lib/pull-refresh/PullRefresh.js +8 -13
- package/lib/pull-refresh/index.js +9 -16
- package/lib/radio/Radio.js +9 -16
- package/lib/radio/index.js +9 -16
- package/lib/radio-group/RadioGroup.js +8 -13
- package/lib/radio-group/index.js +9 -16
- package/lib/rate/Rate.js +39 -22
- package/lib/rate/index.js +9 -16
- package/lib/row/Row.js +8 -13
- package/lib/row/index.js +9 -16
- package/lib/search/Search.d.ts +3 -0
- package/lib/search/Search.js +8 -13
- package/lib/search/index.d.ts +2 -0
- package/lib/search/index.js +9 -16
- package/lib/search/types.js +7 -12
- package/lib/share-sheet/ShareSheet.js +33 -24
- package/lib/share-sheet/index.css +1 -1
- package/lib/share-sheet/index.js +9 -16
- package/lib/share-sheet/index.less +45 -1
- package/lib/sidebar/Sidebar.js +8 -13
- package/lib/sidebar/index.js +9 -16
- package/lib/sidebar-item/SidebarItem.js +8 -13
- package/lib/sidebar-item/index.js +9 -16
- package/lib/skeleton/Skeleton.d.ts +5 -4
- package/lib/skeleton/Skeleton.js +8 -13
- package/lib/skeleton/index.d.ts +3 -3
- package/lib/skeleton/index.js +9 -16
- package/lib/slider/Slider.js +8 -13
- package/lib/slider/index.css +1 -1
- package/lib/slider/index.js +9 -16
- package/lib/step/Step.js +8 -13
- package/lib/step/index.js +9 -16
- package/lib/stepper/Stepper.js +8 -13
- package/lib/stepper/index.js +9 -16
- package/lib/steps/Steps.js +8 -13
- package/lib/steps/index.js +9 -16
- package/lib/sticky/Sticky.js +8 -13
- package/lib/sticky/index.js +9 -16
- package/lib/style/animation.css +1 -1
- package/lib/style/base.css +1 -1
- package/lib/submit-bar/SubmitBar.js +8 -13
- package/lib/submit-bar/index.js +9 -16
- package/lib/swipe/Swipe.js +8 -13
- package/lib/swipe/index.js +9 -16
- package/lib/swipe/types.js +7 -12
- package/lib/swipe-cell/SwipeCell.js +8 -13
- package/lib/swipe-cell/index.css +1 -1
- package/lib/swipe-cell/index.js +9 -16
- package/lib/swipe-cell/types.js +7 -12
- package/lib/swipe-item/SwipeItem.js +8 -13
- package/lib/swipe-item/index.js +9 -16
- package/lib/switch/Switch.js +8 -13
- package/lib/switch/index.js +9 -16
- package/lib/tab/Tab.js +8 -13
- package/lib/tab/index.js +9 -16
- package/lib/tabbar/Tabbar.d.ts +2 -2
- package/lib/tabbar/Tabbar.js +8 -13
- package/lib/tabbar/index.js +9 -16
- package/lib/tabbar-item/TabbarItem.js +8 -13
- package/lib/tabbar-item/index.js +9 -16
- package/lib/tabs/Tabs.d.ts +1 -1
- package/lib/tabs/Tabs.js +10 -16
- package/lib/tabs/TabsContent.js +8 -13
- package/lib/tabs/TabsTitle.js +8 -13
- package/lib/tabs/index.js +9 -16
- package/lib/tabs/types.d.ts +5 -4
- package/lib/tabs/types.js +7 -12
- package/lib/tabs/utils.js +8 -13
- package/lib/tag/Tag.js +8 -13
- package/lib/tag/index.js +9 -16
- package/lib/toast/Toast.js +8 -13
- package/lib/toast/function-call.js +9 -16
- package/lib/toast/index.js +8 -13
- package/lib/toast/lock-click.js +8 -13
- package/lib/toast/types.d.ts +3 -2
- package/lib/toast/types.js +7 -12
- package/lib/tree-select/TreeSelect.d.ts +7 -6
- package/lib/tree-select/TreeSelect.js +8 -13
- package/lib/tree-select/index.d.ts +3 -3
- package/lib/tree-select/index.js +9 -16
- package/lib/uploader/Uploader.d.ts +4 -4
- package/lib/uploader/Uploader.js +11 -18
- package/lib/uploader/UploaderPreviewItem.d.ts +3 -3
- package/lib/uploader/UploaderPreviewItem.js +17 -19
- package/lib/uploader/index.d.ts +2 -2
- package/lib/uploader/index.js +9 -16
- package/lib/uploader/types.d.ts +5 -5
- package/lib/uploader/types.js +7 -12
- package/lib/uploader/utils.d.ts +0 -1
- package/lib/uploader/utils.js +10 -17
- package/lib/utils/basic.d.ts +2 -0
- package/lib/utils/basic.js +11 -14
- package/lib/utils/constant.js +8 -13
- package/lib/utils/create.js +9 -16
- package/lib/utils/deep-assign.js +8 -13
- package/lib/utils/deep-clone.js +8 -13
- package/lib/utils/dom.js +8 -13
- package/lib/utils/format.d.ts +7 -6
- package/lib/utils/format.js +14 -13
- package/lib/utils/index.js +17 -21
- package/lib/utils/interceptor.js +8 -13
- package/lib/utils/mount-component.js +8 -13
- package/lib/utils/props.js +8 -13
- package/lib/utils/validate.d.ts +2 -1
- package/lib/utils/validate.js +8 -13
- package/lib/utils/with-install.js +8 -13
- package/lib/vant.cjs.js +530 -263
- package/lib/vant.cjs.min.js +1 -1
- package/lib/vant.es.js +530 -263
- package/lib/vant.es.min.js +530 -263
- package/lib/vant.js +530 -263
- package/lib/vant.min.js +1 -1
- package/package.json +3 -3
- package/vetur/attributes.json +423 -487
- package/vetur/tags.json +112 -110
- package/vetur/web-types.json +2200 -1345
- package/es/empty/Network.d.ts +0 -1
- package/es/empty/Network.js +0 -89
- package/lib/empty/Network.d.ts +0 -1
- package/lib/empty/Network.js +0 -113
package/README.md
ADDED
@@ -0,0 +1,141 @@
|
|
1
|
+
<p align="center">
|
2
|
+
<img alt="logo" src="https://cdn.jsdelivr.net/npm/@vant/assets/logo.png" width="120" height="120" style="margin-bottom: 10px;">
|
3
|
+
</p>
|
4
|
+
|
5
|
+
<h1 align="center">Vant</h1>
|
6
|
+
|
7
|
+
<p align="center">Mobile UI Components built on Vue</p>
|
8
|
+
|
9
|
+
<p align="center">
|
10
|
+
<img src="https://img.shields.io/npm/v/vant?style=flat-square" alt="npm version" />
|
11
|
+
<img src="https://img.shields.io/github/workflow/status/youzan/vant/CI/dev?style=flat-square" alt="CI Status" />
|
12
|
+
<img src="https://img.shields.io/codecov/c/github/youzan/vant/dev.svg?style=flat-square&color=#4fc08d" alt="Coverage Status" />
|
13
|
+
<img src="https://img.shields.io/npm/dm/vant.svg?style=flat-square&color=#4fc08d" alt="downloads" />
|
14
|
+
<img src="https://img.shields.io/jsdelivr/npm/hm/vant?style=flat-square" alt="Jsdelivr Hits">
|
15
|
+
<img src="https://img.badgesize.io/https://unpkg.com/vant@3/lib/vant.min.js?compression=gzip&style=flat-square&label=gzip%20size&color=#4fc08d" alt="Gzip Size" />
|
16
|
+
</p>
|
17
|
+
|
18
|
+
<p align="center">
|
19
|
+
🔥 <a href="https://vant-contrib.gitee.io/vant">文档网站(国内)</a>
|
20
|
+
|
21
|
+
🌈 <a href="https://youzan.github.io/vant">文档网站(GitHub)</a>
|
22
|
+
|
23
|
+
🇨🇳 <a href="./README.zh-CN.md">中文版介绍</a>
|
24
|
+
</p>
|
25
|
+
|
26
|
+
---
|
27
|
+
|
28
|
+
## Features
|
29
|
+
|
30
|
+
- 🚀 1KB Component average size (min+gzip)
|
31
|
+
- 🚀 70+ High quality components
|
32
|
+
- 💪 90%+ Unit test coverage
|
33
|
+
- 💪 Written in TypeScript
|
34
|
+
- 📖 Extensive documentation and demos
|
35
|
+
- 📖 Provide Sketch and Axure design resources
|
36
|
+
- 🍭 Support Vue 2 & Vue 3
|
37
|
+
- 🍭 Support Tree Shaking
|
38
|
+
- 🍭 Support Custom Theme
|
39
|
+
- 🍭 Support Accessibility (still improving)
|
40
|
+
- 🍭 Support Dark Mode (Requires upgrade to [Vant 4](https://vant-contrib.gitee.io/vant/v4/#/en-US/config-provider))
|
41
|
+
- 🍭 Support SSR
|
42
|
+
- 🌍 Support i18n, built-in 20+ languages
|
43
|
+
|
44
|
+
## Install
|
45
|
+
|
46
|
+
Using `npm` to install:
|
47
|
+
|
48
|
+
```bash
|
49
|
+
# install latest Vant for Vue 3 project
|
50
|
+
npm i vant
|
51
|
+
|
52
|
+
# install Vant 2 for Vue 2 project
|
53
|
+
npm i vant@latest-v2
|
54
|
+
```
|
55
|
+
|
56
|
+
Using `yarn` or `pnpm`:
|
57
|
+
|
58
|
+
```bash
|
59
|
+
# with yarn
|
60
|
+
yarn add vant
|
61
|
+
|
62
|
+
# with pnpm
|
63
|
+
pnpm add vant
|
64
|
+
```
|
65
|
+
|
66
|
+
## Quickstart
|
67
|
+
|
68
|
+
```js
|
69
|
+
import { createApp } from 'vue';
|
70
|
+
import { Button } from 'vant';
|
71
|
+
import 'vant/lib/index.css';
|
72
|
+
|
73
|
+
const app = createApp();
|
74
|
+
app.use(Button);
|
75
|
+
```
|
76
|
+
|
77
|
+
See more in [Quickstart](https://youzan.github.io/vant#/en-US/quickstart).
|
78
|
+
|
79
|
+
## Browser Support
|
80
|
+
|
81
|
+
Vant 2 supports modern browsers and Android >= 4.0、iOS >= 8.0.
|
82
|
+
|
83
|
+
Vant 3/4 supports modern browsers and Chrome >= 51、iOS >= 10.0 (same as Vue 3).
|
84
|
+
|
85
|
+
## Official Ecosystem
|
86
|
+
|
87
|
+
| Project | Description |
|
88
|
+
| --- | --- |
|
89
|
+
| [vant-weapp](https://github.com/youzan/vant-weapp) | WeChat MiniProgram UI |
|
90
|
+
| [vant-demo](https://github.com/youzan/vant-demo) | Collection of Vant demos |
|
91
|
+
| [vant-cli](https://github.com/youzan/vant/tree/dev/packages/vant-cli) | Scaffold for UI library |
|
92
|
+
| [vant-icons](https://github.com/youzan/vant/tree/dev/packages/vant-icons) | Vant icons |
|
93
|
+
| [vant-touch-emulator](https://github.com/youzan/vant/tree/dev/packages/vant-touch-emulator) | Using vant in desktop browsers |
|
94
|
+
|
95
|
+
## Community Ecosystem
|
96
|
+
|
97
|
+
| Project | Description |
|
98
|
+
| --- | --- |
|
99
|
+
| [3lang3/react-vant](https://github.com/3lang3/react-vant) | React mobile UI Components based on Vant |
|
100
|
+
| [rc-ui-lib](https://github.com/rancui/rc-ui-lib) | React mobile UI Components based on Vant |
|
101
|
+
| [vant-aliapp](https://github.com/ant-move/Vant-Aliapp) | Alipay MiniProgram UI |
|
102
|
+
| [taroify](https://gitee.com/mallfoundry/taroify) | Vant Taro |
|
103
|
+
| [vant-theme](https://github.com/Aisen60/vant-theme) | Online theme preview built on Vant UI |
|
104
|
+
| [@antmjs/vantui](https://github.com/antmjs/vantui) | Mobile UI Components based on Vant, supporting Taro and React |
|
105
|
+
| [sfc-playground-vant](https://github.com/zhixiaoqiang/sfc-playground-vant) | Try Vant in the Playground. Currently only Vant 3+ is supported |
|
106
|
+
|
107
|
+
## Links
|
108
|
+
|
109
|
+
- [Documentation](https://youzan.github.io/vant)
|
110
|
+
- [Changelog](https://youzan.github.io/vant#/en-US/changelog)
|
111
|
+
- [Gitter](https://gitter.im/vant-contrib/discuss?utm_source=share-link&utm_medium=link&utm_campaign=share-link)
|
112
|
+
|
113
|
+
## Preview
|
114
|
+
|
115
|
+
You can scan the following QR code to access the demo:
|
116
|
+
|
117
|
+
<img src="https://cdn.jsdelivr.net/npm/@vant/assets/preview-qrcode.png" width="220" height="220" >
|
118
|
+
|
119
|
+
## Core Team
|
120
|
+
|
121
|
+
Core contributors of Vant and Vant Weapp:
|
122
|
+
|
123
|
+
| [](https://github.com/chenjiahan/) | [](https://github.com/cookfront/) | [](https://github.com/w91/) | [](https://github.com/pangxie1991/) | [](https://github.com/rex-zsd/) | [](https://github.com/nemo-shen/) | [](https://github.com/Lindysen/) | [](https://github.com/JakeLaoyu/) |
|
124
|
+
| :-: | :-: | :-: | :-: | :-: | :-: | :-: | :-: |
|
125
|
+
| [chenjiahan](https://github.com/chenjiahan/) | [cookfront](https://github.com/cookfront/) | [wangnaiyi](https://github.com/w91/) | [pangxie](https://github.com/pangxie1991/) | [rex-zsd](https://github.com/rex-zsd/) | [nemo-shen](https://github.com/nemo-shen/) | [Lindysen](https://github.com/Lindysen/) | [JakeLaoyu](https://github.com/JakeLaoyu/) |
|
126
|
+
|
127
|
+
## All Contributors
|
128
|
+
|
129
|
+
Thanks to the following friends for their contributions to Vant:
|
130
|
+
|
131
|
+
<a href="https://github.com/youzan/vant/graphs/contributors">
|
132
|
+
<img src="https://opencollective.com/vant/contributors.svg?width=890&button=false" alt="contributors">
|
133
|
+
</a>
|
134
|
+
|
135
|
+
## Contribution Guide
|
136
|
+
|
137
|
+
Please make sure to read the [Contributing Guide](./.github/CONTRIBUTING.md) before making a pull request.
|
138
|
+
|
139
|
+
## LICENSE
|
140
|
+
|
141
|
+
[MIT](https://en.wikipedia.org/wiki/MIT_License)
|
package/changelog.generated.md
CHANGED
@@ -1,92 +1,71 @@
|
|
1
|
-
### [v3.4.
|
1
|
+
### [v3.4.9](https://github.com/youzan/vant/compare/v3.4.8...v3.4.9)
|
2
2
|
|
3
|
-
`2022-
|
3
|
+
`2022-05-02`
|
4
4
|
|
5
5
|
**Bug Fixes**
|
6
6
|
|
7
|
-
-
|
8
|
-
-
|
9
|
-
- Skeleton: fix non-props attributes warning [#10384](https://github.com/youzan/vant/issues/10384)
|
10
|
-
- SwipeCell: cell should stopPropagation when lockClick is true [#10319](https://github.com/youzan/vant/issues/10319)
|
11
|
-
- Toast: failed to render message after changing type [#10311](https://github.com/youzan/vant/issues/10311)
|
12
|
-
- vant-cli: decamelize ReDoS [#10351](https://github.com/youzan/vant/issues/10351)
|
7
|
+
- @vant/area-data: only publish dist folder to npm [f927f6](https://github.com/youzan/vant/commit/f927f6a7518cf7d08ec8abc5dd35019685c19e3a)
|
8
|
+
- remove default license in vant cli template [#10546](https://github.com/youzan/vant/issues/10546)
|
13
9
|
|
14
10
|
**Document**
|
15
11
|
|
16
|
-
- @vant/
|
17
|
-
-
|
18
|
-
-
|
19
|
-
-
|
20
|
-
-
|
21
|
-
-
|
22
|
-
-
|
23
|
-
- modify JSX.ELement to JSX.Element [#10344](https://github.com/youzan/vant/issues/10344)
|
24
|
-
- update react-vant address [#10305](https://github.com/youzan/vant/issues/10305)
|
25
|
-
- update vite-plugin-style-import version [#10303](https://github.com/youzan/vant/issues/10303)
|
26
|
-
|
27
|
-
- Update contribution.zh-CN.md (#10314) [#10314](https://github.com/youzan/vant/issues/10314)
|
12
|
+
- @vant/cli: optimize links and fix typos [#10545](https://github.com/youzan/vant/issues/10545)
|
13
|
+
- changelog: 3.4.8 [666089](https://github.com/youzan/vant/commit/666089edbb2b894fec5e8f023c0037ca5c7dbe41)
|
14
|
+
- translate docs of composables [#10561](https://github.com/youzan/vant/issues/10561)
|
15
|
+
- update the composables content [#10560](https://github.com/youzan/vant/issues/10560)
|
16
|
+
- vant-cli: translate README to en [#10519](https://github.com/youzan/vant/issues/10519)
|
17
|
+
- vant-cli: translate vant-cli docs to en [#10537](https://github.com/youzan/vant/issues/10537)
|
18
|
+
- vant: keep the doc consistent with the demo code [#10554](https://github.com/youzan/vant/issues/10554)
|
28
19
|
|
29
20
|
**Feature**
|
30
21
|
|
31
|
-
-
|
32
|
-
-
|
33
|
-
-
|
22
|
+
- Form: support setting multile validate-trigger [#10544](https://github.com/youzan/vant/issues/10544)
|
23
|
+
- Image: localize default image [#10514](https://github.com/youzan/vant/issues/10514)
|
24
|
+
- Image: localize error image [#10515](https://github.com/youzan/vant/issues/10515)
|
25
|
+
- Image: localize search image [#10516](https://github.com/youzan/vant/issues/10516)
|
26
|
+
- Loading: add aria to improve a11y [#10568](https://github.com/youzan/vant/issues/10568)
|
34
27
|
|
35
28
|
**release**
|
36
29
|
|
37
|
-
- @vant/
|
38
|
-
|
30
|
+
- @vant/area-data 1.2.4 [c378f4](https://github.com/youzan/vant/commit/c378f4ead14176e371ce1e80074244268fbc5769)
|
31
|
+
### [v3.4.8](https://github.com/youzan/vant/compare/v3.4.7...v3.4.8)
|
39
32
|
|
40
|
-
|
33
|
+
`2022-04-16`
|
41
34
|
|
42
|
-
|
43
|
-
### [v3.4.5](https://github.com/youzan/vant/compare/v3.4.3...v3.4.5)
|
35
|
+
**Bug Fixes**
|
44
36
|
|
45
|
-
|
37
|
+
- datetime-picker: modeValue is inconsistent with the selected data. [#10448](https://github.com/youzan/vant/issues/10448)
|
38
|
+
- Rate: support precisely selected [#10500](https://github.com/youzan/vant/issues/10500)
|
46
39
|
|
47
|
-
**
|
40
|
+
**doc**
|
48
41
|
|
49
|
-
-
|
42
|
+
- update readme add sfc-playground-vant to Community Ecosystem [#10475](https://github.com/youzan/vant/issues/10475)
|
50
43
|
|
51
44
|
**Document**
|
52
45
|
|
53
|
-
- @vant/cli: changelog
|
54
|
-
-
|
55
|
-
-
|
56
|
-
-
|
57
|
-
-
|
58
|
-
-
|
59
|
-
-
|
60
|
-
- update
|
61
|
-
-
|
62
|
-
- update site subtitle [#10267](https://github.com/youzan/vant/issues/10267)
|
46
|
+
- @vant/cli: changelog v4.0.1 [#10473](https://github.com/youzan/vant/issues/10473)
|
47
|
+
- @vant/icons: changelog v1.8.0 [#10472](https://github.com/youzan/vant/issues/10472)
|
48
|
+
- Badge: add show-zero tip [#10506](https://github.com/youzan/vant/issues/10506)
|
49
|
+
- changelog: 3.4.7 [99876c](https://github.com/youzan/vant/commit/99876cfb7c203b5a37fcef1220eeee55d02772cd)
|
50
|
+
- ContactCard: fix missing editable prop [#10507](https://github.com/youzan/vant/issues/10507)
|
51
|
+
- fix ContactCard return error [#10460](https://github.com/youzan/vant/issues/10460)
|
52
|
+
- fix Lazyload register multilple times [#10456](https://github.com/youzan/vant/issues/10456)
|
53
|
+
- Icons: update contribution guide [#10471](https://github.com/youzan/vant/issues/10471)
|
54
|
+
- List: add en FAQ [#10508](https://github.com/youzan/vant/issues/10508)
|
63
55
|
|
64
56
|
**Feature**
|
65
57
|
|
66
|
-
-
|
67
|
-
-
|
68
|
-
-
|
69
|
-
-
|
70
|
-
-
|
71
|
-
- Locale: add
|
72
|
-
-
|
73
|
-
-
|
74
|
-
- Locale: add Vietnamese translation [#10294](https://github.com/youzan/vant/issues/10294)
|
58
|
+
- CalendarDay: add default margin-bottom [#10441](https://github.com/youzan/vant/issues/10441)
|
59
|
+
- Empty: support set the image size separately [#10465](https://github.com/youzan/vant/issues/10465)
|
60
|
+
- Field: add enterkeyhint prop [#10478](https://github.com/youzan/vant/issues/10478)
|
61
|
+
- Form: add getValues method [#10511](https://github.com/youzan/vant/issues/10511)
|
62
|
+
- Icon: add some icons for ShareSheet [#10468](https://github.com/youzan/vant/issues/10468)
|
63
|
+
- Locale: add Danish lang [#10513](https://github.com/youzan/vant/issues/10513)
|
64
|
+
- ShareSheet: no longer rely on CDN images [#10469](https://github.com/youzan/vant/issues/10469)
|
65
|
+
- VantMarkdownVetur: support arguments of events [#10474](https://github.com/youzan/vant/issues/10474)
|
75
66
|
|
76
67
|
**release**
|
77
68
|
|
78
|
-
- @vant/
|
79
|
-
- 3.
|
80
|
-
- 3.4.
|
81
|
-
- create-vant-cli-app 2.0.0 [3d3597](https://github.com/youzan/vant/commit/3d3597c214999834df289f55d982b3d4c506b1b9)
|
82
|
-
|
83
|
-
**style**
|
84
|
-
|
85
|
-
- SubmitBar: using english colon [#10286](https://github.com/youzan/vant/issues/10286)
|
86
|
-
|
87
|
-
**Types**
|
88
|
-
|
89
|
-
- fix ts errors in demo files [#10275](https://github.com/youzan/vant/issues/10275)
|
90
|
-
- IndexBar: index-list prop can includes number [#10273](https://github.com/youzan/vant/issues/10273)
|
91
|
-
- Toast: fix missing teleport prop [#10272](https://github.com/youzan/vant/issues/10272)
|
92
|
-
- Uploader: fix UploaderBeforeRead type [#10274](https://github.com/youzan/vant/issues/10274)
|
69
|
+
- @vant/icons 1.8.0 [e461ab](https://github.com/youzan/vant/commit/e461abaafaea45ee6ba5eb06145618867a3ff7cf)
|
70
|
+
- @vant/markdown-vetur v2.3.0 [#10480](https://github.com/youzan/vant/issues/10480)
|
71
|
+
- 3.4.8 [f525be](https://github.com/youzan/vant/commit/f525be1e0db180bda4da4245f48f74b1e4b1ed78)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { createVNode as _createVNode } from "vue";
|
2
2
|
import { defineComponent } from "vue";
|
3
|
-
import {
|
3
|
+
import { extend, createNamespace, makeRequiredProp } from "../utils";
|
4
4
|
import { Tag } from "../tag";
|
5
5
|
import { Icon } from "../icon";
|
6
6
|
import { Cell } from "../cell";
|
package/es/badge/Badge.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import { type PropType, type ExtractPropTypes } from 'vue';
|
2
|
+
import { type Numeric } from '../utils';
|
2
3
|
export declare type BadgePosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
3
4
|
declare const badgeProps: {
|
4
5
|
dot: BooleanConstructor;
|
@@ -8,7 +9,7 @@ declare const badgeProps: {
|
|
8
9
|
default: keyof HTMLElementTagNameMap;
|
9
10
|
};
|
10
11
|
color: StringConstructor;
|
11
|
-
offset: PropType<[
|
12
|
+
offset: PropType<[Numeric, Numeric]>;
|
12
13
|
content: (NumberConstructor | StringConstructor)[];
|
13
14
|
showZero: {
|
14
15
|
type: BooleanConstructor;
|
@@ -28,7 +29,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
28
29
|
default: keyof HTMLElementTagNameMap;
|
29
30
|
};
|
30
31
|
color: StringConstructor;
|
31
|
-
offset: PropType<[
|
32
|
+
offset: PropType<[Numeric, Numeric]>;
|
32
33
|
content: (NumberConstructor | StringConstructor)[];
|
33
34
|
showZero: {
|
34
35
|
type: BooleanConstructor;
|
@@ -46,7 +47,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
46
47
|
default: keyof HTMLElementTagNameMap;
|
47
48
|
};
|
48
49
|
color: StringConstructor;
|
49
|
-
offset: PropType<[
|
50
|
+
offset: PropType<[Numeric, Numeric]>;
|
50
51
|
content: (NumberConstructor | StringConstructor)[];
|
51
52
|
showZero: {
|
52
53
|
type: BooleanConstructor;
|
package/es/badge/index.d.ts
CHANGED
@@ -6,7 +6,7 @@ export declare const Badge: import("../utils").WithInstall<import("vue").DefineC
|
|
6
6
|
default: keyof HTMLElementTagNameMap;
|
7
7
|
};
|
8
8
|
color: StringConstructor;
|
9
|
-
offset: import("vue").PropType<[
|
9
|
+
offset: import("vue").PropType<[import("../utils").Numeric, import("../utils").Numeric]>;
|
10
10
|
content: (NumberConstructor | StringConstructor)[];
|
11
11
|
showZero: {
|
12
12
|
type: BooleanConstructor;
|
@@ -24,7 +24,7 @@ export declare const Badge: import("../utils").WithInstall<import("vue").DefineC
|
|
24
24
|
default: keyof HTMLElementTagNameMap;
|
25
25
|
};
|
26
26
|
color: StringConstructor;
|
27
|
-
offset: import("vue").PropType<[
|
27
|
+
offset: import("vue").PropType<[import("../utils").Numeric, import("../utils").Numeric]>;
|
28
28
|
content: (NumberConstructor | StringConstructor)[];
|
29
29
|
showZero: {
|
30
30
|
type: BooleanConstructor;
|
package/es/calendar/Calendar.js
CHANGED
@@ -199,8 +199,8 @@ var stdin_default = defineComponent({
|
|
199
199
|
}
|
200
200
|
raf(() => {
|
201
201
|
bodyHeight = Math.floor(useRect(bodyRef).height);
|
202
|
-
scrollToCurrentDate();
|
203
202
|
});
|
203
|
+
scrollToCurrentDate();
|
204
204
|
};
|
205
205
|
const reset = (date = getInitialDate()) => {
|
206
206
|
currentDate.value = date;
|
@@ -18,6 +18,7 @@ var stdin_default = defineComponent({
|
|
18
18
|
slots
|
19
19
|
}) {
|
20
20
|
const style = computed(() => {
|
21
|
+
var _a;
|
21
22
|
const {
|
22
23
|
item,
|
23
24
|
index,
|
@@ -49,6 +50,9 @@ var stdin_default = defineComponent({
|
|
49
50
|
break;
|
50
51
|
}
|
51
52
|
}
|
53
|
+
if (offset + (((_a = item.date) == null ? void 0 : _a.getDate()) || 1) > 28) {
|
54
|
+
style2.marginBottom = 0;
|
55
|
+
}
|
52
56
|
return style2;
|
53
57
|
});
|
54
58
|
const onClick = () => {
|
package/es/calendar/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
:root{--van-calendar-background-color: var(--van-background-color-light);--van-calendar-popup-height: 80%;--van-calendar-header-box-shadow: 0 2px 10px rgba(125, 126, 128, .16);--van-calendar-header-title-height: 44px;--van-calendar-header-title-font-size: var(--van-font-size-lg);--van-calendar-header-subtitle-font-size: var(--van-font-size-md);--van-calendar-weekdays-height: 30px;--van-calendar-weekdays-font-size: var(--van-font-size-sm);--van-calendar-month-title-font-size: var(--van-font-size-md);--van-calendar-month-mark-color: rgba(242, 243, 245, .8);--van-calendar-month-mark-font-size: 160px;--van-calendar-day-height: 64px;--van-calendar-day-font-size: var(--van-font-size-lg);--van-calendar-range-edge-color: var(--van-white);--van-calendar-range-edge-background-color: var(--van-danger-color);--van-calendar-range-middle-color: var(--van-danger-color);--van-calendar-range-middle-background-opacity: .1;--van-calendar-selected-day-size: 54px;--van-calendar-selected-day-color: var(--van-white);--van-calendar-info-font-size: var(--van-font-size-xs);--van-calendar-info-line-height: var(--van-line-height-xs);--van-calendar-selected-day-background-color: var(--van-danger-color);--van-calendar-day-disabled-color: var(--van-text-color-3);--van-calendar-confirm-button-height: 36px;--van-calendar-confirm-button-margin: 7px 0}.van-calendar{display:flex;flex-direction:column;height:100%;background:var(--van-calendar-background-color)}.van-calendar__popup.van-popup--top,.van-calendar__popup.van-popup--bottom{height:var(--van-calendar-popup-height)}.van-calendar__popup.van-popup--left,.van-calendar__popup.van-popup--right{height:100%}.van-calendar__popup .van-popup__close-icon{top:11px}.van-calendar__header{flex-shrink:0;box-shadow:var(--van-calendar-header-box-shadow)}.van-calendar__month-title,.van-calendar__header-title,.van-calendar__header-subtitle{height:var(--van-calendar-header-title-height);font-weight:var(--van-font-weight-bold);line-height:var(--van-calendar-header-title-height);text-align:center}.van-calendar__header-title{font-size:var(--van-calendar-header-title-font-size)}.van-calendar__header-subtitle{font-size:var(--van-calendar-header-subtitle-font-size)}.van-calendar__month-title{font-size:var(--van-calendar-month-title-font-size)}.van-calendar__weekdays{display:flex}.van-calendar__weekday{flex:1;font-size:var(--van-calendar-weekdays-font-size);line-height:var(--van-calendar-weekdays-height);text-align:center}.van-calendar__body{flex:1;overflow:auto;-webkit-overflow-scrolling:touch}.van-calendar__days{position:relative;display:flex;flex-wrap:wrap;-webkit-user-select:none;user-select:none}.van-calendar__month-mark{position:absolute;top:50%;left:50%;z-index:0;color:var(--van-calendar-month-mark-color);font-size:var(--van-calendar-month-mark-font-size);transform:translate(-50%,-50%);pointer-events:none}.van-calendar__day,.van-calendar__selected-day{display:flex;align-items:center;justify-content:center;text-align:center}.van-calendar__day{position:relative;width:14.285%;height:var(--van-calendar-day-height);font-size:var(--van-calendar-day-font-size);cursor:pointer}.van-calendar__day--end,.van-calendar__day--start,.van-calendar__day--start-end,.van-calendar__day--multiple-middle,.van-calendar__day--multiple-selected{color:var(--van-calendar-range-edge-color);background:var(--van-calendar-range-edge-background-color)}.van-calendar__day--start{border-radius:var(--van-border-radius-md) 0 0 var(--van-border-radius-md)}.van-calendar__day--end{border-radius:0 var(--van-border-radius-md) var(--van-border-radius-md) 0}.van-calendar__day--start-end,.van-calendar__day--multiple-selected{border-radius:var(--van-border-radius-md)}.van-calendar__day--middle{color:var(--van-calendar-range-middle-color)}.van-calendar__day--middle:after{position:absolute;top:0;right:0;bottom:0;left:0;background-color:currentColor;opacity:var(--van-calendar-range-middle-background-opacity);content:""}.van-calendar__day--disabled{color:var(--van-calendar-day-disabled-color);cursor:default}.van-calendar__top-info,.van-calendar__bottom-info{position:absolute;right:0;left:0;font-size:var(--van-calendar-info-font-size);line-height:var(--van-calendar-info-line-height)}@media (max-width: 350px){.van-calendar__top-info,.van-calendar__bottom-info{font-size:9px}}.van-calendar__top-info{top:6px}.van-calendar__bottom-info{bottom:6px}.van-calendar__selected-day{width:var(--van-calendar-selected-day-size);height:var(--van-calendar-selected-day-size);color:var(--van-calendar-selected-day-color);background:var(--van-calendar-selected-day-background-color);border-radius:var(--van-border-radius-md)}.van-calendar__footer{flex-shrink:0;padding-left:var(--van-padding-md);padding-right:var(--van-padding-md)}.van-calendar__confirm{height:var(--van-calendar-confirm-button-height);margin:var(--van-calendar-confirm-button-margin)}
|
1
|
+
:root{--van-calendar-background-color: var(--van-background-color-light);--van-calendar-popup-height: 80%;--van-calendar-header-box-shadow: 0 2px 10px rgba(125, 126, 128, .16);--van-calendar-header-title-height: 44px;--van-calendar-header-title-font-size: var(--van-font-size-lg);--van-calendar-header-subtitle-font-size: var(--van-font-size-md);--van-calendar-weekdays-height: 30px;--van-calendar-weekdays-font-size: var(--van-font-size-sm);--van-calendar-month-title-font-size: var(--van-font-size-md);--van-calendar-month-mark-color: rgba(242, 243, 245, .8);--van-calendar-month-mark-font-size: 160px;--van-calendar-day-height: 64px;--van-calendar-day-font-size: var(--van-font-size-lg);--van-calendar-day-margin-bottom: 4px;--van-calendar-range-edge-color: var(--van-white);--van-calendar-range-edge-background-color: var(--van-danger-color);--van-calendar-range-middle-color: var(--van-danger-color);--van-calendar-range-middle-background-opacity: .1;--van-calendar-selected-day-size: 54px;--van-calendar-selected-day-color: var(--van-white);--van-calendar-info-font-size: var(--van-font-size-xs);--van-calendar-info-line-height: var(--van-line-height-xs);--van-calendar-selected-day-background-color: var(--van-danger-color);--van-calendar-day-disabled-color: var(--van-text-color-3);--van-calendar-confirm-button-height: 36px;--van-calendar-confirm-button-margin: 7px 0}.van-calendar{display:flex;flex-direction:column;height:100%;background:var(--van-calendar-background-color)}.van-calendar__popup.van-popup--top,.van-calendar__popup.van-popup--bottom{height:var(--van-calendar-popup-height)}.van-calendar__popup.van-popup--left,.van-calendar__popup.van-popup--right{height:100%}.van-calendar__popup .van-popup__close-icon{top:11px}.van-calendar__header{flex-shrink:0;box-shadow:var(--van-calendar-header-box-shadow)}.van-calendar__month-title,.van-calendar__header-title,.van-calendar__header-subtitle{height:var(--van-calendar-header-title-height);font-weight:var(--van-font-weight-bold);line-height:var(--van-calendar-header-title-height);text-align:center}.van-calendar__header-title{font-size:var(--van-calendar-header-title-font-size)}.van-calendar__header-subtitle{font-size:var(--van-calendar-header-subtitle-font-size)}.van-calendar__month-title{font-size:var(--van-calendar-month-title-font-size)}.van-calendar__weekdays{display:flex}.van-calendar__weekday{flex:1;font-size:var(--van-calendar-weekdays-font-size);line-height:var(--van-calendar-weekdays-height);text-align:center}.van-calendar__body{flex:1;overflow:auto;-webkit-overflow-scrolling:touch}.van-calendar__days{position:relative;display:flex;flex-wrap:wrap;-webkit-user-select:none;user-select:none}.van-calendar__month-mark{position:absolute;top:50%;left:50%;z-index:0;color:var(--van-calendar-month-mark-color);font-size:var(--van-calendar-month-mark-font-size);transform:translate(-50%,-50%);pointer-events:none}.van-calendar__day,.van-calendar__selected-day{display:flex;align-items:center;justify-content:center;text-align:center}.van-calendar__day{position:relative;width:14.285%;height:var(--van-calendar-day-height);font-size:var(--van-calendar-day-font-size);margin-bottom:var(--van-calendar-day-margin-bottom);cursor:pointer}.van-calendar__day--end,.van-calendar__day--start,.van-calendar__day--start-end,.van-calendar__day--multiple-middle,.van-calendar__day--multiple-selected{color:var(--van-calendar-range-edge-color);background:var(--van-calendar-range-edge-background-color)}.van-calendar__day--start{border-radius:var(--van-border-radius-md) 0 0 var(--van-border-radius-md)}.van-calendar__day--end{border-radius:0 var(--van-border-radius-md) var(--van-border-radius-md) 0}.van-calendar__day--start-end,.van-calendar__day--multiple-selected{border-radius:var(--van-border-radius-md)}.van-calendar__day--middle{color:var(--van-calendar-range-middle-color)}.van-calendar__day--middle:after{position:absolute;top:0;right:0;bottom:0;left:0;background-color:currentColor;opacity:var(--van-calendar-range-middle-background-opacity);content:""}.van-calendar__day--disabled{color:var(--van-calendar-day-disabled-color);cursor:default}.van-calendar__top-info,.van-calendar__bottom-info{position:absolute;right:0;left:0;font-size:var(--van-calendar-info-font-size);line-height:var(--van-calendar-info-line-height)}@media (max-width: 350px){.van-calendar__top-info,.van-calendar__bottom-info{font-size:9px}}.van-calendar__top-info{top:6px}.van-calendar__bottom-info{bottom:6px}.van-calendar__selected-day{width:var(--van-calendar-selected-day-size);height:var(--van-calendar-selected-day-size);color:var(--van-calendar-selected-day-color);background:var(--van-calendar-selected-day-background-color);border-radius:var(--van-border-radius-md)}.van-calendar__footer{flex-shrink:0;padding-left:var(--van-padding-md);padding-right:var(--van-padding-md)}.van-calendar__confirm{height:var(--van-calendar-confirm-button-height);margin:var(--van-calendar-confirm-button-margin)}
|
package/es/calendar/index.less
CHANGED
@@ -14,6 +14,7 @@
|
|
14
14
|
--van-calendar-month-mark-font-size: @calendar-month-mark-font-size;
|
15
15
|
--van-calendar-day-height: @calendar-day-height;
|
16
16
|
--van-calendar-day-font-size: @calendar-day-font-size;
|
17
|
+
--van-calendar-day-margin-bottom: @calendar-day-margin-bottom;
|
17
18
|
--van-calendar-range-edge-color: @calendar-range-edge-color;
|
18
19
|
--van-calendar-range-edge-background-color: @calendar-range-edge-background-color;
|
19
20
|
--van-calendar-range-middle-color: @calendar-range-middle-color;
|
@@ -124,6 +125,7 @@
|
|
124
125
|
width: 14.285%;
|
125
126
|
height: var(--van-calendar-day-height);
|
126
127
|
font-size: var(--van-calendar-day-font-size);
|
128
|
+
margin-bottom: var(--van-calendar-day-margin-bottom);
|
127
129
|
cursor: pointer;
|
128
130
|
|
129
131
|
&--end,
|
package/es/calendar/types.d.ts
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
import type { ComponentPublicInstance, ComputedRef, Ref } from 'vue';
|
2
|
+
import type { Numeric } from '../utils';
|
2
3
|
import type { CalendarProps } from './Calendar';
|
3
4
|
import type { CalendarMonthProps } from './CalendarMonth';
|
4
5
|
export declare type CalendarType = 'single' | 'range' | 'multiple';
|
5
6
|
export declare type CalendarDayType = '' | 'start' | 'start-end' | 'middle' | 'end' | 'selected' | 'multiple-middle' | 'multiple-selected' | 'disabled' | 'placeholder';
|
6
7
|
export declare type CalendarDayItem = {
|
7
8
|
date?: Date;
|
8
|
-
text?:
|
9
|
+
text?: Numeric;
|
9
10
|
type?: CalendarDayType;
|
10
11
|
topInfo?: string;
|
11
12
|
className?: unknown;
|
package/es/calendar/var.less
CHANGED
@@ -13,6 +13,7 @@
|
|
13
13
|
@calendar-month-mark-font-size: 160px;
|
14
14
|
@calendar-day-height: 64px;
|
15
15
|
@calendar-day-font-size: var(--van-font-size-lg);
|
16
|
+
@calendar-day-margin-bottom: 4px;
|
16
17
|
@calendar-range-edge-color: var(--van-white);
|
17
18
|
@calendar-range-edge-background-color: var(--van-danger-color);
|
18
19
|
@calendar-range-middle-color: var(--van-danger-color);
|
package/es/cascader/types.d.ts
CHANGED
package/es/checkbox/Checker.d.ts
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
import { type PropType } from 'vue';
|
2
|
+
import { type Numeric } from '../utils';
|
2
3
|
export declare type CheckerShape = 'square' | 'round';
|
3
4
|
export declare type CheckerDirection = 'horizontal' | 'vertical';
|
4
5
|
export declare type CheckerLabelPosition = 'left' | 'right';
|
5
6
|
export declare type CheckerParent = {
|
6
7
|
props: {
|
7
8
|
disabled?: boolean;
|
8
|
-
iconSize?:
|
9
|
+
iconSize?: Numeric;
|
9
10
|
direction?: CheckerDirection;
|
10
11
|
checkedColor?: string;
|
11
12
|
};
|
@@ -1,7 +1,8 @@
|
|
1
1
|
import { type PropType, type InjectionKey, type ExtractPropTypes } from 'vue';
|
2
|
+
import { type Numeric } from '../utils';
|
2
3
|
export declare type CollapseProvide = {
|
3
|
-
toggle: (name:
|
4
|
-
isExpanded: (name:
|
4
|
+
toggle: (name: Numeric, expanded: boolean) => void;
|
5
|
+
isExpanded: (name: Numeric) => boolean;
|
5
6
|
};
|
6
7
|
export declare const COLLAPSE_KEY: InjectionKey<CollapseProvide>;
|
7
8
|
declare const collapseProps: {
|
@@ -11,7 +12,7 @@ declare const collapseProps: {
|
|
11
12
|
};
|
12
13
|
accordion: BooleanConstructor;
|
13
14
|
modelValue: {
|
14
|
-
type: PropType<
|
15
|
+
type: PropType<Numeric | Numeric[]>;
|
15
16
|
default: string;
|
16
17
|
};
|
17
18
|
};
|
@@ -23,7 +24,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
23
24
|
};
|
24
25
|
accordion: BooleanConstructor;
|
25
26
|
modelValue: {
|
26
|
-
type: PropType<
|
27
|
+
type: PropType<Numeric | Numeric[]>;
|
27
28
|
default: string;
|
28
29
|
};
|
29
30
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
@@ -33,7 +34,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
33
34
|
};
|
34
35
|
accordion: BooleanConstructor;
|
35
36
|
modelValue: {
|
36
|
-
type: PropType<
|
37
|
+
type: PropType<Numeric | Numeric[]>;
|
37
38
|
default: string;
|
38
39
|
};
|
39
40
|
}>> & {
|
@@ -41,7 +42,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
41
42
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
42
43
|
}, {
|
43
44
|
border: boolean;
|
44
|
-
modelValue:
|
45
|
+
modelValue: Numeric | Numeric[];
|
45
46
|
accordion: boolean;
|
46
47
|
}>;
|
47
48
|
export default _default;
|
package/es/collapse/index.d.ts
CHANGED
@@ -5,7 +5,7 @@ export declare const Collapse: import("../utils").WithInstall<import("vue").Defi
|
|
5
5
|
};
|
6
6
|
accordion: BooleanConstructor;
|
7
7
|
modelValue: {
|
8
|
-
type: import("vue").PropType<
|
8
|
+
type: import("vue").PropType<import("../utils").Numeric | import("../utils").Numeric[]>;
|
9
9
|
default: string;
|
10
10
|
};
|
11
11
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
@@ -15,7 +15,7 @@ export declare const Collapse: import("../utils").WithInstall<import("vue").Defi
|
|
15
15
|
};
|
16
16
|
accordion: BooleanConstructor;
|
17
17
|
modelValue: {
|
18
|
-
type: import("vue").PropType<
|
18
|
+
type: import("vue").PropType<import("../utils").Numeric | import("../utils").Numeric[]>;
|
19
19
|
default: string;
|
20
20
|
};
|
21
21
|
}>> & {
|
@@ -23,7 +23,7 @@ export declare const Collapse: import("../utils").WithInstall<import("vue").Defi
|
|
23
23
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
24
24
|
}, {
|
25
25
|
border: boolean;
|
26
|
-
modelValue:
|
26
|
+
modelValue: import("../utils").Numeric | import("../utils").Numeric[];
|
27
27
|
accordion: boolean;
|
28
28
|
}>>;
|
29
29
|
export default Collapse;
|
@@ -32,7 +32,7 @@ function useTouch() {
|
|
32
32
|
};
|
33
33
|
const move = (event) => {
|
34
34
|
const touch = event.touches[0];
|
35
|
-
deltaX.value = touch.clientX < 0 ? 0 : touch.clientX - startX.value;
|
35
|
+
deltaX.value = (touch.clientX < 0 ? 0 : touch.clientX) - startX.value;
|
36
36
|
deltaY.value = touch.clientY - startY.value;
|
37
37
|
offsetX.value = Math.abs(deltaX.value);
|
38
38
|
offsetY.value = Math.abs(deltaY.value);
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { type PropType, type InjectionKey, type ExtractPropTypes } from 'vue';
|
2
|
+
import { type Numeric } from '../utils';
|
2
3
|
export declare type ConfigProviderProvide = {
|
3
4
|
iconPrefix?: string;
|
4
5
|
};
|
@@ -8,7 +9,7 @@ declare const configProviderProps: {
|
|
8
9
|
type: PropType<keyof HTMLElementTagNameMap>;
|
9
10
|
default: keyof HTMLElementTagNameMap;
|
10
11
|
};
|
11
|
-
themeVars: PropType<Record<string,
|
12
|
+
themeVars: PropType<Record<string, Numeric>>;
|
12
13
|
iconPrefix: StringConstructor;
|
13
14
|
};
|
14
15
|
export declare type ConfigProviderProps = ExtractPropTypes<typeof configProviderProps>;
|
@@ -17,14 +18,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
17
18
|
type: PropType<keyof HTMLElementTagNameMap>;
|
18
19
|
default: keyof HTMLElementTagNameMap;
|
19
20
|
};
|
20
|
-
themeVars: PropType<Record<string,
|
21
|
+
themeVars: PropType<Record<string, Numeric>>;
|
21
22
|
iconPrefix: StringConstructor;
|
22
23
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
23
24
|
tag: {
|
24
25
|
type: PropType<keyof HTMLElementTagNameMap>;
|
25
26
|
default: keyof HTMLElementTagNameMap;
|
26
27
|
};
|
27
|
-
themeVars: PropType<Record<string,
|
28
|
+
themeVars: PropType<Record<string, Numeric>>;
|
28
29
|
iconPrefix: StringConstructor;
|
29
30
|
}>>, {
|
30
31
|
tag: keyof HTMLElementTagNameMap;
|
@@ -3,14 +3,14 @@ export declare const ConfigProvider: import("../utils").WithInstall<import("vue"
|
|
3
3
|
type: import("vue").PropType<keyof HTMLElementTagNameMap>;
|
4
4
|
default: keyof HTMLElementTagNameMap;
|
5
5
|
};
|
6
|
-
themeVars: import("vue").PropType<Record<string,
|
6
|
+
themeVars: import("vue").PropType<Record<string, import("../utils").Numeric>>;
|
7
7
|
iconPrefix: StringConstructor;
|
8
8
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
9
9
|
tag: {
|
10
10
|
type: import("vue").PropType<keyof HTMLElementTagNameMap>;
|
11
11
|
default: keyof HTMLElementTagNameMap;
|
12
12
|
};
|
13
|
-
themeVars: import("vue").PropType<Record<string,
|
13
|
+
themeVars: import("vue").PropType<Record<string, import("../utils").Numeric>>;
|
14
14
|
iconPrefix: StringConstructor;
|
15
15
|
}>>, {
|
16
16
|
tag: keyof HTMLElementTagNameMap;
|
@@ -1,7 +1,8 @@
|
|
1
1
|
import { type PropType, type ExtractPropTypes } from 'vue';
|
2
|
+
import { type Numeric } from '../utils';
|
2
3
|
export declare type ContactListItem = {
|
3
|
-
id?:
|
4
|
-
tel:
|
4
|
+
id?: Numeric;
|
5
|
+
tel: Numeric;
|
5
6
|
name: string;
|
6
7
|
isDefault?: boolean;
|
7
8
|
};
|