vant 3.4.8 → 4.0.0-alpha.2
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/changelog.generated.md +154 -39
- 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 -23
- package/es/address-edit/AddressEdit.js +32 -57
- 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 -18
- package/es/address-edit/index.less +8 -15
- package/es/address-edit/types.d.ts +2 -5
- 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 +42 -38
- 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 +11 -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 +14 -16
- 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 +24 -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/locale/lang/bn-BD.d.ts +0 -2
- package/es/locale/lang/bn-BD.js +0 -2
- package/es/locale/lang/de-DE-formal.d.ts +0 -2
- package/es/locale/lang/de-DE-formal.js +0 -2
- package/es/locale/lang/de-DE.d.ts +0 -2
- package/es/locale/lang/de-DE.js +0 -2
- package/es/locale/lang/en-US.d.ts +0 -2
- package/es/locale/lang/en-US.js +0 -2
- package/es/locale/lang/es-ES.d.ts +0 -2
- package/es/locale/lang/es-ES.js +0 -2
- package/es/locale/lang/fr-FR.d.ts +0 -2
- package/es/locale/lang/fr-FR.js +0 -2
- package/es/locale/lang/hi-IN.d.ts +0 -2
- package/es/locale/lang/hi-IN.js +0 -2
- package/es/locale/lang/id-ID.d.ts +0 -2
- package/es/locale/lang/id-ID.js +0 -2
- package/es/locale/lang/is-IS.d.ts +0 -2
- package/es/locale/lang/is-IS.js +0 -2
- package/es/locale/lang/it-IT.d.ts +0 -2
- package/es/locale/lang/it-IT.js +0 -2
- package/es/locale/lang/ja-JP.d.ts +0 -2
- package/es/locale/lang/ja-JP.js +0 -2
- package/es/locale/lang/ko-KR.d.ts +0 -2
- package/es/locale/lang/ko-KR.js +0 -2
- package/es/locale/lang/la-LA.d.ts +0 -2
- package/es/locale/lang/la-LA.js +0 -2
- package/es/locale/lang/nb-NO.d.ts +0 -2
- package/es/locale/lang/nb-NO.js +0 -2
- package/es/locale/lang/pt-BR.d.ts +0 -2
- package/es/locale/lang/pt-BR.js +0 -2
- package/es/locale/lang/ro-RO.d.ts +0 -2
- package/es/locale/lang/ro-RO.js +0 -2
- package/es/locale/lang/ru-RU.d.ts +0 -2
- package/es/locale/lang/ru-RU.js +0 -2
- package/es/locale/lang/sv-SE.d.ts +0 -2
- package/es/locale/lang/sv-SE.js +0 -2
- package/es/locale/lang/th-TH.d.ts +0 -2
- package/es/locale/lang/th-TH.js +0 -2
- package/es/locale/lang/tr-TR.d.ts +0 -2
- package/es/locale/lang/tr-TR.js +0 -2
- package/es/locale/lang/uk-UA.d.ts +0 -2
- package/es/locale/lang/uk-UA.js +0 -2
- package/es/locale/lang/vi-VN.d.ts +0 -2
- package/es/locale/lang/vi-VN.js +0 -2
- package/es/locale/lang/zh-CN.d.ts +0 -2
- package/es/locale/lang/zh-CN.js +0 -2
- package/es/locale/lang/zh-HK.d.ts +0 -2
- package/es/locale/lang/zh-HK.js +0 -2
- package/es/locale/lang/zh-TW.d.ts +0 -2
- package/es/locale/lang/zh-TW.js +0 -2
- 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 +27 -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 +32 -19
- package/es/picker/types.d.ts +13 -19
- package/es/picker/utils.d.ts +11 -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 -23
- package/lib/address-edit/AddressEdit.js +32 -57
- 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 -18
- package/lib/address-edit/index.less +8 -15
- package/lib/address-edit/types.d.ts +2 -5
- 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 +104 -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 +42 -38
- 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 +9 -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 +14 -16
- package/lib/date-picker/DatePicker.d.ts +168 -0
- package/lib/date-picker/DatePicker.js +130 -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 +24 -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/locale/lang/bn-BD.d.ts +0 -2
- package/lib/locale/lang/bn-BD.js +0 -2
- package/lib/locale/lang/de-DE-formal.d.ts +0 -2
- package/lib/locale/lang/de-DE-formal.js +0 -2
- package/lib/locale/lang/de-DE.d.ts +0 -2
- package/lib/locale/lang/de-DE.js +0 -2
- package/lib/locale/lang/en-US.d.ts +0 -2
- package/lib/locale/lang/en-US.js +0 -2
- package/lib/locale/lang/es-ES.d.ts +0 -2
- package/lib/locale/lang/es-ES.js +0 -2
- package/lib/locale/lang/fr-FR.d.ts +0 -2
- package/lib/locale/lang/fr-FR.js +0 -2
- package/lib/locale/lang/hi-IN.d.ts +0 -2
- package/lib/locale/lang/hi-IN.js +0 -2
- package/lib/locale/lang/id-ID.d.ts +0 -2
- package/lib/locale/lang/id-ID.js +0 -2
- package/lib/locale/lang/is-IS.d.ts +0 -2
- package/lib/locale/lang/is-IS.js +0 -2
- package/lib/locale/lang/it-IT.d.ts +0 -2
- package/lib/locale/lang/it-IT.js +0 -2
- package/lib/locale/lang/ja-JP.d.ts +0 -2
- package/lib/locale/lang/ja-JP.js +0 -2
- package/lib/locale/lang/ko-KR.d.ts +0 -2
- package/lib/locale/lang/ko-KR.js +0 -2
- package/lib/locale/lang/la-LA.d.ts +0 -2
- package/lib/locale/lang/la-LA.js +0 -2
- package/lib/locale/lang/nb-NO.d.ts +0 -2
- package/lib/locale/lang/nb-NO.js +0 -2
- package/lib/locale/lang/pt-BR.d.ts +0 -2
- package/lib/locale/lang/pt-BR.js +0 -2
- package/lib/locale/lang/ro-RO.d.ts +0 -2
- package/lib/locale/lang/ro-RO.js +0 -2
- package/lib/locale/lang/ru-RU.d.ts +0 -2
- package/lib/locale/lang/ru-RU.js +0 -2
- package/lib/locale/lang/sv-SE.d.ts +0 -2
- package/lib/locale/lang/sv-SE.js +0 -2
- package/lib/locale/lang/th-TH.d.ts +0 -2
- package/lib/locale/lang/th-TH.js +0 -2
- package/lib/locale/lang/tr-TR.d.ts +0 -2
- package/lib/locale/lang/tr-TR.js +0 -2
- package/lib/locale/lang/uk-UA.d.ts +0 -2
- package/lib/locale/lang/uk-UA.js +0 -2
- package/lib/locale/lang/vi-VN.d.ts +0 -2
- package/lib/locale/lang/vi-VN.js +0 -2
- package/lib/locale/lang/zh-CN.d.ts +0 -2
- package/lib/locale/lang/zh-CN.js +0 -2
- package/lib/locale/lang/zh-HK.d.ts +0 -2
- package/lib/locale/lang/zh-HK.js +0 -2
- package/lib/locale/lang/zh-TW.d.ts +0 -2
- package/lib/locale/lang/zh-TW.js +0 -2
- 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 +27 -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 +32 -19
- package/lib/picker/types.d.ts +13 -19
- package/lib/picker/utils.d.ts +11 -0
- package/lib/picker/utils.js +92 -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 +90 -0
- package/{es/datetime-picker/TimePicker.d.ts → lib/time-picker/index.d.ts} +60 -20
- package/lib/time-picker/index.js +30 -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 +1203 -1659
- package/lib/vant.cjs.min.js +1 -1
- package/lib/vant.es.js +1203 -1660
- package/lib/vant.es.min.js +1203 -1660
- package/lib/vant.js +1202 -1658
- package/lib/vant.min.js +1 -1
- package/package.json +4 -1
- package/vetur/attributes.json +516 -468
- package/vetur/tags.json +176 -168
- package/vetur/web-types.json +1855 -1700
- 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 -28
- 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 -9
- 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 -28
- 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 -9
- package/lib/datetime-picker/DatePicker.js +0 -269
- package/lib/datetime-picker/DatetimePicker.d.ts +0 -7
- package/lib/datetime-picker/DatetimePicker.js +0 -62
- package/lib/datetime-picker/TimePicker.js +0 -136
- package/lib/datetime-picker/index.d.ts +0 -12
- package/lib/datetime-picker/types.d.ts +0 -9
- package/lib/datetime-picker/types.js +0 -15
- 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
@@ -0,0 +1,168 @@
|
|
1
|
+
import { type PropType, type ExtractPropTypes } from 'vue';
|
2
|
+
export declare type DatePickerColumnType = 'year' | 'month' | 'day';
|
3
|
+
declare const datePickerProps: {
|
4
|
+
title: StringConstructor;
|
5
|
+
loading: BooleanConstructor;
|
6
|
+
readonly: BooleanConstructor;
|
7
|
+
allowHtml: BooleanConstructor;
|
8
|
+
optionHeight: {
|
9
|
+
type: (NumberConstructor | StringConstructor)[];
|
10
|
+
default: number;
|
11
|
+
};
|
12
|
+
showToolbar: {
|
13
|
+
type: BooleanConstructor;
|
14
|
+
default: true;
|
15
|
+
};
|
16
|
+
swipeDuration: {
|
17
|
+
type: (NumberConstructor | StringConstructor)[];
|
18
|
+
default: number;
|
19
|
+
};
|
20
|
+
visibleOptionNum: {
|
21
|
+
type: (NumberConstructor | StringConstructor)[];
|
22
|
+
default: number;
|
23
|
+
};
|
24
|
+
cancelButtonText: StringConstructor;
|
25
|
+
confirmButtonText: StringConstructor;
|
26
|
+
} & {
|
27
|
+
modelValue: {
|
28
|
+
type: PropType<string[]>;
|
29
|
+
default: () => never[];
|
30
|
+
};
|
31
|
+
filter: PropType<(columnType: string, options: import("../picker").PickerOption[]) => import("../picker").PickerOption[]>;
|
32
|
+
formatter: {
|
33
|
+
type: PropType<(type: string, option: import("../picker").PickerOption) => import("../picker").PickerOption>;
|
34
|
+
default: (type: string, option: import("../picker").PickerOption) => import("../picker").PickerOption;
|
35
|
+
};
|
36
|
+
} & {
|
37
|
+
columnsType: {
|
38
|
+
type: PropType<DatePickerColumnType[]>;
|
39
|
+
default: () => string[];
|
40
|
+
};
|
41
|
+
minDate: {
|
42
|
+
type: DateConstructor;
|
43
|
+
default: () => Date;
|
44
|
+
validator: (val: unknown) => val is Date;
|
45
|
+
};
|
46
|
+
maxDate: {
|
47
|
+
type: DateConstructor;
|
48
|
+
default: () => Date;
|
49
|
+
validator: (val: unknown) => val is Date;
|
50
|
+
};
|
51
|
+
};
|
52
|
+
export declare type DatePickerProps = ExtractPropTypes<typeof datePickerProps>;
|
53
|
+
declare const _default: import("vue").DefineComponent<{
|
54
|
+
title: StringConstructor;
|
55
|
+
loading: BooleanConstructor;
|
56
|
+
readonly: BooleanConstructor;
|
57
|
+
allowHtml: BooleanConstructor;
|
58
|
+
optionHeight: {
|
59
|
+
type: (NumberConstructor | StringConstructor)[];
|
60
|
+
default: number;
|
61
|
+
};
|
62
|
+
showToolbar: {
|
63
|
+
type: BooleanConstructor;
|
64
|
+
default: true;
|
65
|
+
};
|
66
|
+
swipeDuration: {
|
67
|
+
type: (NumberConstructor | StringConstructor)[];
|
68
|
+
default: number;
|
69
|
+
};
|
70
|
+
visibleOptionNum: {
|
71
|
+
type: (NumberConstructor | StringConstructor)[];
|
72
|
+
default: number;
|
73
|
+
};
|
74
|
+
cancelButtonText: StringConstructor;
|
75
|
+
confirmButtonText: StringConstructor;
|
76
|
+
} & {
|
77
|
+
modelValue: {
|
78
|
+
type: PropType<string[]>;
|
79
|
+
default: () => never[];
|
80
|
+
};
|
81
|
+
filter: PropType<(columnType: string, options: import("../picker").PickerOption[]) => import("../picker").PickerOption[]>;
|
82
|
+
formatter: {
|
83
|
+
type: PropType<(type: string, option: import("../picker").PickerOption) => import("../picker").PickerOption>;
|
84
|
+
default: (type: string, option: import("../picker").PickerOption) => import("../picker").PickerOption;
|
85
|
+
};
|
86
|
+
} & {
|
87
|
+
columnsType: {
|
88
|
+
type: PropType<DatePickerColumnType[]>;
|
89
|
+
default: () => string[];
|
90
|
+
};
|
91
|
+
minDate: {
|
92
|
+
type: DateConstructor;
|
93
|
+
default: () => Date;
|
94
|
+
validator: (val: unknown) => val is Date;
|
95
|
+
};
|
96
|
+
maxDate: {
|
97
|
+
type: DateConstructor;
|
98
|
+
default: () => Date;
|
99
|
+
validator: (val: unknown) => val is Date;
|
100
|
+
};
|
101
|
+
}, () => 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<{
|
102
|
+
title: StringConstructor;
|
103
|
+
loading: BooleanConstructor;
|
104
|
+
readonly: BooleanConstructor;
|
105
|
+
allowHtml: BooleanConstructor;
|
106
|
+
optionHeight: {
|
107
|
+
type: (NumberConstructor | StringConstructor)[];
|
108
|
+
default: number;
|
109
|
+
};
|
110
|
+
showToolbar: {
|
111
|
+
type: BooleanConstructor;
|
112
|
+
default: true;
|
113
|
+
};
|
114
|
+
swipeDuration: {
|
115
|
+
type: (NumberConstructor | StringConstructor)[];
|
116
|
+
default: number;
|
117
|
+
};
|
118
|
+
visibleOptionNum: {
|
119
|
+
type: (NumberConstructor | StringConstructor)[];
|
120
|
+
default: number;
|
121
|
+
};
|
122
|
+
cancelButtonText: StringConstructor;
|
123
|
+
confirmButtonText: StringConstructor;
|
124
|
+
} & {
|
125
|
+
modelValue: {
|
126
|
+
type: PropType<string[]>;
|
127
|
+
default: () => never[];
|
128
|
+
};
|
129
|
+
filter: PropType<(columnType: string, options: import("../picker").PickerOption[]) => import("../picker").PickerOption[]>;
|
130
|
+
formatter: {
|
131
|
+
type: PropType<(type: string, option: import("../picker").PickerOption) => import("../picker").PickerOption>;
|
132
|
+
default: (type: string, option: import("../picker").PickerOption) => import("../picker").PickerOption;
|
133
|
+
};
|
134
|
+
} & {
|
135
|
+
columnsType: {
|
136
|
+
type: PropType<DatePickerColumnType[]>;
|
137
|
+
default: () => string[];
|
138
|
+
};
|
139
|
+
minDate: {
|
140
|
+
type: DateConstructor;
|
141
|
+
default: () => Date;
|
142
|
+
validator: (val: unknown) => val is Date;
|
143
|
+
};
|
144
|
+
maxDate: {
|
145
|
+
type: DateConstructor;
|
146
|
+
default: () => Date;
|
147
|
+
validator: (val: unknown) => val is Date;
|
148
|
+
};
|
149
|
+
}>> & {
|
150
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
151
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
152
|
+
onCancel?: ((...args: any[]) => any) | undefined;
|
153
|
+
onConfirm?: ((...args: any[]) => any) | undefined;
|
154
|
+
}, {
|
155
|
+
formatter: (type: string, option: import("../picker").PickerOption) => import("../picker").PickerOption;
|
156
|
+
modelValue: string[];
|
157
|
+
readonly: boolean;
|
158
|
+
loading: boolean;
|
159
|
+
allowHtml: boolean;
|
160
|
+
optionHeight: string | number;
|
161
|
+
showToolbar: boolean;
|
162
|
+
swipeDuration: string | number;
|
163
|
+
visibleOptionNum: string | number;
|
164
|
+
minDate: Date;
|
165
|
+
maxDate: Date;
|
166
|
+
columnsType: DatePickerColumnType[];
|
167
|
+
}>;
|
168
|
+
export default _default;
|
@@ -0,0 +1,130 @@
|
|
1
|
+
var __defProp = Object.defineProperty;
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
5
|
+
var __export = (target, all) => {
|
6
|
+
for (var name2 in all)
|
7
|
+
__defProp(target, name2, { get: all[name2], enumerable: true });
|
8
|
+
};
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
11
|
+
for (let key of __getOwnPropNames(from))
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
14
|
+
}
|
15
|
+
return to;
|
16
|
+
};
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
18
|
+
var stdin_exports = {};
|
19
|
+
__export(stdin_exports, {
|
20
|
+
default: () => stdin_default
|
21
|
+
});
|
22
|
+
module.exports = __toCommonJS(stdin_exports);
|
23
|
+
var import_vue = require("vue");
|
24
|
+
var import_vue2 = require("vue");
|
25
|
+
var import_utils = require("../utils");
|
26
|
+
var import_utils2 = require("./utils");
|
27
|
+
var import_picker = require("../picker");
|
28
|
+
const currentYear = new Date().getFullYear();
|
29
|
+
const [name] = (0, import_utils.createNamespace)("date-picker");
|
30
|
+
const datePickerProps = (0, import_utils.extend)({}, import_utils2.sharedProps, {
|
31
|
+
columnsType: {
|
32
|
+
type: Array,
|
33
|
+
default: () => ["year", "month", "day"]
|
34
|
+
},
|
35
|
+
minDate: {
|
36
|
+
type: Date,
|
37
|
+
default: () => new Date(currentYear - 10, 0, 1),
|
38
|
+
validator: import_utils.isDate
|
39
|
+
},
|
40
|
+
maxDate: {
|
41
|
+
type: Date,
|
42
|
+
default: () => new Date(currentYear + 10, 11, 31),
|
43
|
+
validator: import_utils.isDate
|
44
|
+
}
|
45
|
+
});
|
46
|
+
var stdin_default = (0, import_vue2.defineComponent)({
|
47
|
+
name,
|
48
|
+
props: datePickerProps,
|
49
|
+
emits: ["confirm", "cancel", "change", "update:modelValue"],
|
50
|
+
setup(props, {
|
51
|
+
emit,
|
52
|
+
slots
|
53
|
+
}) {
|
54
|
+
const currentValues = (0, import_vue2.ref)(props.modelValue);
|
55
|
+
const genYearOptions = () => {
|
56
|
+
const minYear = props.minDate.getFullYear();
|
57
|
+
const maxYear = props.maxDate.getFullYear();
|
58
|
+
return (0, import_utils2.genOptions)(minYear, maxYear, "year", props.formatter, props.filter);
|
59
|
+
};
|
60
|
+
const isMaxYear = (year) => year === props.maxDate.getFullYear();
|
61
|
+
const isMaxMonth = (month) => month === props.maxDate.getMonth() + 1;
|
62
|
+
const getValue = (type) => {
|
63
|
+
const {
|
64
|
+
minDate,
|
65
|
+
columnsType
|
66
|
+
} = props;
|
67
|
+
const index = columnsType.indexOf(type);
|
68
|
+
const value = currentValues.value[index];
|
69
|
+
if (value) {
|
70
|
+
return +value;
|
71
|
+
}
|
72
|
+
switch (type) {
|
73
|
+
case "year":
|
74
|
+
return minDate.getFullYear();
|
75
|
+
case "month":
|
76
|
+
return minDate.getMonth() + 1;
|
77
|
+
case "day":
|
78
|
+
return minDate.getDate();
|
79
|
+
}
|
80
|
+
};
|
81
|
+
const genMonthOptions = () => {
|
82
|
+
if (isMaxYear(getValue("year"))) {
|
83
|
+
return (0, import_utils2.genOptions)(1, props.maxDate.getMonth() + 1, "month", props.formatter, props.filter);
|
84
|
+
}
|
85
|
+
return (0, import_utils2.genOptions)(1, 12, "month", props.formatter, props.filter);
|
86
|
+
};
|
87
|
+
const genDayOptions = () => {
|
88
|
+
const year = getValue("year");
|
89
|
+
const month = getValue("month");
|
90
|
+
let maxDate = (0, import_utils2.getMonthEndDay)(year, month);
|
91
|
+
if (isMaxYear(year) && isMaxMonth(month)) {
|
92
|
+
maxDate = props.maxDate.getDate();
|
93
|
+
}
|
94
|
+
return (0, import_utils2.genOptions)(1, maxDate, "day", props.formatter, props.filter);
|
95
|
+
};
|
96
|
+
const columns = (0, import_vue2.computed)(() => props.columnsType.map((type) => {
|
97
|
+
switch (type) {
|
98
|
+
case "year":
|
99
|
+
return genYearOptions();
|
100
|
+
case "month":
|
101
|
+
return genMonthOptions();
|
102
|
+
case "day":
|
103
|
+
return genDayOptions();
|
104
|
+
default:
|
105
|
+
throw new Error(`[Vant] DatePicker: unsupported columns type: ${type}`);
|
106
|
+
}
|
107
|
+
}));
|
108
|
+
(0, import_vue2.watch)(currentValues, (newValues) => {
|
109
|
+
if ((0, import_utils.isSameValue)(newValues, props.modelValue)) {
|
110
|
+
emit("update:modelValue", newValues);
|
111
|
+
}
|
112
|
+
});
|
113
|
+
(0, import_vue2.watch)(() => props.modelValue, (newValues) => {
|
114
|
+
if (!(0, import_utils.isSameValue)(newValues, currentValues.value)) {
|
115
|
+
currentValues.value = newValues;
|
116
|
+
}
|
117
|
+
});
|
118
|
+
const onChange = (...args) => emit("change", ...args);
|
119
|
+
const onCancel = (...args) => emit("cancel", ...args);
|
120
|
+
const onConfirm = (...args) => emit("confirm", ...args);
|
121
|
+
return () => (0, import_vue.createVNode)(import_picker.Picker, (0, import_vue.mergeProps)({
|
122
|
+
"modelValue": currentValues.value,
|
123
|
+
"onUpdate:modelValue": ($event) => currentValues.value = $event,
|
124
|
+
"columns": columns.value,
|
125
|
+
"onChange": onChange,
|
126
|
+
"onCancel": onCancel,
|
127
|
+
"onConfirm": onConfirm
|
128
|
+
}, (0, import_utils.pick)(props, import_utils2.pickerInheritKeys)), slots);
|
129
|
+
}
|
130
|
+
});
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import {
|
2
|
-
declare const
|
1
|
+
import { DatePickerProps } from './DatePicker';
|
2
|
+
export declare const DatePicker: import("../utils").WithInstall<import("vue").DefineComponent<{
|
3
3
|
title: StringConstructor;
|
4
4
|
loading: BooleanConstructor;
|
5
5
|
readonly: BooleanConstructor;
|
6
6
|
allowHtml: BooleanConstructor;
|
7
|
-
|
7
|
+
optionHeight: {
|
8
8
|
type: (NumberConstructor | StringConstructor)[];
|
9
9
|
default: number;
|
10
10
|
};
|
@@ -16,25 +16,27 @@ declare const _default: import("vue").DefineComponent<{
|
|
16
16
|
type: (NumberConstructor | StringConstructor)[];
|
17
17
|
default: number;
|
18
18
|
};
|
19
|
-
|
19
|
+
visibleOptionNum: {
|
20
20
|
type: (NumberConstructor | StringConstructor)[];
|
21
21
|
default: number;
|
22
22
|
};
|
23
23
|
cancelButtonText: StringConstructor;
|
24
24
|
confirmButtonText: StringConstructor;
|
25
25
|
} & {
|
26
|
-
|
27
|
-
|
26
|
+
modelValue: {
|
27
|
+
type: import("vue").PropType<string[]>;
|
28
|
+
default: () => never[];
|
29
|
+
};
|
30
|
+
filter: import("vue").PropType<(columnType: string, options: import("..").PickerOption[]) => import("..").PickerOption[]>;
|
28
31
|
formatter: {
|
29
|
-
type: import("vue").PropType<(type: string,
|
30
|
-
default: (type: string,
|
32
|
+
type: import("vue").PropType<(type: string, option: import("..").PickerOption) => import("..").PickerOption>;
|
33
|
+
default: (type: string, option: import("..").PickerOption) => import("..").PickerOption;
|
31
34
|
};
|
32
35
|
} & {
|
33
|
-
|
34
|
-
type: import("vue").PropType<
|
35
|
-
default:
|
36
|
+
columnsType: {
|
37
|
+
type: import("vue").PropType<import("./DatePicker").DatePickerColumnType[]>;
|
38
|
+
default: () => string[];
|
36
39
|
};
|
37
|
-
modelValue: DateConstructor;
|
38
40
|
minDate: {
|
39
41
|
type: DateConstructor;
|
40
42
|
default: () => Date;
|
@@ -50,7 +52,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
50
52
|
loading: BooleanConstructor;
|
51
53
|
readonly: BooleanConstructor;
|
52
54
|
allowHtml: BooleanConstructor;
|
53
|
-
|
55
|
+
optionHeight: {
|
54
56
|
type: (NumberConstructor | StringConstructor)[];
|
55
57
|
default: number;
|
56
58
|
};
|
@@ -62,25 +64,27 @@ declare const _default: import("vue").DefineComponent<{
|
|
62
64
|
type: (NumberConstructor | StringConstructor)[];
|
63
65
|
default: number;
|
64
66
|
};
|
65
|
-
|
67
|
+
visibleOptionNum: {
|
66
68
|
type: (NumberConstructor | StringConstructor)[];
|
67
69
|
default: number;
|
68
70
|
};
|
69
71
|
cancelButtonText: StringConstructor;
|
70
72
|
confirmButtonText: StringConstructor;
|
71
73
|
} & {
|
72
|
-
|
73
|
-
|
74
|
+
modelValue: {
|
75
|
+
type: import("vue").PropType<string[]>;
|
76
|
+
default: () => never[];
|
77
|
+
};
|
78
|
+
filter: import("vue").PropType<(columnType: string, options: import("..").PickerOption[]) => import("..").PickerOption[]>;
|
74
79
|
formatter: {
|
75
|
-
type: import("vue").PropType<(type: string,
|
76
|
-
default: (type: string,
|
80
|
+
type: import("vue").PropType<(type: string, option: import("..").PickerOption) => import("..").PickerOption>;
|
81
|
+
default: (type: string, option: import("..").PickerOption) => import("..").PickerOption;
|
77
82
|
};
|
78
83
|
} & {
|
79
|
-
|
80
|
-
type: import("vue").PropType<
|
81
|
-
default:
|
84
|
+
columnsType: {
|
85
|
+
type: import("vue").PropType<import("./DatePicker").DatePickerColumnType[]>;
|
86
|
+
default: () => string[];
|
82
87
|
};
|
83
|
-
modelValue: DateConstructor;
|
84
88
|
minDate: {
|
85
89
|
type: DateConstructor;
|
86
90
|
default: () => Date;
|
@@ -97,16 +101,24 @@ declare const _default: import("vue").DefineComponent<{
|
|
97
101
|
onCancel?: ((...args: any[]) => any) | undefined;
|
98
102
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
99
103
|
}, {
|
100
|
-
type:
|
101
|
-
|
104
|
+
formatter: (type: string, option: import("..").PickerOption) => import("..").PickerOption;
|
105
|
+
modelValue: string[];
|
102
106
|
readonly: boolean;
|
103
107
|
loading: boolean;
|
104
108
|
allowHtml: boolean;
|
105
|
-
|
109
|
+
optionHeight: string | number;
|
106
110
|
showToolbar: boolean;
|
107
111
|
swipeDuration: string | number;
|
108
|
-
|
112
|
+
visibleOptionNum: string | number;
|
109
113
|
minDate: Date;
|
110
114
|
maxDate: Date;
|
111
|
-
|
112
|
-
|
115
|
+
columnsType: import("./DatePicker").DatePickerColumnType[];
|
116
|
+
}>>;
|
117
|
+
export default DatePicker;
|
118
|
+
export type { DatePickerProps };
|
119
|
+
export type { DatePickerColumnType } from './DatePicker';
|
120
|
+
declare module 'vue' {
|
121
|
+
interface GlobalComponents {
|
122
|
+
VanDatePicker: typeof DatePicker;
|
123
|
+
}
|
124
|
+
}
|
@@ -20,11 +20,11 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
20
20
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
21
21
|
var stdin_exports = {};
|
22
22
|
__export(stdin_exports, {
|
23
|
-
|
23
|
+
DatePicker: () => DatePicker,
|
24
24
|
default: () => stdin_default
|
25
25
|
});
|
26
26
|
module.exports = __toCommonJS(stdin_exports);
|
27
27
|
var import_utils = require("../utils");
|
28
|
-
var
|
29
|
-
const
|
30
|
-
var stdin_default =
|
28
|
+
var import_DatePicker = __toESM(require("./DatePicker"));
|
29
|
+
const DatePicker = (0, import_utils.withInstall)(import_DatePicker.default);
|
30
|
+
var stdin_default = DatePicker;
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
File without changes
|
@@ -1,12 +1,13 @@
|
|
1
1
|
import type { PropType } from 'vue';
|
2
|
-
import type {
|
3
|
-
|
2
|
+
import type { PickerOption } from '../picker';
|
3
|
+
declare type Filter = (columnType: string, options: PickerOption[]) => PickerOption[];
|
4
|
+
declare type Formatter = (type: string, option: PickerOption) => PickerOption;
|
4
5
|
export declare const sharedProps: {
|
5
6
|
title: StringConstructor;
|
6
7
|
loading: BooleanConstructor;
|
7
8
|
readonly: BooleanConstructor;
|
8
9
|
allowHtml: BooleanConstructor;
|
9
|
-
|
10
|
+
optionHeight: {
|
10
11
|
type: (NumberConstructor | StringConstructor)[];
|
11
12
|
default: number;
|
12
13
|
};
|
@@ -18,22 +19,25 @@ export declare const sharedProps: {
|
|
18
19
|
type: (NumberConstructor | StringConstructor)[];
|
19
20
|
default: number;
|
20
21
|
};
|
21
|
-
|
22
|
+
visibleOptionNum: {
|
22
23
|
type: (NumberConstructor | StringConstructor)[];
|
23
24
|
default: number;
|
24
25
|
};
|
25
26
|
cancelButtonText: StringConstructor;
|
26
27
|
confirmButtonText: StringConstructor;
|
27
28
|
} & {
|
28
|
-
|
29
|
-
|
29
|
+
modelValue: {
|
30
|
+
type: PropType<string[]>;
|
31
|
+
default: () => never[];
|
32
|
+
};
|
33
|
+
filter: PropType<Filter>;
|
30
34
|
formatter: {
|
31
|
-
type: PropType<
|
32
|
-
default: (type: string,
|
35
|
+
type: PropType<Formatter>;
|
36
|
+
default: (type: string, option: PickerOption) => PickerOption;
|
33
37
|
};
|
34
38
|
};
|
35
|
-
export declare const pickerInheritKeys: ("title" | "readonly" | "loading" | "allowHtml" | "
|
39
|
+
export declare const pickerInheritKeys: ("title" | "readonly" | "loading" | "allowHtml" | "optionHeight" | "showToolbar" | "swipeDuration" | "visibleOptionNum" | "cancelButtonText" | "confirmButtonText")[];
|
36
40
|
export declare function times<T>(n: number, iteratee: (index: number) => T): T[];
|
37
|
-
export declare function getTrueValue(value: string | undefined): number;
|
38
41
|
export declare const getMonthEndDay: (year: number, month: number) => number;
|
39
|
-
export declare const
|
42
|
+
export declare const genOptions: <T extends string>(min: number, max: number, type: T, formatter: Formatter, filter?: Filter | undefined) => PickerOption[];
|
43
|
+
export {};
|
@@ -17,10 +17,9 @@ var __copyProps = (to, from, except, desc) => {
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
18
18
|
var stdin_exports = {};
|
19
19
|
__export(stdin_exports, {
|
20
|
+
genOptions: () => genOptions,
|
20
21
|
getMonthEndDay: () => getMonthEndDay,
|
21
|
-
getTrueValue: () => getTrueValue,
|
22
22
|
pickerInheritKeys: () => pickerInheritKeys,
|
23
|
-
proxyPickerMethods: () => proxyPickerMethods,
|
24
23
|
sharedProps: () => sharedProps,
|
25
24
|
times: () => times
|
26
25
|
});
|
@@ -28,11 +27,11 @@ module.exports = __toCommonJS(stdin_exports);
|
|
28
27
|
var import_utils = require("../utils");
|
29
28
|
var import_Picker = require("../picker/Picker");
|
30
29
|
const sharedProps = (0, import_utils.extend)({}, import_Picker.pickerSharedProps, {
|
30
|
+
modelValue: (0, import_utils.makeArrayProp)(),
|
31
31
|
filter: Function,
|
32
|
-
columnsOrder: Array,
|
33
32
|
formatter: {
|
34
33
|
type: Function,
|
35
|
-
default: (type,
|
34
|
+
default: (type, option) => option
|
36
35
|
}
|
37
36
|
});
|
38
37
|
const pickerInheritKeys = Object.keys(import_Picker.pickerSharedProps);
|
@@ -47,36 +46,14 @@ function times(n, iteratee) {
|
|
47
46
|
}
|
48
47
|
return result;
|
49
48
|
}
|
50
|
-
function getTrueValue(value) {
|
51
|
-
if (!value) {
|
52
|
-
return 0;
|
53
|
-
}
|
54
|
-
while (Number.isNaN(parseInt(value, 10))) {
|
55
|
-
if (value.length > 1) {
|
56
|
-
value = value.slice(1);
|
57
|
-
} else {
|
58
|
-
return 0;
|
59
|
-
}
|
60
|
-
}
|
61
|
-
return parseInt(value, 10);
|
62
|
-
}
|
63
49
|
const getMonthEndDay = (year, month) => 32 - new Date(year, month - 1, 32).getDate();
|
64
|
-
const
|
65
|
-
const
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
return new Proxy(picker, {
|
72
|
-
get: (target, prop) => {
|
73
|
-
if (methods.includes(prop)) {
|
74
|
-
return (...args) => {
|
75
|
-
target[prop](...args);
|
76
|
-
callback();
|
77
|
-
};
|
78
|
-
}
|
79
|
-
return target[prop];
|
80
|
-
}
|
50
|
+
const genOptions = (min, max, type, formatter, filter) => {
|
51
|
+
const options = times(max - min + 1, (index) => {
|
52
|
+
const value = (0, import_utils.padZero)(min + index);
|
53
|
+
return formatter(type, {
|
54
|
+
text: value,
|
55
|
+
value
|
56
|
+
});
|
81
57
|
});
|
58
|
+
return filter ? filter(type, options) : options;
|
82
59
|
};
|
package/lib/dialog/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
body{--van-dialog-width: 320px;--van-dialog-small-screen-width: 90%;--van-dialog-font-size: var(--van-font-size-lg);--van-dialog-transition: var(--van-duration-base);--van-dialog-radius: 16px;--van-dialog-background: var(--van-background-2);--van-dialog-header-font-weight: var(--van-font-bold);--van-dialog-header-line-height: 24px;--van-dialog-header-padding-top: 26px;--van-dialog-header-isolated-padding: var(--van-padding-lg) 0;--van-dialog-message-padding: var(--van-padding-lg);--van-dialog-message-font-size: var(--van-font-size-md);--van-dialog-message-line-height: var(--van-line-height-md);--van-dialog-message-max-height: 60vh;--van-dialog-has-title-message-text-color: var(--van-gray-7);--van-dialog-has-title-message-padding-top: var(--van-padding-xs);--van-dialog-button-height: 48px;--van-dialog-round-button-height: 36px;--van-dialog-confirm-button-text-color: var(--van-primary-color)}.van-dialog{top:45%;left:50%;width:var(--van-dialog-width);overflow:hidden;font-size:var(--van-dialog-font-size);background:var(--van-dialog-background);border-radius:var(--van-dialog-radius);-webkit-backface-visibility:hidden;backface-visibility:hidden;transition:var(--van-dialog-transition);transition-property:transform,opacity}@media (max-width: 321px){.van-dialog{width:var(--van-dialog-small-screen-width)}}.van-dialog__header{color:var(--van-text-color);padding-top:var(--van-dialog-header-padding-top);font-weight:var(--van-dialog-header-font-weight);line-height:var(--van-dialog-header-line-height);text-align:center}.van-dialog__header--isolated{padding:var(--van-dialog-header-isolated-padding)}.van-dialog__content--isolated{display:flex;align-items:center;min-height:104px}.van-dialog__message{color:var(--van-text-color);flex:1;max-height:var(--van-dialog-message-max-height);padding:26px var(--van-dialog-message-padding);overflow-y:auto;font-size:var(--van-dialog-message-font-size);line-height:var(--van-dialog-message-line-height);white-space:pre-wrap;text-align:center;word-wrap:break-word;-webkit-overflow-scrolling:touch}.van-dialog__message--has-title{padding-top:var(--van-dialog-has-title-message-padding-top);color:var(--van-dialog-has-title-message-text-color)}.van-dialog__message--left{text-align:left}.van-dialog__message--right{text-align:right}.van-dialog__footer{display:flex;overflow:hidden;-webkit-user-select:none;user-select:none}.van-dialog__confirm,.van-dialog__cancel{flex:1;height:var(--van-dialog-button-height);margin:0;border:0}.van-dialog__confirm,.van-dialog__confirm:active{color:var(--van-dialog-confirm-button-text-color)}.van-dialog--round-button .van-dialog__footer{position:relative;height:auto;padding:var(--van-padding-xs) var(--van-padding-lg) var(--van-padding-md)}.van-dialog--round-button .van-dialog__message{padding-bottom:var(--van-padding-md);color:var(--van-text-color)}.van-dialog--round-button .van-dialog__confirm,.van-dialog--round-button .van-dialog__cancel{height:var(--van-dialog-round-button-height)}.van-dialog--round-button .van-dialog__confirm{color:var(--van-white)}.van-dialog-bounce-enter-from{transform:translate3d(-50%,-50%,0) scale(.7);opacity:0}.van-dialog-bounce-leave-active{transform:translate3d(-50%,-50%,0) scale(.9);opacity:0}
|
package/lib/dialog/index.less
CHANGED
@@ -1,25 +1,23 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
:
|
4
|
-
--van-dialog-
|
5
|
-
--van-dialog-
|
6
|
-
--van-dialog-
|
7
|
-
--van-dialog-
|
8
|
-
--van-dialog-
|
9
|
-
--van-dialog-
|
10
|
-
--van-dialog-header-
|
11
|
-
--van-dialog-header-
|
12
|
-
--van-dialog-
|
13
|
-
--van-dialog-
|
14
|
-
--van-dialog-message-
|
15
|
-
--van-dialog-message-
|
16
|
-
--van-dialog-message-
|
17
|
-
--van-dialog-message-
|
18
|
-
--van-dialog-
|
19
|
-
--van-dialog-
|
20
|
-
--van-dialog-button-
|
21
|
-
--van-dialog-round-button-height: @dialog-round-button-height;
|
22
|
-
--van-dialog-confirm-button-text-color: @dialog-confirm-button-text-color;
|
1
|
+
body {
|
2
|
+
--van-dialog-width: 320px;
|
3
|
+
--van-dialog-small-screen-width: 90%;
|
4
|
+
--van-dialog-font-size: var(--van-font-size-lg);
|
5
|
+
--van-dialog-transition: var(--van-duration-base);
|
6
|
+
--van-dialog-radius: 16px;
|
7
|
+
--van-dialog-background: var(--van-background-2);
|
8
|
+
--van-dialog-header-font-weight: var(--van-font-bold);
|
9
|
+
--van-dialog-header-line-height: 24px;
|
10
|
+
--van-dialog-header-padding-top: 26px;
|
11
|
+
--van-dialog-header-isolated-padding: var(--van-padding-lg) 0;
|
12
|
+
--van-dialog-message-padding: var(--van-padding-lg);
|
13
|
+
--van-dialog-message-font-size: var(--van-font-size-md);
|
14
|
+
--van-dialog-message-line-height: var(--van-line-height-md);
|
15
|
+
--van-dialog-message-max-height: 60vh;
|
16
|
+
--van-dialog-has-title-message-text-color: var(--van-gray-7);
|
17
|
+
--van-dialog-has-title-message-padding-top: var(--van-padding-xs);
|
18
|
+
--van-dialog-button-height: 48px;
|
19
|
+
--van-dialog-round-button-height: 36px;
|
20
|
+
--van-dialog-confirm-button-text-color: var(--van-primary-color);
|
23
21
|
}
|
24
22
|
|
25
23
|
.van-dialog {
|
@@ -28,8 +26,8 @@
|
|
28
26
|
width: var(--van-dialog-width);
|
29
27
|
overflow: hidden;
|
30
28
|
font-size: var(--van-dialog-font-size);
|
31
|
-
background: var(--van-dialog-background
|
32
|
-
border-radius: var(--van-dialog-
|
29
|
+
background: var(--van-dialog-background);
|
30
|
+
border-radius: var(--van-dialog-radius);
|
33
31
|
backface-visibility: hidden; // avoid blurry text after scale animation
|
34
32
|
transition: var(--van-dialog-transition);
|
35
33
|
transition-property: transform, opacity;
|
@@ -39,6 +37,7 @@
|
|
39
37
|
}
|
40
38
|
|
41
39
|
&__header {
|
40
|
+
color: var(--van-text-color);
|
42
41
|
padding-top: var(--van-dialog-header-padding-top);
|
43
42
|
font-weight: var(--van-dialog-header-font-weight);
|
44
43
|
line-height: var(--van-dialog-header-line-height);
|
@@ -58,6 +57,7 @@
|
|
58
57
|
}
|
59
58
|
|
60
59
|
&__message {
|
60
|
+
color: var(--van-text-color);
|
61
61
|
flex: 1;
|
62
62
|
max-height: var(--van-dialog-message-max-height);
|
63
63
|
padding: 26px var(--van-dialog-message-padding);
|