vant 3.4.5 → 4.0.0-alpha.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/index.css +1 -1
- package/es/action-bar/index.less +4 -6
- package/es/action-bar-button/index.css +1 -1
- package/es/action-bar-button/index.less +9 -11
- package/es/action-bar-icon/index.css +1 -1
- package/es/action-bar-icon/index.less +10 -12
- package/es/action-sheet/index.css +1 -1
- package/es/action-sheet/index.less +23 -24
- package/es/address-edit/AddressEdit.d.ts +6 -6
- package/es/address-edit/AddressEdit.js +29 -33
- package/es/address-edit/AddressEditDetail.d.ts +2 -2
- package/es/address-edit/AddressEditDetail.js +5 -14
- package/es/address-edit/index.css +1 -1
- package/es/address-edit/index.d.ts +6 -6
- package/es/address-edit/index.less +8 -15
- package/es/address-edit/types.d.ts +2 -4
- package/es/address-list/AddressList.d.ts +4 -4
- package/es/address-list/AddressList.js +5 -5
- package/es/address-list/AddressListItem.js +3 -3
- package/es/address-list/index.css +1 -1
- package/es/address-list/index.d.ts +4 -4
- package/es/address-list/index.less +20 -22
- package/es/area/Area.d.ts +13 -25
- package/es/area/Area.js +43 -208
- package/es/area/index.d.ts +11 -19
- package/es/area/types.d.ts +2 -17
- package/es/area/utils.d.ts +6 -0
- package/es/area/utils.js +85 -0
- package/es/badge/index.css +1 -1
- package/es/badge/index.less +15 -17
- package/es/button/index.css +1 -1
- package/es/button/index.less +55 -52
- package/es/calendar/Calendar.d.ts +6 -6
- package/es/calendar/Calendar.js +5 -5
- package/es/calendar/CalendarHeader.d.ts +2 -2
- package/es/calendar/CalendarHeader.js +2 -2
- package/es/calendar/CalendarMonth.d.ts +1 -2
- package/es/calendar/CalendarMonth.js +2 -2
- package/es/calendar/index.css +1 -1
- package/es/calendar/index.d.ts +6 -6
- package/es/calendar/index.less +40 -37
- package/es/card/Card.d.ts +2 -2
- package/es/card/Card.js +3 -3
- package/es/card/index.css +1 -1
- package/es/card/index.d.ts +2 -2
- package/es/card/index.less +23 -25
- package/es/cascader/Cascader.d.ts +2 -2
- package/es/cascader/Cascader.js +3 -3
- package/es/cascader/index.css +1 -1
- package/es/cascader/index.d.ts +2 -2
- package/es/cascader/index.less +17 -19
- package/es/cell/Cell.js +1 -4
- package/es/cell/index.css +1 -1
- package/es/cell/index.less +21 -27
- package/es/cell-group/index.css +1 -1
- package/es/cell-group/index.less +12 -13
- package/es/checkbox/index.css +1 -1
- package/es/checkbox/index.less +12 -14
- package/es/circle/index.css +1 -1
- package/es/circle/index.less +8 -10
- package/es/collapse-item/index.css +1 -1
- package/es/collapse-item/index.less +12 -12
- package/es/config-provider/ConfigProvider.d.ts +14 -0
- package/es/config-provider/ConfigProvider.js +9 -2
- package/es/config-provider/index.d.ts +10 -1
- package/es/contact-card/ContactCard.js +2 -2
- package/es/contact-card/index.css +1 -1
- package/es/contact-card/index.less +7 -9
- package/es/contact-edit/ContactEdit.d.ts +2 -2
- package/es/contact-edit/ContactEdit.js +3 -4
- package/es/contact-edit/index.css +1 -1
- package/es/contact-edit/index.d.ts +2 -2
- package/es/contact-edit/index.less +7 -9
- package/es/contact-list/ContactList.js +4 -4
- package/es/contact-list/index.css +1 -1
- package/es/contact-list/index.less +9 -11
- package/es/count-down/index.css +1 -1
- package/es/count-down/index.less +4 -6
- package/es/coupon/index.css +1 -1
- package/es/coupon/index.less +28 -31
- package/es/coupon-cell/index.css +1 -1
- package/es/coupon-cell/index.less +2 -4
- package/es/coupon-list/CouponList.js +2 -2
- package/es/coupon-list/index.css +1 -1
- package/es/coupon-list/index.less +15 -17
- package/es/date-picker/DatePicker.d.ts +168 -0
- package/es/date-picker/DatePicker.js +111 -0
- package/es/{datetime-picker/DatePicker.d.ts → date-picker/index.d.ts} +40 -28
- package/es/date-picker/index.js +8 -0
- package/es/{datetime-picker → date-picker}/style/index.d.ts +0 -0
- package/es/{datetime-picker → date-picker}/style/index.js +0 -0
- package/es/{datetime-picker → date-picker}/style/less.d.ts +0 -0
- package/es/{datetime-picker → date-picker}/style/less.js +0 -0
- package/es/{datetime-picker → date-picker}/utils.d.ts +15 -11
- package/es/date-picker/utils.js +40 -0
- package/es/dialog/index.css +1 -1
- package/es/dialog/index.less +22 -24
- package/es/divider/index.css +1 -1
- package/es/divider/index.less +10 -12
- package/es/dropdown-item/index.css +1 -1
- package/es/dropdown-item/index.less +2 -5
- package/es/dropdown-menu/index.css +1 -1
- package/es/dropdown-menu/index.less +14 -17
- package/es/empty/index.css +1 -1
- package/es/empty/index.less +9 -11
- package/es/field/Field.d.ts +4 -4
- package/es/field/Field.js +4 -4
- package/es/field/index.css +1 -1
- package/es/field/index.d.ts +4 -4
- package/es/field/index.less +20 -23
- package/es/grid-item/index.css +1 -1
- package/es/grid-item/index.less +10 -13
- package/es/image/index.css +1 -1
- package/es/image/index.less +10 -12
- package/es/image-preview/index.css +1 -1
- package/es/image-preview/index.less +11 -13
- package/es/index-anchor/index.css +1 -1
- package/es/index-anchor/index.less +12 -14
- package/es/index-bar/index.css +1 -1
- package/es/index-bar/index.less +7 -8
- package/es/index.d.ts +3 -2
- package/es/index.js +7 -4
- package/es/list/index.css +1 -1
- package/es/list/index.less +5 -7
- package/es/loading/index.css +1 -1
- package/es/loading/index.less +7 -10
- package/es/nav-bar/NavBar.d.ts +3 -3
- package/es/nav-bar/NavBar.js +3 -3
- package/es/nav-bar/index.css +1 -1
- package/es/nav-bar/index.d.ts +3 -3
- package/es/nav-bar/index.less +11 -13
- package/es/notice-bar/index.css +1 -1
- package/es/notice-bar/index.less +11 -13
- package/es/notify/index.css +1 -1
- package/es/notify/index.less +13 -15
- package/es/number-keyboard/NumberKeyboard.d.ts +1 -1
- package/es/number-keyboard/index.css +1 -1
- package/es/number-keyboard/index.d.ts +1 -1
- package/es/number-keyboard/index.less +26 -22
- package/es/overlay/index.css +1 -1
- package/es/overlay/index.less +4 -6
- package/es/pagination/index.css +1 -1
- package/es/pagination/index.less +13 -15
- package/es/password-input/index.css +1 -1
- package/es/password-input/index.less +20 -22
- package/es/picker/Picker.d.ts +26 -28
- package/es/picker/Picker.js +91 -196
- package/es/picker/PickerColumn.d.ts +21 -30
- package/es/picker/PickerColumn.js +61 -111
- package/es/picker/index.css +1 -1
- package/es/picker/index.d.ts +19 -20
- package/es/picker/index.less +31 -19
- package/es/picker/types.d.ts +13 -19
- package/es/picker/utils.d.ts +10 -0
- package/es/picker/utils.js +73 -0
- package/es/popover/Popover.d.ts +1 -1
- package/es/popover/index.css +1 -1
- package/es/popover/index.d.ts +1 -1
- package/es/popover/index.less +21 -23
- package/es/popup/Popup.d.ts +3 -3
- package/es/popup/Popup.js +3 -3
- package/es/popup/index.css +1 -1
- package/es/popup/index.d.ts +3 -3
- package/es/popup/index.less +20 -22
- package/es/progress/index.css +1 -1
- package/es/progress/index.less +14 -18
- package/es/pull-refresh/index.css +1 -1
- package/es/pull-refresh/index.less +5 -7
- package/es/radio/index.css +1 -1
- package/es/radio/index.less +12 -14
- package/es/rate/index.css +1 -1
- package/es/rate/index.less +6 -8
- package/es/search/Search.d.ts +4 -4
- package/es/search/Search.js +7 -7
- package/es/search/index.css +1 -1
- package/es/search/index.d.ts +4 -4
- package/es/search/index.less +16 -18
- package/es/share-sheet/index.css +1 -1
- package/es/share-sheet/index.less +17 -18
- package/es/sidebar/index.css +1 -1
- package/es/sidebar/index.less +2 -4
- package/es/sidebar-item/index.css +1 -1
- package/es/sidebar-item/index.less +17 -19
- package/es/skeleton/index.css +1 -1
- package/es/skeleton/index.less +14 -16
- package/es/slider/Slider.d.ts +4 -4
- package/es/slider/Slider.js +4 -5
- package/es/slider/index.css +1 -1
- package/es/slider/index.d.ts +4 -4
- package/es/slider/index.less +20 -18
- package/es/step/index.css +1 -1
- package/es/step/index.less +15 -17
- package/es/stepper/Stepper.d.ts +1 -1
- package/es/stepper/index.css +1 -1
- package/es/stepper/index.d.ts +1 -1
- package/es/stepper/index.less +20 -24
- package/es/steps/Steps.d.ts +2 -2
- package/es/steps/Steps.js +2 -2
- package/es/steps/index.css +1 -1
- package/es/steps/index.d.ts +2 -2
- package/es/steps/index.less +3 -5
- package/es/sticky/index.css +1 -1
- package/es/sticky/index.less +2 -4
- package/es/style/animation.css +1 -1
- package/es/style/animation.less +18 -22
- package/es/style/base.css +1 -1
- package/es/style/base.less +6 -7
- package/es/style/css-variables.css +1 -1
- package/es/style/css-variables.less +76 -61
- package/es/style/mixins/hairline.less +0 -2
- package/es/style/normalize.css +1 -1
- package/es/style/normalize.less +1 -3
- package/es/submit-bar/index.css +1 -1
- package/es/submit-bar/index.less +26 -28
- package/es/swipe/index.css +1 -1
- package/es/swipe/index.less +11 -13
- package/es/switch/index.css +1 -1
- package/es/switch/index.less +24 -24
- package/es/tabbar/index.css +1 -1
- package/es/tabbar/index.less +5 -7
- package/es/tabbar-item/index.css +1 -1
- package/es/tabbar-item/index.less +9 -11
- package/es/tabs/Tabs.d.ts +2 -4
- package/es/tabs/Tabs.js +14 -27
- package/es/tabs/index.css +1 -1
- package/es/tabs/index.d.ts +2 -4
- package/es/tabs/index.less +17 -20
- package/es/tag/index.css +1 -1
- package/es/tag/index.less +22 -25
- package/es/time-picker/TimePicker.d.ts +214 -0
- package/es/time-picker/TimePicker.js +71 -0
- package/{lib/datetime-picker/TimePicker.d.ts → es/time-picker/index.d.ts} +60 -20
- package/es/time-picker/index.js +8 -0
- package/{lib/datetime-picker → es/time-picker}/style/index.d.ts +0 -0
- package/es/time-picker/style/index.js +3 -0
- package/{lib/datetime-picker → es/time-picker}/style/less.d.ts +0 -0
- package/es/time-picker/style/less.js +3 -0
- package/es/toast/index.css +1 -1
- package/es/toast/index.less +19 -21
- package/es/tree-select/TreeSelect.d.ts +3 -3
- package/es/tree-select/TreeSelect.js +3 -3
- package/es/tree-select/index.css +1 -1
- package/es/tree-select/index.d.ts +3 -3
- package/es/tree-select/index.less +12 -14
- package/es/uploader/Uploader.d.ts +4 -4
- package/es/uploader/Uploader.js +4 -4
- package/es/uploader/index.css +1 -1
- package/es/uploader/index.d.ts +4 -4
- package/es/uploader/index.less +31 -33
- package/es/utils/basic.d.ts +1 -0
- package/es/utils/basic.js +2 -0
- package/lib/action-bar/index.css +1 -1
- package/lib/action-bar/index.less +4 -6
- package/lib/action-bar-button/index.css +1 -1
- package/lib/action-bar-button/index.less +9 -11
- package/lib/action-bar-icon/index.css +1 -1
- package/lib/action-bar-icon/index.less +10 -12
- package/lib/action-sheet/index.css +1 -1
- package/lib/action-sheet/index.less +23 -24
- package/lib/address-edit/AddressEdit.d.ts +6 -6
- package/lib/address-edit/AddressEdit.js +29 -33
- package/lib/address-edit/AddressEditDetail.d.ts +2 -2
- package/lib/address-edit/AddressEditDetail.js +5 -14
- package/lib/address-edit/index.css +1 -1
- package/lib/address-edit/index.d.ts +6 -6
- package/lib/address-edit/index.less +8 -15
- package/lib/address-edit/types.d.ts +2 -4
- package/lib/address-list/AddressList.d.ts +4 -4
- package/lib/address-list/AddressList.js +5 -5
- package/lib/address-list/AddressListItem.js +3 -3
- package/lib/address-list/index.css +1 -1
- package/lib/address-list/index.d.ts +4 -4
- package/lib/address-list/index.less +20 -22
- package/lib/area/Area.d.ts +13 -25
- package/lib/area/Area.js +42 -207
- package/lib/area/index.d.ts +11 -19
- package/lib/area/types.d.ts +2 -17
- package/lib/area/utils.d.ts +6 -0
- package/lib/area/utils.js +109 -0
- package/lib/badge/index.css +1 -1
- package/lib/badge/index.less +15 -17
- package/lib/button/index.css +1 -1
- package/lib/button/index.less +55 -52
- package/lib/calendar/Calendar.d.ts +6 -6
- package/lib/calendar/Calendar.js +5 -5
- package/lib/calendar/CalendarHeader.d.ts +2 -2
- package/lib/calendar/CalendarHeader.js +2 -2
- package/lib/calendar/CalendarMonth.d.ts +1 -2
- package/lib/calendar/CalendarMonth.js +2 -2
- package/lib/calendar/index.css +1 -1
- package/lib/calendar/index.d.ts +6 -6
- package/lib/calendar/index.less +40 -37
- package/lib/card/Card.d.ts +2 -2
- package/lib/card/Card.js +3 -3
- package/lib/card/index.css +1 -1
- package/lib/card/index.d.ts +2 -2
- package/lib/card/index.less +23 -25
- package/lib/cascader/Cascader.d.ts +2 -2
- package/lib/cascader/Cascader.js +3 -3
- package/lib/cascader/index.css +1 -1
- package/lib/cascader/index.d.ts +2 -2
- package/lib/cascader/index.less +17 -19
- package/lib/cell/Cell.js +1 -4
- package/lib/cell/index.css +1 -1
- package/lib/cell/index.less +21 -27
- package/lib/cell-group/index.css +1 -1
- package/lib/cell-group/index.less +12 -13
- package/lib/checkbox/index.css +1 -1
- package/lib/checkbox/index.less +12 -14
- package/lib/circle/index.css +1 -1
- package/lib/circle/index.less +8 -10
- package/lib/collapse-item/index.css +1 -1
- package/lib/collapse-item/index.less +12 -12
- package/lib/config-provider/ConfigProvider.d.ts +14 -0
- package/lib/config-provider/ConfigProvider.js +7 -0
- package/lib/config-provider/index.d.ts +10 -1
- package/lib/contact-card/ContactCard.js +2 -2
- package/lib/contact-card/index.css +1 -1
- package/lib/contact-card/index.less +7 -9
- package/lib/contact-edit/ContactEdit.d.ts +2 -2
- package/lib/contact-edit/ContactEdit.js +3 -4
- package/lib/contact-edit/index.css +1 -1
- package/lib/contact-edit/index.d.ts +2 -2
- package/lib/contact-edit/index.less +7 -9
- package/lib/contact-list/ContactList.js +4 -4
- package/lib/contact-list/index.css +1 -1
- package/lib/contact-list/index.less +9 -11
- package/lib/count-down/index.css +1 -1
- package/lib/count-down/index.less +4 -6
- package/lib/coupon/index.css +1 -1
- package/lib/coupon/index.less +28 -31
- package/lib/coupon-cell/index.css +1 -1
- package/lib/coupon-cell/index.less +2 -4
- package/lib/coupon-list/CouponList.js +2 -2
- package/lib/coupon-list/index.css +1 -1
- package/lib/coupon-list/index.less +15 -17
- package/lib/date-picker/DatePicker.d.ts +168 -0
- package/lib/date-picker/DatePicker.js +135 -0
- package/lib/{datetime-picker/DatePicker.d.ts → date-picker/index.d.ts} +40 -28
- package/lib/{datetime-picker → date-picker}/index.js +4 -4
- package/lib/date-picker/style/index.d.ts +1 -0
- package/lib/{datetime-picker → date-picker}/style/index.js +0 -0
- package/lib/date-picker/style/less.d.ts +1 -0
- package/lib/{datetime-picker → date-picker}/style/less.js +0 -0
- package/lib/{datetime-picker → date-picker}/utils.d.ts +15 -11
- package/lib/{datetime-picker → date-picker}/utils.js +11 -34
- package/lib/dialog/index.css +1 -1
- package/lib/dialog/index.less +22 -24
- package/lib/divider/index.css +1 -1
- package/lib/divider/index.less +10 -12
- package/lib/dropdown-item/index.css +1 -1
- package/lib/dropdown-item/index.less +2 -5
- package/lib/dropdown-menu/index.css +1 -1
- package/lib/dropdown-menu/index.less +14 -17
- package/lib/empty/index.css +1 -1
- package/lib/empty/index.less +9 -11
- package/lib/field/Field.d.ts +4 -4
- package/lib/field/Field.js +4 -4
- package/lib/field/index.css +1 -1
- package/lib/field/index.d.ts +4 -4
- package/lib/field/index.less +20 -23
- package/lib/grid-item/index.css +1 -1
- package/lib/grid-item/index.less +10 -13
- package/lib/image/index.css +1 -1
- package/lib/image/index.less +10 -12
- package/lib/image-preview/index.css +1 -1
- package/lib/image-preview/index.less +11 -13
- package/lib/index-anchor/index.css +1 -1
- package/lib/index-anchor/index.less +12 -14
- package/lib/index-bar/index.css +1 -1
- package/lib/index-bar/index.less +7 -8
- package/lib/index.css +1 -1
- package/lib/index.d.ts +3 -2
- package/lib/index.js +7 -4
- package/lib/list/index.css +1 -1
- package/lib/list/index.less +5 -7
- package/lib/loading/index.css +1 -1
- package/lib/loading/index.less +7 -10
- package/lib/nav-bar/NavBar.d.ts +3 -3
- package/lib/nav-bar/NavBar.js +3 -3
- package/lib/nav-bar/index.css +1 -1
- package/lib/nav-bar/index.d.ts +3 -3
- package/lib/nav-bar/index.less +11 -13
- package/lib/notice-bar/index.css +1 -1
- package/lib/notice-bar/index.less +11 -13
- package/lib/notify/index.css +1 -1
- package/lib/notify/index.less +13 -15
- package/lib/number-keyboard/NumberKeyboard.d.ts +1 -1
- package/lib/number-keyboard/index.css +1 -1
- package/lib/number-keyboard/index.d.ts +1 -1
- package/lib/number-keyboard/index.less +26 -22
- package/lib/overlay/index.css +1 -1
- package/lib/overlay/index.less +4 -6
- package/lib/pagination/index.css +1 -1
- package/lib/pagination/index.less +13 -15
- package/lib/password-input/index.css +1 -1
- package/lib/password-input/index.less +20 -22
- package/lib/picker/Picker.d.ts +26 -28
- package/lib/picker/Picker.js +90 -195
- package/lib/picker/PickerColumn.d.ts +21 -30
- package/lib/picker/PickerColumn.js +60 -110
- package/lib/picker/index.css +1 -1
- package/lib/picker/index.d.ts +19 -20
- package/lib/picker/index.less +31 -19
- package/lib/picker/types.d.ts +13 -19
- package/lib/picker/utils.d.ts +10 -0
- package/lib/picker/utils.js +97 -0
- package/lib/popover/Popover.d.ts +1 -1
- package/lib/popover/index.css +1 -1
- package/lib/popover/index.d.ts +1 -1
- package/lib/popover/index.less +21 -23
- package/lib/popup/Popup.d.ts +3 -3
- package/lib/popup/Popup.js +3 -3
- package/lib/popup/index.css +1 -1
- package/lib/popup/index.d.ts +3 -3
- package/lib/popup/index.less +20 -22
- package/lib/progress/index.css +1 -1
- package/lib/progress/index.less +14 -18
- package/lib/pull-refresh/index.css +1 -1
- package/lib/pull-refresh/index.less +5 -7
- package/lib/radio/index.css +1 -1
- package/lib/radio/index.less +12 -14
- package/lib/rate/index.css +1 -1
- package/lib/rate/index.less +6 -8
- package/lib/search/Search.d.ts +4 -4
- package/lib/search/Search.js +7 -7
- package/lib/search/index.css +1 -1
- package/lib/search/index.d.ts +4 -4
- package/lib/search/index.less +16 -18
- package/lib/share-sheet/index.css +1 -1
- package/lib/share-sheet/index.less +17 -18
- package/lib/sidebar/index.css +1 -1
- package/lib/sidebar/index.less +2 -4
- package/lib/sidebar-item/index.css +1 -1
- package/lib/sidebar-item/index.less +17 -19
- package/lib/skeleton/index.css +1 -1
- package/lib/skeleton/index.less +14 -16
- package/lib/slider/Slider.d.ts +4 -4
- package/lib/slider/Slider.js +5 -6
- package/lib/slider/index.css +1 -1
- package/lib/slider/index.d.ts +4 -4
- package/lib/slider/index.less +20 -18
- package/lib/step/index.css +1 -1
- package/lib/step/index.less +15 -17
- package/lib/stepper/Stepper.d.ts +1 -1
- package/lib/stepper/index.css +1 -1
- package/lib/stepper/index.d.ts +1 -1
- package/lib/stepper/index.less +20 -24
- package/lib/steps/Steps.d.ts +2 -2
- package/lib/steps/Steps.js +2 -2
- package/lib/steps/index.css +1 -1
- package/lib/steps/index.d.ts +2 -2
- package/lib/steps/index.less +3 -5
- package/lib/sticky/index.css +1 -1
- package/lib/sticky/index.less +2 -4
- package/lib/style/animation.css +1 -1
- package/lib/style/animation.less +18 -22
- package/lib/style/base.css +1 -1
- package/lib/style/base.less +6 -7
- package/lib/style/css-variables.css +1 -1
- package/lib/style/css-variables.less +76 -61
- package/lib/style/mixins/hairline.less +0 -2
- package/lib/style/normalize.css +1 -1
- package/lib/style/normalize.less +1 -3
- package/lib/submit-bar/index.css +1 -1
- package/lib/submit-bar/index.less +26 -28
- package/lib/swipe/index.css +1 -1
- package/lib/swipe/index.less +11 -13
- package/lib/switch/index.css +1 -1
- package/lib/switch/index.less +24 -24
- package/lib/tabbar/index.css +1 -1
- package/lib/tabbar/index.less +5 -7
- package/lib/tabbar-item/index.css +1 -1
- package/lib/tabbar-item/index.less +9 -11
- package/lib/tabs/Tabs.d.ts +2 -4
- package/lib/tabs/Tabs.js +13 -26
- package/lib/tabs/index.css +1 -1
- package/lib/tabs/index.d.ts +2 -4
- package/lib/tabs/index.less +17 -20
- package/lib/tag/index.css +1 -1
- package/lib/tag/index.less +22 -25
- package/lib/time-picker/TimePicker.d.ts +214 -0
- package/lib/time-picker/TimePicker.js +95 -0
- package/{es/datetime-picker/TimePicker.d.ts → lib/time-picker/index.d.ts} +60 -20
- package/lib/{datetime-picker/types.js → time-picker/index.js} +17 -0
- package/lib/time-picker/style/index.d.ts +1 -0
- package/lib/time-picker/style/index.js +3 -0
- package/lib/time-picker/style/less.d.ts +1 -0
- package/lib/time-picker/style/less.js +3 -0
- package/lib/toast/index.css +1 -1
- package/lib/toast/index.less +19 -21
- package/lib/tree-select/TreeSelect.d.ts +3 -3
- package/lib/tree-select/TreeSelect.js +3 -3
- package/lib/tree-select/index.css +1 -1
- package/lib/tree-select/index.d.ts +3 -3
- package/lib/tree-select/index.less +12 -14
- package/lib/uploader/Uploader.d.ts +4 -4
- package/lib/uploader/Uploader.js +4 -4
- package/lib/uploader/index.css +1 -1
- package/lib/uploader/index.d.ts +4 -4
- package/lib/uploader/index.less +31 -33
- package/lib/utils/basic.d.ts +1 -0
- package/lib/utils/basic.js +2 -0
- package/lib/vant.cjs.js +1194 -1629
- package/lib/vant.cjs.min.js +1 -1
- package/lib/vant.es.js +1194 -1630
- package/lib/vant.es.min.js +1194 -1630
- package/lib/vant.js +1193 -1628
- package/lib/vant.min.js +1 -1
- package/package.json +4 -1
- package/vetur/attributes.json +242 -186
- package/vetur/tags.json +82 -72
- package/vetur/web-types.json +826 -651
- package/es/action-bar/var.css +0 -0
- package/es/action-bar/var.less +0 -4
- package/es/action-bar-button/var.css +0 -0
- package/es/action-bar-button/var.less +0 -5
- package/es/action-bar-icon/var.css +0 -0
- package/es/action-bar-icon/var.less +0 -10
- package/es/action-sheet/var.css +0 -0
- package/es/action-sheet/var.less +0 -23
- package/es/address-edit/var.css +0 -0
- package/es/address-edit/var.less +0 -6
- package/es/address-list/var.css +0 -0
- package/es/address-list/var.less +0 -16
- package/es/badge/var.css +0 -0
- package/es/badge/var.less +0 -12
- package/es/button/var.css +0 -0
- package/es/button/var.less +0 -36
- package/es/calendar/var.css +0 -0
- package/es/calendar/var.less +0 -27
- package/es/card/var.css +0 -0
- package/es/card/var.less +0 -18
- package/es/cascader/var.css +0 -0
- package/es/cascader/var.less +0 -15
- package/es/cell/var.css +0 -0
- package/es/cell/var.less +0 -21
- package/es/cell-group/var.css +0 -0
- package/es/cell-group/var.less +0 -12
- package/es/checkbox/var.css +0 -0
- package/es/checkbox/var.less +0 -11
- package/es/circle/var.css +0 -0
- package/es/circle/var.less +0 -9
- package/es/collapse-item/var.css +0 -0
- package/es/collapse-item/var.less +0 -9
- package/es/contact-card/var.css +0 -0
- package/es/contact-card/var.less +0 -6
- package/es/contact-edit/var.css +0 -0
- package/es/contact-edit/var.less +0 -8
- package/es/contact-list/var.css +0 -0
- package/es/contact-list/var.less +0 -6
- package/es/count-down/var.css +0 -0
- package/es/count-down/var.less +0 -5
- package/es/coupon/var.css +0 -0
- package/es/coupon/var.less +0 -19
- package/es/coupon-cell/var.css +0 -0
- package/es/coupon-cell/var.less +0 -3
- package/es/coupon-list/var.css +0 -0
- package/es/coupon-list/var.less +0 -10
- package/es/datetime-picker/DatePicker.js +0 -250
- package/es/datetime-picker/DatetimePicker.d.ts +0 -7
- package/es/datetime-picker/DatetimePicker.js +0 -40
- package/es/datetime-picker/TimePicker.js +0 -117
- package/es/datetime-picker/index.d.ts +0 -12
- package/es/datetime-picker/index.js +0 -8
- package/es/datetime-picker/types.d.ts +0 -9
- package/es/datetime-picker/types.js +0 -0
- package/es/datetime-picker/utils.js +0 -63
- package/es/dialog/var.css +0 -0
- package/es/dialog/var.less +0 -21
- package/es/divider/var.css +0 -0
- package/es/divider/var.less +0 -10
- package/es/dropdown-item/var.css +0 -0
- package/es/dropdown-item/var.less +0 -3
- package/es/dropdown-menu/var.css +0 -0
- package/es/dropdown-menu/var.less +0 -13
- package/es/empty/var.css +0 -0
- package/es/empty/var.less +0 -10
- package/es/field/var.css +0 -0
- package/es/field/var.less +0 -21
- package/es/grid-item/var.css +0 -0
- package/es/grid-item/var.less +0 -8
- package/es/image/var.css +0 -0
- package/es/image/var.less +0 -9
- package/es/image-preview/var.css +0 -0
- package/es/image-preview/var.less +0 -11
- package/es/index-anchor/var.css +0 -0
- package/es/index-anchor/var.less +0 -11
- package/es/index-bar/var.css +0 -0
- package/es/index-bar/var.less +0 -6
- package/es/list/var.css +0 -0
- package/es/list/var.less +0 -6
- package/es/loading/var.css +0 -0
- package/es/loading/var.less +0 -7
- package/es/nav-bar/var.css +0 -0
- package/es/nav-bar/var.less +0 -10
- package/es/notice-bar/var.css +0 -0
- package/es/notice-bar/var.less +0 -11
- package/es/notify/var.css +0 -0
- package/es/notify/var.less +0 -10
- package/es/number-keyboard/var.css +0 -0
- package/es/number-keyboard/var.less +0 -17
- package/es/overlay/var.css +0 -0
- package/es/overlay/var.less +0 -4
- package/es/pagination/var.css +0 -0
- package/es/pagination/var.less +0 -11
- package/es/password-input/var.css +0 -0
- package/es/password-input/var.less +0 -17
- package/es/picker/var.css +0 -0
- package/es/picker/var.less +0 -22
- package/es/popover/var.css +0 -0
- package/es/popover/var.less +0 -15
- package/es/popup/var.css +0 -0
- package/es/popup/var.less +0 -9
- package/es/progress/var.css +0 -0
- package/es/progress/var.less +0 -11
- package/es/pull-refresh/var.css +0 -0
- package/es/pull-refresh/var.less +0 -6
- package/es/radio/var.css +0 -0
- package/es/radio/var.less +0 -11
- package/es/rate/var.css +0 -0
- package/es/rate/var.less +0 -7
- package/es/search/var.css +0 -0
- package/es/search/var.less +0 -13
- package/es/share-sheet/var.css +0 -0
- package/es/share-sheet/var.less +0 -18
- package/es/sidebar/var.css +0 -0
- package/es/sidebar/var.less +0 -3
- package/es/sidebar-item/var.css +0 -0
- package/es/sidebar-item/var.less +0 -15
- package/es/skeleton/var.css +0 -0
- package/es/skeleton/var.less +0 -9
- package/es/slider/var.css +0 -0
- package/es/slider/var.less +0 -11
- package/es/step/var.css +0 -0
- package/es/step/var.less +0 -13
- package/es/stepper/var.css +0 -0
- package/es/stepper/var.less +0 -15
- package/es/steps/var.css +0 -0
- package/es/steps/var.less +0 -3
- package/es/sticky/var.css +0 -0
- package/es/sticky/var.less +0 -3
- package/es/style/var.css +0 -0
- package/es/style/var.less +0 -74
- package/es/submit-bar/var.css +0 -0
- package/es/submit-bar/var.less +0 -22
- package/es/swipe/var.css +0 -0
- package/es/swipe/var.less +0 -8
- package/es/switch/var.css +0 -0
- package/es/switch/var.less +0 -14
- package/es/tabbar/var.css +0 -0
- package/es/tabbar/var.less +0 -5
- package/es/tabbar-item/var.css +0 -0
- package/es/tabbar-item/var.less +0 -9
- package/es/tabs/var.css +0 -0
- package/es/tabs/var.less +0 -14
- package/es/tag/var.css +0 -0
- package/es/tag/var.less +0 -18
- package/es/toast/var.css +0 -0
- package/es/toast/var.less +0 -17
- package/es/tree-select/var.css +0 -0
- package/es/tree-select/var.less +0 -10
- package/es/uploader/var.css +0 -0
- package/es/uploader/var.less +0 -27
- package/lib/action-bar/var.css +0 -0
- package/lib/action-bar/var.less +0 -4
- package/lib/action-bar-button/var.css +0 -0
- package/lib/action-bar-button/var.less +0 -5
- package/lib/action-bar-icon/var.css +0 -0
- package/lib/action-bar-icon/var.less +0 -10
- package/lib/action-sheet/var.css +0 -0
- package/lib/action-sheet/var.less +0 -23
- package/lib/address-edit/var.css +0 -0
- package/lib/address-edit/var.less +0 -6
- package/lib/address-list/var.css +0 -0
- package/lib/address-list/var.less +0 -16
- package/lib/badge/var.css +0 -0
- package/lib/badge/var.less +0 -12
- package/lib/button/var.css +0 -0
- package/lib/button/var.less +0 -36
- package/lib/calendar/var.css +0 -0
- package/lib/calendar/var.less +0 -27
- package/lib/card/var.css +0 -0
- package/lib/card/var.less +0 -18
- package/lib/cascader/var.css +0 -0
- package/lib/cascader/var.less +0 -15
- package/lib/cell/var.css +0 -0
- package/lib/cell/var.less +0 -21
- package/lib/cell-group/var.css +0 -0
- package/lib/cell-group/var.less +0 -12
- package/lib/checkbox/var.css +0 -0
- package/lib/checkbox/var.less +0 -11
- package/lib/circle/var.css +0 -0
- package/lib/circle/var.less +0 -9
- package/lib/collapse-item/var.css +0 -0
- package/lib/collapse-item/var.less +0 -9
- package/lib/contact-card/var.css +0 -0
- package/lib/contact-card/var.less +0 -6
- package/lib/contact-edit/var.css +0 -0
- package/lib/contact-edit/var.less +0 -8
- package/lib/contact-list/var.css +0 -0
- package/lib/contact-list/var.less +0 -6
- package/lib/count-down/var.css +0 -0
- package/lib/count-down/var.less +0 -5
- package/lib/coupon/var.css +0 -0
- package/lib/coupon/var.less +0 -19
- package/lib/coupon-cell/var.css +0 -0
- package/lib/coupon-cell/var.less +0 -3
- package/lib/coupon-list/var.css +0 -0
- package/lib/coupon-list/var.less +0 -10
- package/lib/datetime-picker/DatePicker.js +0 -274
- package/lib/datetime-picker/DatetimePicker.d.ts +0 -7
- package/lib/datetime-picker/DatetimePicker.js +0 -69
- package/lib/datetime-picker/TimePicker.js +0 -141
- package/lib/datetime-picker/index.d.ts +0 -12
- package/lib/datetime-picker/types.d.ts +0 -9
- package/lib/dialog/var.css +0 -0
- package/lib/dialog/var.less +0 -21
- package/lib/divider/var.css +0 -0
- package/lib/divider/var.less +0 -10
- package/lib/dropdown-item/var.css +0 -0
- package/lib/dropdown-item/var.less +0 -3
- package/lib/dropdown-menu/var.css +0 -0
- package/lib/dropdown-menu/var.less +0 -13
- package/lib/empty/var.css +0 -0
- package/lib/empty/var.less +0 -10
- package/lib/field/var.css +0 -0
- package/lib/field/var.less +0 -21
- package/lib/grid-item/var.css +0 -0
- package/lib/grid-item/var.less +0 -8
- package/lib/image/var.css +0 -0
- package/lib/image/var.less +0 -9
- package/lib/image-preview/var.css +0 -0
- package/lib/image-preview/var.less +0 -11
- package/lib/index-anchor/var.css +0 -0
- package/lib/index-anchor/var.less +0 -11
- package/lib/index-bar/var.css +0 -0
- package/lib/index-bar/var.less +0 -6
- package/lib/list/var.css +0 -0
- package/lib/list/var.less +0 -6
- package/lib/loading/var.css +0 -0
- package/lib/loading/var.less +0 -7
- package/lib/nav-bar/var.css +0 -0
- package/lib/nav-bar/var.less +0 -10
- package/lib/notice-bar/var.css +0 -0
- package/lib/notice-bar/var.less +0 -11
- package/lib/notify/var.css +0 -0
- package/lib/notify/var.less +0 -10
- package/lib/number-keyboard/var.css +0 -0
- package/lib/number-keyboard/var.less +0 -17
- package/lib/overlay/var.css +0 -0
- package/lib/overlay/var.less +0 -4
- package/lib/pagination/var.css +0 -0
- package/lib/pagination/var.less +0 -11
- package/lib/password-input/var.css +0 -0
- package/lib/password-input/var.less +0 -17
- package/lib/picker/var.css +0 -0
- package/lib/picker/var.less +0 -22
- package/lib/popover/var.css +0 -0
- package/lib/popover/var.less +0 -15
- package/lib/popup/var.css +0 -0
- package/lib/popup/var.less +0 -9
- package/lib/progress/var.css +0 -0
- package/lib/progress/var.less +0 -11
- package/lib/pull-refresh/var.css +0 -0
- package/lib/pull-refresh/var.less +0 -6
- package/lib/radio/var.css +0 -0
- package/lib/radio/var.less +0 -11
- package/lib/rate/var.css +0 -0
- package/lib/rate/var.less +0 -7
- package/lib/search/var.css +0 -0
- package/lib/search/var.less +0 -13
- package/lib/share-sheet/var.css +0 -0
- package/lib/share-sheet/var.less +0 -18
- package/lib/sidebar/var.css +0 -0
- package/lib/sidebar/var.less +0 -3
- package/lib/sidebar-item/var.css +0 -0
- package/lib/sidebar-item/var.less +0 -15
- package/lib/skeleton/var.css +0 -0
- package/lib/skeleton/var.less +0 -9
- package/lib/slider/var.css +0 -0
- package/lib/slider/var.less +0 -11
- package/lib/step/var.css +0 -0
- package/lib/step/var.less +0 -13
- package/lib/stepper/var.css +0 -0
- package/lib/stepper/var.less +0 -15
- package/lib/steps/var.css +0 -0
- package/lib/steps/var.less +0 -3
- package/lib/sticky/var.css +0 -0
- package/lib/sticky/var.less +0 -3
- package/lib/style/var.css +0 -0
- package/lib/style/var.less +0 -74
- package/lib/submit-bar/var.css +0 -0
- package/lib/submit-bar/var.less +0 -22
- package/lib/swipe/var.css +0 -0
- package/lib/swipe/var.less +0 -8
- package/lib/switch/var.css +0 -0
- package/lib/switch/var.less +0 -14
- package/lib/tabbar/var.css +0 -0
- package/lib/tabbar/var.less +0 -5
- package/lib/tabbar-item/var.css +0 -0
- package/lib/tabbar-item/var.less +0 -9
- package/lib/tabs/var.css +0 -0
- package/lib/tabs/var.less +0 -14
- package/lib/tag/var.css +0 -0
- package/lib/tag/var.less +0 -18
- package/lib/toast/var.css +0 -0
- package/lib/toast/var.less +0 -17
- package/lib/tree-select/var.css +0 -0
- package/lib/tree-select/var.less +0 -10
- package/lib/uploader/var.css +0 -0
- package/lib/uploader/var.less +0 -27
@@ -1,21 +1,19 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
:
|
4
|
-
--van-password-input-
|
5
|
-
--van-password-input-
|
6
|
-
--van-password-input-
|
7
|
-
--van-password-input-
|
8
|
-
--van-password-input-
|
9
|
-
--van-password-input-info-color:
|
10
|
-
--van-password-input-
|
11
|
-
--van-password-input-
|
12
|
-
--van-password-input-
|
13
|
-
--van-password-input-
|
14
|
-
--van-password-input-
|
15
|
-
--van-password-input-cursor-
|
16
|
-
--van-password-input-cursor-
|
17
|
-
--van-password-input-cursor-height: @password-input-cursor-height;
|
18
|
-
--van-password-input-cursor-animation-duration: @password-input-cursor-animation-duration;
|
1
|
+
body {
|
2
|
+
--van-password-input-height: 50px;
|
3
|
+
--van-password-input-margin: 0 var(--van-padding-md);
|
4
|
+
--van-password-input-font-size: 20px;
|
5
|
+
--van-password-input-radius: 6px;
|
6
|
+
--van-password-input-background: var(--van-background-2);
|
7
|
+
--van-password-input-info-color: var(--van-text-color-2);
|
8
|
+
--van-password-input-info-font-size: var(--van-font-size-md);
|
9
|
+
--van-password-input-error-info-color: var(--van-danger-color);
|
10
|
+
--van-password-input-dot-size: 10px;
|
11
|
+
--van-password-input-dot-color: var(--van-text-color);
|
12
|
+
--van-password-input-text-color: var(--van-text-color);
|
13
|
+
--van-password-input-cursor-color: var(--van-text-color);
|
14
|
+
--van-password-input-cursor-width: 1px;
|
15
|
+
--van-password-input-cursor-height: 40%;
|
16
|
+
--van-password-input-cursor-duration: 1s;
|
19
17
|
}
|
20
18
|
|
21
19
|
.van-password-input {
|
@@ -45,7 +43,7 @@
|
|
45
43
|
cursor: pointer;
|
46
44
|
|
47
45
|
&::after {
|
48
|
-
border-radius: var(--van-password-input-
|
46
|
+
border-radius: var(--van-password-input-radius);
|
49
47
|
}
|
50
48
|
|
51
49
|
li {
|
@@ -58,7 +56,7 @@
|
|
58
56
|
color: var(--van-password-input-text-color);
|
59
57
|
font-size: var(--van-password-input-font-size);
|
60
58
|
line-height: 1.2;
|
61
|
-
background: var(--van-password-input-background
|
59
|
+
background: var(--van-password-input-background);
|
62
60
|
}
|
63
61
|
|
64
62
|
i {
|
@@ -82,8 +80,8 @@
|
|
82
80
|
height: var(--van-password-input-cursor-height);
|
83
81
|
background: var(--van-password-input-cursor-color);
|
84
82
|
transform: translate(-50%, -50%);
|
85
|
-
animation: var(--van-password-input-cursor-
|
86
|
-
|
83
|
+
animation: var(--van-password-input-cursor-duration) van-cursor-flicker
|
84
|
+
infinite;
|
87
85
|
}
|
88
86
|
}
|
89
87
|
|
package/lib/picker/Picker.d.ts
CHANGED
@@ -5,7 +5,7 @@ export declare const pickerSharedProps: {
|
|
5
5
|
loading: BooleanConstructor;
|
6
6
|
readonly: BooleanConstructor;
|
7
7
|
allowHtml: BooleanConstructor;
|
8
|
-
|
8
|
+
optionHeight: {
|
9
9
|
type: (NumberConstructor | StringConstructor)[];
|
10
10
|
default: number;
|
11
11
|
};
|
@@ -17,7 +17,7 @@ export declare const pickerSharedProps: {
|
|
17
17
|
type: (NumberConstructor | StringConstructor)[];
|
18
18
|
default: number;
|
19
19
|
};
|
20
|
-
|
20
|
+
visibleOptionNum: {
|
21
21
|
type: (NumberConstructor | StringConstructor)[];
|
22
22
|
default: number;
|
23
23
|
};
|
@@ -29,7 +29,7 @@ declare const pickerProps: {
|
|
29
29
|
loading: BooleanConstructor;
|
30
30
|
readonly: BooleanConstructor;
|
31
31
|
allowHtml: BooleanConstructor;
|
32
|
-
|
32
|
+
optionHeight: {
|
33
33
|
type: (NumberConstructor | StringConstructor)[];
|
34
34
|
default: number;
|
35
35
|
};
|
@@ -41,7 +41,7 @@ declare const pickerProps: {
|
|
41
41
|
type: (NumberConstructor | StringConstructor)[];
|
42
42
|
default: number;
|
43
43
|
};
|
44
|
-
|
44
|
+
visibleOptionNum: {
|
45
45
|
type: (NumberConstructor | StringConstructor)[];
|
46
46
|
default: number;
|
47
47
|
};
|
@@ -49,13 +49,12 @@ declare const pickerProps: {
|
|
49
49
|
confirmButtonText: StringConstructor;
|
50
50
|
} & {
|
51
51
|
columns: {
|
52
|
-
type: PropType<(
|
52
|
+
type: PropType<(PickerColumn | PickerOption)[]>;
|
53
53
|
default: () => never[];
|
54
54
|
};
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
default: number;
|
55
|
+
modelValue: {
|
56
|
+
type: PropType<(string | number)[]>;
|
57
|
+
default: () => never[];
|
59
58
|
};
|
60
59
|
toolbarPosition: {
|
61
60
|
type: PropType<PickerToolbarPosition>;
|
@@ -69,7 +68,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
69
68
|
loading: BooleanConstructor;
|
70
69
|
readonly: BooleanConstructor;
|
71
70
|
allowHtml: BooleanConstructor;
|
72
|
-
|
71
|
+
optionHeight: {
|
73
72
|
type: (NumberConstructor | StringConstructor)[];
|
74
73
|
default: number;
|
75
74
|
};
|
@@ -81,7 +80,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
81
80
|
type: (NumberConstructor | StringConstructor)[];
|
82
81
|
default: number;
|
83
82
|
};
|
84
|
-
|
83
|
+
visibleOptionNum: {
|
85
84
|
type: (NumberConstructor | StringConstructor)[];
|
86
85
|
default: number;
|
87
86
|
};
|
@@ -89,25 +88,24 @@ declare const _default: import("vue").DefineComponent<{
|
|
89
88
|
confirmButtonText: StringConstructor;
|
90
89
|
} & {
|
91
90
|
columns: {
|
92
|
-
type: PropType<(
|
91
|
+
type: PropType<(PickerColumn | PickerOption)[]>;
|
93
92
|
default: () => never[];
|
94
93
|
};
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
default: number;
|
94
|
+
modelValue: {
|
95
|
+
type: PropType<(string | number)[]>;
|
96
|
+
default: () => never[];
|
99
97
|
};
|
100
98
|
toolbarPosition: {
|
101
99
|
type: PropType<PickerToolbarPosition>;
|
102
100
|
default: PickerToolbarPosition;
|
103
101
|
};
|
104
102
|
columnsFieldNames: PropType<PickerFieldNames>;
|
105
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "cancel" | "confirm")[], "change" | "cancel" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
103
|
+
}, () => 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<{
|
106
104
|
title: StringConstructor;
|
107
105
|
loading: BooleanConstructor;
|
108
106
|
readonly: BooleanConstructor;
|
109
107
|
allowHtml: BooleanConstructor;
|
110
|
-
|
108
|
+
optionHeight: {
|
111
109
|
type: (NumberConstructor | StringConstructor)[];
|
112
110
|
default: number;
|
113
111
|
};
|
@@ -119,7 +117,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
119
117
|
type: (NumberConstructor | StringConstructor)[];
|
120
118
|
default: number;
|
121
119
|
};
|
122
|
-
|
120
|
+
visibleOptionNum: {
|
123
121
|
type: (NumberConstructor | StringConstructor)[];
|
124
122
|
default: number;
|
125
123
|
};
|
@@ -127,13 +125,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
127
125
|
confirmButtonText: StringConstructor;
|
128
126
|
} & {
|
129
127
|
columns: {
|
130
|
-
type: PropType<(
|
128
|
+
type: PropType<(PickerColumn | PickerOption)[]>;
|
131
129
|
default: () => never[];
|
132
130
|
};
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
default: number;
|
131
|
+
modelValue: {
|
132
|
+
type: PropType<(string | number)[]>;
|
133
|
+
default: () => never[];
|
137
134
|
};
|
138
135
|
toolbarPosition: {
|
139
136
|
type: PropType<PickerToolbarPosition>;
|
@@ -142,18 +139,19 @@ declare const _default: import("vue").DefineComponent<{
|
|
142
139
|
columnsFieldNames: PropType<PickerFieldNames>;
|
143
140
|
}>> & {
|
144
141
|
onChange?: ((...args: any[]) => any) | undefined;
|
142
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
145
143
|
onCancel?: ((...args: any[]) => any) | undefined;
|
146
144
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
147
145
|
}, {
|
146
|
+
modelValue: (string | number)[];
|
148
147
|
readonly: boolean;
|
149
148
|
loading: boolean;
|
150
|
-
defaultIndex: string | number;
|
151
149
|
allowHtml: boolean;
|
152
|
-
|
150
|
+
optionHeight: string | number;
|
153
151
|
showToolbar: boolean;
|
154
152
|
swipeDuration: string | number;
|
155
|
-
|
156
|
-
columns: (
|
153
|
+
visibleOptionNum: string | number;
|
154
|
+
columns: (PickerColumn | PickerOption)[];
|
157
155
|
toolbarPosition: PickerToolbarPosition;
|
158
156
|
}>;
|
159
157
|
export default _default;
|
package/lib/picker/Picker.js
CHANGED
@@ -33,6 +33,7 @@ __export(stdin_exports, {
|
|
33
33
|
var import_vue = require("vue");
|
34
34
|
var import_vue2 = require("vue");
|
35
35
|
var import_utils = require("../utils");
|
36
|
+
var import_utils2 = require("./utils");
|
36
37
|
var import_use = require("@vant/use");
|
37
38
|
var import_use_expose = require("../composables/use-expose");
|
38
39
|
var import_loading = require("../loading");
|
@@ -43,198 +44,85 @@ const pickerSharedProps = {
|
|
43
44
|
loading: Boolean,
|
44
45
|
readonly: Boolean,
|
45
46
|
allowHtml: Boolean,
|
46
|
-
|
47
|
+
optionHeight: (0, import_utils.makeNumericProp)(44),
|
47
48
|
showToolbar: import_utils.truthProp,
|
48
49
|
swipeDuration: (0, import_utils.makeNumericProp)(1e3),
|
49
|
-
|
50
|
+
visibleOptionNum: (0, import_utils.makeNumericProp)(6),
|
50
51
|
cancelButtonText: String,
|
51
52
|
confirmButtonText: String
|
52
53
|
};
|
53
54
|
const pickerProps = (0, import_utils.extend)({}, pickerSharedProps, {
|
54
55
|
columns: (0, import_utils.makeArrayProp)(),
|
55
|
-
|
56
|
-
defaultIndex: (0, import_utils.makeNumericProp)(0),
|
56
|
+
modelValue: (0, import_utils.makeArrayProp)(),
|
57
57
|
toolbarPosition: (0, import_utils.makeStringProp)("top"),
|
58
58
|
columnsFieldNames: Object
|
59
59
|
});
|
60
60
|
var stdin_default = (0, import_vue2.defineComponent)({
|
61
61
|
name,
|
62
62
|
props: pickerProps,
|
63
|
-
emits: ["confirm", "cancel", "change"],
|
63
|
+
emits: ["confirm", "cancel", "change", "update:modelValue"],
|
64
64
|
setup(props, {
|
65
65
|
emit,
|
66
66
|
slots
|
67
67
|
}) {
|
68
|
-
|
69
|
-
if (slots.default) {
|
70
|
-
console.warn('[Vant] Picker: "default" slot is deprecated, please use "toolbar" slot instead.');
|
71
|
-
}
|
72
|
-
if (props.valueKey) {
|
73
|
-
console.warn('[Vant] Picker: "valueKey" prop is deprecated, please use "columnsFieldNames" prop instead.');
|
74
|
-
}
|
75
|
-
}
|
76
|
-
const hasOptions = (0, import_vue2.ref)(false);
|
77
|
-
const formattedColumns = (0, import_vue2.ref)([]);
|
78
|
-
const {
|
79
|
-
text: textKey,
|
80
|
-
values: valuesKey,
|
81
|
-
children: childrenKey
|
82
|
-
} = (0, import_utils.extend)({
|
83
|
-
text: props.valueKey || "text",
|
84
|
-
values: "values",
|
85
|
-
children: "children"
|
86
|
-
}, props.columnsFieldNames);
|
68
|
+
const selectedValues = (0, import_vue2.ref)(props.modelValue);
|
87
69
|
const {
|
88
70
|
children,
|
89
71
|
linkChildren
|
90
72
|
} = (0, import_use.useChildren)(import_PickerColumn.PICKER_KEY);
|
91
73
|
linkChildren();
|
92
|
-
const
|
93
|
-
const
|
94
|
-
|
95
|
-
|
96
|
-
if (childrenKey in firstColumn) {
|
97
|
-
return "cascade";
|
98
|
-
}
|
99
|
-
if (valuesKey in firstColumn) {
|
100
|
-
return "object";
|
101
|
-
}
|
102
|
-
}
|
103
|
-
return "plain";
|
104
|
-
});
|
105
|
-
const formatCascade = () => {
|
106
|
-
var _a;
|
107
|
-
const formatted = [];
|
108
|
-
let cursor = {
|
109
|
-
[childrenKey]: props.columns
|
110
|
-
};
|
111
|
-
while (cursor && cursor[childrenKey]) {
|
112
|
-
const children2 = cursor[childrenKey];
|
113
|
-
let defaultIndex = (_a = cursor.defaultIndex) != null ? _a : +props.defaultIndex;
|
114
|
-
while (children2[defaultIndex] && children2[defaultIndex].disabled) {
|
115
|
-
if (defaultIndex < children2.length - 1) {
|
116
|
-
defaultIndex++;
|
117
|
-
} else {
|
118
|
-
defaultIndex = 0;
|
119
|
-
break;
|
120
|
-
}
|
121
|
-
}
|
122
|
-
formatted.push({
|
123
|
-
[valuesKey]: cursor[childrenKey],
|
124
|
-
className: cursor.className,
|
125
|
-
defaultIndex
|
126
|
-
});
|
127
|
-
cursor = children2[defaultIndex];
|
128
|
-
}
|
129
|
-
formattedColumns.value = formatted;
|
130
|
-
};
|
131
|
-
const format = () => {
|
74
|
+
const fields = (0, import_vue2.computed)(() => (0, import_utils2.assignDefaultFields)(props.columnsFieldNames));
|
75
|
+
const optionHeight = (0, import_vue2.computed)(() => (0, import_utils.unitToPx)(props.optionHeight));
|
76
|
+
const columnsType = (0, import_vue2.computed)(() => (0, import_utils2.getColumnsType)(props.columns, fields.value));
|
77
|
+
const currentColumns = (0, import_vue2.computed)(() => {
|
132
78
|
const {
|
133
79
|
columns
|
134
80
|
} = props;
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
formattedColumns.value = columns;
|
143
|
-
}
|
144
|
-
hasOptions.value = formattedColumns.value.some((item) => item[valuesKey] && item[valuesKey].length !== 0);
|
145
|
-
};
|
146
|
-
const getIndexes = () => children.map((child) => child.state.index);
|
147
|
-
const setColumnValues = (index, options) => {
|
148
|
-
const column = children[index];
|
149
|
-
if (column) {
|
150
|
-
column.setOptions(options);
|
151
|
-
hasOptions.value = true;
|
152
|
-
}
|
153
|
-
};
|
154
|
-
const onCascadeChange = (columnIndex) => {
|
155
|
-
let cursor = {
|
156
|
-
[childrenKey]: props.columns
|
157
|
-
};
|
158
|
-
const indexes = getIndexes();
|
159
|
-
for (let i = 0; i <= columnIndex; i++) {
|
160
|
-
cursor = cursor[childrenKey][indexes[i]];
|
161
|
-
}
|
162
|
-
while (cursor && cursor[childrenKey]) {
|
163
|
-
columnIndex++;
|
164
|
-
setColumnValues(columnIndex, cursor[childrenKey]);
|
165
|
-
cursor = cursor[childrenKey][cursor.defaultIndex || 0];
|
166
|
-
}
|
167
|
-
};
|
168
|
-
const getChild = (index) => children[index];
|
169
|
-
const getColumnValue = (index) => {
|
170
|
-
const column = getChild(index);
|
171
|
-
if (column) {
|
172
|
-
return column.getValue();
|
173
|
-
}
|
174
|
-
};
|
175
|
-
const setColumnValue = (index, value) => {
|
176
|
-
const column = getChild(index);
|
177
|
-
if (column) {
|
178
|
-
column.setValue(value);
|
179
|
-
if (dataType.value === "cascade") {
|
180
|
-
onCascadeChange(index);
|
181
|
-
}
|
182
|
-
}
|
183
|
-
};
|
184
|
-
const getColumnIndex = (index) => {
|
185
|
-
const column = getChild(index);
|
186
|
-
if (column) {
|
187
|
-
return column.state.index;
|
188
|
-
}
|
189
|
-
};
|
190
|
-
const setColumnIndex = (columnIndex, optionIndex) => {
|
191
|
-
const column = getChild(columnIndex);
|
192
|
-
if (column) {
|
193
|
-
column.setIndex(optionIndex);
|
194
|
-
if (dataType.value === "cascade") {
|
195
|
-
onCascadeChange(columnIndex);
|
196
|
-
}
|
81
|
+
switch (columnsType.value) {
|
82
|
+
case "multiple":
|
83
|
+
return columns;
|
84
|
+
case "cascade":
|
85
|
+
return (0, import_utils2.formatCascadeColumns)(columns, fields.value, selectedValues);
|
86
|
+
default:
|
87
|
+
return [columns];
|
197
88
|
}
|
198
|
-
};
|
199
|
-
const
|
200
|
-
|
201
|
-
|
202
|
-
|
89
|
+
});
|
90
|
+
const hasOptions = (0, import_vue2.computed)(() => currentColumns.value.some((options) => options.length));
|
91
|
+
const selectedOptions = (0, import_vue2.computed)(() => currentColumns.value.map((options, index) => (0, import_utils2.findOptionByValue)(options, selectedValues.value[index], fields.value)));
|
92
|
+
const setValue = (index, value) => {
|
93
|
+
if (selectedValues.value[index] !== value) {
|
94
|
+
const newValues = selectedValues.value.slice(0);
|
95
|
+
newValues[index] = value;
|
96
|
+
selectedValues.value = newValues;
|
97
|
+
}
|
98
|
+
};
|
99
|
+
const onChange = (value, columnIndex) => {
|
100
|
+
setValue(columnIndex, value);
|
101
|
+
if (columnsType.value === "cascade") {
|
102
|
+
selectedValues.value.forEach((value2, index) => {
|
103
|
+
const options = currentColumns.value[index];
|
104
|
+
if (!(0, import_utils2.isOptionExist)(options, value2, fields.value)) {
|
105
|
+
setValue(index, options.length ? options[0][fields.value.value] : void 0);
|
106
|
+
}
|
107
|
+
});
|
203
108
|
}
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
setColumnValue(index, value);
|
109
|
+
emit("change", {
|
110
|
+
columnIndex,
|
111
|
+
selectedValues: selectedValues.value,
|
112
|
+
selectedOptions: selectedOptions.value
|
209
113
|
});
|
210
114
|
};
|
211
|
-
const setIndexes = (indexes) => {
|
212
|
-
indexes.forEach((optionIndex, columnIndex) => {
|
213
|
-
setColumnIndex(columnIndex, optionIndex);
|
214
|
-
});
|
215
|
-
};
|
216
|
-
const emitAction = (event) => {
|
217
|
-
if (dataType.value === "plain") {
|
218
|
-
emit(event, getColumnValue(0), getColumnIndex(0));
|
219
|
-
} else {
|
220
|
-
emit(event, getValues(), getIndexes());
|
221
|
-
}
|
222
|
-
};
|
223
|
-
const onChange = (columnIndex) => {
|
224
|
-
if (dataType.value === "cascade") {
|
225
|
-
onCascadeChange(columnIndex);
|
226
|
-
}
|
227
|
-
if (dataType.value === "plain") {
|
228
|
-
emit("change", getColumnValue(0), getColumnIndex(0));
|
229
|
-
} else {
|
230
|
-
emit("change", getValues(), columnIndex);
|
231
|
-
}
|
232
|
-
};
|
233
115
|
const confirm = () => {
|
234
116
|
children.forEach((child) => child.stopMomentum());
|
235
|
-
|
117
|
+
emit("confirm", {
|
118
|
+
selectedValues: selectedValues.value,
|
119
|
+
selectedOptions: selectedOptions.value
|
120
|
+
});
|
236
121
|
};
|
237
|
-
const cancel = () =>
|
122
|
+
const cancel = () => emit("cancel", {
|
123
|
+
selectedValues: selectedValues.value,
|
124
|
+
selectedOptions: selectedOptions.value
|
125
|
+
});
|
238
126
|
const renderTitle = () => {
|
239
127
|
if (slots.title) {
|
240
128
|
return slots.title();
|
@@ -263,36 +151,31 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
263
151
|
};
|
264
152
|
const renderToolbar = () => {
|
265
153
|
if (props.showToolbar) {
|
266
|
-
const slot = slots.toolbar || slots.default;
|
267
154
|
return (0, import_vue.createVNode)("div", {
|
268
155
|
"class": bem("toolbar")
|
269
|
-
}, [
|
270
|
-
}
|
271
|
-
};
|
272
|
-
const renderColumnItems = () =>
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
}, {
|
286
|
-
option: slots.option
|
287
|
-
});
|
288
|
-
});
|
156
|
+
}, [slots.toolbar ? slots.toolbar() : [renderCancel(), renderTitle(), renderConfirm()]]);
|
157
|
+
}
|
158
|
+
};
|
159
|
+
const renderColumnItems = () => currentColumns.value.map((options, columnIndex) => (0, import_vue.createVNode)(import_PickerColumn.default, {
|
160
|
+
"value": selectedValues.value[columnIndex],
|
161
|
+
"fields": fields.value,
|
162
|
+
"options": options,
|
163
|
+
"readonly": props.readonly,
|
164
|
+
"allowHtml": props.allowHtml,
|
165
|
+
"optionHeight": optionHeight.value,
|
166
|
+
"swipeDuration": props.swipeDuration,
|
167
|
+
"visibleOptionNum": props.visibleOptionNum,
|
168
|
+
"onChange": (value) => onChange(value, columnIndex)
|
169
|
+
}, {
|
170
|
+
option: slots.option
|
171
|
+
}));
|
289
172
|
const renderMask = (wrapHeight) => {
|
290
173
|
if (hasOptions.value) {
|
291
174
|
const frameStyle = {
|
292
|
-
height: `${
|
175
|
+
height: `${optionHeight.value}px`
|
293
176
|
};
|
294
177
|
const maskStyle = {
|
295
|
-
backgroundSize: `100% ${(wrapHeight -
|
178
|
+
backgroundSize: `100% ${(wrapHeight - optionHeight.value) / 2}px`
|
296
179
|
};
|
297
180
|
return [(0, import_vue.createVNode)("div", {
|
298
181
|
"class": bem("mask"),
|
@@ -304,7 +187,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
304
187
|
}
|
305
188
|
};
|
306
189
|
const renderColumns = () => {
|
307
|
-
const wrapHeight =
|
190
|
+
const wrapHeight = optionHeight.value * +props.visibleOptionNum;
|
308
191
|
const columnsStyle = {
|
309
192
|
height: `${wrapHeight}px`
|
310
193
|
};
|
@@ -314,21 +197,33 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
314
197
|
"onTouchmove": import_utils.preventDefault
|
315
198
|
}, [renderColumnItems(), renderMask(wrapHeight)]);
|
316
199
|
};
|
317
|
-
(0, import_vue2.watch)(() =>
|
200
|
+
(0, import_vue2.watch)(currentColumns, (columns) => {
|
201
|
+
columns.forEach((options, index) => {
|
202
|
+
if (options.length && !(0, import_utils2.isOptionExist)(options, selectedValues.value[index], fields.value)) {
|
203
|
+
setValue(index, (0, import_utils2.getFirstEnabledOption)(options)[fields.value.value]);
|
204
|
+
}
|
205
|
+
});
|
206
|
+
}, {
|
207
|
+
immediate: true
|
208
|
+
});
|
209
|
+
(0, import_vue2.watch)(() => props.modelValue, (newValues) => {
|
210
|
+
if (!(0, import_utils.isSameValue)(newValues, selectedValues.value)) {
|
211
|
+
selectedValues.value = newValues;
|
212
|
+
}
|
213
|
+
}, {
|
214
|
+
deep: true
|
215
|
+
});
|
216
|
+
(0, import_vue2.watch)(selectedValues, (newValues) => {
|
217
|
+
if (!(0, import_utils.isSameValue)(newValues, props.modelValue)) {
|
218
|
+
emit("update:modelValue", newValues);
|
219
|
+
}
|
220
|
+
}, {
|
318
221
|
immediate: true
|
319
222
|
});
|
223
|
+
const getSelectedOptions = () => selectedOptions.value;
|
320
224
|
(0, import_use_expose.useExpose)({
|
321
225
|
confirm,
|
322
|
-
|
323
|
-
setValues,
|
324
|
-
getIndexes,
|
325
|
-
setIndexes,
|
326
|
-
getColumnIndex,
|
327
|
-
setColumnIndex,
|
328
|
-
getColumnValue,
|
329
|
-
setColumnValue,
|
330
|
-
getColumnValues,
|
331
|
-
setColumnValues
|
226
|
+
getSelectedOptions
|
332
227
|
});
|
333
228
|
return () => {
|
334
229
|
var _a, _b;
|
@@ -1,59 +1,51 @@
|
|
1
|
-
import { type InjectionKey } from 'vue';
|
2
|
-
import type { PickerOption, PickerColumnProvide } from './types';
|
1
|
+
import { type PropType, type InjectionKey } from 'vue';
|
2
|
+
import type { PickerOption, PickerFieldNames, PickerColumnProvide } from './types';
|
3
3
|
export declare const PICKER_KEY: InjectionKey<PickerColumnProvide>;
|
4
4
|
declare const _default: import("vue").DefineComponent<{
|
5
|
-
|
6
|
-
|
5
|
+
value: (NumberConstructor | StringConstructor)[];
|
6
|
+
fields: {
|
7
|
+
type: PropType<Required<PickerFieldNames>>;
|
7
8
|
required: true;
|
8
9
|
};
|
10
|
+
options: {
|
11
|
+
type: PropType<PickerOption[]>;
|
12
|
+
default: () => never[];
|
13
|
+
};
|
9
14
|
readonly: BooleanConstructor;
|
10
15
|
allowHtml: BooleanConstructor;
|
11
|
-
|
12
|
-
itemHeight: {
|
16
|
+
optionHeight: {
|
13
17
|
type: NumberConstructor;
|
14
18
|
required: true;
|
15
19
|
};
|
16
|
-
defaultIndex: {
|
17
|
-
type: NumberConstructor;
|
18
|
-
default: number;
|
19
|
-
};
|
20
20
|
swipeDuration: {
|
21
21
|
type: (NumberConstructor | StringConstructor)[];
|
22
22
|
required: true;
|
23
23
|
};
|
24
|
-
|
25
|
-
type: import("vue").PropType<PickerOption[]>;
|
26
|
-
default: () => never[];
|
27
|
-
};
|
28
|
-
visibleItemCount: {
|
24
|
+
visibleOptionNum: {
|
29
25
|
type: (NumberConstructor | StringConstructor)[];
|
30
26
|
required: true;
|
31
27
|
};
|
32
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<{
|
33
|
-
|
34
|
-
|
29
|
+
value: (NumberConstructor | StringConstructor)[];
|
30
|
+
fields: {
|
31
|
+
type: PropType<Required<PickerFieldNames>>;
|
35
32
|
required: true;
|
36
33
|
};
|
34
|
+
options: {
|
35
|
+
type: PropType<PickerOption[]>;
|
36
|
+
default: () => never[];
|
37
|
+
};
|
37
38
|
readonly: BooleanConstructor;
|
38
39
|
allowHtml: BooleanConstructor;
|
39
|
-
|
40
|
-
itemHeight: {
|
40
|
+
optionHeight: {
|
41
41
|
type: NumberConstructor;
|
42
42
|
required: true;
|
43
43
|
};
|
44
|
-
defaultIndex: {
|
45
|
-
type: NumberConstructor;
|
46
|
-
default: number;
|
47
|
-
};
|
48
44
|
swipeDuration: {
|
49
45
|
type: (NumberConstructor | StringConstructor)[];
|
50
46
|
required: true;
|
51
47
|
};
|
52
|
-
|
53
|
-
type: import("vue").PropType<PickerOption[]>;
|
54
|
-
default: () => never[];
|
55
|
-
};
|
56
|
-
visibleItemCount: {
|
48
|
+
visibleOptionNum: {
|
57
49
|
type: (NumberConstructor | StringConstructor)[];
|
58
50
|
required: true;
|
59
51
|
};
|
@@ -61,8 +53,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
61
53
|
onChange?: ((...args: any[]) => any) | undefined;
|
62
54
|
}, {
|
63
55
|
readonly: boolean;
|
64
|
-
defaultIndex: number;
|
65
56
|
allowHtml: boolean;
|
66
|
-
|
57
|
+
options: PickerOption[];
|
67
58
|
}>;
|
68
59
|
export default _default;
|