vant 4.0.0-alpha.4 → 4.0.0-rc.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/LICENSE +10 -0
- package/README.md +17 -13
- package/changelog.generated.md +295 -0
- package/es/action-bar/ActionBar.d.ts +5 -1
- package/es/action-bar/ActionBar.mjs +13 -2
- package/es/action-bar/index.d.ts +4 -1
- package/es/action-bar-button/ActionBarButton.d.ts +1 -1
- package/es/action-bar-button/index.d.ts +1 -1
- package/es/action-bar-icon/ActionBarIcon.d.ts +1 -1
- package/es/action-bar-icon/index.d.ts +1 -1
- package/es/address-edit/AddressEdit.mjs +2 -2
- package/es/address-edit/style/index.mjs +7 -1
- package/es/area/Area.d.ts +6 -3
- package/es/area/index.d.ts +4 -2
- package/es/area/style/index.mjs +7 -0
- package/es/area/utils.mjs +9 -2
- package/es/badge/Badge.d.ts +1 -1
- package/es/badge/Badge.mjs +1 -1
- package/es/badge/index.d.ts +1 -1
- package/es/calendar/Calendar.mjs +13 -8
- package/es/calendar/style/index.mjs +7 -1
- package/es/calendar/types.d.ts +1 -0
- package/es/cell/Cell.d.ts +2 -2
- package/es/cell/index.d.ts +2 -2
- package/es/cell-group/CellGroup.d.ts +1 -1
- package/es/cell-group/index.d.ts +1 -1
- package/es/col/Col.d.ts +1 -1
- package/es/col/index.d.ts +1 -1
- package/es/collapse/Collapse.d.ts +8 -1
- package/es/collapse/Collapse.mjs +28 -1
- package/es/collapse/index.d.ts +1 -1
- package/es/collapse-item/CollapseItem.d.ts +2 -2
- package/es/collapse-item/CollapseItem.mjs +3 -1
- package/es/collapse-item/index.d.ts +2 -2
- package/es/composables/use-global-z-index.d.ts +4 -0
- package/es/composables/use-global-z-index.mjs +9 -0
- package/es/composables/use-height.d.ts +1 -1
- package/es/composables/use-height.mjs +8 -2
- package/es/composables/use-lazy-render.mjs +9 -5
- package/es/composables/use-lock-scroll.mjs +7 -2
- package/es/composables/use-placeholder.mjs +1 -1
- package/es/composables/use-visibility-change.mjs +6 -3
- package/es/config-provider/ConfigProvider.d.ts +14 -4
- package/es/config-provider/ConfigProvider.mjs +25 -9
- package/es/config-provider/index.d.ts +9 -3
- package/es/coupon/Coupon.d.ts +1 -1
- package/es/coupon/index.d.ts +1 -1
- package/es/coupon/utils.mjs +3 -1
- package/es/coupon-cell/CouponCell.d.ts +1 -1
- package/es/coupon-cell/index.d.ts +1 -1
- package/es/coupon-list/style/index.mjs +3 -3
- package/es/date-picker/DatePicker.d.ts +6 -3
- package/es/date-picker/DatePicker.mjs +10 -10
- package/es/date-picker/index.d.ts +4 -2
- package/es/date-picker/style/index.mjs +7 -0
- package/es/date-picker/utils.d.ts +3 -2
- package/es/dialog/Dialog.d.ts +9 -1
- package/es/dialog/Dialog.mjs +6 -0
- package/es/dialog/function-call.d.ts +6 -184
- package/es/dialog/function-call.mjs +45 -45
- package/es/dialog/index.css +1 -1
- package/es/dialog/index.d.ts +130 -3
- package/es/dialog/index.mjs +16 -2
- package/es/dialog/types.d.ts +3 -7
- package/es/divider/Divider.d.ts +1 -1
- package/es/divider/index.d.ts +1 -1
- package/es/dropdown-item/DropdownItem.d.ts +2 -2
- package/es/dropdown-item/index.d.ts +2 -2
- package/es/dropdown-menu/DropdownMenu.d.ts +1 -1
- package/es/dropdown-menu/DropdownMenu.mjs +2 -1
- package/es/dropdown-menu/index.d.ts +1 -1
- package/es/empty/Empty.d.ts +2 -2
- package/es/empty/Empty.mjs +281 -16
- package/es/empty/index.d.ts +1 -1
- package/es/field/Field.d.ts +4 -2
- package/es/field/Field.mjs +21 -5
- package/es/field/index.d.ts +4 -2
- package/es/field/types.d.ts +1 -0
- package/es/field/utils.d.ts +1 -0
- package/es/field/utils.mjs +8 -2
- package/es/grid/Grid.d.ts +1 -1
- package/es/grid/index.d.ts +1 -1
- package/es/grid-item/GridItem.d.ts +1 -1
- package/es/grid-item/index.d.ts +1 -1
- package/es/icon/Icon.d.ts +1 -1
- package/es/icon/index.d.ts +1 -1
- package/es/image-preview/ImagePreviewItem.mjs +11 -3
- package/es/image-preview/function-call.d.ts +1 -134
- package/es/image-preview/function-call.mjs +3 -7
- package/es/image-preview/index.css +1 -1
- package/es/image-preview/index.d.ts +129 -2
- package/es/image-preview/index.mjs +6 -2
- package/es/index-anchor/IndexAnchor.d.ts +1 -1
- package/es/index-anchor/index.d.ts +1 -1
- package/es/index-bar/IndexBar.mjs +9 -4
- package/es/index.d.ts +3 -1
- package/es/index.mjs +7 -1
- package/es/lazyload/vue-lazyload/lazy-component.mjs +4 -1
- package/es/lazyload/vue-lazyload/lazy-container.mjs +11 -7
- package/es/lazyload/vue-lazyload/lazy-image.mjs +24 -14
- package/es/lazyload/vue-lazyload/lazy.mjs +11 -3
- package/es/lazyload/vue-lazyload/listener.mjs +45 -33
- package/es/lazyload/vue-lazyload/util.mjs +4 -1
- package/es/list/List.mjs +2 -1
- package/es/loading/Loading.d.ts +1 -1
- package/es/loading/index.d.ts +1 -1
- package/es/locale/index.d.ts +1 -1
- package/es/notify/function-call.d.ts +4 -100
- package/es/notify/function-call.mjs +25 -29
- package/es/notify/index.d.ts +91 -2
- package/es/notify/index.mjs +14 -2
- package/es/notify/types.d.ts +0 -6
- package/es/number-keyboard/NumberKeyboard.d.ts +1 -1
- package/es/number-keyboard/NumberKeyboard.mjs +1 -2
- package/es/number-keyboard/NumberKeyboardKey.mjs +2 -2
- package/es/number-keyboard/index.d.ts +1 -1
- package/es/overlay/Overlay.d.ts +1 -1
- package/es/overlay/Overlay.mjs +13 -6
- package/es/overlay/index.d.ts +1 -1
- package/es/password-input/PasswordInput.mjs +1 -1
- package/es/picker/Picker.d.ts +10 -5
- package/es/picker/Picker.mjs +47 -64
- package/es/picker/PickerColumn.d.ts +2 -1
- package/es/picker/PickerColumn.mjs +11 -6
- package/es/picker/PickerToolbar.d.ts +21 -0
- package/es/picker/PickerToolbar.mjs +59 -0
- package/es/picker/index.d.ts +6 -3
- package/es/picker/style/index.mjs +7 -0
- package/es/picker/utils.d.ts +2 -0
- package/es/picker/utils.mjs +14 -7
- package/es/picker-group/PickerGroup.d.ts +39 -0
- package/es/picker-group/PickerGroup.mjs +57 -0
- package/es/picker-group/index.css +1 -0
- package/es/picker-group/index.d.ts +32 -0
- package/es/picker-group/index.mjs +8 -0
- package/es/{action-bar-button/style/less.d.ts → picker-group/style/index.d.ts} +0 -0
- package/es/picker-group/style/index.mjs +9 -0
- package/es/popover/Popover.mjs +28 -27
- package/es/popup/Popup.d.ts +2 -2
- package/es/popup/Popup.mjs +7 -6
- package/es/popup/index.css +1 -1
- package/es/popup/index.d.ts +2 -2
- package/es/popup/shared.mjs +3 -1
- package/es/progress/Progress.d.ts +1 -1
- package/es/progress/index.d.ts +1 -1
- package/es/pull-refresh/PullRefresh.d.ts +2 -1
- package/es/pull-refresh/PullRefresh.mjs +12 -4
- package/es/pull-refresh/index.d.ts +2 -1
- package/es/rate/Rate.mjs +5 -3
- package/es/row/Row.d.ts +1 -1
- package/es/row/index.d.ts +1 -1
- package/es/search/index.css +1 -1
- package/es/skeleton/Skeleton.d.ts +1 -1
- package/es/skeleton/index.d.ts +1 -1
- package/es/slider/Slider.mjs +7 -3
- package/es/space/Space.d.ts +48 -0
- package/es/space/Space.mjs +87 -0
- package/es/space/index.css +1 -0
- package/es/space/index.d.ts +37 -0
- package/es/space/index.mjs +8 -0
- package/es/{action-bar-icon/style/less.d.ts → space/style/index.d.ts} +0 -0
- package/es/space/style/index.mjs +2 -0
- package/es/step/Step.d.ts +1 -1
- package/es/step/index.d.ts +1 -1
- package/es/stepper/Stepper.mjs +1 -1
- package/es/sticky/Sticky.mjs +2 -1
- package/es/submit-bar/SubmitBar.d.ts +4 -0
- package/es/submit-bar/SubmitBar.mjs +13 -2
- package/es/submit-bar/index.d.ts +3 -0
- package/es/swipe/Swipe.mjs +14 -7
- package/es/swipe-cell/SwipeCell.d.ts +2 -2
- package/es/swipe-cell/SwipeCell.mjs +5 -3
- package/es/swipe-cell/index.d.ts +2 -2
- package/es/swipe-item/SwipeItem.d.ts +1 -1
- package/es/swipe-item/index.d.ts +1 -1
- package/es/switch/Switch.mjs +2 -1
- package/es/tab/Tab.d.ts +1 -1
- package/es/tab/index.d.ts +1 -1
- package/es/tabs/Tabs.mjs +12 -2
- package/es/tabs/TabsContent.mjs +4 -0
- package/es/tabs/TabsTitle.d.ts +1 -1
- package/es/time-picker/TimePicker.d.ts +6 -3
- package/es/time-picker/index.d.ts +4 -2
- package/es/time-picker/style/index.mjs +7 -0
- package/es/toast/function-call.d.ts +10 -18
- package/es/toast/function-call.mjs +22 -20
- package/es/toast/index.d.ts +76 -2
- package/es/toast/index.mjs +22 -2
- package/es/toast/types.d.ts +10 -7
- package/es/uploader/Uploader.d.ts +3 -3
- package/es/uploader/Uploader.mjs +3 -3
- package/es/uploader/index.d.ts +2 -2
- package/es/utils/basic.d.ts +3 -3
- package/es/utils/create.d.ts +1 -1
- package/es/utils/create.mjs +8 -2
- package/es/utils/with-install.d.ts +2 -2
- package/es/utils/with-install.mjs +4 -2
- package/es/vue-tsx-shim.d.ts +7 -0
- package/lib/action-bar/ActionBar.d.ts +5 -1
- package/lib/action-bar/ActionBar.js +12 -1
- package/lib/action-bar/index.d.ts +4 -1
- package/lib/action-bar/index.js +4 -1
- package/lib/action-bar-button/ActionBarButton.d.ts +1 -1
- package/lib/action-bar-button/index.d.ts +1 -1
- package/lib/action-bar-button/index.js +4 -1
- package/lib/action-bar-icon/ActionBarIcon.d.ts +1 -1
- package/lib/action-bar-icon/index.d.ts +1 -1
- package/lib/action-bar-icon/index.js +4 -1
- package/lib/action-sheet/index.js +4 -1
- package/lib/address-edit/AddressEdit.js +5 -2
- package/lib/address-edit/index.js +4 -1
- package/lib/address-edit/style/index.js +7 -1
- package/lib/address-list/AddressList.js +4 -1
- package/lib/address-list/index.js +4 -1
- package/lib/area/Area.d.ts +6 -3
- package/lib/area/index.d.ts +4 -2
- package/lib/area/index.js +4 -1
- package/lib/area/style/index.js +7 -0
- package/lib/area/utils.js +9 -2
- package/lib/badge/Badge.d.ts +1 -1
- package/lib/badge/Badge.js +1 -1
- package/lib/badge/index.d.ts +1 -1
- package/lib/badge/index.js +4 -1
- package/lib/button/index.js +4 -1
- package/lib/calendar/Calendar.js +16 -8
- package/lib/calendar/CalendarMonth.js +4 -1
- package/lib/calendar/index.js +4 -1
- package/lib/calendar/style/index.js +7 -1
- package/lib/calendar/types.d.ts +1 -0
- package/lib/card/index.js +4 -1
- package/lib/cascader/index.js +4 -1
- package/lib/cell/Cell.d.ts +2 -2
- package/lib/cell/index.d.ts +2 -2
- package/lib/cell/index.js +4 -1
- package/lib/cell-group/CellGroup.d.ts +1 -1
- package/lib/cell-group/index.d.ts +1 -1
- package/lib/cell-group/index.js +4 -1
- package/lib/checkbox/Checkbox.js +4 -1
- package/lib/checkbox/index.js +4 -1
- package/lib/checkbox-group/index.js +4 -1
- package/lib/circle/index.js +4 -1
- package/lib/col/Col.d.ts +1 -1
- package/lib/col/index.d.ts +1 -1
- package/lib/col/index.js +4 -1
- package/lib/collapse/Collapse.d.ts +8 -1
- package/lib/collapse/Collapse.js +28 -1
- package/lib/collapse/index.d.ts +1 -1
- package/lib/collapse/index.js +4 -1
- package/lib/collapse-item/CollapseItem.d.ts +2 -2
- package/lib/collapse-item/CollapseItem.js +3 -1
- package/lib/collapse-item/index.d.ts +2 -2
- package/lib/collapse-item/index.js +4 -1
- package/lib/composables/use-global-z-index.d.ts +4 -0
- package/lib/composables/use-global-z-index.js +28 -0
- package/lib/composables/use-height.d.ts +1 -1
- package/lib/composables/use-height.js +8 -2
- package/lib/composables/use-lazy-render.js +9 -5
- package/lib/composables/use-lock-scroll.js +7 -2
- package/lib/composables/use-placeholder.js +1 -1
- package/lib/composables/use-visibility-change.js +6 -3
- package/lib/config-provider/ConfigProvider.d.ts +14 -4
- package/lib/config-provider/ConfigProvider.js +23 -7
- package/lib/config-provider/index.d.ts +9 -3
- package/lib/config-provider/index.js +4 -1
- package/lib/contact-card/index.js +4 -1
- package/lib/contact-edit/index.js +4 -1
- package/lib/contact-list/index.js +4 -1
- package/lib/count-down/index.js +4 -1
- package/lib/coupon/Coupon.d.ts +1 -1
- package/lib/coupon/index.d.ts +1 -1
- package/lib/coupon/index.js +4 -1
- package/lib/coupon/utils.js +3 -1
- package/lib/coupon-cell/CouponCell.d.ts +1 -1
- package/lib/coupon-cell/index.d.ts +1 -1
- package/lib/coupon-cell/index.js +4 -1
- package/lib/coupon-list/index.js +4 -1
- package/lib/coupon-list/style/index.js +3 -3
- package/lib/date-picker/DatePicker.d.ts +6 -3
- package/lib/date-picker/DatePicker.js +10 -10
- package/lib/date-picker/index.d.ts +4 -2
- package/lib/date-picker/index.js +4 -1
- package/lib/date-picker/style/index.js +7 -0
- package/lib/date-picker/utils.d.ts +3 -2
- package/lib/dialog/Dialog.d.ts +9 -1
- package/lib/dialog/Dialog.js +6 -0
- package/lib/dialog/function-call.d.ts +6 -184
- package/lib/dialog/function-call.js +46 -43
- package/lib/dialog/index.css +1 -1
- package/lib/dialog/index.d.ts +130 -3
- package/lib/dialog/index.js +17 -3
- package/lib/dialog/types.d.ts +3 -7
- package/lib/divider/Divider.d.ts +1 -1
- package/lib/divider/index.d.ts +1 -1
- package/lib/divider/index.js +4 -1
- package/lib/dropdown-item/DropdownItem.d.ts +2 -2
- package/lib/dropdown-item/index.d.ts +2 -2
- package/lib/dropdown-item/index.js +4 -1
- package/lib/dropdown-menu/DropdownMenu.d.ts +1 -1
- package/lib/dropdown-menu/DropdownMenu.js +2 -1
- package/lib/dropdown-menu/index.d.ts +1 -1
- package/lib/dropdown-menu/index.js +4 -1
- package/lib/empty/Empty.d.ts +2 -2
- package/lib/empty/Empty.js +281 -16
- package/lib/empty/index.d.ts +1 -1
- package/lib/empty/index.js +4 -1
- package/lib/field/Field.d.ts +4 -2
- package/lib/field/Field.js +19 -3
- package/lib/field/index.d.ts +4 -2
- package/lib/field/index.js +4 -1
- package/lib/field/types.d.ts +1 -0
- package/lib/field/utils.d.ts +1 -0
- package/lib/field/utils.js +8 -2
- package/lib/form/index.js +4 -1
- package/lib/grid/Grid.d.ts +1 -1
- package/lib/grid/index.d.ts +1 -1
- package/lib/grid/index.js +4 -1
- package/lib/grid-item/GridItem.d.ts +1 -1
- package/lib/grid-item/index.d.ts +1 -1
- package/lib/grid-item/index.js +4 -1
- package/lib/icon/Icon.d.ts +1 -1
- package/lib/icon/index.d.ts +1 -1
- package/lib/icon/index.js +4 -1
- package/lib/image/index.js +4 -1
- package/lib/image-preview/ImagePreview.js +4 -1
- package/lib/image-preview/ImagePreviewItem.js +10 -2
- package/lib/image-preview/function-call.d.ts +1 -134
- package/lib/image-preview/function-call.js +6 -7
- package/lib/image-preview/index.css +1 -1
- package/lib/image-preview/index.d.ts +129 -2
- package/lib/image-preview/index.js +13 -3
- package/lib/index-anchor/IndexAnchor.d.ts +1 -1
- package/lib/index-anchor/index.d.ts +1 -1
- package/lib/index-anchor/index.js +4 -1
- package/lib/index-bar/IndexBar.js +9 -4
- package/lib/index-bar/index.js +4 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +3 -1
- package/lib/index.js +7 -1
- package/lib/lazyload/vue-lazyload/index.js +4 -1
- package/lib/lazyload/vue-lazyload/lazy-component.js +4 -1
- package/lib/lazyload/vue-lazyload/lazy-container.js +11 -7
- package/lib/lazyload/vue-lazyload/lazy-image.js +24 -14
- package/lib/lazyload/vue-lazyload/lazy.js +15 -4
- package/lib/lazyload/vue-lazyload/listener.js +45 -33
- package/lib/lazyload/vue-lazyload/util.js +4 -1
- package/lib/list/List.js +2 -1
- package/lib/list/index.js +4 -1
- package/lib/loading/Loading.d.ts +1 -1
- package/lib/loading/index.d.ts +1 -1
- package/lib/loading/index.js +4 -1
- package/lib/locale/index.d.ts +1 -1
- package/lib/locale/index.js +4 -1
- package/lib/nav-bar/index.js +4 -1
- package/lib/notice-bar/index.js +4 -1
- package/lib/notify/function-call.d.ts +4 -100
- package/lib/notify/function-call.js +28 -29
- package/lib/notify/index.d.ts +91 -2
- package/lib/notify/index.js +16 -3
- package/lib/notify/types.d.ts +0 -6
- package/lib/number-keyboard/NumberKeyboard.d.ts +1 -1
- package/lib/number-keyboard/NumberKeyboard.js +5 -3
- package/lib/number-keyboard/NumberKeyboardKey.js +2 -2
- package/lib/number-keyboard/index.d.ts +1 -1
- package/lib/number-keyboard/index.js +4 -1
- package/lib/overlay/Overlay.d.ts +1 -1
- package/lib/overlay/Overlay.js +11 -4
- package/lib/overlay/index.d.ts +1 -1
- package/lib/overlay/index.js +4 -1
- package/lib/pagination/index.js +4 -1
- package/lib/password-input/PasswordInput.js +1 -1
- package/lib/password-input/index.js +4 -1
- package/lib/picker/Picker.d.ts +10 -5
- package/lib/picker/Picker.js +53 -67
- package/lib/picker/PickerColumn.d.ts +2 -1
- package/lib/picker/PickerColumn.js +10 -5
- package/lib/picker/PickerToolbar.d.ts +21 -0
- package/lib/picker/PickerToolbar.js +78 -0
- package/lib/picker/index.d.ts +6 -3
- package/lib/picker/index.js +4 -1
- package/lib/picker/style/index.js +7 -0
- package/lib/picker/utils.d.ts +2 -0
- package/lib/picker/utils.js +15 -8
- package/lib/picker-group/PickerGroup.d.ts +39 -0
- package/lib/picker-group/PickerGroup.js +82 -0
- package/lib/picker-group/index.css +1 -0
- package/lib/picker-group/index.d.ts +32 -0
- package/lib/picker-group/index.js +33 -0
- package/{es/action-bar/style/less.d.ts → lib/picker-group/style/index.d.ts} +0 -0
- package/lib/picker-group/style/index.js +9 -0
- package/lib/popover/Popover.js +27 -26
- package/lib/popover/index.js +4 -1
- package/lib/popup/Popup.d.ts +2 -2
- package/lib/popup/Popup.js +7 -6
- package/lib/popup/index.css +1 -1
- package/lib/popup/index.d.ts +2 -2
- package/lib/popup/index.js +4 -1
- package/lib/popup/shared.js +3 -1
- package/lib/progress/Progress.d.ts +1 -1
- package/lib/progress/index.d.ts +1 -1
- package/lib/progress/index.js +4 -1
- package/lib/pull-refresh/PullRefresh.d.ts +2 -1
- package/lib/pull-refresh/PullRefresh.js +11 -3
- package/lib/pull-refresh/index.d.ts +2 -1
- package/lib/pull-refresh/index.js +4 -1
- package/lib/radio/Radio.js +4 -1
- package/lib/radio/index.js +4 -1
- package/lib/radio-group/index.js +4 -1
- package/lib/rate/Rate.js +4 -2
- package/lib/rate/index.js +4 -1
- package/lib/row/Row.d.ts +1 -1
- package/lib/row/index.d.ts +1 -1
- package/lib/row/index.js +4 -1
- package/lib/search/index.css +1 -1
- package/lib/search/index.js +4 -1
- package/lib/share-sheet/index.js +4 -1
- package/lib/sidebar/index.js +4 -1
- package/lib/sidebar-item/index.js +4 -1
- package/lib/skeleton/Skeleton.d.ts +1 -1
- package/lib/skeleton/index.d.ts +1 -1
- package/lib/skeleton/index.js +4 -1
- package/lib/slider/Slider.js +6 -2
- package/lib/slider/index.js +4 -1
- package/lib/space/Space.d.ts +48 -0
- package/lib/space/Space.js +106 -0
- package/lib/space/index.css +1 -0
- package/lib/space/index.d.ts +37 -0
- package/lib/space/index.js +33 -0
- package/{es/action-sheet/style/less.d.ts → lib/space/style/index.d.ts} +0 -0
- package/lib/space/style/index.js +2 -0
- package/lib/step/Step.d.ts +1 -1
- package/lib/step/index.d.ts +1 -1
- package/lib/step/index.js +4 -1
- package/lib/stepper/Stepper.js +1 -1
- package/lib/stepper/index.js +4 -1
- package/lib/steps/index.js +4 -1
- package/lib/sticky/Sticky.js +2 -1
- package/lib/sticky/index.js +4 -1
- package/lib/submit-bar/SubmitBar.d.ts +4 -0
- package/lib/submit-bar/SubmitBar.js +12 -1
- package/lib/submit-bar/index.d.ts +3 -0
- package/lib/submit-bar/index.js +4 -1
- package/lib/swipe/Swipe.js +13 -6
- package/lib/swipe/index.js +4 -1
- package/lib/swipe-cell/SwipeCell.d.ts +2 -2
- package/lib/swipe-cell/SwipeCell.js +4 -2
- package/lib/swipe-cell/index.d.ts +2 -2
- package/lib/swipe-cell/index.js +4 -1
- package/lib/swipe-item/SwipeItem.d.ts +1 -1
- package/lib/swipe-item/index.d.ts +1 -1
- package/lib/swipe-item/index.js +4 -1
- package/lib/switch/Switch.js +2 -1
- package/lib/switch/index.js +4 -1
- package/lib/tab/Tab.d.ts +1 -1
- package/lib/tab/index.d.ts +1 -1
- package/lib/tab/index.js +4 -1
- package/lib/tabbar/index.js +4 -1
- package/lib/tabbar-item/index.js +4 -1
- package/lib/tabs/Tabs.js +16 -3
- package/lib/tabs/TabsContent.js +4 -0
- package/lib/tabs/TabsTitle.d.ts +1 -1
- package/lib/tabs/index.js +4 -1
- package/lib/tag/index.js +4 -1
- package/lib/time-picker/TimePicker.d.ts +6 -3
- package/lib/time-picker/index.d.ts +4 -2
- package/lib/time-picker/index.js +4 -1
- package/lib/time-picker/style/index.js +7 -0
- package/lib/toast/function-call.d.ts +10 -18
- package/lib/toast/function-call.js +25 -20
- package/lib/toast/index.d.ts +76 -2
- package/lib/toast/index.js +20 -3
- package/lib/toast/types.d.ts +10 -7
- package/lib/tree-select/index.js +4 -1
- package/lib/uploader/Uploader.d.ts +3 -3
- package/lib/uploader/Uploader.js +6 -3
- package/lib/uploader/index.d.ts +2 -2
- package/lib/uploader/index.js +4 -1
- package/lib/utils/basic.d.ts +3 -3
- package/lib/utils/create.d.ts +1 -1
- package/lib/utils/create.js +12 -3
- package/lib/utils/with-install.d.ts +2 -2
- package/lib/utils/with-install.js +4 -2
- package/lib/vant.cjs.js +5478 -5015
- package/lib/vant.es.js +5548 -4994
- package/lib/vant.js +5453 -5021
- package/lib/vant.min.js +1 -1
- package/lib/vue-tsx-shim.d.ts +7 -0
- package/{vetur → lib}/web-types.json +567 -345
- package/package.json +13 -18
- package/es/action-bar/index.less +0 -16
- package/es/action-bar/style/less.mjs +0 -2
- package/es/action-bar-button/index.less +0 -38
- package/es/action-bar-button/style/less.mjs +0 -7
- package/es/action-bar-icon/index.less +0 -34
- package/es/action-bar-icon/style/less.mjs +0 -5
- package/es/action-sheet/index.less +0 -131
- package/es/action-sheet/style/less.mjs +0 -7
- package/es/address-edit/index.less +0 -39
- package/es/address-edit/style/less.d.ts +0 -1
- package/es/address-edit/style/less.mjs +0 -13
- package/es/address-list/index.less +0 -110
- package/es/address-list/style/less.d.ts +0 -1
- package/es/address-list/style/less.mjs +0 -11
- package/es/area/style/less.d.ts +0 -1
- package/es/area/style/less.mjs +0 -3
- package/es/badge/index.less +0 -72
- package/es/badge/style/less.d.ts +0 -1
- package/es/badge/style/less.mjs +0 -2
- package/es/button/index.less +0 -241
- package/es/button/style/less.d.ts +0 -1
- package/es/button/style/less.mjs +0 -5
- package/es/calendar/index.less +0 -217
- package/es/calendar/style/less.d.ts +0 -1
- package/es/calendar/style/less.mjs +0 -10
- package/es/card/index.less +0 -126
- package/es/card/style/less.d.ts +0 -1
- package/es/card/style/less.mjs +0 -6
- package/es/cascader/index.less +0 -92
- package/es/cascader/style/less.d.ts +0 -1
- package/es/cascader/style/less.mjs +0 -9
- package/es/cell/index.less +0 -119
- package/es/cell/style/less.d.ts +0 -1
- package/es/cell/style/less.mjs +0 -4
- package/es/cell-group/index.less +0 -32
- package/es/cell-group/style/less.d.ts +0 -1
- package/es/cell-group/style/less.mjs +0 -2
- package/es/checkbox/index.less +0 -96
- package/es/checkbox/style/less.d.ts +0 -1
- package/es/checkbox/style/less.mjs +0 -5
- package/es/checkbox-group/index.less +0 -6
- package/es/checkbox-group/style/less.d.ts +0 -1
- package/es/checkbox-group/style/less.mjs +0 -2
- package/es/circle/index.less +0 -49
- package/es/circle/style/less.d.ts +0 -1
- package/es/circle/style/less.mjs +0 -2
- package/es/col/index.less +0 -19
- package/es/col/style/less.d.ts +0 -1
- package/es/col/style/less.mjs +0 -3
- package/es/collapse/style/less.d.ts +0 -1
- package/es/collapse/style/less.mjs +0 -1
- package/es/collapse-item/index.less +0 -75
- package/es/collapse-item/style/less.d.ts +0 -1
- package/es/collapse-item/style/less.mjs +0 -5
- package/es/config-provider/style/less.d.ts +0 -1
- package/es/config-provider/style/less.mjs +0 -1
- package/es/contact-card/index.less +0 -47
- package/es/contact-card/style/less.d.ts +0 -1
- package/es/contact-card/style/less.mjs +0 -5
- package/es/contact-edit/index.less +0 -37
- package/es/contact-edit/style/less.d.ts +0 -1
- package/es/contact-edit/style/less.mjs +0 -9
- package/es/contact-list/index.less +0 -65
- package/es/contact-list/style/less.d.ts +0 -1
- package/es/contact-list/style/less.mjs +0 -11
- package/es/count-down/index.less +0 -11
- package/es/count-down/style/less.d.ts +0 -1
- package/es/count-down/style/less.mjs +0 -2
- package/es/coupon/index.less +0 -127
- package/es/coupon/style/less.d.ts +0 -1
- package/es/coupon/style/less.mjs +0 -6
- package/es/coupon-cell/index.less +0 -9
- package/es/coupon-cell/style/less.d.ts +0 -1
- package/es/coupon-cell/style/less.mjs +0 -5
- package/es/coupon-list/index.less +0 -86
- package/es/coupon-list/style/less.d.ts +0 -1
- package/es/coupon-list/style/less.mjs +0 -17
- package/es/date-picker/style/less.d.ts +0 -1
- package/es/date-picker/style/less.mjs +0 -3
- package/es/dialog/index.less +0 -140
- package/es/dialog/style/less.d.ts +0 -1
- package/es/dialog/style/less.mjs +0 -10
- package/es/divider/index.less +0 -73
- package/es/divider/style/less.d.ts +0 -1
- package/es/divider/style/less.mjs +0 -2
- package/es/dropdown-item/index.less +0 -41
- package/es/dropdown-item/style/less.d.ts +0 -1
- package/es/dropdown-item/style/less.mjs +0 -8
- package/es/dropdown-menu/index.less +0 -80
- package/es/dropdown-menu/style/less.d.ts +0 -1
- package/es/dropdown-menu/style/less.mjs +0 -2
- package/es/empty/Images.d.ts +0 -4
- package/es/empty/Images.mjs +0 -271
- package/es/empty/index.less +0 -41
- package/es/empty/style/less.d.ts +0 -1
- package/es/empty/style/less.mjs +0 -2
- package/es/field/index.less +0 -196
- package/es/field/style/less.d.ts +0 -1
- package/es/field/style/less.mjs +0 -5
- package/es/form/style/less.d.ts +0 -1
- package/es/form/style/less.mjs +0 -1
- package/es/grid/index.less +0 -4
- package/es/grid/style/less.d.ts +0 -1
- package/es/grid/style/less.mjs +0 -2
- package/es/grid-item/index.less +0 -97
- package/es/grid-item/style/less.d.ts +0 -1
- package/es/grid-item/style/less.mjs +0 -5
- package/es/icon/index.less +0 -10
- package/es/icon/style/less.d.ts +0 -1
- package/es/icon/style/less.mjs +0 -3
- package/es/image/index.less +0 -55
- package/es/image/style/less.d.ts +0 -1
- package/es/image/style/less.mjs +0 -4
- package/es/image-preview/index.less +0 -110
- package/es/image-preview/style/less.d.ts +0 -1
- package/es/image-preview/style/less.mjs +0 -10
- package/es/index-anchor/index.less +0 -31
- package/es/index-anchor/style/less.d.ts +0 -1
- package/es/index-anchor/style/less.mjs +0 -3
- package/es/index-bar/index.less +0 -33
- package/es/index-bar/style/less.d.ts +0 -1
- package/es/index-bar/style/less.mjs +0 -2
- package/es/lazyload/style/less.d.ts +0 -1
- package/es/lazyload/style/less.mjs +0 -1
- package/es/list/index.less +0 -29
- package/es/list/style/less.d.ts +0 -1
- package/es/list/style/less.mjs +0 -3
- package/es/loading/index.less +0 -109
- package/es/loading/style/less.d.ts +0 -1
- package/es/loading/style/less.mjs +0 -2
- package/es/locale/style/less.d.ts +0 -1
- package/es/locale/style/less.mjs +0 -1
- package/es/nav-bar/index.less +0 -78
- package/es/nav-bar/style/less.d.ts +0 -1
- package/es/nav-bar/style/less.mjs +0 -4
- package/es/notice-bar/index.less +0 -70
- package/es/notice-bar/style/less.d.ts +0 -1
- package/es/notice-bar/style/less.mjs +0 -4
- package/es/notify/index.less +0 -42
- package/es/notify/style/less.d.ts +0 -1
- package/es/notify/style/less.mjs +0 -6
- package/es/number-keyboard/index.less +0 -159
- package/es/number-keyboard/style/less.d.ts +0 -1
- package/es/number-keyboard/style/less.mjs +0 -3
- package/es/overlay/index.less +0 -14
- package/es/overlay/style/less.d.ts +0 -1
- package/es/overlay/style/less.mjs +0 -2
- package/es/pagination/index.less +0 -89
- package/es/pagination/style/less.d.ts +0 -1
- package/es/pagination/style/less.mjs +0 -2
- package/es/password-input/index.less +0 -100
- package/es/password-input/style/less.d.ts +0 -1
- package/es/password-input/style/less.mjs +0 -2
- package/es/picker/index.less +0 -138
- package/es/picker/style/less.d.ts +0 -1
- package/es/picker/style/less.mjs +0 -3
- package/es/popover/index.less +0 -288
- package/es/popover/style/less.d.ts +0 -1
- package/es/popover/style/less.mjs +0 -6
- package/es/popup/index.less +0 -139
- package/es/popup/style/less.d.ts +0 -1
- package/es/popup/style/less.mjs +0 -5
- package/es/progress/index.less +0 -53
- package/es/progress/style/less.d.ts +0 -1
- package/es/progress/style/less.mjs +0 -2
- package/es/pull-refresh/index.less +0 -36
- package/es/pull-refresh/style/less.d.ts +0 -1
- package/es/pull-refresh/style/less.mjs +0 -3
- package/es/radio/index.less +0 -96
- package/es/radio/style/less.d.ts +0 -1
- package/es/radio/style/less.mjs +0 -6
- package/es/radio-group/index.less +0 -6
- package/es/radio-group/style/less.d.ts +0 -1
- package/es/radio-group/style/less.mjs +0 -2
- package/es/rate/index.less +0 -52
- package/es/rate/style/less.d.ts +0 -1
- package/es/rate/style/less.mjs +0 -4
- package/es/row/index.less +0 -32
- package/es/row/style/less.d.ts +0 -1
- package/es/row/style/less.mjs +0 -2
- package/es/search/index.less +0 -76
- package/es/search/style/less.d.ts +0 -1
- package/es/search/style/less.mjs +0 -6
- package/es/share-sheet/index.less +0 -152
- package/es/share-sheet/style/less.d.ts +0 -1
- package/es/share-sheet/style/less.mjs +0 -6
- package/es/sidebar/index.less +0 -9
- package/es/sidebar/style/less.d.ts +0 -1
- package/es/sidebar/style/less.mjs +0 -2
- package/es/sidebar-item/index.less +0 -72
- package/es/sidebar-item/style/less.d.ts +0 -1
- package/es/sidebar-item/style/less.mjs +0 -4
- package/es/skeleton/index.less +0 -73
- package/es/skeleton/style/less.d.ts +0 -1
- package/es/skeleton/style/less.mjs +0 -2
- package/es/slider/index.less +0 -104
- package/es/slider/style/less.d.ts +0 -1
- package/es/slider/style/less.mjs +0 -2
- package/es/step/index.less +0 -147
- package/es/step/style/less.d.ts +0 -1
- package/es/step/style/less.mjs +0 -5
- package/es/stepper/index.less +0 -129
- package/es/stepper/style/less.d.ts +0 -1
- package/es/stepper/style/less.mjs +0 -2
- package/es/steps/index.less +0 -23
- package/es/steps/style/less.d.ts +0 -1
- package/es/steps/style/less.mjs +0 -2
- package/es/sticky/index.less +0 -10
- package/es/sticky/style/less.d.ts +0 -1
- package/es/sticky/style/less.mjs +0 -2
- package/es/style/animation.less +0 -135
- package/es/style/base.less +0 -89
- package/es/style/css-variables.less +0 -90
- package/es/style/mixins/clearfix.less +0 -7
- package/es/style/mixins/ellipsis.less +0 -15
- package/es/style/mixins/hairline.less +0 -37
- package/es/style/normalize.less +0 -36
- package/es/submit-bar/index.less +0 -97
- package/es/submit-bar/style/less.d.ts +0 -1
- package/es/submit-bar/style/less.mjs +0 -6
- package/es/swipe/index.less +0 -65
- package/es/swipe/style/less.d.ts +0 -1
- package/es/swipe/style/less.mjs +0 -2
- package/es/swipe-cell/index.less +0 -27
- package/es/swipe-cell/style/less.d.ts +0 -1
- package/es/swipe-cell/style/less.mjs +0 -2
- package/es/swipe-item/index.less +0 -6
- package/es/swipe-item/style/less.d.ts +0 -1
- package/es/swipe-item/style/less.mjs +0 -3
- package/es/switch/index.less +0 -75
- package/es/switch/style/less.d.ts +0 -1
- package/es/switch/style/less.mjs +0 -3
- package/es/tab/index.less +0 -15
- package/es/tab/style/less.d.ts +0 -1
- package/es/tab/style/less.mjs +0 -7
- package/es/tabbar/index.less +0 -20
- package/es/tabbar/style/less.d.ts +0 -1
- package/es/tabbar/style/less.mjs +0 -2
- package/es/tabbar-item/index.less +0 -44
- package/es/tabbar-item/style/less.d.ts +0 -1
- package/es/tabbar-item/style/less.mjs +0 -5
- package/es/tabs/index.less +0 -170
- package/es/tabs/style/less.d.ts +0 -1
- package/es/tabs/style/less.mjs +0 -5
- package/es/tag/index.less +0 -115
- package/es/tag/style/less.d.ts +0 -1
- package/es/tag/style/less.mjs +0 -4
- package/es/time-picker/style/less.d.ts +0 -1
- package/es/time-picker/style/less.mjs +0 -3
- package/es/toast/index.less +0 -89
- package/es/toast/style/less.d.ts +0 -1
- package/es/toast/style/less.mjs +0 -7
- package/es/tree-select/index.less +0 -68
- package/es/tree-select/style/less.d.ts +0 -1
- package/es/tree-select/style/less.mjs +0 -6
- package/es/uploader/index.less +0 -191
- package/es/uploader/style/less.d.ts +0 -1
- package/es/uploader/style/less.mjs +0 -11
- package/lib/action-bar/index.less +0 -16
- package/lib/action-bar/style/less.d.ts +0 -1
- package/lib/action-bar/style/less.js +0 -2
- package/lib/action-bar-button/index.less +0 -38
- package/lib/action-bar-button/style/less.d.ts +0 -1
- package/lib/action-bar-button/style/less.js +0 -7
- package/lib/action-bar-icon/index.less +0 -34
- package/lib/action-bar-icon/style/less.d.ts +0 -1
- package/lib/action-bar-icon/style/less.js +0 -5
- package/lib/action-sheet/index.less +0 -131
- package/lib/action-sheet/style/less.d.ts +0 -1
- package/lib/action-sheet/style/less.js +0 -7
- package/lib/address-edit/index.less +0 -39
- package/lib/address-edit/style/less.d.ts +0 -1
- package/lib/address-edit/style/less.js +0 -13
- package/lib/address-list/index.less +0 -110
- package/lib/address-list/style/less.d.ts +0 -1
- package/lib/address-list/style/less.js +0 -11
- package/lib/area/style/less.d.ts +0 -1
- package/lib/area/style/less.js +0 -3
- package/lib/badge/index.less +0 -72
- package/lib/badge/style/less.d.ts +0 -1
- package/lib/badge/style/less.js +0 -2
- package/lib/button/index.less +0 -241
- package/lib/button/style/less.d.ts +0 -1
- package/lib/button/style/less.js +0 -5
- package/lib/calendar/index.less +0 -217
- package/lib/calendar/style/less.d.ts +0 -1
- package/lib/calendar/style/less.js +0 -10
- package/lib/card/index.less +0 -126
- package/lib/card/style/less.d.ts +0 -1
- package/lib/card/style/less.js +0 -6
- package/lib/cascader/index.less +0 -92
- package/lib/cascader/style/less.d.ts +0 -1
- package/lib/cascader/style/less.js +0 -9
- package/lib/cell/index.less +0 -119
- package/lib/cell/style/less.d.ts +0 -1
- package/lib/cell/style/less.js +0 -4
- package/lib/cell-group/index.less +0 -32
- package/lib/cell-group/style/less.d.ts +0 -1
- package/lib/cell-group/style/less.js +0 -2
- package/lib/checkbox/index.less +0 -96
- package/lib/checkbox/style/less.d.ts +0 -1
- package/lib/checkbox/style/less.js +0 -5
- package/lib/checkbox-group/index.less +0 -6
- package/lib/checkbox-group/style/less.d.ts +0 -1
- package/lib/checkbox-group/style/less.js +0 -2
- package/lib/circle/index.less +0 -49
- package/lib/circle/style/less.d.ts +0 -1
- package/lib/circle/style/less.js +0 -2
- package/lib/col/index.less +0 -19
- package/lib/col/style/less.d.ts +0 -1
- package/lib/col/style/less.js +0 -3
- package/lib/collapse/style/less.d.ts +0 -1
- package/lib/collapse/style/less.js +0 -1
- package/lib/collapse-item/index.less +0 -75
- package/lib/collapse-item/style/less.d.ts +0 -1
- package/lib/collapse-item/style/less.js +0 -5
- package/lib/config-provider/style/less.d.ts +0 -1
- package/lib/config-provider/style/less.js +0 -1
- package/lib/contact-card/index.less +0 -47
- package/lib/contact-card/style/less.d.ts +0 -1
- package/lib/contact-card/style/less.js +0 -5
- package/lib/contact-edit/index.less +0 -37
- package/lib/contact-edit/style/less.d.ts +0 -1
- package/lib/contact-edit/style/less.js +0 -9
- package/lib/contact-list/index.less +0 -65
- package/lib/contact-list/style/less.d.ts +0 -1
- package/lib/contact-list/style/less.js +0 -11
- package/lib/count-down/index.less +0 -11
- package/lib/count-down/style/less.d.ts +0 -1
- package/lib/count-down/style/less.js +0 -2
- package/lib/coupon/index.less +0 -127
- package/lib/coupon/style/less.d.ts +0 -1
- package/lib/coupon/style/less.js +0 -6
- package/lib/coupon-cell/index.less +0 -9
- package/lib/coupon-cell/style/less.d.ts +0 -1
- package/lib/coupon-cell/style/less.js +0 -5
- package/lib/coupon-list/index.less +0 -86
- package/lib/coupon-list/style/less.d.ts +0 -1
- package/lib/coupon-list/style/less.js +0 -17
- package/lib/date-picker/style/less.d.ts +0 -1
- package/lib/date-picker/style/less.js +0 -3
- package/lib/dialog/index.less +0 -140
- package/lib/dialog/style/less.d.ts +0 -1
- package/lib/dialog/style/less.js +0 -10
- package/lib/divider/index.less +0 -73
- package/lib/divider/style/less.d.ts +0 -1
- package/lib/divider/style/less.js +0 -2
- package/lib/dropdown-item/index.less +0 -41
- package/lib/dropdown-item/style/less.d.ts +0 -1
- package/lib/dropdown-item/style/less.js +0 -8
- package/lib/dropdown-menu/index.less +0 -80
- package/lib/dropdown-menu/style/less.d.ts +0 -1
- package/lib/dropdown-menu/style/less.js +0 -2
- package/lib/empty/Images.d.ts +0 -4
- package/lib/empty/Images.js +0 -290
- package/lib/empty/index.less +0 -41
- package/lib/empty/style/less.d.ts +0 -1
- package/lib/empty/style/less.js +0 -2
- package/lib/field/index.less +0 -196
- package/lib/field/style/less.d.ts +0 -1
- package/lib/field/style/less.js +0 -5
- package/lib/form/style/less.d.ts +0 -1
- package/lib/form/style/less.js +0 -1
- package/lib/grid/index.less +0 -4
- package/lib/grid/style/less.d.ts +0 -1
- package/lib/grid/style/less.js +0 -2
- package/lib/grid-item/index.less +0 -97
- package/lib/grid-item/style/less.d.ts +0 -1
- package/lib/grid-item/style/less.js +0 -5
- package/lib/icon/index.less +0 -10
- package/lib/icon/style/less.d.ts +0 -1
- package/lib/icon/style/less.js +0 -3
- package/lib/image/index.less +0 -55
- package/lib/image/style/less.d.ts +0 -1
- package/lib/image/style/less.js +0 -4
- package/lib/image-preview/index.less +0 -110
- package/lib/image-preview/style/less.d.ts +0 -1
- package/lib/image-preview/style/less.js +0 -10
- package/lib/index-anchor/index.less +0 -31
- package/lib/index-anchor/style/less.d.ts +0 -1
- package/lib/index-anchor/style/less.js +0 -3
- package/lib/index-bar/index.less +0 -33
- package/lib/index-bar/style/less.d.ts +0 -1
- package/lib/index-bar/style/less.js +0 -2
- package/lib/index.less +0 -80
- package/lib/lazyload/style/less.d.ts +0 -1
- package/lib/lazyload/style/less.js +0 -1
- package/lib/list/index.less +0 -29
- package/lib/list/style/less.d.ts +0 -1
- package/lib/list/style/less.js +0 -3
- package/lib/loading/index.less +0 -109
- package/lib/loading/style/less.d.ts +0 -1
- package/lib/loading/style/less.js +0 -2
- package/lib/locale/style/less.d.ts +0 -1
- package/lib/locale/style/less.js +0 -1
- package/lib/nav-bar/index.less +0 -78
- package/lib/nav-bar/style/less.d.ts +0 -1
- package/lib/nav-bar/style/less.js +0 -4
- package/lib/notice-bar/index.less +0 -70
- package/lib/notice-bar/style/less.d.ts +0 -1
- package/lib/notice-bar/style/less.js +0 -4
- package/lib/notify/index.less +0 -42
- package/lib/notify/style/less.d.ts +0 -1
- package/lib/notify/style/less.js +0 -6
- package/lib/number-keyboard/index.less +0 -159
- package/lib/number-keyboard/style/less.d.ts +0 -1
- package/lib/number-keyboard/style/less.js +0 -3
- package/lib/overlay/index.less +0 -14
- package/lib/overlay/style/less.d.ts +0 -1
- package/lib/overlay/style/less.js +0 -2
- package/lib/pagination/index.less +0 -89
- package/lib/pagination/style/less.d.ts +0 -1
- package/lib/pagination/style/less.js +0 -2
- package/lib/password-input/index.less +0 -100
- package/lib/password-input/style/less.d.ts +0 -1
- package/lib/password-input/style/less.js +0 -2
- package/lib/picker/index.less +0 -138
- package/lib/picker/style/less.d.ts +0 -1
- package/lib/picker/style/less.js +0 -3
- package/lib/popover/index.less +0 -288
- package/lib/popover/style/less.d.ts +0 -1
- package/lib/popover/style/less.js +0 -6
- package/lib/popup/index.less +0 -139
- package/lib/popup/style/less.d.ts +0 -1
- package/lib/popup/style/less.js +0 -5
- package/lib/progress/index.less +0 -53
- package/lib/progress/style/less.d.ts +0 -1
- package/lib/progress/style/less.js +0 -2
- package/lib/pull-refresh/index.less +0 -36
- package/lib/pull-refresh/style/less.d.ts +0 -1
- package/lib/pull-refresh/style/less.js +0 -3
- package/lib/radio/index.less +0 -96
- package/lib/radio/style/less.d.ts +0 -1
- package/lib/radio/style/less.js +0 -6
- package/lib/radio-group/index.less +0 -6
- package/lib/radio-group/style/less.d.ts +0 -1
- package/lib/radio-group/style/less.js +0 -2
- package/lib/rate/index.less +0 -52
- package/lib/rate/style/less.d.ts +0 -1
- package/lib/rate/style/less.js +0 -4
- package/lib/row/index.less +0 -32
- package/lib/row/style/less.d.ts +0 -1
- package/lib/row/style/less.js +0 -2
- package/lib/search/index.less +0 -76
- package/lib/search/style/less.d.ts +0 -1
- package/lib/search/style/less.js +0 -6
- package/lib/share-sheet/index.less +0 -152
- package/lib/share-sheet/style/less.d.ts +0 -1
- package/lib/share-sheet/style/less.js +0 -6
- package/lib/sidebar/index.less +0 -9
- package/lib/sidebar/style/less.d.ts +0 -1
- package/lib/sidebar/style/less.js +0 -2
- package/lib/sidebar-item/index.less +0 -72
- package/lib/sidebar-item/style/less.d.ts +0 -1
- package/lib/sidebar-item/style/less.js +0 -4
- package/lib/skeleton/index.less +0 -73
- package/lib/skeleton/style/less.d.ts +0 -1
- package/lib/skeleton/style/less.js +0 -2
- package/lib/slider/index.less +0 -104
- package/lib/slider/style/less.d.ts +0 -1
- package/lib/slider/style/less.js +0 -2
- package/lib/ssr.js +0 -7
- package/lib/ssr.mjs +0 -1
- package/lib/step/index.less +0 -147
- package/lib/step/style/less.d.ts +0 -1
- package/lib/step/style/less.js +0 -5
- package/lib/stepper/index.less +0 -129
- package/lib/stepper/style/less.d.ts +0 -1
- package/lib/stepper/style/less.js +0 -2
- package/lib/steps/index.less +0 -23
- package/lib/steps/style/less.d.ts +0 -1
- package/lib/steps/style/less.js +0 -2
- package/lib/sticky/index.less +0 -10
- package/lib/sticky/style/less.d.ts +0 -1
- package/lib/sticky/style/less.js +0 -2
- package/lib/style/animation.less +0 -135
- package/lib/style/base.less +0 -89
- package/lib/style/css-variables.less +0 -90
- package/lib/style/mixins/clearfix.less +0 -7
- package/lib/style/mixins/ellipsis.less +0 -15
- package/lib/style/mixins/hairline.less +0 -37
- package/lib/style/normalize.less +0 -36
- package/lib/submit-bar/index.less +0 -97
- package/lib/submit-bar/style/less.d.ts +0 -1
- package/lib/submit-bar/style/less.js +0 -6
- package/lib/swipe/index.less +0 -65
- package/lib/swipe/style/less.d.ts +0 -1
- package/lib/swipe/style/less.js +0 -2
- package/lib/swipe-cell/index.less +0 -27
- package/lib/swipe-cell/style/less.d.ts +0 -1
- package/lib/swipe-cell/style/less.js +0 -2
- package/lib/swipe-item/index.less +0 -6
- package/lib/swipe-item/style/less.d.ts +0 -1
- package/lib/swipe-item/style/less.js +0 -3
- package/lib/switch/index.less +0 -75
- package/lib/switch/style/less.d.ts +0 -1
- package/lib/switch/style/less.js +0 -3
- package/lib/tab/index.less +0 -15
- package/lib/tab/style/less.d.ts +0 -1
- package/lib/tab/style/less.js +0 -7
- package/lib/tabbar/index.less +0 -20
- package/lib/tabbar/style/less.d.ts +0 -1
- package/lib/tabbar/style/less.js +0 -2
- package/lib/tabbar-item/index.less +0 -44
- package/lib/tabbar-item/style/less.d.ts +0 -1
- package/lib/tabbar-item/style/less.js +0 -5
- package/lib/tabs/index.less +0 -170
- package/lib/tabs/style/less.d.ts +0 -1
- package/lib/tabs/style/less.js +0 -5
- package/lib/tag/index.less +0 -115
- package/lib/tag/style/less.d.ts +0 -1
- package/lib/tag/style/less.js +0 -4
- package/lib/time-picker/style/less.d.ts +0 -1
- package/lib/time-picker/style/less.js +0 -3
- package/lib/toast/index.less +0 -89
- package/lib/toast/style/less.d.ts +0 -1
- package/lib/toast/style/less.js +0 -7
- package/lib/tree-select/index.less +0 -68
- package/lib/tree-select/style/less.d.ts +0 -1
- package/lib/tree-select/style/less.js +0 -6
- package/lib/uploader/index.less +0 -191
- package/lib/uploader/style/less.d.ts +0 -1
- package/lib/uploader/style/less.js +0 -11
- package/lib/vant.cjs.min.js +0 -1
- package/lib/vant.es.min.js +0 -14191
- package/vetur/attributes.json +0 -3514
- package/vetur/tags.json +0 -1208
package/es/picker/Picker.d.ts
CHANGED
@@ -2,7 +2,6 @@ import { type PropType, type ExtractPropTypes } from 'vue';
|
|
2
2
|
import { type Numeric } from '../utils';
|
3
3
|
import type { PickerColumn, PickerOption, PickerFieldNames, PickerToolbarPosition } from './types';
|
4
4
|
export declare const pickerSharedProps: {
|
5
|
-
title: StringConstructor;
|
6
5
|
loading: BooleanConstructor;
|
7
6
|
readonly: BooleanConstructor;
|
8
7
|
allowHtml: BooleanConstructor;
|
@@ -22,11 +21,12 @@ export declare const pickerSharedProps: {
|
|
22
21
|
type: (NumberConstructor | StringConstructor)[];
|
23
22
|
default: number;
|
24
23
|
};
|
24
|
+
} & {
|
25
|
+
title: StringConstructor;
|
25
26
|
cancelButtonText: StringConstructor;
|
26
27
|
confirmButtonText: StringConstructor;
|
27
28
|
};
|
28
29
|
declare const pickerProps: {
|
29
|
-
title: StringConstructor;
|
30
30
|
loading: BooleanConstructor;
|
31
31
|
readonly: BooleanConstructor;
|
32
32
|
allowHtml: BooleanConstructor;
|
@@ -46,6 +46,8 @@ declare const pickerProps: {
|
|
46
46
|
type: (NumberConstructor | StringConstructor)[];
|
47
47
|
default: number;
|
48
48
|
};
|
49
|
+
} & {
|
50
|
+
title: StringConstructor;
|
49
51
|
cancelButtonText: StringConstructor;
|
50
52
|
confirmButtonText: StringConstructor;
|
51
53
|
} & {
|
@@ -65,7 +67,6 @@ declare const pickerProps: {
|
|
65
67
|
};
|
66
68
|
export declare type PickerProps = ExtractPropTypes<typeof pickerProps>;
|
67
69
|
declare const _default: import("vue").DefineComponent<{
|
68
|
-
title: StringConstructor;
|
69
70
|
loading: BooleanConstructor;
|
70
71
|
readonly: BooleanConstructor;
|
71
72
|
allowHtml: BooleanConstructor;
|
@@ -85,6 +86,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
85
86
|
type: (NumberConstructor | StringConstructor)[];
|
86
87
|
default: number;
|
87
88
|
};
|
89
|
+
} & {
|
90
|
+
title: StringConstructor;
|
88
91
|
cancelButtonText: StringConstructor;
|
89
92
|
confirmButtonText: StringConstructor;
|
90
93
|
} & {
|
@@ -101,8 +104,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
101
104
|
default: PickerToolbarPosition;
|
102
105
|
};
|
103
106
|
columnsFieldNames: PropType<PickerFieldNames>;
|
104
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change" | "cancel" | "confirm")[], "update:modelValue" | "change" | "cancel" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
105
|
-
title: StringConstructor;
|
107
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change" | "cancel" | "clickOption" | "confirm")[], "update:modelValue" | "change" | "cancel" | "clickOption" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
106
108
|
loading: BooleanConstructor;
|
107
109
|
readonly: BooleanConstructor;
|
108
110
|
allowHtml: BooleanConstructor;
|
@@ -122,6 +124,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
122
124
|
type: (NumberConstructor | StringConstructor)[];
|
123
125
|
default: number;
|
124
126
|
};
|
127
|
+
} & {
|
128
|
+
title: StringConstructor;
|
125
129
|
cancelButtonText: StringConstructor;
|
126
130
|
confirmButtonText: StringConstructor;
|
127
131
|
} & {
|
@@ -142,6 +146,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
142
146
|
onChange?: ((...args: any[]) => any) | undefined;
|
143
147
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
144
148
|
onCancel?: ((...args: any[]) => any) | undefined;
|
149
|
+
onClickOption?: ((...args: any[]) => any) | undefined;
|
145
150
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
146
151
|
}, {
|
147
152
|
modelValue: Numeric[];
|
package/es/picker/Picker.mjs
CHANGED
@@ -1,24 +1,22 @@
|
|
1
|
-
import { createVNode as _createVNode } from "vue";
|
1
|
+
import { mergeProps as _mergeProps, createVNode as _createVNode } from "vue";
|
2
2
|
import { ref, watch, computed, defineComponent } from "vue";
|
3
|
-
import { extend, unitToPx, truthProp, isSameValue, makeArrayProp, preventDefault, makeStringProp, makeNumericProp,
|
4
|
-
import { isOptionExist, getColumnsType, findOptionByValue, formatCascadeColumns, getFirstEnabledOption
|
5
|
-
import { useChildren } from "@vant/use";
|
3
|
+
import { pick, extend, unitToPx, truthProp, isSameValue, makeArrayProp, preventDefault, makeStringProp, makeNumericProp, BORDER_UNSET_TOP_BOTTOM } from "../utils/index.mjs";
|
4
|
+
import { bem, name, isOptionExist, getColumnsType, findOptionByValue, assignDefaultFields, formatCascadeColumns, getFirstEnabledOption } from "./utils.mjs";
|
5
|
+
import { useChildren, useEventListener, useParent } from "@vant/use";
|
6
6
|
import { useExpose } from "../composables/use-expose.mjs";
|
7
7
|
import { Loading } from "../loading/index.mjs";
|
8
8
|
import Column, { PICKER_KEY } from "./PickerColumn.mjs";
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
import Toolbar, { pickerToolbarPropKeys, pickerToolbarProps, pickerToolbarSlots } from "./PickerToolbar.mjs";
|
10
|
+
import { PICKER_GROUP_KEY } from "../picker-group/PickerGroup.mjs";
|
11
|
+
const pickerSharedProps = extend({
|
12
12
|
loading: Boolean,
|
13
13
|
readonly: Boolean,
|
14
14
|
allowHtml: Boolean,
|
15
15
|
optionHeight: makeNumericProp(44),
|
16
16
|
showToolbar: truthProp,
|
17
17
|
swipeDuration: makeNumericProp(1e3),
|
18
|
-
visibleOptionNum: makeNumericProp(6)
|
19
|
-
|
20
|
-
confirmButtonText: String
|
21
|
-
};
|
18
|
+
visibleOptionNum: makeNumericProp(6)
|
19
|
+
}, pickerToolbarProps);
|
22
20
|
const pickerProps = extend({}, pickerSharedProps, {
|
23
21
|
columns: makeArrayProp(),
|
24
22
|
modelValue: makeArrayProp(),
|
@@ -28,12 +26,16 @@ const pickerProps = extend({}, pickerSharedProps, {
|
|
28
26
|
var stdin_default = defineComponent({
|
29
27
|
name,
|
30
28
|
props: pickerProps,
|
31
|
-
emits: ["confirm", "cancel", "change", "update:modelValue"],
|
29
|
+
emits: ["confirm", "cancel", "change", "clickOption", "update:modelValue"],
|
32
30
|
setup(props, {
|
33
31
|
emit,
|
34
32
|
slots
|
35
33
|
}) {
|
36
|
-
const
|
34
|
+
const columnsRef = ref();
|
35
|
+
const selectedValues = ref(props.modelValue.slice(0));
|
36
|
+
const {
|
37
|
+
parent
|
38
|
+
} = useParent(PICKER_GROUP_KEY);
|
37
39
|
const {
|
38
40
|
children,
|
39
41
|
linkChildren
|
@@ -64,6 +66,10 @@ var stdin_default = defineComponent({
|
|
64
66
|
selectedValues.value = newValues;
|
65
67
|
}
|
66
68
|
};
|
69
|
+
const getEventParams = () => ({
|
70
|
+
selectedValues: selectedValues.value.slice(0),
|
71
|
+
selectedOptions: selectedOptions.value
|
72
|
+
});
|
67
73
|
const onChange = (value, columnIndex) => {
|
68
74
|
setValue(columnIndex, value);
|
69
75
|
if (columnsType.value === "cascade") {
|
@@ -74,56 +80,21 @@ var stdin_default = defineComponent({
|
|
74
80
|
}
|
75
81
|
});
|
76
82
|
}
|
77
|
-
emit("change", {
|
78
|
-
columnIndex
|
79
|
-
|
80
|
-
selectedOptions: selectedOptions.value
|
81
|
-
});
|
83
|
+
emit("change", extend({
|
84
|
+
columnIndex
|
85
|
+
}, getEventParams()));
|
82
86
|
};
|
87
|
+
const onClickOption = (currentOption, columnIndex) => emit("clickOption", extend({
|
88
|
+
columnIndex,
|
89
|
+
currentOption
|
90
|
+
}, getEventParams()));
|
83
91
|
const confirm = () => {
|
84
92
|
children.forEach((child) => child.stopMomentum());
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
});
|
89
|
-
};
|
90
|
-
const cancel = () => emit("cancel", {
|
91
|
-
selectedValues: selectedValues.value,
|
92
|
-
selectedOptions: selectedOptions.value
|
93
|
-
});
|
94
|
-
const renderTitle = () => {
|
95
|
-
if (slots.title) {
|
96
|
-
return slots.title();
|
97
|
-
}
|
98
|
-
if (props.title) {
|
99
|
-
return _createVNode("div", {
|
100
|
-
"class": [bem("title"), "van-ellipsis"]
|
101
|
-
}, [props.title]);
|
102
|
-
}
|
103
|
-
};
|
104
|
-
const renderCancel = () => {
|
105
|
-
const text = props.cancelButtonText || t("cancel");
|
106
|
-
return _createVNode("button", {
|
107
|
-
"type": "button",
|
108
|
-
"class": [bem("cancel"), HAPTICS_FEEDBACK],
|
109
|
-
"onClick": cancel
|
110
|
-
}, [slots.cancel ? slots.cancel() : text]);
|
111
|
-
};
|
112
|
-
const renderConfirm = () => {
|
113
|
-
const text = props.confirmButtonText || t("confirm");
|
114
|
-
return _createVNode("button", {
|
115
|
-
"type": "button",
|
116
|
-
"class": [bem("confirm"), HAPTICS_FEEDBACK],
|
117
|
-
"onClick": confirm
|
118
|
-
}, [slots.confirm ? slots.confirm() : text]);
|
119
|
-
};
|
120
|
-
const renderToolbar = () => {
|
121
|
-
if (props.showToolbar) {
|
122
|
-
return _createVNode("div", {
|
123
|
-
"class": bem("toolbar")
|
124
|
-
}, [slots.toolbar ? slots.toolbar() : [renderCancel(), renderTitle(), renderConfirm()]]);
|
125
|
-
}
|
93
|
+
const params = getEventParams();
|
94
|
+
emit("confirm", params);
|
95
|
+
return params;
|
126
96
|
};
|
97
|
+
const cancel = () => emit("cancel", getEventParams());
|
127
98
|
const renderColumnItems = () => currentColumns.value.map((options, columnIndex) => _createVNode(Column, {
|
128
99
|
"value": selectedValues.value[columnIndex],
|
129
100
|
"fields": fields.value,
|
@@ -133,7 +104,8 @@ var stdin_default = defineComponent({
|
|
133
104
|
"optionHeight": optionHeight.value,
|
134
105
|
"swipeDuration": props.swipeDuration,
|
135
106
|
"visibleOptionNum": props.visibleOptionNum,
|
136
|
-
"onChange": (value) => onChange(value, columnIndex)
|
107
|
+
"onChange": (value) => onChange(value, columnIndex),
|
108
|
+
"onClickOption": (option) => onClickOption(option, columnIndex)
|
137
109
|
}, {
|
138
110
|
option: slots.option
|
139
111
|
}));
|
@@ -160,11 +132,19 @@ var stdin_default = defineComponent({
|
|
160
132
|
height: `${wrapHeight}px`
|
161
133
|
};
|
162
134
|
return _createVNode("div", {
|
135
|
+
"ref": columnsRef,
|
163
136
|
"class": bem("columns"),
|
164
|
-
"style": columnsStyle
|
165
|
-
"onTouchmove": preventDefault
|
137
|
+
"style": columnsStyle
|
166
138
|
}, [renderColumnItems(), renderMask(wrapHeight)]);
|
167
139
|
};
|
140
|
+
const renderToolbar = () => {
|
141
|
+
if (props.showToolbar && !parent) {
|
142
|
+
return _createVNode(Toolbar, _mergeProps(pick(props, pickerToolbarPropKeys), {
|
143
|
+
"onConfirm": confirm,
|
144
|
+
"onCancel": cancel
|
145
|
+
}), pick(slots, pickerToolbarSlots));
|
146
|
+
}
|
147
|
+
};
|
168
148
|
watch(currentColumns, (columns) => {
|
169
149
|
columns.forEach((options, index) => {
|
170
150
|
if (options.length && !isOptionExist(options, selectedValues.value[index], fields.value)) {
|
@@ -176,18 +156,21 @@ var stdin_default = defineComponent({
|
|
176
156
|
});
|
177
157
|
watch(() => props.modelValue, (newValues) => {
|
178
158
|
if (!isSameValue(newValues, selectedValues.value)) {
|
179
|
-
selectedValues.value = newValues;
|
159
|
+
selectedValues.value = newValues.slice(0);
|
180
160
|
}
|
181
161
|
}, {
|
182
162
|
deep: true
|
183
163
|
});
|
184
164
|
watch(selectedValues, (newValues) => {
|
185
165
|
if (!isSameValue(newValues, props.modelValue)) {
|
186
|
-
emit("update:modelValue", newValues);
|
166
|
+
emit("update:modelValue", newValues.slice(0));
|
187
167
|
}
|
188
168
|
}, {
|
189
169
|
immediate: true
|
190
170
|
});
|
171
|
+
useEventListener("touchmove", preventDefault, {
|
172
|
+
target: columnsRef
|
173
|
+
});
|
191
174
|
const getSelectedOptions = () => selectedOptions.value;
|
192
175
|
useExpose({
|
193
176
|
confirm,
|
@@ -25,7 +25,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
25
25
|
type: (NumberConstructor | StringConstructor)[];
|
26
26
|
required: true;
|
27
27
|
};
|
28
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "change"[], "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
28
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "clickOption")[], "change" | "clickOption", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
29
29
|
value: (NumberConstructor | StringConstructor)[];
|
30
30
|
fields: {
|
31
31
|
type: PropType<Required<PickerFieldNames>>;
|
@@ -51,6 +51,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
51
51
|
};
|
52
52
|
}>> & {
|
53
53
|
onChange?: ((...args: any[]) => any) | undefined;
|
54
|
+
onClickOption?: ((...args: any[]) => any) | undefined;
|
54
55
|
}, {
|
55
56
|
readonly: boolean;
|
56
57
|
allowHtml: boolean;
|
@@ -2,7 +2,7 @@ import { createVNode as _createVNode } from "vue";
|
|
2
2
|
import { ref, watchEffect, defineComponent } from "vue";
|
3
3
|
import { clamp, numericProp, makeArrayProp, preventDefault, createNamespace, makeRequiredProp } from "../utils/index.mjs";
|
4
4
|
import { getElementTranslateY, findIndexOfEnabledOption } from "./utils.mjs";
|
5
|
-
import { useParent } from "@vant/use";
|
5
|
+
import { useEventListener, useParent } from "@vant/use";
|
6
6
|
import { useTouch } from "../composables/use-touch.mjs";
|
7
7
|
import { useExpose } from "../composables/use-expose.mjs";
|
8
8
|
const DEFAULT_DURATION = 200;
|
@@ -22,7 +22,7 @@ var stdin_default = defineComponent({
|
|
22
22
|
swipeDuration: makeRequiredProp(numericProp),
|
23
23
|
visibleOptionNum: makeRequiredProp(numericProp)
|
24
24
|
},
|
25
|
-
emits: ["change"],
|
25
|
+
emits: ["change", "clickOption"],
|
26
26
|
setup(props, {
|
27
27
|
emit,
|
28
28
|
slots
|
@@ -32,6 +32,7 @@ var stdin_default = defineComponent({
|
|
32
32
|
let touchStartTime;
|
33
33
|
let momentumOffset;
|
34
34
|
let transitionEndTrigger;
|
35
|
+
const root = ref();
|
35
36
|
const wrapper = ref();
|
36
37
|
const currentOffset = ref(0);
|
37
38
|
const currentDuration = ref(0);
|
@@ -54,13 +55,14 @@ var stdin_default = defineComponent({
|
|
54
55
|
}
|
55
56
|
currentOffset.value = offset;
|
56
57
|
};
|
57
|
-
const
|
58
|
+
const onClickOption = (index) => {
|
58
59
|
if (moving || props.readonly) {
|
59
60
|
return;
|
60
61
|
}
|
61
62
|
transitionEndTrigger = null;
|
62
63
|
currentDuration.value = DEFAULT_DURATION;
|
63
64
|
updateValueByIndex(index);
|
65
|
+
emit("clickOption", props.options[index]);
|
64
66
|
};
|
65
67
|
const getIndexByOffset = (offset) => clamp(Math.round(-offset / props.optionHeight), 0, count() - 1);
|
66
68
|
const momentum = (distance, duration) => {
|
@@ -145,7 +147,7 @@ var stdin_default = defineComponent({
|
|
145
147
|
disabled,
|
146
148
|
selected: value === props.value
|
147
149
|
}), option.className],
|
148
|
-
onClick: () =>
|
150
|
+
onClick: () => onClickOption(index)
|
149
151
|
};
|
150
152
|
const childData = {
|
151
153
|
class: "van-ellipsis",
|
@@ -164,10 +166,13 @@ var stdin_default = defineComponent({
|
|
164
166
|
const offset = -enabledIndex * props.optionHeight;
|
165
167
|
currentOffset.value = offset;
|
166
168
|
});
|
169
|
+
useEventListener("touchmove", onTouchMove, {
|
170
|
+
target: root
|
171
|
+
});
|
167
172
|
return () => _createVNode("div", {
|
173
|
+
"ref": root,
|
168
174
|
"class": bem(),
|
169
|
-
"
|
170
|
-
"onTouchmove": onTouchMove,
|
175
|
+
"onTouchstartPassive": onTouchStart,
|
171
176
|
"onTouchend": onTouchEnd,
|
172
177
|
"onTouchcancel": onTouchEnd
|
173
178
|
}, [_createVNode("ul", {
|
@@ -0,0 +1,21 @@
|
|
1
|
+
export declare const pickerToolbarProps: {
|
2
|
+
title: StringConstructor;
|
3
|
+
cancelButtonText: StringConstructor;
|
4
|
+
confirmButtonText: StringConstructor;
|
5
|
+
};
|
6
|
+
export declare const pickerToolbarSlots: string[];
|
7
|
+
export declare type PickerToolbarPropKeys = Array<keyof typeof pickerToolbarProps>;
|
8
|
+
export declare const pickerToolbarPropKeys: PickerToolbarPropKeys;
|
9
|
+
declare const _default: import("vue").DefineComponent<{
|
10
|
+
title: StringConstructor;
|
11
|
+
cancelButtonText: StringConstructor;
|
12
|
+
confirmButtonText: StringConstructor;
|
13
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("cancel" | "confirm")[], "cancel" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
14
|
+
title: StringConstructor;
|
15
|
+
cancelButtonText: StringConstructor;
|
16
|
+
confirmButtonText: StringConstructor;
|
17
|
+
}>> & {
|
18
|
+
onCancel?: ((...args: any[]) => any) | undefined;
|
19
|
+
onConfirm?: ((...args: any[]) => any) | undefined;
|
20
|
+
}, {}>;
|
21
|
+
export default _default;
|
@@ -0,0 +1,59 @@
|
|
1
|
+
import { createVNode as _createVNode } from "vue";
|
2
|
+
import { defineComponent } from "vue";
|
3
|
+
import { bem, t } from "./utils.mjs";
|
4
|
+
import { createNamespace, HAPTICS_FEEDBACK } from "../utils/index.mjs";
|
5
|
+
const [name] = createNamespace("picker-toolbar");
|
6
|
+
const pickerToolbarProps = {
|
7
|
+
title: String,
|
8
|
+
cancelButtonText: String,
|
9
|
+
confirmButtonText: String
|
10
|
+
};
|
11
|
+
const pickerToolbarSlots = ["cancel", "confirm", "title", "toolbar"];
|
12
|
+
const pickerToolbarPropKeys = Object.keys(pickerToolbarProps);
|
13
|
+
var stdin_default = defineComponent({
|
14
|
+
name,
|
15
|
+
props: pickerToolbarProps,
|
16
|
+
emits: ["confirm", "cancel"],
|
17
|
+
setup(props, {
|
18
|
+
emit,
|
19
|
+
slots
|
20
|
+
}) {
|
21
|
+
const renderTitle = () => {
|
22
|
+
if (slots.title) {
|
23
|
+
return slots.title();
|
24
|
+
}
|
25
|
+
if (props.title) {
|
26
|
+
return _createVNode("div", {
|
27
|
+
"class": [bem("title"), "van-ellipsis"]
|
28
|
+
}, [props.title]);
|
29
|
+
}
|
30
|
+
};
|
31
|
+
const onCancel = () => emit("cancel");
|
32
|
+
const onConfirm = () => emit("confirm");
|
33
|
+
const renderCancel = () => {
|
34
|
+
const text = props.cancelButtonText || t("cancel");
|
35
|
+
return _createVNode("button", {
|
36
|
+
"type": "button",
|
37
|
+
"class": [bem("cancel"), HAPTICS_FEEDBACK],
|
38
|
+
"onClick": onCancel
|
39
|
+
}, [slots.cancel ? slots.cancel() : text]);
|
40
|
+
};
|
41
|
+
const renderConfirm = () => {
|
42
|
+
const text = props.confirmButtonText || t("confirm");
|
43
|
+
return _createVNode("button", {
|
44
|
+
"type": "button",
|
45
|
+
"class": [bem("confirm"), HAPTICS_FEEDBACK],
|
46
|
+
"onClick": onConfirm
|
47
|
+
}, [slots.confirm ? slots.confirm() : text]);
|
48
|
+
};
|
49
|
+
return () => _createVNode("div", {
|
50
|
+
"class": bem("toolbar")
|
51
|
+
}, [slots.toolbar ? slots.toolbar() : [renderCancel(), renderTitle(), renderConfirm()]]);
|
52
|
+
}
|
53
|
+
});
|
54
|
+
export {
|
55
|
+
stdin_default as default,
|
56
|
+
pickerToolbarPropKeys,
|
57
|
+
pickerToolbarProps,
|
58
|
+
pickerToolbarSlots
|
59
|
+
};
|
package/es/picker/index.d.ts
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
import { PickerProps } from './Picker';
|
2
2
|
export declare const Picker: import("../utils").WithInstall<import("vue").DefineComponent<{
|
3
|
-
title: StringConstructor;
|
4
3
|
loading: BooleanConstructor;
|
5
4
|
readonly: BooleanConstructor;
|
6
5
|
allowHtml: BooleanConstructor;
|
@@ -20,6 +19,8 @@ export declare const Picker: import("../utils").WithInstall<import("vue").Define
|
|
20
19
|
type: (NumberConstructor | StringConstructor)[];
|
21
20
|
default: number;
|
22
21
|
};
|
22
|
+
} & {
|
23
|
+
title: StringConstructor;
|
23
24
|
cancelButtonText: StringConstructor;
|
24
25
|
confirmButtonText: StringConstructor;
|
25
26
|
} & {
|
@@ -36,8 +37,7 @@ export declare const Picker: import("../utils").WithInstall<import("vue").Define
|
|
36
37
|
default: import("./types").PickerToolbarPosition;
|
37
38
|
};
|
38
39
|
columnsFieldNames: import("vue").PropType<import("./types").PickerFieldNames>;
|
39
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change" | "cancel" | "confirm")[], "update:modelValue" | "change" | "cancel" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
40
|
-
title: StringConstructor;
|
40
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change" | "cancel" | "clickOption" | "confirm")[], "update:modelValue" | "change" | "cancel" | "clickOption" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
41
41
|
loading: BooleanConstructor;
|
42
42
|
readonly: BooleanConstructor;
|
43
43
|
allowHtml: BooleanConstructor;
|
@@ -57,6 +57,8 @@ export declare const Picker: import("../utils").WithInstall<import("vue").Define
|
|
57
57
|
type: (NumberConstructor | StringConstructor)[];
|
58
58
|
default: number;
|
59
59
|
};
|
60
|
+
} & {
|
61
|
+
title: StringConstructor;
|
60
62
|
cancelButtonText: StringConstructor;
|
61
63
|
confirmButtonText: StringConstructor;
|
62
64
|
} & {
|
@@ -77,6 +79,7 @@ export declare const Picker: import("../utils").WithInstall<import("vue").Define
|
|
77
79
|
onChange?: ((...args: any[]) => any) | undefined;
|
78
80
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
79
81
|
onCancel?: ((...args: any[]) => any) | undefined;
|
82
|
+
onClickOption?: ((...args: any[]) => any) | undefined;
|
80
83
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
81
84
|
}, {
|
82
85
|
modelValue: import("../utils").Numeric[];
|
@@ -1,3 +1,10 @@
|
|
1
1
|
import "../../style/base.css";
|
2
|
+
import "../../badge/index.css";
|
2
3
|
import "../../loading/index.css";
|
4
|
+
import "../../sticky/index.css";
|
5
|
+
import "../../swipe/index.css";
|
6
|
+
import "../../swipe-item/index.css";
|
7
|
+
import "../../tabs/index.css";
|
8
|
+
import "../../tab/index.css";
|
9
|
+
import "../../picker-group/index.css";
|
3
10
|
import "../index.css";
|
package/es/picker/utils.d.ts
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
import { type Numeric } from '../utils';
|
2
2
|
import type { Ref } from 'vue';
|
3
3
|
import type { PickerOption, PickerColumn, PickerFieldNames } from './types';
|
4
|
+
declare const name: string, bem: (el?: import("../utils").Mods | undefined, mods?: import("../utils").Mods | undefined) => import("../utils").Mods, t: (path: string, ...args: unknown[]) => any;
|
5
|
+
export { name, bem, t };
|
4
6
|
export declare const getFirstEnabledOption: (options: PickerOption[]) => PickerOption | undefined;
|
5
7
|
export declare function getColumnsType(columns: PickerColumn | PickerColumn[], fields: Required<PickerFieldNames>): "default" | "multiple" | "cascade";
|
6
8
|
export declare function findIndexOfEnabledOption(options: PickerOption[], index: number): number;
|
package/es/picker/utils.mjs
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
import { isDef, clamp, extend } from "../utils/index.mjs";
|
1
|
+
import { isDef, clamp, extend, createNamespace } from "../utils/index.mjs";
|
2
|
+
const [name, bem, t] = createNamespace("picker");
|
2
3
|
const getFirstEnabledOption = (options) => options.find((option) => !option.disabled) || options[0];
|
3
4
|
function getColumnsType(columns, fields) {
|
4
5
|
const firstColumn = columns[0];
|
@@ -55,19 +56,25 @@ function getElementTranslateY(element) {
|
|
55
56
|
return Number(translateY);
|
56
57
|
}
|
57
58
|
function assignDefaultFields(fields) {
|
58
|
-
return extend(
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
59
|
+
return extend(
|
60
|
+
{
|
61
|
+
text: "text",
|
62
|
+
value: "value",
|
63
|
+
children: "children"
|
64
|
+
},
|
65
|
+
fields
|
66
|
+
);
|
63
67
|
}
|
64
68
|
export {
|
65
69
|
assignDefaultFields,
|
70
|
+
bem,
|
66
71
|
findIndexOfEnabledOption,
|
67
72
|
findOptionByValue,
|
68
73
|
formatCascadeColumns,
|
69
74
|
getColumnsType,
|
70
75
|
getElementTranslateY,
|
71
76
|
getFirstEnabledOption,
|
72
|
-
isOptionExist
|
77
|
+
isOptionExist,
|
78
|
+
name,
|
79
|
+
t
|
73
80
|
};
|
@@ -0,0 +1,39 @@
|
|
1
|
+
import { type InjectionKey, type ExtractPropTypes } from 'vue';
|
2
|
+
export declare type PickerGroupProvide = Record<string, string>;
|
3
|
+
export declare const PICKER_GROUP_KEY: InjectionKey<PickerGroupProvide>;
|
4
|
+
export declare const pickerGroupProps: {
|
5
|
+
tabs: {
|
6
|
+
type: import("vue").PropType<string[]>;
|
7
|
+
default: () => never[];
|
8
|
+
};
|
9
|
+
} & {
|
10
|
+
title: StringConstructor;
|
11
|
+
cancelButtonText: StringConstructor;
|
12
|
+
confirmButtonText: StringConstructor;
|
13
|
+
};
|
14
|
+
export declare type PickerGroupProps = ExtractPropTypes<typeof pickerGroupProps>;
|
15
|
+
declare const _default: import("vue").DefineComponent<{
|
16
|
+
tabs: {
|
17
|
+
type: import("vue").PropType<string[]>;
|
18
|
+
default: () => never[];
|
19
|
+
};
|
20
|
+
} & {
|
21
|
+
title: StringConstructor;
|
22
|
+
cancelButtonText: StringConstructor;
|
23
|
+
confirmButtonText: StringConstructor;
|
24
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("cancel" | "confirm")[], "cancel" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
25
|
+
tabs: {
|
26
|
+
type: import("vue").PropType<string[]>;
|
27
|
+
default: () => never[];
|
28
|
+
};
|
29
|
+
} & {
|
30
|
+
title: StringConstructor;
|
31
|
+
cancelButtonText: StringConstructor;
|
32
|
+
confirmButtonText: StringConstructor;
|
33
|
+
}>> & {
|
34
|
+
onCancel?: ((...args: any[]) => any) | undefined;
|
35
|
+
onConfirm?: ((...args: any[]) => any) | undefined;
|
36
|
+
}, {
|
37
|
+
tabs: string[];
|
38
|
+
}>;
|
39
|
+
export default _default;
|
@@ -0,0 +1,57 @@
|
|
1
|
+
import { createVNode as _createVNode, mergeProps as _mergeProps } from "vue";
|
2
|
+
import { defineComponent } from "vue";
|
3
|
+
import { extend, makeArrayProp, createNamespace } from "../utils/index.mjs";
|
4
|
+
import { useChildren } from "@vant/use";
|
5
|
+
import { Tab } from "../tab/index.mjs";
|
6
|
+
import { Tabs } from "../tabs/index.mjs";
|
7
|
+
import Toolbar, { pickerToolbarProps } from "../picker/PickerToolbar.mjs";
|
8
|
+
const [name, bem] = createNamespace("picker-group");
|
9
|
+
const PICKER_GROUP_KEY = Symbol(name);
|
10
|
+
const pickerGroupProps = extend({
|
11
|
+
tabs: makeArrayProp()
|
12
|
+
}, pickerToolbarProps);
|
13
|
+
var stdin_default = defineComponent({
|
14
|
+
name,
|
15
|
+
props: pickerGroupProps,
|
16
|
+
emits: ["confirm", "cancel"],
|
17
|
+
setup(props, {
|
18
|
+
emit,
|
19
|
+
slots
|
20
|
+
}) {
|
21
|
+
const {
|
22
|
+
children,
|
23
|
+
linkChildren
|
24
|
+
} = useChildren(PICKER_GROUP_KEY);
|
25
|
+
linkChildren();
|
26
|
+
const onConfirm = () => {
|
27
|
+
emit("confirm", children.map((item) => item.confirm()));
|
28
|
+
};
|
29
|
+
const onCancel = () => emit("cancel");
|
30
|
+
return () => {
|
31
|
+
var _a;
|
32
|
+
const childNodes = (_a = slots.default) == null ? void 0 : _a.call(slots);
|
33
|
+
return _createVNode("div", {
|
34
|
+
"class": bem()
|
35
|
+
}, [_createVNode(Toolbar, _mergeProps(props, {
|
36
|
+
"onConfirm": onConfirm,
|
37
|
+
"onCancel": onCancel
|
38
|
+
}), null), _createVNode(Tabs, {
|
39
|
+
"shrink": true,
|
40
|
+
"class": bem("tabs"),
|
41
|
+
"animated": true
|
42
|
+
}, {
|
43
|
+
default: () => [props.tabs.map((title, index) => _createVNode(Tab, {
|
44
|
+
"title": title,
|
45
|
+
"titleClass": bem("tab-title")
|
46
|
+
}, {
|
47
|
+
default: () => [childNodes == null ? void 0 : childNodes[index]]
|
48
|
+
}))]
|
49
|
+
})]);
|
50
|
+
};
|
51
|
+
}
|
52
|
+
});
|
53
|
+
export {
|
54
|
+
PICKER_GROUP_KEY,
|
55
|
+
stdin_default as default,
|
56
|
+
pickerGroupProps
|
57
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
body{--van-picker-group-background: var(--van-background-2)}.van-picker-group{background:var(--van-picker-group-background)}.van-picker-group__tabs{margin-top:var(--van-padding-base)}.van-picker-group__tab-title{margin-right:16px}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import { PickerGroupProps } from './PickerGroup';
|
2
|
+
export declare const PickerGroup: import("../utils").WithInstall<import("vue").DefineComponent<{
|
3
|
+
tabs: {
|
4
|
+
type: import("vue").PropType<string[]>;
|
5
|
+
default: () => never[];
|
6
|
+
};
|
7
|
+
} & {
|
8
|
+
title: StringConstructor;
|
9
|
+
cancelButtonText: StringConstructor;
|
10
|
+
confirmButtonText: StringConstructor;
|
11
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("cancel" | "confirm")[], "cancel" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
12
|
+
tabs: {
|
13
|
+
type: import("vue").PropType<string[]>;
|
14
|
+
default: () => never[];
|
15
|
+
};
|
16
|
+
} & {
|
17
|
+
title: StringConstructor;
|
18
|
+
cancelButtonText: StringConstructor;
|
19
|
+
confirmButtonText: StringConstructor;
|
20
|
+
}>> & {
|
21
|
+
onCancel?: ((...args: any[]) => any) | undefined;
|
22
|
+
onConfirm?: ((...args: any[]) => any) | undefined;
|
23
|
+
}, {
|
24
|
+
tabs: string[];
|
25
|
+
}>>;
|
26
|
+
export default PickerGroup;
|
27
|
+
export type { PickerGroupProps };
|
28
|
+
declare module 'vue' {
|
29
|
+
interface GlobalComponents {
|
30
|
+
VanPickerGroup: typeof PickerGroup;
|
31
|
+
}
|
32
|
+
}
|