vant 3.3.4 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/action-bar/ActionBar.d.ts +2 -2
- package/es/action-bar/index.d.ts +6 -1
- package/es/action-bar-button/ActionBarButton.d.ts +4 -4
- package/es/action-bar-button/index.d.ts +8 -3
- package/es/action-bar-icon/ActionBarIcon.d.ts +69 -8
- package/es/action-bar-icon/ActionBarIcon.js +8 -5
- package/es/action-bar-icon/index.d.ts +49 -3
- package/es/action-sheet/ActionSheet.d.ts +2 -2
- package/es/action-sheet/ActionSheet.js +27 -15
- package/es/action-sheet/index.d.ts +6 -1
- package/es/address-edit/AddressEdit.d.ts +2 -2
- package/es/address-edit/AddressEditDetail.d.ts +2 -2
- package/es/address-edit/index.d.ts +6 -1
- package/es/address-list/AddressList.d.ts +2 -2
- package/es/address-list/AddressListItem.d.ts +2 -2
- package/es/address-list/index.d.ts +6 -1
- package/es/area/Area.d.ts +2 -2
- package/es/area/index.d.ts +6 -1
- package/es/badge/Badge.d.ts +15 -3
- package/es/badge/Badge.js +4 -3
- package/es/badge/index.css +1 -1
- package/es/badge/index.d.ts +15 -3
- package/es/badge/index.less +22 -1
- package/es/button/Button.d.ts +4 -4
- package/es/button/index.d.ts +8 -3
- package/es/calendar/Calendar.d.ts +5 -5
- package/es/calendar/CalendarDay.d.ts +2 -2
- package/es/calendar/CalendarHeader.d.ts +1 -1
- package/es/calendar/CalendarMonth.d.ts +4 -4
- package/es/calendar/index.d.ts +9 -4
- package/es/card/Card.d.ts +2 -2
- package/es/card/index.d.ts +6 -1
- package/es/cascader/Cascader.d.ts +2 -2
- package/es/cascader/Cascader.js +1 -1
- package/es/cascader/index.css +1 -1
- package/es/cascader/index.d.ts +6 -1
- package/es/cascader/index.less +0 -10
- package/es/cell/Cell.d.ts +2 -2
- package/es/cell/index.d.ts +6 -1
- package/es/cell-group/CellGroup.d.ts +2 -2
- package/es/cell-group/index.d.ts +6 -1
- package/es/checkbox/Checkbox.d.ts +2 -2
- package/es/checkbox/Checker.d.ts +2 -2
- package/es/checkbox/index.d.ts +6 -1
- package/es/checkbox-group/CheckboxGroup.d.ts +2 -2
- package/es/checkbox-group/index.d.ts +6 -1
- package/es/circle/Circle.d.ts +2 -2
- package/es/circle/index.d.ts +6 -1
- package/es/col/Col.d.ts +2 -2
- package/es/col/index.d.ts +6 -1
- package/es/collapse/Collapse.d.ts +2 -2
- package/es/collapse/index.d.ts +6 -1
- package/es/collapse-item/CollapseItem.d.ts +2 -2
- package/es/collapse-item/index.d.ts +6 -1
- package/es/composables/use-refs.js +9 -2
- package/es/composables/use-route.d.ts +1 -1
- package/es/composables/use-touch.js +7 -6
- package/es/config-provider/ConfigProvider.d.ts +2 -2
- package/es/config-provider/index.d.ts +6 -1
- package/es/contact-card/ContactCard.d.ts +2 -2
- package/es/contact-card/index.d.ts +6 -1
- package/es/contact-edit/ContactEdit.d.ts +2 -2
- package/es/contact-edit/index.d.ts +6 -1
- package/es/contact-list/ContactList.d.ts +2 -2
- package/es/contact-list/index.d.ts +6 -1
- package/es/count-down/CountDown.d.ts +2 -2
- package/es/count-down/index.d.ts +6 -1
- package/es/coupon/Coupon.d.ts +2 -2
- package/es/coupon/index.d.ts +6 -1
- package/es/coupon-cell/CouponCell.d.ts +2 -2
- package/es/coupon-cell/index.d.ts +6 -1
- package/es/coupon-list/CouponList.d.ts +2 -2
- package/es/coupon-list/index.d.ts +6 -1
- package/es/datetime-picker/DatePicker.d.ts +1 -1
- package/es/datetime-picker/DatePicker.js +2 -2
- package/es/datetime-picker/DatetimePicker.d.ts +2 -2
- package/es/datetime-picker/TimePicker.d.ts +1 -1
- package/es/datetime-picker/TimePicker.js +2 -2
- package/es/datetime-picker/index.d.ts +6 -1
- package/es/datetime-picker/utils.d.ts +3 -1
- package/es/datetime-picker/utils.js +17 -1
- package/es/dialog/Dialog.d.ts +2 -2
- package/es/dialog/function-call.d.ts +1 -1
- package/es/dialog/index.d.ts +5 -0
- package/es/divider/Divider.d.ts +2 -2
- package/es/divider/index.d.ts +6 -1
- package/es/dropdown-item/DropdownItem.d.ts +2 -2
- package/es/dropdown-item/index.d.ts +6 -1
- package/es/dropdown-menu/DropdownMenu.d.ts +2 -2
- package/es/dropdown-menu/index.d.ts +6 -1
- package/es/empty/Empty.d.ts +2 -2
- package/es/empty/index.d.ts +6 -1
- package/es/field/Field.d.ts +2 -2
- package/es/field/Field.js +5 -5
- package/es/field/index.d.ts +6 -1
- package/es/field/types.d.ts +1 -1
- package/es/field/utils.d.ts +2 -0
- package/es/field/utils.js +9 -0
- package/es/form/Form.d.ts +2 -2
- package/es/form/index.d.ts +6 -1
- package/es/grid/Grid.d.ts +2 -2
- package/es/grid/index.d.ts +6 -1
- package/es/grid-item/GridItem.d.ts +66 -5
- package/es/grid-item/GridItem.js +8 -6
- package/es/grid-item/index.d.ts +48 -2
- package/es/icon/Icon.d.ts +66 -5
- package/es/icon/Icon.js +7 -6
- package/es/icon/index.css +1 -1
- package/es/icon/index.d.ts +48 -2
- package/es/image/Image.d.ts +2 -2
- package/es/image/index.d.ts +6 -1
- package/es/image-preview/ImagePreview.d.ts +6 -2
- package/es/image-preview/ImagePreview.js +2 -1
- package/es/image-preview/ImagePreviewItem.d.ts +1 -1
- package/es/image-preview/function-call.d.ts +4 -1
- package/es/image-preview/function-call.js +1 -0
- package/es/image-preview/index.d.ts +5 -0
- package/es/image-preview/types.d.ts +1 -0
- package/es/index-anchor/IndexAnchor.d.ts +2 -2
- package/es/index-anchor/index.d.ts +6 -1
- package/es/index-bar/IndexBar.d.ts +2 -2
- package/es/index-bar/index.d.ts +6 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/list/List.d.ts +2 -2
- package/es/list/index.d.ts +6 -1
- package/es/loading/Loading.d.ts +2 -2
- package/es/loading/index.d.ts +6 -1
- package/es/nav-bar/NavBar.d.ts +2 -2
- package/es/nav-bar/index.d.ts +6 -1
- package/es/notice-bar/NoticeBar.d.ts +2 -2
- package/es/notice-bar/index.d.ts +6 -1
- package/es/notify/Notify.d.ts +14 -3
- package/es/notify/Notify.js +2 -1
- package/es/notify/function-call.d.ts +9 -2
- package/es/notify/function-call.js +1 -0
- package/es/notify/index.d.ts +5 -0
- package/es/notify/types.d.ts +2 -0
- package/es/number-keyboard/NumberKeyboard.d.ts +2 -2
- package/es/number-keyboard/NumberKeyboardKey.d.ts +3 -3
- package/es/number-keyboard/index.d.ts +6 -1
- package/es/overlay/Overlay.d.ts +2 -2
- package/es/overlay/index.d.ts +6 -1
- package/es/pagination/Pagination.d.ts +2 -2
- package/es/pagination/Pagination.js +3 -3
- package/es/pagination/index.d.ts +6 -1
- package/es/password-input/PasswordInput.d.ts +2 -2
- package/es/password-input/index.d.ts +6 -1
- package/es/picker/Picker.d.ts +2 -2
- package/es/picker/Picker.js +21 -13
- package/es/picker/PickerColumn.d.ts +1 -1
- package/es/picker/index.d.ts +6 -1
- package/es/popover/Popover.d.ts +2 -2
- package/es/popover/Popover.js +19 -9
- package/es/popover/index.d.ts +6 -1
- package/es/popup/Popup.d.ts +5 -6
- package/es/popup/Popup.js +7 -4
- package/es/popup/index.d.ts +16 -10
- package/es/popup/shared.d.ts +1 -1
- package/es/popup/types.d.ts +5 -0
- package/es/popup/types.js +1 -0
- package/es/progress/Progress.d.ts +2 -2
- package/es/progress/index.d.ts +6 -1
- package/es/pull-refresh/PullRefresh.d.ts +2 -2
- package/es/pull-refresh/index.css +1 -1
- package/es/pull-refresh/index.d.ts +6 -1
- package/es/pull-refresh/index.less +0 -1
- package/es/radio/Radio.d.ts +2 -2
- package/es/radio/index.d.ts +6 -1
- package/es/radio-group/RadioGroup.d.ts +2 -2
- package/es/radio-group/index.d.ts +6 -1
- package/es/rate/Rate.d.ts +2 -2
- package/es/rate/index.d.ts +6 -1
- package/es/row/Row.d.ts +2 -2
- package/es/row/index.d.ts +6 -1
- package/es/search/Search.d.ts +8 -2
- package/es/search/Search.js +19 -1
- package/es/search/index.d.ts +12 -1
- package/es/share-sheet/ShareSheet.d.ts +2 -2
- package/es/share-sheet/index.d.ts +6 -1
- package/es/sidebar/Sidebar.d.ts +2 -2
- package/es/sidebar/index.d.ts +6 -1
- package/es/sidebar-item/SidebarItem.d.ts +65 -4
- package/es/sidebar-item/SidebarItem.js +7 -6
- package/es/sidebar-item/index.d.ts +47 -1
- package/es/skeleton/Skeleton.d.ts +2 -2
- package/es/skeleton/index.d.ts +6 -1
- package/es/slider/Slider.d.ts +4 -4
- package/es/slider/index.d.ts +8 -3
- package/es/step/Step.d.ts +1 -1
- package/es/step/Step.js +1 -1
- package/es/step/index.d.ts +6 -1
- package/es/stepper/Stepper.d.ts +2 -2
- package/es/stepper/index.d.ts +6 -1
- package/es/steps/Steps.d.ts +2 -2
- package/es/steps/index.d.ts +6 -1
- package/es/sticky/Sticky.d.ts +2 -2
- package/es/sticky/index.d.ts +6 -1
- package/es/submit-bar/SubmitBar.d.ts +2 -2
- package/es/submit-bar/index.d.ts +6 -1
- package/es/swipe/Swipe.d.ts +2 -2
- package/es/swipe/Swipe.js +34 -30
- package/es/swipe/index.d.ts +6 -1
- package/es/swipe-cell/SwipeCell.d.ts +2 -2
- package/es/swipe-cell/SwipeCell.js +8 -5
- package/es/swipe-cell/index.d.ts +6 -1
- package/es/swipe-item/SwipeItem.d.ts +1 -1
- package/es/swipe-item/index.d.ts +6 -1
- package/es/switch/Switch.d.ts +2 -2
- package/es/switch/index.d.ts +6 -1
- package/es/tab/Tab.d.ts +2 -2
- package/es/tab/index.d.ts +6 -1
- package/es/tabbar/Tabbar.d.ts +2 -2
- package/es/tabbar/index.d.ts +6 -1
- package/es/tabbar-item/TabbarItem.d.ts +65 -4
- package/es/tabbar-item/TabbarItem.js +6 -5
- package/es/tabbar-item/index.d.ts +47 -1
- package/es/tabs/Tabs.d.ts +7 -2
- package/es/tabs/Tabs.js +19 -11
- package/es/tabs/TabsContent.d.ts +1 -1
- package/es/tabs/TabsTitle.d.ts +6 -5
- package/es/tabs/TabsTitle.js +10 -5
- package/es/tabs/index.css +1 -1
- package/es/tabs/index.d.ts +10 -1
- package/es/tabs/index.less +43 -35
- package/es/tag/Tag.d.ts +2 -2
- package/es/tag/index.d.ts +6 -1
- package/es/toast/Toast.d.ts +4 -4
- package/es/toast/function-call.d.ts +2 -2
- package/es/toast/function-call.js +1 -1
- package/es/tree-select/TreeSelect.d.ts +2 -2
- package/es/tree-select/index.css +1 -1
- package/es/tree-select/index.d.ts +6 -1
- package/es/tree-select/index.less +1 -1
- package/es/uploader/Uploader.d.ts +3 -3
- package/es/uploader/UploaderPreviewItem.d.ts +2 -2
- package/es/uploader/index.d.ts +6 -1
- package/lib/action-bar/ActionBar.d.ts +2 -2
- package/lib/action-bar/index.d.ts +6 -1
- package/lib/action-bar-button/ActionBarButton.d.ts +4 -4
- package/lib/action-bar-button/index.d.ts +8 -3
- package/lib/action-bar-icon/ActionBarIcon.d.ts +69 -8
- package/lib/action-bar-icon/ActionBarIcon.js +7 -4
- package/lib/action-bar-icon/index.d.ts +49 -3
- package/lib/action-sheet/ActionSheet.d.ts +2 -2
- package/lib/action-sheet/ActionSheet.js +27 -15
- package/lib/action-sheet/index.d.ts +6 -1
- package/lib/address-edit/AddressEdit.d.ts +2 -2
- package/lib/address-edit/AddressEditDetail.d.ts +2 -2
- package/lib/address-edit/index.d.ts +6 -1
- package/lib/address-list/AddressList.d.ts +2 -2
- package/lib/address-list/AddressListItem.d.ts +2 -2
- package/lib/address-list/index.d.ts +6 -1
- package/lib/area/Area.d.ts +2 -2
- package/lib/area/index.d.ts +6 -1
- package/lib/badge/Badge.d.ts +15 -3
- package/lib/badge/Badge.js +4 -3
- package/lib/badge/index.css +1 -1
- package/lib/badge/index.d.ts +15 -3
- package/lib/badge/index.less +22 -1
- package/lib/button/Button.d.ts +4 -4
- package/lib/button/index.d.ts +8 -3
- package/lib/calendar/Calendar.d.ts +5 -5
- package/lib/calendar/CalendarDay.d.ts +2 -2
- package/lib/calendar/CalendarHeader.d.ts +1 -1
- package/lib/calendar/CalendarMonth.d.ts +4 -4
- package/lib/calendar/index.d.ts +9 -4
- package/lib/card/Card.d.ts +2 -2
- package/lib/card/index.d.ts +6 -1
- package/lib/cascader/Cascader.d.ts +2 -2
- package/lib/cascader/Cascader.js +1 -1
- package/lib/cascader/index.css +1 -1
- package/lib/cascader/index.d.ts +6 -1
- package/lib/cascader/index.less +0 -10
- package/lib/cell/Cell.d.ts +2 -2
- package/lib/cell/index.d.ts +6 -1
- package/lib/cell-group/CellGroup.d.ts +2 -2
- package/lib/cell-group/index.d.ts +6 -1
- package/lib/checkbox/Checkbox.d.ts +2 -2
- package/lib/checkbox/Checker.d.ts +2 -2
- package/lib/checkbox/index.d.ts +6 -1
- package/lib/checkbox-group/CheckboxGroup.d.ts +2 -2
- package/lib/checkbox-group/index.d.ts +6 -1
- package/lib/circle/Circle.d.ts +2 -2
- package/lib/circle/index.d.ts +6 -1
- package/lib/col/Col.d.ts +2 -2
- package/lib/col/index.d.ts +6 -1
- package/lib/collapse/Collapse.d.ts +2 -2
- package/lib/collapse/index.d.ts +6 -1
- package/lib/collapse-item/CollapseItem.d.ts +2 -2
- package/lib/collapse-item/index.d.ts +6 -1
- package/lib/composables/use-refs.js +9 -2
- package/lib/composables/use-route.d.ts +1 -1
- package/lib/composables/use-touch.js +7 -7
- package/lib/config-provider/ConfigProvider.d.ts +2 -2
- package/lib/config-provider/index.d.ts +6 -1
- package/lib/contact-card/ContactCard.d.ts +2 -2
- package/lib/contact-card/index.d.ts +6 -1
- package/lib/contact-edit/ContactEdit.d.ts +2 -2
- package/lib/contact-edit/index.d.ts +6 -1
- package/lib/contact-list/ContactList.d.ts +2 -2
- package/lib/contact-list/index.d.ts +6 -1
- package/lib/count-down/CountDown.d.ts +2 -2
- package/lib/count-down/index.d.ts +6 -1
- package/lib/coupon/Coupon.d.ts +2 -2
- package/lib/coupon/index.d.ts +6 -1
- package/lib/coupon-cell/CouponCell.d.ts +2 -2
- package/lib/coupon-cell/index.d.ts +6 -1
- package/lib/coupon-list/CouponList.d.ts +2 -2
- package/lib/coupon-list/index.d.ts +6 -1
- package/lib/datetime-picker/DatePicker.d.ts +1 -1
- package/lib/datetime-picker/DatePicker.js +1 -1
- package/lib/datetime-picker/DatetimePicker.d.ts +2 -2
- package/lib/datetime-picker/TimePicker.d.ts +1 -1
- package/lib/datetime-picker/TimePicker.js +1 -1
- package/lib/datetime-picker/index.d.ts +6 -1
- package/lib/datetime-picker/utils.d.ts +3 -1
- package/lib/datetime-picker/utils.js +22 -3
- package/lib/dialog/Dialog.d.ts +2 -2
- package/lib/dialog/function-call.d.ts +1 -1
- package/lib/dialog/index.d.ts +5 -0
- package/lib/divider/Divider.d.ts +2 -2
- package/lib/divider/index.d.ts +6 -1
- package/lib/dropdown-item/DropdownItem.d.ts +2 -2
- package/lib/dropdown-item/index.d.ts +6 -1
- package/lib/dropdown-menu/DropdownMenu.d.ts +2 -2
- package/lib/dropdown-menu/index.d.ts +6 -1
- package/lib/empty/Empty.d.ts +2 -2
- package/lib/empty/index.d.ts +6 -1
- package/lib/field/Field.d.ts +2 -2
- package/lib/field/Field.js +4 -4
- package/lib/field/index.d.ts +6 -1
- package/lib/field/types.d.ts +1 -1
- package/lib/field/utils.d.ts +2 -0
- package/lib/field/utils.js +13 -0
- package/lib/form/Form.d.ts +2 -2
- package/lib/form/index.d.ts +6 -1
- package/lib/grid/Grid.d.ts +2 -2
- package/lib/grid/index.d.ts +6 -1
- package/lib/grid-item/GridItem.d.ts +66 -5
- package/lib/grid-item/GridItem.js +7 -5
- package/lib/grid-item/index.d.ts +48 -2
- package/lib/icon/Icon.d.ts +66 -5
- package/lib/icon/Icon.js +5 -4
- package/lib/icon/index.css +1 -1
- package/lib/icon/index.d.ts +48 -2
- package/lib/image/Image.d.ts +2 -2
- package/lib/image/index.d.ts +6 -1
- package/lib/image-preview/ImagePreview.d.ts +6 -2
- package/lib/image-preview/ImagePreview.js +2 -1
- package/lib/image-preview/ImagePreviewItem.d.ts +1 -1
- package/lib/image-preview/function-call.d.ts +4 -1
- package/lib/image-preview/function-call.js +1 -0
- package/lib/image-preview/index.d.ts +5 -0
- package/lib/image-preview/types.d.ts +1 -0
- package/lib/index-anchor/IndexAnchor.d.ts +2 -2
- package/lib/index-anchor/index.d.ts +6 -1
- package/lib/index-bar/IndexBar.d.ts +2 -2
- package/lib/index-bar/index.d.ts +6 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/list/List.d.ts +2 -2
- package/lib/list/index.d.ts +6 -1
- package/lib/loading/Loading.d.ts +2 -2
- package/lib/loading/index.d.ts +6 -1
- package/lib/nav-bar/NavBar.d.ts +2 -2
- package/lib/nav-bar/index.d.ts +6 -1
- package/lib/notice-bar/NoticeBar.d.ts +2 -2
- package/lib/notice-bar/index.d.ts +6 -1
- package/lib/notify/Notify.d.ts +14 -3
- package/lib/notify/Notify.js +2 -1
- package/lib/notify/function-call.d.ts +9 -2
- package/lib/notify/function-call.js +1 -0
- package/lib/notify/index.d.ts +5 -0
- package/lib/notify/types.d.ts +2 -0
- package/lib/number-keyboard/NumberKeyboard.d.ts +2 -2
- package/lib/number-keyboard/NumberKeyboardKey.d.ts +3 -3
- package/lib/number-keyboard/index.d.ts +6 -1
- package/lib/overlay/Overlay.d.ts +2 -2
- package/lib/overlay/index.d.ts +6 -1
- package/lib/pagination/Pagination.d.ts +2 -2
- package/lib/pagination/Pagination.js +3 -3
- package/lib/pagination/index.d.ts +6 -1
- package/lib/password-input/PasswordInput.d.ts +2 -2
- package/lib/password-input/index.d.ts +6 -1
- package/lib/picker/Picker.d.ts +2 -2
- package/lib/picker/Picker.js +21 -13
- package/lib/picker/PickerColumn.d.ts +1 -1
- package/lib/picker/index.d.ts +6 -1
- package/lib/popover/Popover.d.ts +2 -2
- package/lib/popover/Popover.js +18 -8
- package/lib/popover/index.d.ts +6 -1
- package/lib/popup/Popup.d.ts +5 -6
- package/lib/popup/Popup.js +5 -3
- package/lib/popup/index.d.ts +16 -10
- package/lib/popup/shared.d.ts +1 -1
- package/lib/popup/types.d.ts +5 -0
- package/lib/popup/types.js +3 -0
- package/lib/progress/Progress.d.ts +2 -2
- package/lib/progress/index.d.ts +6 -1
- package/lib/pull-refresh/PullRefresh.d.ts +2 -2
- package/lib/pull-refresh/index.css +1 -1
- package/lib/pull-refresh/index.d.ts +6 -1
- package/lib/pull-refresh/index.less +0 -1
- package/lib/radio/Radio.d.ts +2 -2
- package/lib/radio/index.d.ts +6 -1
- package/lib/radio-group/RadioGroup.d.ts +2 -2
- package/lib/radio-group/index.d.ts +6 -1
- package/lib/rate/Rate.d.ts +2 -2
- package/lib/rate/index.d.ts +6 -1
- package/lib/row/Row.d.ts +2 -2
- package/lib/row/index.d.ts +6 -1
- package/lib/search/Search.d.ts +8 -2
- package/lib/search/Search.js +19 -1
- package/lib/search/index.d.ts +12 -1
- package/lib/share-sheet/ShareSheet.d.ts +2 -2
- package/lib/share-sheet/index.d.ts +6 -1
- package/lib/sidebar/Sidebar.d.ts +2 -2
- package/lib/sidebar/index.d.ts +6 -1
- package/lib/sidebar-item/SidebarItem.d.ts +65 -4
- package/lib/sidebar-item/SidebarItem.js +6 -5
- package/lib/sidebar-item/index.d.ts +47 -1
- package/lib/skeleton/Skeleton.d.ts +2 -2
- package/lib/skeleton/index.d.ts +6 -1
- package/lib/slider/Slider.d.ts +4 -4
- package/lib/slider/index.d.ts +8 -3
- package/lib/ssr.js +2 -2
- package/lib/step/Step.d.ts +1 -1
- package/lib/step/Step.js +1 -1
- package/lib/step/index.d.ts +6 -1
- package/lib/stepper/Stepper.d.ts +2 -2
- package/lib/stepper/index.d.ts +6 -1
- package/lib/steps/Steps.d.ts +2 -2
- package/lib/steps/index.d.ts +6 -1
- package/lib/sticky/Sticky.d.ts +2 -2
- package/lib/sticky/index.d.ts +6 -1
- package/lib/submit-bar/SubmitBar.d.ts +2 -2
- package/lib/submit-bar/index.d.ts +6 -1
- package/lib/swipe/Swipe.d.ts +2 -2
- package/lib/swipe/Swipe.js +34 -30
- package/lib/swipe/index.d.ts +6 -1
- package/lib/swipe-cell/SwipeCell.d.ts +2 -2
- package/lib/swipe-cell/SwipeCell.js +8 -5
- package/lib/swipe-cell/index.d.ts +6 -1
- package/lib/swipe-item/SwipeItem.d.ts +1 -1
- package/lib/swipe-item/index.d.ts +6 -1
- package/lib/switch/Switch.d.ts +2 -2
- package/lib/switch/index.d.ts +6 -1
- package/lib/tab/Tab.d.ts +2 -2
- package/lib/tab/index.d.ts +6 -1
- package/lib/tabbar/Tabbar.d.ts +2 -2
- package/lib/tabbar/index.d.ts +6 -1
- package/lib/tabbar-item/TabbarItem.d.ts +65 -4
- package/lib/tabbar-item/TabbarItem.js +5 -4
- package/lib/tabbar-item/index.d.ts +47 -1
- package/lib/tabs/Tabs.d.ts +7 -2
- package/lib/tabs/Tabs.js +18 -10
- package/lib/tabs/TabsContent.d.ts +1 -1
- package/lib/tabs/TabsTitle.d.ts +6 -5
- package/lib/tabs/TabsTitle.js +10 -5
- package/lib/tabs/index.css +1 -1
- package/lib/tabs/index.d.ts +10 -1
- package/lib/tabs/index.less +43 -35
- package/lib/tag/Tag.d.ts +2 -2
- package/lib/tag/index.d.ts +6 -1
- package/lib/toast/Toast.d.ts +4 -4
- package/lib/toast/function-call.d.ts +2 -2
- package/lib/tree-select/TreeSelect.d.ts +2 -2
- package/lib/tree-select/index.css +1 -1
- package/lib/tree-select/index.d.ts +6 -1
- package/lib/tree-select/index.less +1 -1
- package/lib/uploader/Uploader.d.ts +3 -3
- package/lib/uploader/UploaderPreviewItem.d.ts +2 -2
- package/lib/uploader/index.d.ts +6 -1
- package/lib/vant.cjs.js +223 -129
- package/lib/vant.cjs.min.js +1 -1
- package/lib/vant.es.js +224 -130
- package/lib/vant.es.min.js +224 -130
- package/lib/vant.js +391 -171
- package/lib/vant.min.js +1 -1
- package/package.json +17 -13
- package/vetur/attributes.json +365 -330
- package/vetur/tags.json +115 -107
- package/vetur/web-types.json +1265 -1167
package/lib/vant.es.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { useWindowSize, useRect, useChildren, useParent, onMountedOrActivated, getScrollParent, useEventListener, CUSTOM_FIELD_INJECTION_KEY, useCustomFieldValue, useToggle, raf, useScrollParent, usePageVisibility, doubleRaf, cancelRaf, useCountDown, useClickAway, inBrowser as inBrowser$1 } from "@vant/use";
|
2
|
-
import { unref, ref, reactive, defineComponent, createVNode, getCurrentInstance, computed, provide, inject, onDeactivated, onBeforeUnmount, watch, Transition, withDirectives, vShow, onMounted, onActivated, Teleport, Fragment,
|
2
|
+
import { unref, ref, reactive, defineComponent, createVNode, getCurrentInstance, computed, provide, inject, mergeProps, onDeactivated, onBeforeUnmount, watch, Transition, withDirectives, vShow, onMounted, onActivated, Teleport, Fragment, nextTick, createTextVNode, createApp, onUnmounted, onBeforeUpdate, resolveDirective, h, onUpdated, watchEffect } from "vue";
|
3
3
|
import { createPopper, offsetModifier } from "@vant/popperjs";
|
4
4
|
function noop() {
|
5
5
|
}
|
@@ -476,7 +476,8 @@ var badgeProps = {
|
|
476
476
|
color: String,
|
477
477
|
offset: Array,
|
478
478
|
content: numericProp,
|
479
|
-
showZero: truthProp
|
479
|
+
showZero: truthProp,
|
480
|
+
position: makeStringProp("top-right")
|
480
481
|
};
|
481
482
|
var _Badge = defineComponent({
|
482
483
|
name: name$1t,
|
@@ -534,10 +535,10 @@ var _Badge = defineComponent({
|
|
534
535
|
var renderBadge = () => {
|
535
536
|
if (hasContent() || props.dot) {
|
536
537
|
return createVNode("div", {
|
537
|
-
"class": bem$1p({
|
538
|
+
"class": bem$1p([props.position, {
|
538
539
|
dot: props.dot,
|
539
540
|
fixed: !!slots.default
|
540
|
-
}),
|
541
|
+
}]),
|
541
542
|
"style": style.value
|
542
543
|
}, [renderContent()]);
|
543
544
|
}
|
@@ -602,6 +603,7 @@ var iconProps = {
|
|
602
603
|
size: numericProp,
|
603
604
|
badge: numericProp,
|
604
605
|
color: String,
|
606
|
+
badgeProps: Object,
|
605
607
|
classPrefix: String
|
606
608
|
};
|
607
609
|
var _Icon = defineComponent({
|
@@ -623,16 +625,16 @@ var _Icon = defineComponent({
|
|
623
625
|
color
|
624
626
|
} = props;
|
625
627
|
var isImageIcon = isImage(name2);
|
626
|
-
return createVNode(Badge, {
|
628
|
+
return createVNode(Badge, mergeProps({
|
627
629
|
"dot": dot,
|
628
630
|
"tag": tag,
|
629
|
-
"content": badge,
|
630
631
|
"class": [classPrefix.value, isImageIcon ? "" : classPrefix.value + "-" + name2],
|
631
632
|
"style": {
|
632
633
|
color,
|
633
634
|
fontSize: addUnit(size)
|
634
|
-
}
|
635
|
-
|
635
|
+
},
|
636
|
+
"content": badge
|
637
|
+
}, props.badgeProps), {
|
636
638
|
default: () => [slots.default == null ? void 0 : slots.default(), isImageIcon && createVNode("img", {
|
637
639
|
"class": bem$1n("image"),
|
638
640
|
"src": name2
|
@@ -915,6 +917,7 @@ var actionBarIconProps = extend({}, routeProps, {
|
|
915
917
|
color: String,
|
916
918
|
badge: numericProp,
|
917
919
|
iconClass: unknownProp,
|
920
|
+
badgeProps: Object,
|
918
921
|
iconPrefix: String
|
919
922
|
});
|
920
923
|
var _ActionBarIcon = defineComponent({
|
@@ -933,14 +936,15 @@ var _ActionBarIcon = defineComponent({
|
|
933
936
|
icon,
|
934
937
|
color,
|
935
938
|
iconClass,
|
939
|
+
badgeProps: badgeProps2,
|
936
940
|
iconPrefix
|
937
941
|
} = props;
|
938
942
|
if (slots.icon) {
|
939
|
-
return createVNode(Badge, {
|
943
|
+
return createVNode(Badge, mergeProps({
|
940
944
|
"dot": dot,
|
941
|
-
"
|
942
|
-
"
|
943
|
-
}, {
|
945
|
+
"class": bem$1j("icon"),
|
946
|
+
"content": badge
|
947
|
+
}, badgeProps2), {
|
944
948
|
default: slots.icon
|
945
949
|
});
|
946
950
|
}
|
@@ -951,6 +955,7 @@ var _ActionBarIcon = defineComponent({
|
|
951
955
|
"badge": badge,
|
952
956
|
"color": color,
|
953
957
|
"class": [bem$1j("icon"), iconClass],
|
958
|
+
"badgeProps": badgeProps2,
|
954
959
|
"classPrefix": iconPrefix
|
955
960
|
}, null);
|
956
961
|
};
|
@@ -978,12 +983,11 @@ var popupSharedProps = {
|
|
978
983
|
closeOnClickOverlay: truthProp
|
979
984
|
};
|
980
985
|
var popupSharedPropKeys = Object.keys(popupSharedProps);
|
981
|
-
var MIN_DISTANCE = 10;
|
982
986
|
function getDirection(x, y) {
|
983
|
-
if (x > y
|
987
|
+
if (x > y) {
|
984
988
|
return "horizontal";
|
985
989
|
}
|
986
|
-
if (y > x
|
990
|
+
if (y > x) {
|
987
991
|
return "vertical";
|
988
992
|
}
|
989
993
|
return "";
|
@@ -1016,7 +1020,8 @@ function useTouch() {
|
|
1016
1020
|
deltaY.value = touch.clientY - startY.value;
|
1017
1021
|
offsetX.value = Math.abs(deltaX.value);
|
1018
1022
|
offsetY.value = Math.abs(deltaY.value);
|
1019
|
-
|
1023
|
+
var LOCK_DIRECTION_DISTANCE = 10;
|
1024
|
+
if (!direction.value || offsetX.value < LOCK_DIRECTION_DISTANCE && offsetY.value < LOCK_DIRECTION_DISTANCE) {
|
1020
1025
|
direction.value = getDirection(offsetX.value, offsetY.value);
|
1021
1026
|
}
|
1022
1027
|
};
|
@@ -1280,10 +1285,11 @@ var _Popup = defineComponent({
|
|
1280
1285
|
default: renderPopup
|
1281
1286
|
});
|
1282
1287
|
};
|
1283
|
-
watch(() => props.show, (
|
1284
|
-
if (
|
1288
|
+
watch(() => props.show, (show) => {
|
1289
|
+
if (show && !opened) {
|
1285
1290
|
open();
|
1286
|
-
}
|
1291
|
+
}
|
1292
|
+
if (!show && opened) {
|
1287
1293
|
opened = false;
|
1288
1294
|
emit("close");
|
1289
1295
|
}
|
@@ -1379,34 +1385,43 @@ var _ActionSheet = defineComponent({
|
|
1379
1385
|
}, [slots.cancel ? slots.cancel() : props.cancelText])];
|
1380
1386
|
}
|
1381
1387
|
};
|
1382
|
-
var
|
1388
|
+
var renderActionContent = (action, index2) => {
|
1389
|
+
if (action.loading) {
|
1390
|
+
return createVNode(Loading, {
|
1391
|
+
"class": bem$1g("loading-icon")
|
1392
|
+
}, null);
|
1393
|
+
}
|
1394
|
+
if (slots.action) {
|
1395
|
+
return slots.action({
|
1396
|
+
action,
|
1397
|
+
index: index2
|
1398
|
+
});
|
1399
|
+
}
|
1400
|
+
return [createVNode("span", {
|
1401
|
+
"class": bem$1g("name")
|
1402
|
+
}, [action.name]), action.subname && createVNode("div", {
|
1403
|
+
"class": bem$1g("subname")
|
1404
|
+
}, [action.subname])];
|
1405
|
+
};
|
1406
|
+
var renderAction = (action, index2) => {
|
1383
1407
|
var {
|
1384
|
-
name: name2,
|
1385
1408
|
color,
|
1386
|
-
subname,
|
1387
1409
|
loading,
|
1388
1410
|
callback,
|
1389
1411
|
disabled,
|
1390
1412
|
className
|
1391
|
-
} =
|
1392
|
-
var Content = loading ? createVNode(Loading, {
|
1393
|
-
"class": bem$1g("loading-icon")
|
1394
|
-
}, null) : [createVNode("span", {
|
1395
|
-
"class": bem$1g("name")
|
1396
|
-
}, [name2]), subname && createVNode("div", {
|
1397
|
-
"class": bem$1g("subname")
|
1398
|
-
}, [subname])];
|
1413
|
+
} = action;
|
1399
1414
|
var onClick = () => {
|
1400
1415
|
if (disabled || loading) {
|
1401
1416
|
return;
|
1402
1417
|
}
|
1403
1418
|
if (callback) {
|
1404
|
-
callback(
|
1419
|
+
callback(action);
|
1405
1420
|
}
|
1406
1421
|
if (props.closeOnClickAction) {
|
1407
1422
|
updateShow(false);
|
1408
1423
|
}
|
1409
|
-
nextTick(() => emit("select",
|
1424
|
+
nextTick(() => emit("select", action, index2));
|
1410
1425
|
};
|
1411
1426
|
return createVNode("button", {
|
1412
1427
|
"type": "button",
|
@@ -1418,7 +1433,7 @@ var _ActionSheet = defineComponent({
|
|
1418
1433
|
disabled
|
1419
1434
|
}), className],
|
1420
1435
|
"onClick": onClick
|
1421
|
-
}, [
|
1436
|
+
}, [renderActionContent(action, index2)]);
|
1422
1437
|
};
|
1423
1438
|
var renderDescription = () => {
|
1424
1439
|
if (props.description || slots.description) {
|
@@ -1435,7 +1450,7 @@ var _ActionSheet = defineComponent({
|
|
1435
1450
|
}, pick(props, popupInheritKeys$2)), {
|
1436
1451
|
default: () => [renderHeader(), renderDescription(), createVNode("div", {
|
1437
1452
|
"class": bem$1g("content")
|
1438
|
-
}, [props.actions.map(
|
1453
|
+
}, [props.actions.map(renderAction), slots.default == null ? void 0 : slots.default()]), renderCancel()]
|
1439
1454
|
});
|
1440
1455
|
}
|
1441
1456
|
});
|
@@ -1923,28 +1938,34 @@ var _Picker = defineComponent({
|
|
1923
1938
|
option: slots.option
|
1924
1939
|
});
|
1925
1940
|
});
|
1941
|
+
var renderMask = (wrapHeight) => {
|
1942
|
+
var hasOptions = formattedColumns.value.some((item) => item[valuesKey] && item[valuesKey].length !== 0);
|
1943
|
+
if (hasOptions) {
|
1944
|
+
var frameStyle = {
|
1945
|
+
height: itemHeight.value + "px"
|
1946
|
+
};
|
1947
|
+
var maskStyle = {
|
1948
|
+
backgroundSize: "100% " + (wrapHeight - itemHeight.value) / 2 + "px"
|
1949
|
+
};
|
1950
|
+
return [createVNode("div", {
|
1951
|
+
"class": bem$1e("mask"),
|
1952
|
+
"style": maskStyle
|
1953
|
+
}, null), createVNode("div", {
|
1954
|
+
"class": [BORDER_UNSET_TOP_BOTTOM, bem$1e("frame")],
|
1955
|
+
"style": frameStyle
|
1956
|
+
}, null)];
|
1957
|
+
}
|
1958
|
+
};
|
1926
1959
|
var renderColumns = () => {
|
1927
1960
|
var wrapHeight = itemHeight.value * +props.visibleItemCount;
|
1928
|
-
var frameStyle = {
|
1929
|
-
height: itemHeight.value + "px"
|
1930
|
-
};
|
1931
1961
|
var columnsStyle = {
|
1932
1962
|
height: wrapHeight + "px"
|
1933
1963
|
};
|
1934
|
-
var maskStyle = {
|
1935
|
-
backgroundSize: "100% " + (wrapHeight - itemHeight.value) / 2 + "px"
|
1936
|
-
};
|
1937
1964
|
return createVNode("div", {
|
1938
1965
|
"class": bem$1e("columns"),
|
1939
1966
|
"style": columnsStyle,
|
1940
1967
|
"onTouchmove": preventDefault
|
1941
|
-
}, [renderColumnItems(),
|
1942
|
-
"class": bem$1e("mask"),
|
1943
|
-
"style": maskStyle
|
1944
|
-
}, null), createVNode("div", {
|
1945
|
-
"class": [BORDER_UNSET_TOP_BOTTOM, bem$1e("frame")],
|
1946
|
-
"style": frameStyle
|
1947
|
-
}, null)]);
|
1968
|
+
}, [renderColumnItems(), renderMask(wrapHeight)]);
|
1948
1969
|
};
|
1949
1970
|
watch(() => props.columns, format2, {
|
1950
1971
|
immediate: true
|
@@ -2553,6 +2574,12 @@ function mapInputType(type) {
|
|
2553
2574
|
type
|
2554
2575
|
};
|
2555
2576
|
}
|
2577
|
+
function getStringLength(str) {
|
2578
|
+
return [...str].length;
|
2579
|
+
}
|
2580
|
+
function cutString(str, maxlength) {
|
2581
|
+
return [...str].slice(0, maxlength).join("");
|
2582
|
+
}
|
2556
2583
|
var current = 0;
|
2557
2584
|
function useId() {
|
2558
2585
|
var vm = getCurrentInstance();
|
@@ -2727,12 +2754,12 @@ var _Field = defineComponent({
|
|
2727
2754
|
var {
|
2728
2755
|
maxlength
|
2729
2756
|
} = props;
|
2730
|
-
if (isDef(maxlength) && value
|
2757
|
+
if (isDef(maxlength) && getStringLength(value) > maxlength) {
|
2731
2758
|
var modelValue = getModelValue();
|
2732
|
-
if (modelValue && modelValue
|
2759
|
+
if (modelValue && getStringLength(modelValue) === +maxlength) {
|
2733
2760
|
return modelValue;
|
2734
2761
|
}
|
2735
|
-
return value
|
2762
|
+
return cutString(value, +maxlength);
|
2736
2763
|
}
|
2737
2764
|
return value;
|
2738
2765
|
};
|
@@ -2896,7 +2923,7 @@ var _Field = defineComponent({
|
|
2896
2923
|
};
|
2897
2924
|
var renderWordLimit = () => {
|
2898
2925
|
if (props.showWordLimit && props.maxlength) {
|
2899
|
-
var count = getModelValue()
|
2926
|
+
var count = getStringLength(getModelValue());
|
2900
2927
|
return createVNode("div", {
|
2901
2928
|
"class": bem$1a("word-limit")
|
2902
2929
|
}, [createVNode("span", {
|
@@ -4183,11 +4210,17 @@ function calcDateNum(date) {
|
|
4183
4210
|
}
|
4184
4211
|
function useRefs() {
|
4185
4212
|
var refs = ref([]);
|
4213
|
+
var cache = [];
|
4186
4214
|
onBeforeUpdate(() => {
|
4187
4215
|
refs.value = [];
|
4188
4216
|
});
|
4189
|
-
var setRefs = (index2) =>
|
4190
|
-
|
4217
|
+
var setRefs = (index2) => {
|
4218
|
+
if (!cache[index2]) {
|
4219
|
+
cache[index2] = (el) => {
|
4220
|
+
refs.value[index2] = el;
|
4221
|
+
};
|
4222
|
+
}
|
4223
|
+
return cache[index2];
|
4191
4224
|
};
|
4192
4225
|
return [refs, setRefs];
|
4193
4226
|
}
|
@@ -4222,6 +4255,20 @@ function getTrueValue(value) {
|
|
4222
4255
|
return parseInt(value, 10);
|
4223
4256
|
}
|
4224
4257
|
var getMonthEndDay = (year, month) => 32 - new Date(year, month - 1, 32).getDate();
|
4258
|
+
var proxyPickerMethods = (picker, callback) => {
|
4259
|
+
var methods = ["setValues", "setIndexes", "setColumnIndex", "setColumnValue"];
|
4260
|
+
return new Proxy(picker, {
|
4261
|
+
get: (target, prop) => {
|
4262
|
+
if (methods.includes(prop)) {
|
4263
|
+
return function() {
|
4264
|
+
target[prop](...arguments);
|
4265
|
+
callback();
|
4266
|
+
};
|
4267
|
+
}
|
4268
|
+
return target[prop];
|
4269
|
+
}
|
4270
|
+
});
|
4271
|
+
};
|
4225
4272
|
var useHeight = (element) => {
|
4226
4273
|
var height = ref();
|
4227
4274
|
onMounted(() => nextTick(() => {
|
@@ -5421,16 +5468,19 @@ var TabsTitle = defineComponent({
|
|
5421
5468
|
color: String,
|
5422
5469
|
title: String,
|
5423
5470
|
badge: numericProp,
|
5471
|
+
shrink: Boolean,
|
5424
5472
|
isActive: Boolean,
|
5425
5473
|
disabled: Boolean,
|
5426
5474
|
controls: String,
|
5427
5475
|
scrollable: Boolean,
|
5428
5476
|
activeColor: String,
|
5429
|
-
renderTitle: Function,
|
5430
5477
|
inactiveColor: String,
|
5431
5478
|
showZeroBadge: truthProp
|
5432
5479
|
},
|
5433
|
-
setup(props) {
|
5480
|
+
setup(props, _ref) {
|
5481
|
+
var {
|
5482
|
+
slots
|
5483
|
+
} = _ref;
|
5434
5484
|
var style = computed(() => {
|
5435
5485
|
var style2 = {};
|
5436
5486
|
var {
|
@@ -5463,7 +5513,7 @@ var TabsTitle = defineComponent({
|
|
5463
5513
|
"class": bem$Y("text", {
|
5464
5514
|
ellipsis: !props.scrollable
|
5465
5515
|
})
|
5466
|
-
}, [
|
5516
|
+
}, [slots.title ? slots.title() : props.title]);
|
5467
5517
|
if (props.dot || isDef(props.badge) && props.badge !== "") {
|
5468
5518
|
return createVNode(Badge, {
|
5469
5519
|
"dot": props.dot,
|
@@ -5478,10 +5528,12 @@ var TabsTitle = defineComponent({
|
|
5478
5528
|
return () => createVNode("div", {
|
5479
5529
|
"id": props.id,
|
5480
5530
|
"role": "tab",
|
5481
|
-
"class": [bem$Y({
|
5531
|
+
"class": [bem$Y([props.type, {
|
5532
|
+
grow: props.scrollable && !props.shrink,
|
5533
|
+
shrink: props.shrink,
|
5482
5534
|
active: props.isActive,
|
5483
5535
|
disabled: props.disabled
|
5484
|
-
})],
|
5536
|
+
}])],
|
5485
5537
|
"style": style.value,
|
5486
5538
|
"tabindex": props.disabled ? void 0 : props.isActive ? 0 : -1,
|
5487
5539
|
"aria-selected": props.isActive,
|
@@ -5667,26 +5719,33 @@ var _Swipe = defineComponent({
|
|
5667
5719
|
if (!root.value) {
|
5668
5720
|
return;
|
5669
5721
|
}
|
5670
|
-
|
5671
|
-
|
5672
|
-
|
5673
|
-
|
5674
|
-
|
5675
|
-
|
5676
|
-
|
5677
|
-
|
5678
|
-
|
5679
|
-
|
5680
|
-
|
5681
|
-
|
5722
|
+
var cb = () => {
|
5723
|
+
if (!isHidden(root)) {
|
5724
|
+
var _props$width, _props$height;
|
5725
|
+
var rect = {
|
5726
|
+
width: root.value.offsetWidth,
|
5727
|
+
height: root.value.offsetHeight
|
5728
|
+
};
|
5729
|
+
state.rect = rect;
|
5730
|
+
state.width = +((_props$width = props.width) != null ? _props$width : rect.width);
|
5731
|
+
state.height = +((_props$height = props.height) != null ? _props$height : rect.height);
|
5732
|
+
}
|
5733
|
+
if (count.value) {
|
5734
|
+
active = Math.min(count.value - 1, active);
|
5735
|
+
}
|
5736
|
+
state.active = active;
|
5737
|
+
state.swiping = true;
|
5738
|
+
state.offset = getTargetOffset(active);
|
5739
|
+
children.forEach((swipe) => {
|
5740
|
+
swipe.setOffset(0);
|
5741
|
+
});
|
5742
|
+
autoplay();
|
5743
|
+
};
|
5744
|
+
if (isHidden(root)) {
|
5745
|
+
nextTick().then(cb);
|
5746
|
+
} else {
|
5747
|
+
cb();
|
5682
5748
|
}
|
5683
|
-
state.active = active;
|
5684
|
-
state.swiping = true;
|
5685
|
-
state.offset = getTargetOffset(active);
|
5686
|
-
children.forEach((swipe) => {
|
5687
|
-
swipe.setOffset(0);
|
5688
|
-
});
|
5689
|
-
autoplay();
|
5690
5749
|
};
|
5691
5750
|
var resize = () => initialize(state.active);
|
5692
5751
|
var touchStartTime;
|
@@ -5701,11 +5760,8 @@ var _Swipe = defineComponent({
|
|
5701
5760
|
var onTouchMove = (event) => {
|
5702
5761
|
if (props.touchable && state.swiping) {
|
5703
5762
|
touch.move(event);
|
5704
|
-
var shouldPrevent = isCorrectDirection.value || touch.offsetY.value > touch.offsetX.value === props.vertical;
|
5705
|
-
if (shouldPrevent) {
|
5706
|
-
preventDefault(event, props.stopPropagation);
|
5707
|
-
}
|
5708
5763
|
if (isCorrectDirection.value) {
|
5764
|
+
preventDefault(event, props.stopPropagation);
|
5709
5765
|
move({
|
5710
5766
|
offset: delta.value
|
5711
5767
|
});
|
@@ -5780,7 +5836,8 @@ var _Swipe = defineComponent({
|
|
5780
5836
|
var renderIndicator = () => {
|
5781
5837
|
if (slots.indicator) {
|
5782
5838
|
return slots.indicator({
|
5783
|
-
active: activeIndicator.value
|
5839
|
+
active: activeIndicator.value,
|
5840
|
+
total: count.value
|
5784
5841
|
});
|
5785
5842
|
}
|
5786
5843
|
if (props.showIndicators && count.value > 1) {
|
@@ -5899,6 +5956,7 @@ var tabsProps = {
|
|
5899
5956
|
color: String,
|
5900
5957
|
border: Boolean,
|
5901
5958
|
sticky: Boolean,
|
5959
|
+
shrink: Boolean,
|
5902
5960
|
active: makeNumericProp(0),
|
5903
5961
|
duration: makeNumericProp(0.3),
|
5904
5962
|
animated: Boolean,
|
@@ -5944,7 +6002,7 @@ var _Tabs = defineComponent({
|
|
5944
6002
|
lineStyle: {},
|
5945
6003
|
currentIndex: -1
|
5946
6004
|
});
|
5947
|
-
var scrollable = computed(() => children.length > props.swipeThreshold || !props.ellipsis);
|
6005
|
+
var scrollable = computed(() => children.length > props.swipeThreshold || !props.ellipsis || props.shrink);
|
5948
6006
|
var navStyle = computed(() => ({
|
5949
6007
|
borderColor: props.color,
|
5950
6008
|
background: props.background
|
@@ -6110,14 +6168,24 @@ var _Tabs = defineComponent({
|
|
6110
6168
|
"color": props.color,
|
6111
6169
|
"style": item.titleStyle,
|
6112
6170
|
"class": item.titleClass,
|
6171
|
+
"shrink": props.shrink,
|
6113
6172
|
"isActive": index2 === state.currentIndex,
|
6114
6173
|
"controls": item.id,
|
6115
6174
|
"scrollable": scrollable.value,
|
6116
|
-
"renderTitle": item.$slots.title,
|
6117
6175
|
"activeColor": props.titleActiveColor,
|
6118
6176
|
"inactiveColor": props.titleInactiveColor,
|
6119
6177
|
"onClick": (event) => onClickTab(item, index2, event)
|
6120
|
-
}, pick(item, ["dot", "badge", "title", "disabled", "showZeroBadge"])),
|
6178
|
+
}, pick(item, ["dot", "badge", "title", "disabled", "showZeroBadge"])), {
|
6179
|
+
title: item.$slots.title
|
6180
|
+
}));
|
6181
|
+
var renderLine = () => {
|
6182
|
+
if (props.type === "line" && children.length) {
|
6183
|
+
return createVNode("div", {
|
6184
|
+
"class": bem$V("line"),
|
6185
|
+
"style": state.lineStyle
|
6186
|
+
}, null);
|
6187
|
+
}
|
6188
|
+
};
|
6121
6189
|
var renderHeader = () => {
|
6122
6190
|
var _slots$navLeft, _slots$navRight;
|
6123
6191
|
var {
|
@@ -6126,23 +6194,19 @@ var _Tabs = defineComponent({
|
|
6126
6194
|
} = props;
|
6127
6195
|
return createVNode("div", {
|
6128
6196
|
"ref": wrapRef,
|
6129
|
-
"class": [bem$V("wrap", {
|
6130
|
-
scrollable: scrollable.value
|
6131
|
-
}), {
|
6197
|
+
"class": [bem$V("wrap"), {
|
6132
6198
|
[BORDER_TOP_BOTTOM]: type === "line" && border
|
6133
6199
|
}]
|
6134
6200
|
}, [createVNode("div", {
|
6135
6201
|
"ref": navRef,
|
6136
6202
|
"role": "tablist",
|
6137
6203
|
"class": bem$V("nav", [type, {
|
6204
|
+
shrink: props.shrink,
|
6138
6205
|
complete: scrollable.value
|
6139
6206
|
}]),
|
6140
6207
|
"style": navStyle.value,
|
6141
6208
|
"aria-orientation": "horizontal"
|
6142
|
-
}, [(_slots$navLeft = slots["nav-left"]) == null ? void 0 : _slots$navLeft.call(slots), renderNav(),
|
6143
|
-
"class": bem$V("line"),
|
6144
|
-
"style": state.lineStyle
|
6145
|
-
}, null), (_slots$navRight = slots["nav-right"]) == null ? void 0 : _slots$navRight.call(slots)])]);
|
6209
|
+
}, [(_slots$navLeft = slots["nav-left"]) == null ? void 0 : _slots$navLeft.call(slots), renderNav(), renderLine(), (_slots$navRight = slots["nav-right"]) == null ? void 0 : _slots$navRight.call(slots)])]);
|
6146
6210
|
};
|
6147
6211
|
watch([() => props.color, windowWidth], setLine);
|
6148
6212
|
watch(() => props.active, (value) => {
|
@@ -6577,10 +6641,10 @@ var _Cascader = defineComponent({
|
|
6577
6641
|
var renderTabs = () => createVNode(Tabs, {
|
6578
6642
|
"active": activeTab.value,
|
6579
6643
|
"onUpdate:active": ($event) => activeTab.value = $event,
|
6644
|
+
"shrink": true,
|
6580
6645
|
"animated": true,
|
6581
6646
|
"class": bem$S("tabs"),
|
6582
6647
|
"color": props.activeColor,
|
6583
|
-
"swipeThreshold": 0,
|
6584
6648
|
"swipeable": props.swipeable,
|
6585
6649
|
"onClick-tab": onClickTab
|
6586
6650
|
}, {
|
@@ -7956,7 +8020,7 @@ var TimePicker = defineComponent({
|
|
7956
8020
|
}
|
7957
8021
|
});
|
7958
8022
|
useExpose({
|
7959
|
-
getPicker: () => picker.value
|
8023
|
+
getPicker: () => picker.value && proxyPickerMethods(picker.value, updateInnerValue)
|
7960
8024
|
});
|
7961
8025
|
return () => createVNode(Picker, mergeProps({
|
7962
8026
|
"ref": picker,
|
@@ -8199,7 +8263,7 @@ var DatePicker = defineComponent({
|
|
8199
8263
|
}
|
8200
8264
|
});
|
8201
8265
|
useExpose({
|
8202
|
-
getPicker: () => picker.value
|
8266
|
+
getPicker: () => picker.value && proxyPickerMethods(picker.value, updateInnerValue)
|
8203
8267
|
});
|
8204
8268
|
return () => createVNode(Picker, mergeProps({
|
8205
8269
|
"ref": picker,
|
@@ -9008,7 +9072,8 @@ var gridItemProps = extend({}, routeProps, {
|
|
9008
9072
|
icon: String,
|
9009
9073
|
badge: numericProp,
|
9010
9074
|
iconColor: String,
|
9011
|
-
iconPrefix: String
|
9075
|
+
iconPrefix: String,
|
9076
|
+
badgeProps: Object
|
9012
9077
|
});
|
9013
9078
|
var _GridItem = defineComponent({
|
9014
9079
|
name: name$u,
|
@@ -9062,10 +9127,10 @@ var _GridItem = defineComponent({
|
|
9062
9127
|
});
|
9063
9128
|
var renderIcon = () => {
|
9064
9129
|
if (slots.icon) {
|
9065
|
-
return createVNode(Badge, {
|
9130
|
+
return createVNode(Badge, mergeProps({
|
9066
9131
|
"dot": props.dot,
|
9067
9132
|
"content": props.badge
|
9068
|
-
}, {
|
9133
|
+
}, props.badgeProps), {
|
9069
9134
|
default: slots.icon
|
9070
9135
|
});
|
9071
9136
|
}
|
@@ -9076,8 +9141,9 @@ var _GridItem = defineComponent({
|
|
9076
9141
|
"size": parent.props.iconSize,
|
9077
9142
|
"badge": props.badge,
|
9078
9143
|
"class": bem$v("icon"),
|
9079
|
-
"
|
9080
|
-
"
|
9144
|
+
"color": props.iconColor,
|
9145
|
+
"badgeProps": props.badgeProps,
|
9146
|
+
"classPrefix": props.iconPrefix
|
9081
9147
|
}, null);
|
9082
9148
|
}
|
9083
9149
|
};
|
@@ -9378,6 +9444,7 @@ var imagePreviewProps = {
|
|
9378
9444
|
closeIcon: makeStringProp("clear"),
|
9379
9445
|
transition: String,
|
9380
9446
|
beforeClose: Function,
|
9447
|
+
overlayClass: unknownProp,
|
9381
9448
|
overlayStyle: Object,
|
9382
9449
|
swipeDuration: makeNumericProp(300),
|
9383
9450
|
startPosition: makeNumericProp(0),
|
@@ -9504,7 +9571,7 @@ var VanImagePreview = defineComponent({
|
|
9504
9571
|
});
|
9505
9572
|
return () => createVNode(Popup, mergeProps({
|
9506
9573
|
"class": [bem$t(), props.className],
|
9507
|
-
"overlayClass": bem$t("overlay"),
|
9574
|
+
"overlayClass": [bem$t("overlay"), props.overlayClass],
|
9508
9575
|
"onClosed": onClosed,
|
9509
9576
|
"onUpdate:show": updateShow
|
9510
9577
|
}, pick(props, popupProps$1)), {
|
@@ -9529,6 +9596,7 @@ var defaultConfig = {
|
|
9529
9596
|
transition: void 0,
|
9530
9597
|
beforeClose: void 0,
|
9531
9598
|
overlayStyle: void 0,
|
9599
|
+
overlayClass: void 0,
|
9532
9600
|
startPosition: 0,
|
9533
9601
|
swipeDuration: 300,
|
9534
9602
|
showIndicators: false,
|
@@ -11144,6 +11212,7 @@ var notifyProps = extend({}, popupSharedProps, {
|
|
11144
11212
|
type: makeStringProp("danger"),
|
11145
11213
|
color: String,
|
11146
11214
|
message: numericProp,
|
11215
|
+
position: makeStringProp("top"),
|
11147
11216
|
className: unknownProp,
|
11148
11217
|
background: String,
|
11149
11218
|
lockScroll: Boolean
|
@@ -11166,7 +11235,7 @@ var VanNotify = defineComponent({
|
|
11166
11235
|
background: props.background
|
11167
11236
|
},
|
11168
11237
|
"overlay": false,
|
11169
|
-
"position":
|
11238
|
+
"position": props.position,
|
11170
11239
|
"duration": 0.2,
|
11171
11240
|
"lockScroll": props.lockScroll,
|
11172
11241
|
"onUpdate:show": updateShow
|
@@ -11218,6 +11287,7 @@ var getDefaultOptions = () => ({
|
|
11218
11287
|
onClick: void 0,
|
11219
11288
|
onOpened: void 0,
|
11220
11289
|
duration: 3e3,
|
11290
|
+
position: void 0,
|
11221
11291
|
className: "",
|
11222
11292
|
lockScroll: false,
|
11223
11293
|
background: void 0
|
@@ -11639,7 +11709,7 @@ var _Pagination = defineComponent({
|
|
11639
11709
|
}, [createVNode("button", {
|
11640
11710
|
"type": "button",
|
11641
11711
|
"disabled": disabled,
|
11642
|
-
"onClick": () => updateModelValue(modelValue - 1)
|
11712
|
+
"onClick": () => updateModelValue(modelValue - 1, true)
|
11643
11713
|
}, [slot ? slot() : props.prevText || t$5("prev")])]);
|
11644
11714
|
};
|
11645
11715
|
var renderNextButton = () => {
|
@@ -11658,7 +11728,7 @@ var _Pagination = defineComponent({
|
|
11658
11728
|
}, [createVNode("button", {
|
11659
11729
|
"type": "button",
|
11660
11730
|
"disabled": disabled,
|
11661
|
-
"onClick": () => updateModelValue(modelValue + 1)
|
11731
|
+
"onClick": () => updateModelValue(modelValue + 1, true)
|
11662
11732
|
}, [slot ? slot() : props.nextText || t$5("next")])]);
|
11663
11733
|
};
|
11664
11734
|
var renderPages = () => pages.value.map((page) => createVNode("li", {
|
@@ -11669,7 +11739,7 @@ var _Pagination = defineComponent({
|
|
11669
11739
|
}, [createVNode("button", {
|
11670
11740
|
"type": "button",
|
11671
11741
|
"aria-current": page.active || void 0,
|
11672
|
-
"onClick": () => updateModelValue(page.number)
|
11742
|
+
"onClick": () => updateModelValue(page.number, true)
|
11673
11743
|
}, [slots.page ? slots.page(page) : page.text])]));
|
11674
11744
|
return () => createVNode("nav", {
|
11675
11745
|
"role": "navigation",
|
@@ -11850,10 +11920,24 @@ var _Popover = defineComponent({
|
|
11850
11920
|
updateShow(false);
|
11851
11921
|
}
|
11852
11922
|
};
|
11923
|
+
var renderActionContent = (action, index2) => {
|
11924
|
+
if (slots.action) {
|
11925
|
+
return slots.action({
|
11926
|
+
action,
|
11927
|
+
index: index2
|
11928
|
+
});
|
11929
|
+
}
|
11930
|
+
return [action.icon && createVNode(Icon, {
|
11931
|
+
"name": action.icon,
|
11932
|
+
"classPrefix": props.iconPrefix,
|
11933
|
+
"class": bem$i("action-icon")
|
11934
|
+
}, null), createVNode("div", {
|
11935
|
+
"class": [bem$i("action-text"), BORDER_BOTTOM]
|
11936
|
+
}, [action.text])];
|
11937
|
+
};
|
11853
11938
|
var renderAction = (action, index2) => {
|
11854
11939
|
var {
|
11855
11940
|
icon,
|
11856
|
-
text,
|
11857
11941
|
color,
|
11858
11942
|
disabled,
|
11859
11943
|
className
|
@@ -11870,13 +11954,7 @@ var _Popover = defineComponent({
|
|
11870
11954
|
"tabindex": disabled ? void 0 : 0,
|
11871
11955
|
"aria-disabled": disabled || void 0,
|
11872
11956
|
"onClick": () => onClickAction(action, index2)
|
11873
|
-
}, [
|
11874
|
-
"name": icon,
|
11875
|
-
"classPrefix": props.iconPrefix,
|
11876
|
-
"class": bem$i("action-icon")
|
11877
|
-
}, null), createVNode("div", {
|
11878
|
-
"class": [bem$i("action-text"), BORDER_BOTTOM]
|
11879
|
-
}, [text])]);
|
11957
|
+
}, [renderActionContent(action, index2)]);
|
11880
11958
|
};
|
11881
11959
|
onMounted(updateLocation);
|
11882
11960
|
onBeforeUnmount(() => {
|
@@ -12361,7 +12439,7 @@ var searchProps = extend({}, fieldSharedProps, {
|
|
12361
12439
|
var _Search = defineComponent({
|
12362
12440
|
name: name$e,
|
12363
12441
|
props: searchProps,
|
12364
|
-
emits: ["search", "cancel", "update:modelValue"],
|
12442
|
+
emits: ["blur", "focus", "clear", "search", "cancel", "click-input", "click-left-icon", "click-right-icon", "update:modelValue"],
|
12365
12443
|
setup(props, _ref) {
|
12366
12444
|
var {
|
12367
12445
|
emit,
|
@@ -12411,6 +12489,12 @@ var _Search = defineComponent({
|
|
12411
12489
|
var _filedRef$value2;
|
12412
12490
|
return (_filedRef$value2 = filedRef.value) == null ? void 0 : _filedRef$value2.focus();
|
12413
12491
|
};
|
12492
|
+
var onBlur = (event) => emit("blur", event);
|
12493
|
+
var onFocus = (event) => emit("focus", event);
|
12494
|
+
var onClear = (event) => emit("clear", event);
|
12495
|
+
var onClickInput = (event) => emit("click-input", event);
|
12496
|
+
var onClickLeftIcon = (event) => emit("click-left-icon", event);
|
12497
|
+
var onClickRightIcon = (event) => emit("click-right-icon", event);
|
12414
12498
|
var fieldPropNames = Object.keys(fieldSharedProps);
|
12415
12499
|
var renderField = () => {
|
12416
12500
|
var fieldAttrs = extend({}, attrs, pick(props, fieldPropNames), {
|
@@ -12422,7 +12506,13 @@ var _Search = defineComponent({
|
|
12422
12506
|
"type": "search",
|
12423
12507
|
"class": bem$e("field"),
|
12424
12508
|
"border": false,
|
12509
|
+
"onBlur": onBlur,
|
12510
|
+
"onFocus": onFocus,
|
12511
|
+
"onClear": onClear,
|
12425
12512
|
"onKeypress": onKeypress,
|
12513
|
+
"onClick-input": onClickInput,
|
12514
|
+
"onClick-left-icon": onClickLeftIcon,
|
12515
|
+
"onClick-right-icon": onClickRightIcon,
|
12426
12516
|
"onUpdate:modelValue": onInput
|
12427
12517
|
}, fieldAttrs), pick(slots, ["left-icon", "right-icon"]));
|
12428
12518
|
};
|
@@ -12585,7 +12675,8 @@ var sidebarItemProps = extend({}, routeProps, {
|
|
12585
12675
|
dot: Boolean,
|
12586
12676
|
title: String,
|
12587
12677
|
badge: numericProp,
|
12588
|
-
disabled: Boolean
|
12678
|
+
disabled: Boolean,
|
12679
|
+
badgeProps: Object
|
12589
12680
|
});
|
12590
12681
|
var _SidebarItem = defineComponent({
|
12591
12682
|
name: name$b,
|
@@ -12629,11 +12720,11 @@ var _SidebarItem = defineComponent({
|
|
12629
12720
|
"tabindex": disabled ? void 0 : 0,
|
12630
12721
|
"aria-selected": selected,
|
12631
12722
|
"onClick": onClick
|
12632
|
-
}, [createVNode(Badge, {
|
12723
|
+
}, [createVNode(Badge, mergeProps({
|
12633
12724
|
"dot": dot,
|
12634
|
-
"
|
12635
|
-
"
|
12636
|
-
}, {
|
12725
|
+
"class": bem$b("text"),
|
12726
|
+
"content": badge
|
12727
|
+
}, props.badgeProps), {
|
12637
12728
|
default: () => [slots.title ? slots.title() : title]
|
12638
12729
|
})]);
|
12639
12730
|
};
|
@@ -13047,7 +13138,7 @@ var _Step = defineComponent({
|
|
13047
13138
|
color: parentProps.activeColor
|
13048
13139
|
};
|
13049
13140
|
}
|
13050
|
-
if (
|
13141
|
+
if (getStatus() === "waiting") {
|
13051
13142
|
return {
|
13052
13143
|
color: parentProps.inactiveColor
|
13053
13144
|
};
|
@@ -13492,12 +13583,14 @@ var _SwipeCell = defineComponent({
|
|
13492
13583
|
var leftWidth = computed(() => isDef(props.leftWidth) ? +props.leftWidth : getWidthByRef(leftRef));
|
13493
13584
|
var rightWidth = computed(() => isDef(props.rightWidth) ? +props.rightWidth : getWidthByRef(rightRef));
|
13494
13585
|
var open = (side) => {
|
13495
|
-
opened = true;
|
13496
13586
|
state.offset = side === "left" ? leftWidth.value : -rightWidth.value;
|
13497
|
-
|
13498
|
-
|
13499
|
-
|
13500
|
-
|
13587
|
+
if (!opened) {
|
13588
|
+
opened = true;
|
13589
|
+
emit("open", {
|
13590
|
+
name: props.name,
|
13591
|
+
position: side
|
13592
|
+
});
|
13593
|
+
}
|
13501
13594
|
};
|
13502
13595
|
var close = (position) => {
|
13503
13596
|
state.offset = 0;
|
@@ -13694,6 +13787,7 @@ var tabbarItemProps = extend({}, routeProps, {
|
|
13694
13787
|
icon: String,
|
13695
13788
|
name: numericProp,
|
13696
13789
|
badge: numericProp,
|
13790
|
+
badgeProps: Object,
|
13697
13791
|
iconPrefix: String
|
13698
13792
|
});
|
13699
13793
|
var _TabbarItem = defineComponent({
|
@@ -13779,11 +13873,11 @@ var _TabbarItem = defineComponent({
|
|
13779
13873
|
"tabindex": 0,
|
13780
13874
|
"aria-selected": active.value,
|
13781
13875
|
"onClick": onClick
|
13782
|
-
}, [createVNode(Badge, {
|
13876
|
+
}, [createVNode(Badge, mergeProps({
|
13783
13877
|
"dot": dot,
|
13784
|
-
"
|
13785
|
-
"
|
13786
|
-
}, {
|
13878
|
+
"class": bem$2("icon"),
|
13879
|
+
"content": badge
|
13880
|
+
}, props.badgeProps), {
|
13787
13881
|
default: renderIcon
|
13788
13882
|
}), createVNode("div", {
|
13789
13883
|
"class": bem$2("text")
|
@@ -14308,7 +14402,7 @@ var _Uploader = defineComponent({
|
|
14308
14402
|
}
|
14309
14403
|
});
|
14310
14404
|
var Uploader = withInstall(_Uploader);
|
14311
|
-
var version = "3.
|
14405
|
+
var version = "3.4.0";
|
14312
14406
|
function install(app) {
|
14313
14407
|
var components = [ActionBar, ActionBarButton, ActionBarIcon, ActionSheet, AddressEdit, AddressList, Area, Badge, Button, Calendar, Card, Cascader, Cell, CellGroup, Checkbox, CheckboxGroup, Circle, Col, Collapse, CollapseItem, ConfigProvider, ContactCard, ContactEdit, ContactList, CountDown, Coupon, CouponCell, CouponList, DatetimePicker, Dialog, Divider, DropdownItem, DropdownMenu, Empty, Field, Form, Grid, GridItem, Icon, Image$1, ImagePreview, IndexAnchor, IndexBar, List, Loading, Locale, NavBar, NoticeBar, Notify, NumberKeyboard, Overlay, Pagination, PasswordInput, Picker, Popover, Popup, Progress, PullRefresh, Radio, RadioGroup, Rate, Row, Search, ShareSheet, Sidebar, SidebarItem, Skeleton, Slider, Step, Stepper, Steps, Sticky, SubmitBar, Swipe, SwipeCell, SwipeItem, Switch, Tab, Tabbar, TabbarItem, Tabs, Tag, Toast, TreeSelect, Uploader];
|
14314
14408
|
components.forEach((item) => {
|