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
package/lib/area/Area.d.ts
CHANGED
@@ -5,7 +5,7 @@ declare const areaProps: {
|
|
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,14 +17,14 @@ declare const areaProps: {
|
|
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
|
};
|
24
24
|
cancelButtonText: StringConstructor;
|
25
25
|
confirmButtonText: StringConstructor;
|
26
26
|
} & {
|
27
|
-
|
27
|
+
modelValue: StringConstructor;
|
28
28
|
columnsNum: {
|
29
29
|
type: (NumberConstructor | StringConstructor)[];
|
30
30
|
default: number;
|
@@ -37,10 +37,6 @@ declare const areaProps: {
|
|
37
37
|
type: PropType<AreaList>;
|
38
38
|
default: () => {};
|
39
39
|
};
|
40
|
-
isOverseaCode: {
|
41
|
-
type: PropType<(code: string) => boolean>;
|
42
|
-
default: (code: string) => boolean;
|
43
|
-
};
|
44
40
|
};
|
45
41
|
export declare type AreaProps = ExtractPropTypes<typeof areaProps>;
|
46
42
|
declare const _default: import("vue").DefineComponent<{
|
@@ -48,7 +44,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
48
44
|
loading: BooleanConstructor;
|
49
45
|
readonly: BooleanConstructor;
|
50
46
|
allowHtml: BooleanConstructor;
|
51
|
-
|
47
|
+
optionHeight: {
|
52
48
|
type: (NumberConstructor | StringConstructor)[];
|
53
49
|
default: number;
|
54
50
|
};
|
@@ -60,14 +56,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
60
56
|
type: (NumberConstructor | StringConstructor)[];
|
61
57
|
default: number;
|
62
58
|
};
|
63
|
-
|
59
|
+
visibleOptionNum: {
|
64
60
|
type: (NumberConstructor | StringConstructor)[];
|
65
61
|
default: number;
|
66
62
|
};
|
67
63
|
cancelButtonText: StringConstructor;
|
68
64
|
confirmButtonText: StringConstructor;
|
69
65
|
} & {
|
70
|
-
|
66
|
+
modelValue: StringConstructor;
|
71
67
|
columnsNum: {
|
72
68
|
type: (NumberConstructor | StringConstructor)[];
|
73
69
|
default: number;
|
@@ -80,16 +76,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
80
76
|
type: PropType<AreaList>;
|
81
77
|
default: () => {};
|
82
78
|
};
|
83
|
-
|
84
|
-
type: PropType<(code: string) => boolean>;
|
85
|
-
default: (code: string) => boolean;
|
86
|
-
};
|
87
|
-
}, () => 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<{
|
79
|
+
}, () => 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<{
|
88
80
|
title: StringConstructor;
|
89
81
|
loading: BooleanConstructor;
|
90
82
|
readonly: BooleanConstructor;
|
91
83
|
allowHtml: BooleanConstructor;
|
92
|
-
|
84
|
+
optionHeight: {
|
93
85
|
type: (NumberConstructor | StringConstructor)[];
|
94
86
|
default: number;
|
95
87
|
};
|
@@ -101,14 +93,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
101
93
|
type: (NumberConstructor | StringConstructor)[];
|
102
94
|
default: number;
|
103
95
|
};
|
104
|
-
|
96
|
+
visibleOptionNum: {
|
105
97
|
type: (NumberConstructor | StringConstructor)[];
|
106
98
|
default: number;
|
107
99
|
};
|
108
100
|
cancelButtonText: StringConstructor;
|
109
101
|
confirmButtonText: StringConstructor;
|
110
102
|
} & {
|
111
|
-
|
103
|
+
modelValue: StringConstructor;
|
112
104
|
columnsNum: {
|
113
105
|
type: (NumberConstructor | StringConstructor)[];
|
114
106
|
default: number;
|
@@ -121,25 +113,21 @@ declare const _default: import("vue").DefineComponent<{
|
|
121
113
|
type: PropType<AreaList>;
|
122
114
|
default: () => {};
|
123
115
|
};
|
124
|
-
isOverseaCode: {
|
125
|
-
type: PropType<(code: string) => boolean>;
|
126
|
-
default: (code: string) => boolean;
|
127
|
-
};
|
128
116
|
}>> & {
|
129
117
|
onChange?: ((...args: any[]) => any) | undefined;
|
118
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
130
119
|
onCancel?: ((...args: any[]) => any) | undefined;
|
131
120
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
132
121
|
}, {
|
133
122
|
readonly: boolean;
|
134
123
|
loading: boolean;
|
135
124
|
allowHtml: boolean;
|
136
|
-
|
125
|
+
optionHeight: string | number;
|
137
126
|
showToolbar: boolean;
|
138
127
|
swipeDuration: string | number;
|
139
|
-
|
128
|
+
visibleOptionNum: string | number;
|
140
129
|
columnsNum: string | number;
|
141
130
|
columnsPlaceholder: string[];
|
142
131
|
areaList: AreaList;
|
143
|
-
isOverseaCode: (code: string) => boolean;
|
144
132
|
}>;
|
145
133
|
export default _default;
|
package/lib/area/Area.js
CHANGED
@@ -22,239 +22,74 @@ __export(stdin_exports, {
|
|
22
22
|
module.exports = __toCommonJS(stdin_exports);
|
23
23
|
var import_vue = require("vue");
|
24
24
|
var import_vue2 = require("vue");
|
25
|
-
var import_deep_clone = require("../utils/deep-clone");
|
26
25
|
var import_utils = require("../utils");
|
27
26
|
var import_Picker = require("../picker/Picker");
|
27
|
+
var import_utils2 = require("./utils");
|
28
28
|
var import_use_expose = require("../composables/use-expose");
|
29
29
|
var import_picker = require("../picker");
|
30
30
|
const [name, bem] = (0, import_utils.createNamespace)("area");
|
31
|
-
const EMPTY_CODE = "000000";
|
32
|
-
const INHERIT_SLOTS = ["title", "cancel", "confirm", "toolbar", "columns-top", "columns-bottom"];
|
33
|
-
const INHERIT_PROPS = ["title", "loading", "readonly", "itemHeight", "swipeDuration", "visibleItemCount", "cancelButtonText", "confirmButtonText"];
|
34
|
-
const isOverseaCode = (code) => code[0] === "9";
|
35
31
|
const areaProps = (0, import_utils.extend)({}, import_Picker.pickerSharedProps, {
|
36
|
-
|
32
|
+
modelValue: String,
|
37
33
|
columnsNum: (0, import_utils.makeNumericProp)(3),
|
38
34
|
columnsPlaceholder: (0, import_utils.makeArrayProp)(),
|
39
35
|
areaList: {
|
40
36
|
type: Object,
|
41
37
|
default: () => ({})
|
42
|
-
},
|
43
|
-
isOverseaCode: {
|
44
|
-
type: Function,
|
45
|
-
default: isOverseaCode
|
46
38
|
}
|
47
39
|
});
|
48
40
|
var stdin_default = (0, import_vue2.defineComponent)({
|
49
41
|
name,
|
50
42
|
props: areaProps,
|
51
|
-
emits: ["change", "confirm", "cancel"],
|
43
|
+
emits: ["change", "confirm", "cancel", "update:modelValue"],
|
52
44
|
setup(props, {
|
53
45
|
emit,
|
54
46
|
slots
|
55
47
|
}) {
|
56
|
-
const
|
57
|
-
const
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
});
|
67
|
-
const areaList = (0, import_vue2.computed)(() => {
|
68
|
-
const {
|
69
|
-
areaList: areaList2
|
70
|
-
} = props;
|
71
|
-
return {
|
72
|
-
province: areaList2.province_list || {},
|
73
|
-
city: areaList2.city_list || {},
|
74
|
-
county: areaList2.county_list || {}
|
75
|
-
};
|
76
|
-
});
|
77
|
-
const placeholderMap = (0, import_vue2.computed)(() => {
|
78
|
-
const {
|
79
|
-
columnsPlaceholder
|
80
|
-
} = props;
|
81
|
-
return {
|
82
|
-
province: columnsPlaceholder[0] || "",
|
83
|
-
city: columnsPlaceholder[1] || "",
|
84
|
-
county: columnsPlaceholder[2] || ""
|
85
|
-
};
|
86
|
-
});
|
87
|
-
const getDefaultCode = () => {
|
88
|
-
if (props.columnsPlaceholder.length) {
|
89
|
-
return EMPTY_CODE;
|
90
|
-
}
|
91
|
-
const {
|
92
|
-
county,
|
93
|
-
city
|
94
|
-
} = areaList.value;
|
95
|
-
const countyCodes = Object.keys(county);
|
96
|
-
if (countyCodes[0]) {
|
97
|
-
return countyCodes[0];
|
98
|
-
}
|
99
|
-
const cityCodes = Object.keys(city);
|
100
|
-
if (cityCodes[0]) {
|
101
|
-
return cityCodes[0];
|
102
|
-
}
|
103
|
-
return "";
|
104
|
-
};
|
105
|
-
const getColumnValues = (type, code) => {
|
106
|
-
let column = [];
|
107
|
-
if (type !== "province" && !code) {
|
108
|
-
return column;
|
109
|
-
}
|
110
|
-
const list = areaList.value[type];
|
111
|
-
column = Object.keys(list).map((listCode) => ({
|
112
|
-
code: listCode,
|
113
|
-
name: list[listCode]
|
114
|
-
}));
|
115
|
-
if (code) {
|
116
|
-
if (type === "city" && props.isOverseaCode(code)) {
|
117
|
-
code = "9";
|
118
|
-
}
|
119
|
-
column = column.filter((item) => item.code.indexOf(code) === 0);
|
120
|
-
}
|
121
|
-
if (placeholderMap.value[type] && column.length) {
|
122
|
-
let codeFill = "";
|
123
|
-
if (type === "city") {
|
124
|
-
codeFill = EMPTY_CODE.slice(2, 4);
|
125
|
-
} else if (type === "county") {
|
126
|
-
codeFill = EMPTY_CODE.slice(4, 6);
|
127
|
-
}
|
128
|
-
column.unshift({
|
129
|
-
code: code + codeFill,
|
130
|
-
name: placeholderMap.value[type]
|
131
|
-
});
|
132
|
-
}
|
133
|
-
return column;
|
134
|
-
};
|
135
|
-
const getIndex = (type, code) => {
|
136
|
-
let compareNum = code.length;
|
137
|
-
if (type === "province") {
|
138
|
-
compareNum = props.isOverseaCode(code) ? 1 : 2;
|
139
|
-
}
|
140
|
-
if (type === "city") {
|
141
|
-
compareNum = 4;
|
142
|
-
}
|
143
|
-
code = code.slice(0, compareNum);
|
144
|
-
const list = getColumnValues(type, compareNum > 2 ? code.slice(0, compareNum - 2) : "");
|
145
|
-
for (let i = 0; i < list.length; i++) {
|
146
|
-
if (list[i].code.slice(0, compareNum) === code) {
|
147
|
-
return i;
|
148
|
-
}
|
149
|
-
}
|
150
|
-
return 0;
|
151
|
-
};
|
152
|
-
const setValues = () => {
|
153
|
-
const picker = pickerRef.value;
|
154
|
-
if (!picker) {
|
155
|
-
return;
|
156
|
-
}
|
157
|
-
let code = state.code || getDefaultCode();
|
158
|
-
const province = getColumnValues("province");
|
159
|
-
const city = getColumnValues("city", code.slice(0, 2));
|
160
|
-
picker.setColumnValues(0, province);
|
161
|
-
picker.setColumnValues(1, city);
|
162
|
-
if (city.length && code.slice(2, 4) === "00" && !props.isOverseaCode(code)) {
|
163
|
-
[{
|
164
|
-
code
|
165
|
-
}] = city;
|
166
|
-
}
|
167
|
-
picker.setColumnValues(2, getColumnValues("county", code.slice(0, 4)));
|
168
|
-
picker.setIndexes([getIndex("province", code), getIndex("city", code), getIndex("county", code)]);
|
169
|
-
};
|
170
|
-
const parseValues = (values) => values.map((value, index) => {
|
171
|
-
if (value) {
|
172
|
-
value = (0, import_deep_clone.deepClone)(value);
|
173
|
-
if (!value.code || value.name === props.columnsPlaceholder[index]) {
|
174
|
-
value.code = "";
|
175
|
-
value.name = "";
|
176
|
-
}
|
48
|
+
const codes = (0, import_vue2.ref)([]);
|
49
|
+
const picker = (0, import_vue2.ref)();
|
50
|
+
const columns = (0, import_vue2.computed)(() => (0, import_utils2.formatDataForCascade)(props));
|
51
|
+
const onChange = (...args) => emit("change", ...args);
|
52
|
+
const onCancel = (...args) => emit("cancel", ...args);
|
53
|
+
const onConfirm = (...args) => emit("confirm", ...args);
|
54
|
+
(0, import_vue2.watch)(codes, (newCodes) => {
|
55
|
+
const lastCode = newCodes.length ? newCodes[newCodes.length - 1] : "";
|
56
|
+
if (lastCode && lastCode !== props.modelValue) {
|
57
|
+
emit("update:modelValue", lastCode);
|
177
58
|
}
|
178
|
-
|
59
|
+
}, {
|
60
|
+
deep: true
|
179
61
|
});
|
180
|
-
|
181
|
-
if (
|
182
|
-
const
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
};
|
187
|
-
const getArea = () => {
|
188
|
-
const values = getValues();
|
189
|
-
const area = {
|
190
|
-
code: "",
|
191
|
-
country: "",
|
192
|
-
province: "",
|
193
|
-
city: "",
|
194
|
-
county: ""
|
195
|
-
};
|
196
|
-
if (!values.length) {
|
197
|
-
return area;
|
198
|
-
}
|
199
|
-
const names = values.map((item) => item.name);
|
200
|
-
const validValues = values.filter((value) => value.code);
|
201
|
-
area.code = validValues.length ? validValues[validValues.length - 1].code : "";
|
202
|
-
if (props.isOverseaCode(area.code)) {
|
203
|
-
area.country = names[1] || "";
|
204
|
-
area.province = names[2] || "";
|
62
|
+
(0, import_vue2.watch)(() => props.modelValue, (newCode) => {
|
63
|
+
if (newCode) {
|
64
|
+
const lastCode = codes.value.length ? codes.value[codes.value.length - 1] : "";
|
65
|
+
if (newCode !== lastCode) {
|
66
|
+
codes.value = [`${newCode.slice(0, 2)}0000`, `${newCode.slice(0, 4)}00`, newCode].slice(0, +props.columnsNum);
|
67
|
+
}
|
205
68
|
} else {
|
206
|
-
|
207
|
-
area.city = names[1] || "";
|
208
|
-
area.county = names[2] || "";
|
209
|
-
}
|
210
|
-
return area;
|
211
|
-
};
|
212
|
-
const reset = (newCode = "") => {
|
213
|
-
state.code = newCode;
|
214
|
-
setValues();
|
215
|
-
};
|
216
|
-
const onChange = (values, index) => {
|
217
|
-
state.code = values[index].code;
|
218
|
-
setValues();
|
219
|
-
if (pickerRef.value) {
|
220
|
-
const parsedValues = parseValues(pickerRef.value.getValues());
|
221
|
-
emit("change", parsedValues, index);
|
69
|
+
codes.value = [];
|
222
70
|
}
|
223
|
-
}
|
224
|
-
|
225
|
-
setValues();
|
226
|
-
emit("confirm", parseValues(values), index);
|
227
|
-
};
|
228
|
-
const onCancel = (...args) => emit("cancel", ...args);
|
229
|
-
(0, import_vue2.onMounted)(setValues);
|
230
|
-
(0, import_vue2.watch)(() => props.value, (value) => {
|
231
|
-
state.code = value;
|
232
|
-
setValues();
|
233
|
-
});
|
234
|
-
(0, import_vue2.watch)(() => props.areaList, setValues, {
|
235
|
-
deep: true
|
236
|
-
});
|
237
|
-
(0, import_vue2.watch)(() => props.columnsNum, () => {
|
238
|
-
(0, import_vue2.nextTick)(setValues);
|
71
|
+
}, {
|
72
|
+
immediate: true
|
239
73
|
});
|
240
74
|
(0, import_use_expose.useExpose)({
|
241
|
-
|
242
|
-
|
243
|
-
|
75
|
+
confirm: () => {
|
76
|
+
var _a;
|
77
|
+
return (_a = picker.value) == null ? void 0 : _a.confirm();
|
78
|
+
},
|
79
|
+
getSelectedOptions: () => {
|
80
|
+
var _a;
|
81
|
+
return ((_a = picker.value) == null ? void 0 : _a.getSelectedOptions()) || [];
|
82
|
+
}
|
244
83
|
});
|
245
|
-
return () => {
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
"onCancel": onCancel,
|
256
|
-
"onConfirm": onConfirm
|
257
|
-
}, (0, import_utils.pick)(props, INHERIT_PROPS)), (0, import_utils.pick)(slots, INHERIT_SLOTS));
|
258
|
-
};
|
84
|
+
return () => (0, import_vue.createVNode)(import_picker.Picker, (0, import_vue.mergeProps)({
|
85
|
+
"ref": picker,
|
86
|
+
"modelValue": codes.value,
|
87
|
+
"onUpdate:modelValue": ($event) => codes.value = $event,
|
88
|
+
"class": bem(),
|
89
|
+
"columns": columns.value,
|
90
|
+
"onChange": onChange,
|
91
|
+
"onCancel": onCancel,
|
92
|
+
"onConfirm": onConfirm
|
93
|
+
}, (0, import_utils.pick)(props, import_utils2.INHERIT_PROPS)), (0, import_utils.pick)(slots, import_utils2.INHERIT_SLOTS));
|
259
94
|
}
|
260
95
|
});
|
package/lib/area/index.d.ts
CHANGED
@@ -3,7 +3,7 @@ export declare const Area: import("../utils").WithInstall<import("vue").DefineCo
|
|
3
3
|
loading: BooleanConstructor;
|
4
4
|
readonly: BooleanConstructor;
|
5
5
|
allowHtml: BooleanConstructor;
|
6
|
-
|
6
|
+
optionHeight: {
|
7
7
|
type: (NumberConstructor | StringConstructor)[];
|
8
8
|
default: number;
|
9
9
|
};
|
@@ -15,14 +15,14 @@ export declare const Area: import("../utils").WithInstall<import("vue").DefineCo
|
|
15
15
|
type: (NumberConstructor | StringConstructor)[];
|
16
16
|
default: number;
|
17
17
|
};
|
18
|
-
|
18
|
+
visibleOptionNum: {
|
19
19
|
type: (NumberConstructor | StringConstructor)[];
|
20
20
|
default: number;
|
21
21
|
};
|
22
22
|
cancelButtonText: StringConstructor;
|
23
23
|
confirmButtonText: StringConstructor;
|
24
24
|
} & {
|
25
|
-
|
25
|
+
modelValue: StringConstructor;
|
26
26
|
columnsNum: {
|
27
27
|
type: (NumberConstructor | StringConstructor)[];
|
28
28
|
default: number;
|
@@ -35,16 +35,12 @@ export declare const Area: import("../utils").WithInstall<import("vue").DefineCo
|
|
35
35
|
type: import("vue").PropType<import("./types").AreaList>;
|
36
36
|
default: () => {};
|
37
37
|
};
|
38
|
-
|
39
|
-
type: import("vue").PropType<(code: string) => boolean>;
|
40
|
-
default: (code: string) => boolean;
|
41
|
-
};
|
42
|
-
}, () => 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<import("vue").ExtractPropTypes<{
|
38
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change" | "cancel" | "confirm")[], "update:modelValue" | "change" | "cancel" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
43
39
|
title: StringConstructor;
|
44
40
|
loading: BooleanConstructor;
|
45
41
|
readonly: BooleanConstructor;
|
46
42
|
allowHtml: BooleanConstructor;
|
47
|
-
|
43
|
+
optionHeight: {
|
48
44
|
type: (NumberConstructor | StringConstructor)[];
|
49
45
|
default: number;
|
50
46
|
};
|
@@ -56,14 +52,14 @@ export declare const Area: import("../utils").WithInstall<import("vue").DefineCo
|
|
56
52
|
type: (NumberConstructor | StringConstructor)[];
|
57
53
|
default: number;
|
58
54
|
};
|
59
|
-
|
55
|
+
visibleOptionNum: {
|
60
56
|
type: (NumberConstructor | StringConstructor)[];
|
61
57
|
default: number;
|
62
58
|
};
|
63
59
|
cancelButtonText: StringConstructor;
|
64
60
|
confirmButtonText: StringConstructor;
|
65
61
|
} & {
|
66
|
-
|
62
|
+
modelValue: StringConstructor;
|
67
63
|
columnsNum: {
|
68
64
|
type: (NumberConstructor | StringConstructor)[];
|
69
65
|
default: number;
|
@@ -76,30 +72,26 @@ export declare const Area: import("../utils").WithInstall<import("vue").DefineCo
|
|
76
72
|
type: import("vue").PropType<import("./types").AreaList>;
|
77
73
|
default: () => {};
|
78
74
|
};
|
79
|
-
isOverseaCode: {
|
80
|
-
type: import("vue").PropType<(code: string) => boolean>;
|
81
|
-
default: (code: string) => boolean;
|
82
|
-
};
|
83
75
|
}>> & {
|
84
76
|
onChange?: ((...args: any[]) => any) | undefined;
|
77
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
85
78
|
onCancel?: ((...args: any[]) => any) | undefined;
|
86
79
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
87
80
|
}, {
|
88
81
|
readonly: boolean;
|
89
82
|
loading: boolean;
|
90
83
|
allowHtml: boolean;
|
91
|
-
|
84
|
+
optionHeight: string | number;
|
92
85
|
showToolbar: boolean;
|
93
86
|
swipeDuration: string | number;
|
94
|
-
|
87
|
+
visibleOptionNum: string | number;
|
95
88
|
columnsNum: string | number;
|
96
89
|
columnsPlaceholder: string[];
|
97
90
|
areaList: import("./types").AreaList;
|
98
|
-
isOverseaCode: (code: string) => boolean;
|
99
91
|
}>>;
|
100
92
|
export default Area;
|
101
93
|
export type { AreaProps } from './Area';
|
102
|
-
export type { AreaList, AreaInstance
|
94
|
+
export type { AreaList, AreaInstance } from './types';
|
103
95
|
declare module 'vue' {
|
104
96
|
interface GlobalComponents {
|
105
97
|
VanArea: typeof Area;
|
package/lib/area/types.d.ts
CHANGED
@@ -1,24 +1,9 @@
|
|
1
1
|
import type { ComponentPublicInstance } from 'vue';
|
2
|
+
import { PickerExpose } from '../picker/types';
|
2
3
|
import type { AreaProps } from './Area';
|
3
4
|
export declare type AreaList = {
|
4
5
|
city_list: Record<string, string>;
|
5
6
|
county_list: Record<string, string>;
|
6
7
|
province_list: Record<string, string>;
|
7
8
|
};
|
8
|
-
export declare type
|
9
|
-
name: string;
|
10
|
-
code: string;
|
11
|
-
};
|
12
|
-
export declare type AreaColumnType = 'province' | 'county' | 'city';
|
13
|
-
export declare type AreaExpose = {
|
14
|
-
reset: (newCode?: string) => void;
|
15
|
-
getArea: () => {
|
16
|
-
code: string;
|
17
|
-
country: string;
|
18
|
-
province: string;
|
19
|
-
city: string;
|
20
|
-
county: string;
|
21
|
-
};
|
22
|
-
getValues: () => AreaColumnOption[];
|
23
|
-
};
|
24
|
-
export declare type AreaInstance = ComponentPublicInstance<AreaProps, AreaExpose>;
|
9
|
+
export declare type AreaInstance = ComponentPublicInstance<AreaProps, PickerExpose>;
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import type { AreaProps } from '.';
|
2
|
+
import type { PickerOption } from '../picker';
|
3
|
+
export declare const AREA_EMPTY_CODE = "000000";
|
4
|
+
export declare const INHERIT_SLOTS: readonly ["title", "cancel", "confirm", "toolbar", "columns-top", "columns-bottom"];
|
5
|
+
export declare const INHERIT_PROPS: readonly ["title", "loading", "readonly", "optionHeight", "swipeDuration", "visibleOptionNum", "cancelButtonText", "confirmButtonText"];
|
6
|
+
export declare function formatDataForCascade({ areaList, columnsNum, columnsPlaceholder: placeholder, }: AreaProps): PickerOption[];
|
@@ -0,0 +1,104 @@
|
|
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 name in all)
|
7
|
+
__defProp(target, name, { get: all[name], 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
|
+
AREA_EMPTY_CODE: () => AREA_EMPTY_CODE,
|
21
|
+
INHERIT_PROPS: () => INHERIT_PROPS,
|
22
|
+
INHERIT_SLOTS: () => INHERIT_SLOTS,
|
23
|
+
formatDataForCascade: () => formatDataForCascade
|
24
|
+
});
|
25
|
+
module.exports = __toCommonJS(stdin_exports);
|
26
|
+
const AREA_EMPTY_CODE = "000000";
|
27
|
+
const INHERIT_SLOTS = [
|
28
|
+
"title",
|
29
|
+
"cancel",
|
30
|
+
"confirm",
|
31
|
+
"toolbar",
|
32
|
+
"columns-top",
|
33
|
+
"columns-bottom"
|
34
|
+
];
|
35
|
+
const INHERIT_PROPS = [
|
36
|
+
"title",
|
37
|
+
"loading",
|
38
|
+
"readonly",
|
39
|
+
"optionHeight",
|
40
|
+
"swipeDuration",
|
41
|
+
"visibleOptionNum",
|
42
|
+
"cancelButtonText",
|
43
|
+
"confirmButtonText"
|
44
|
+
];
|
45
|
+
const makeOption = (text = "", value = AREA_EMPTY_CODE, children = void 0) => ({
|
46
|
+
text,
|
47
|
+
value,
|
48
|
+
children
|
49
|
+
});
|
50
|
+
function formatDataForCascade({
|
51
|
+
areaList,
|
52
|
+
columnsNum,
|
53
|
+
columnsPlaceholder: placeholder
|
54
|
+
}) {
|
55
|
+
const {
|
56
|
+
city_list: city = {},
|
57
|
+
county_list: county = {},
|
58
|
+
province_list: province = {}
|
59
|
+
} = areaList;
|
60
|
+
const showCity = columnsNum > 1;
|
61
|
+
const showCounty = columnsNum > 2;
|
62
|
+
const getProvinceChildren = () => {
|
63
|
+
if (showCity) {
|
64
|
+
return placeholder.length ? [
|
65
|
+
makeOption(placeholder[0], AREA_EMPTY_CODE, showCounty ? [] : void 0)
|
66
|
+
] : [];
|
67
|
+
}
|
68
|
+
};
|
69
|
+
const provinceMap = /* @__PURE__ */ new Map();
|
70
|
+
Object.keys(province).forEach((code) => {
|
71
|
+
provinceMap.set(code.slice(0, 2), makeOption(province[code], code, getProvinceChildren()));
|
72
|
+
});
|
73
|
+
const cityMap = /* @__PURE__ */ new Map();
|
74
|
+
if (showCity) {
|
75
|
+
const getCityChildren = () => {
|
76
|
+
if (showCounty) {
|
77
|
+
return placeholder.length ? [makeOption(placeholder[1])] : [];
|
78
|
+
}
|
79
|
+
};
|
80
|
+
Object.keys(city).forEach((code) => {
|
81
|
+
const option = makeOption(city[code], code, getCityChildren());
|
82
|
+
cityMap.set(code.slice(0, 4), option);
|
83
|
+
const province2 = provinceMap.get(code.slice(0, 2));
|
84
|
+
if (province2) {
|
85
|
+
province2.children.push(option);
|
86
|
+
}
|
87
|
+
});
|
88
|
+
}
|
89
|
+
if (showCounty) {
|
90
|
+
Object.keys(county).forEach((code) => {
|
91
|
+
const city2 = cityMap.get(code.slice(0, 4));
|
92
|
+
if (city2) {
|
93
|
+
city2.children.push(makeOption(county[code], code));
|
94
|
+
}
|
95
|
+
});
|
96
|
+
}
|
97
|
+
const options = Array.from(provinceMap.values());
|
98
|
+
if (placeholder.length) {
|
99
|
+
const county2 = showCounty ? [makeOption(placeholder[2])] : void 0;
|
100
|
+
const city2 = showCity ? [makeOption(placeholder[1], AREA_EMPTY_CODE, county2)] : void 0;
|
101
|
+
options.unshift(makeOption(placeholder[0], AREA_EMPTY_CODE, city2));
|
102
|
+
}
|
103
|
+
return options;
|
104
|
+
}
|
package/lib/badge/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
body{--van-badge-size: 16px;--van-badge-color: var(--van-white);--van-badge-padding: 0 3px;--van-badge-font-size: var(--van-font-size-sm);--van-badge-font-weight: var(--van-font-bold);--van-badge-border-width: var(--van-border-width);--van-badge-background: var(--van-danger-color);--van-badge-dot-color: var(--van-danger-color);--van-badge-dot-size: 8px;--van-badge-font: -apple-system-font, helvetica neue, arial, sans-serif}.van-badge{display:inline-block;box-sizing:border-box;min-width:var(--van-badge-size);padding:var(--van-badge-padding);color:var(--van-badge-color);font-weight:var(--van-badge-font-weight);font-size:var(--van-badge-font-size);font-family:var(--van-badge-font);line-height:1.2;text-align:center;background:var(--van-badge-background);border:var(--van-badge-border-width) solid var(--van-background-2);border-radius:var(--van-radius-max)}.van-badge--fixed{position:absolute;transform-origin:100%}.van-badge--top-left{top:0;left:0;transform:translate(-50%,-50%)}.van-badge--top-right{top:0;right:0;transform:translate(50%,-50%)}.van-badge--bottom-left{bottom:0;left:0;transform:translate(-50%,50%)}.van-badge--bottom-right{bottom:0;right:0;transform:translate(50%,50%)}.van-badge--dot{width:var(--van-badge-dot-size);min-width:0;height:var(--van-badge-dot-size);background:var(--van-badge-dot-color);border-radius:100%;border:none;padding:0}.van-badge__wrapper{position:relative;display:inline-block}
|