vant 3.2.6 → 3.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/action-bar/ActionBar.d.ts +8 -0
- package/es/action-bar/ActionBar.js +8 -6
- package/es/action-bar/index.css +1 -1
- package/es/action-bar/index.d.ts +1 -0
- package/es/action-bar/var.less +1 -1
- package/es/action-bar-button/ActionBarButton.d.ts +14 -1
- package/es/action-bar-button/ActionBarButton.js +13 -11
- package/es/action-bar-button/index.d.ts +1 -0
- package/es/action-bar-icon/ActionBarIcon.d.ts +15 -0
- package/es/action-bar-icon/ActionBarIcon.js +14 -12
- package/es/action-bar-icon/index.css +1 -1
- package/es/action-bar-icon/index.d.ts +1 -0
- package/es/action-bar-icon/var.less +1 -1
- package/es/action-sheet/ActionSheet.d.ts +57 -0
- package/es/action-sheet/ActionSheet.js +23 -20
- package/es/action-sheet/index.css +1 -1
- package/es/action-sheet/index.d.ts +1 -1
- package/es/action-sheet/index.less +0 -5
- package/es/action-sheet/var.less +4 -5
- package/es/address-edit/AddressEdit.d.ts +2 -2
- package/es/address-edit/AddressEdit.js +7 -6
- package/es/address-edit/AddressEditDetail.js +4 -3
- package/es/address-list/AddressList.d.ts +20 -0
- package/es/address-list/AddressList.js +16 -13
- package/es/address-list/AddressListItem.js +6 -4
- package/es/address-list/index.css +1 -1
- package/es/address-list/index.d.ts +1 -0
- package/es/address-list/index.less +2 -2
- package/es/address-list/var.less +2 -2
- package/es/area/Area.d.ts +2 -2
- package/es/area/Area.js +20 -9
- package/es/area/index.d.ts +1 -2
- package/es/badge/Badge.d.ts +18 -2
- package/es/badge/Badge.js +17 -14
- package/es/badge/index.css +1 -1
- package/es/badge/index.d.ts +2 -1
- package/es/badge/index.less +1 -1
- package/es/button/Button.d.ts +43 -5
- package/es/button/Button.js +29 -26
- package/es/button/index.css +1 -1
- package/es/button/index.d.ts +18 -17
- package/es/button/types.d.ts +5 -0
- package/es/button/types.js +1 -0
- package/es/button/var.less +1 -1
- package/es/calendar/Calendar.d.ts +2 -2
- package/es/calendar/Calendar.js +32 -10
- package/es/calendar/CalendarDay.js +5 -4
- package/es/calendar/CalendarHeader.js +6 -4
- package/es/calendar/CalendarMonth.d.ts +2 -2
- package/es/calendar/CalendarMonth.js +7 -6
- package/es/calendar/index.css +1 -1
- package/es/calendar/index.d.ts +1 -2
- package/es/calendar/types.d.ts +1 -1
- package/es/calendar/utils.d.ts +1 -1
- package/es/calendar/var.less +2 -2
- package/es/card/Card.d.ts +18 -0
- package/es/card/Card.js +20 -17
- package/es/card/index.css +1 -1
- package/es/card/index.d.ts +1 -0
- package/es/card/var.less +3 -3
- package/es/cascader/Cascader.d.ts +2 -2
- package/es/cascader/Cascader.js +19 -13
- package/es/cascader/index.css +1 -1
- package/es/cascader/index.d.ts +1 -2
- package/es/cascader/index.less +0 -5
- package/es/cascader/var.less +2 -3
- package/es/cell/Cell.d.ts +35 -5
- package/es/cell/Cell.js +8 -13
- package/es/cell/index.css +1 -1
- package/es/cell/index.d.ts +3 -3
- package/es/cell/var.less +3 -3
- package/es/cell-group/CellGroup.d.ts +10 -0
- package/es/cell-group/CellGroup.js +12 -9
- package/es/cell-group/index.css +1 -1
- package/es/cell-group/index.d.ts +1 -0
- package/es/cell-group/var.less +2 -2
- package/es/checkbox/Checkbox.d.ts +2 -2
- package/es/checkbox/Checkbox.js +12 -7
- package/es/checkbox/Checker.js +5 -4
- package/es/checkbox/index.css +1 -1
- package/es/checkbox/index.d.ts +1 -2
- package/es/checkbox/var.less +1 -1
- package/es/checkbox-group/CheckboxGroup.d.ts +2 -2
- package/es/checkbox-group/CheckboxGroup.js +12 -7
- package/es/checkbox-group/index.d.ts +1 -2
- package/es/circle/Circle.d.ts +37 -1
- package/es/circle/Circle.js +20 -18
- package/es/circle/index.d.ts +1 -1
- package/es/col/Col.d.ts +13 -0
- package/es/col/Col.js +10 -8
- package/es/col/index.d.ts +1 -0
- package/es/collapse/Collapse.d.ts +13 -1
- package/es/collapse/Collapse.js +14 -12
- package/es/collapse/index.d.ts +1 -0
- package/es/collapse-item/CollapseItem.d.ts +5 -5
- package/es/collapse-item/CollapseItem.js +13 -8
- package/es/collapse-item/index.css +1 -1
- package/es/collapse-item/index.d.ts +3 -4
- package/es/collapse-item/var.less +3 -3
- package/es/config-provider/ConfigProvider.d.ts +11 -2
- package/es/config-provider/ConfigProvider.js +10 -8
- package/es/config-provider/index.d.ts +2 -1
- package/es/contact-card/ContactCard.d.ts +15 -0
- package/es/contact-card/ContactCard.js +13 -10
- package/es/contact-card/index.css +1 -1
- package/es/contact-card/index.d.ts +1 -1
- package/es/contact-card/index.less +2 -2
- package/es/contact-edit/ContactEdit.d.ts +17 -1
- package/es/contact-edit/ContactEdit.js +20 -18
- package/es/contact-edit/index.d.ts +1 -1
- package/es/contact-list/ContactList.d.ts +8 -1
- package/es/contact-list/ContactList.js +12 -9
- package/es/contact-list/index.css +1 -1
- package/es/contact-list/index.d.ts +1 -1
- package/es/contact-list/index.less +1 -1
- package/es/count-down/CountDown.d.ts +2 -2
- package/es/count-down/CountDown.js +7 -6
- package/es/count-down/index.d.ts +1 -2
- package/es/coupon/Coupon.js +2 -11
- package/es/coupon/index.css +1 -1
- package/es/coupon/index.less +2 -1
- package/es/coupon/utils.d.ts +3 -0
- package/es/coupon/utils.js +7 -0
- package/es/coupon/var.less +3 -2
- package/es/coupon-cell/CouponCell.d.ts +25 -0
- package/es/coupon-cell/CouponCell.js +17 -12
- package/es/coupon-cell/index.d.ts +1 -0
- package/es/coupon-list/CouponList.d.ts +55 -0
- package/es/coupon-list/CouponList.js +26 -24
- package/es/coupon-list/index.css +1 -1
- package/es/coupon-list/index.d.ts +1 -0
- package/es/coupon-list/index.less +3 -3
- package/es/coupon-list/var.less +1 -1
- package/es/datetime-picker/DatePicker.js +13 -10
- package/es/datetime-picker/DatetimePicker.d.ts +2 -2
- package/es/datetime-picker/DatetimePicker.js +10 -9
- package/es/datetime-picker/TimePicker.js +13 -10
- package/es/datetime-picker/utils.d.ts +1 -1
- package/es/datetime-picker/utils.js +3 -3
- package/es/dialog/Dialog.d.ts +55 -1
- package/es/dialog/Dialog.js +27 -25
- package/es/dialog/index.css +1 -1
- package/es/dialog/index.d.ts +1 -0
- package/es/dialog/var.less +1 -1
- package/es/divider/Divider.d.ts +13 -0
- package/es/divider/Divider.js +10 -8
- package/es/divider/index.css +1 -1
- package/es/divider/index.d.ts +1 -1
- package/es/divider/var.less +1 -1
- package/es/dropdown-item/DropdownItem.d.ts +2 -2
- package/es/dropdown-item/DropdownItem.js +16 -7
- package/es/dropdown-menu/DropdownMenu.d.ts +2 -2
- package/es/dropdown-menu/DropdownMenu.js +11 -8
- package/es/dropdown-menu/index.css +1 -1
- package/es/dropdown-menu/index.less +0 -8
- package/es/dropdown-menu/var.less +2 -2
- package/es/empty/Empty.d.ts +10 -0
- package/es/empty/Empty.js +11 -8
- package/es/empty/index.css +1 -1
- package/es/empty/index.d.ts +1 -0
- package/es/empty/var.less +1 -1
- package/es/field/Field.d.ts +5 -5
- package/es/field/Field.js +48 -35
- package/es/field/index.css +1 -1
- package/es/field/index.d.ts +2 -2
- package/es/field/utils.d.ts +2 -2
- package/es/field/utils.js +9 -6
- package/es/field/var.less +3 -3
- package/es/form/Form.d.ts +2 -2
- package/es/form/Form.js +7 -6
- package/es/grid/Grid.d.ts +3 -2
- package/es/grid/Grid.js +6 -5
- package/es/grid/index.d.ts +1 -1
- package/es/grid-item/GridItem.d.ts +14 -0
- package/es/grid-item/GridItem.js +14 -12
- package/es/grid-item/index.css +1 -1
- package/es/grid-item/index.d.ts +1 -0
- package/es/grid-item/var.less +1 -1
- package/es/icon/Icon.d.ts +14 -0
- package/es/icon/Icon.js +14 -12
- package/es/icon/index.d.ts +1 -0
- package/es/image/Image.d.ts +31 -2
- package/es/image/Image.js +32 -26
- package/es/image/index.css +1 -1
- package/es/image/index.d.ts +2 -2
- package/es/image/var.less +1 -1
- package/es/image-preview/ImagePreview.d.ts +2 -2
- package/es/image-preview/ImagePreview.js +9 -8
- package/es/image-preview/ImagePreviewItem.js +4 -3
- package/es/image-preview/function-call.js +5 -1
- package/es/image-preview/index.css +1 -1
- package/es/image-preview/index.less +0 -5
- package/es/image-preview/var.less +0 -1
- package/es/index-anchor/IndexAnchor.d.ts +5 -0
- package/es/index-anchor/IndexAnchor.js +8 -6
- package/es/index-anchor/index.css +1 -1
- package/es/index-anchor/index.d.ts +1 -0
- package/es/index-anchor/var.less +1 -1
- package/es/index-bar/IndexBar.d.ts +2 -2
- package/es/index-bar/IndexBar.js +7 -6
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/list/List.d.ts +2 -2
- package/es/list/List.js +7 -6
- package/es/list/index.css +1 -1
- package/es/list/var.less +1 -1
- package/es/loading/Loading.d.ts +13 -0
- package/es/loading/Loading.js +13 -11
- package/es/loading/index.css +1 -1
- package/es/loading/index.d.ts +1 -1
- package/es/loading/var.less +1 -1
- package/es/locale/index.js +5 -1
- package/es/nav-bar/NavBar.d.ts +16 -0
- package/es/nav-bar/NavBar.js +20 -18
- package/es/nav-bar/index.css +1 -1
- package/es/nav-bar/index.d.ts +1 -0
- package/es/nav-bar/index.less +0 -4
- package/es/nav-bar/var.less +1 -1
- package/es/notice-bar/NoticeBar.d.ts +2 -2
- package/es/notice-bar/NoticeBar.js +7 -6
- package/es/notify/Notify.d.ts +38 -0
- package/es/notify/Notify.js +15 -12
- package/es/notify/index.d.ts +1 -0
- package/es/number-keyboard/NumberKeyboard.d.ts +48 -1
- package/es/number-keyboard/NumberKeyboard.js +30 -28
- package/es/number-keyboard/NumberKeyboardKey.js +5 -4
- package/es/number-keyboard/index.css +1 -1
- package/es/number-keyboard/index.d.ts +1 -1
- package/es/number-keyboard/index.less +0 -4
- package/es/number-keyboard/var.less +1 -1
- package/es/overlay/Overlay.d.ts +13 -1
- package/es/overlay/Overlay.js +13 -11
- package/es/overlay/index.d.ts +1 -0
- package/es/pagination/Pagination.d.ts +31 -0
- package/es/pagination/Pagination.js +17 -15
- package/es/pagination/index.css +1 -1
- package/es/pagination/index.d.ts +1 -1
- package/es/pagination/var.less +1 -1
- package/es/password-input/PasswordInput.js +5 -3
- package/es/password-input/index.css +1 -1
- package/es/password-input/var.less +3 -3
- package/es/picker/Picker.d.ts +40 -1
- package/es/picker/Picker.js +20 -17
- package/es/picker/PickerColumn.js +5 -4
- package/es/picker/index.css +1 -1
- package/es/picker/index.less +2 -10
- package/es/picker/var.less +9 -3
- package/es/popover/Popover.d.ts +50 -11
- package/es/popover/Popover.js +33 -30
- package/es/popover/index.css +1 -1
- package/es/popover/index.d.ts +17 -16
- package/es/popover/types.d.ts +11 -0
- package/es/popover/types.js +1 -0
- package/es/popover/var.less +3 -3
- package/es/popup/Popup.d.ts +47 -1
- package/es/popup/Popup.js +20 -18
- package/es/popup/index.css +1 -1
- package/es/popup/index.d.ts +1 -1
- package/es/popup/index.less +0 -5
- package/es/popup/var.less +1 -2
- package/es/progress/Progress.d.ts +2 -2
- package/es/progress/Progress.js +2 -2
- package/es/pull-refresh/PullRefresh.d.ts +23 -0
- package/es/pull-refresh/PullRefresh.js +18 -16
- package/es/pull-refresh/index.css +1 -1
- package/es/pull-refresh/index.d.ts +1 -0
- package/es/pull-refresh/var.less +1 -1
- package/es/radio/Radio.d.ts +3 -1
- package/es/radio/Radio.js +5 -4
- package/es/radio/index.css +1 -1
- package/es/radio/index.d.ts +1 -2
- package/es/radio/var.less +1 -1
- package/es/radio-group/RadioGroup.d.ts +3 -2
- package/es/radio-group/RadioGroup.js +7 -6
- package/es/radio-group/index.d.ts +1 -2
- package/es/rate/Rate.d.ts +33 -0
- package/es/rate/Rate.js +21 -19
- package/es/rate/index.d.ts +1 -0
- package/es/row/Row.d.ts +18 -1
- package/es/row/Row.js +12 -10
- package/es/row/index.d.ts +1 -1
- package/es/search/Search.d.ts +2 -2
- package/es/search/Search.js +8 -7
- package/es/search/index.css +1 -1
- package/es/search/var.less +1 -1
- package/es/share-sheet/ShareSheet.d.ts +48 -0
- package/es/share-sheet/ShareSheet.js +20 -17
- package/es/share-sheet/index.css +1 -1
- package/es/share-sheet/index.d.ts +1 -1
- package/es/share-sheet/index.less +0 -4
- package/es/share-sheet/var.less +3 -3
- package/es/sidebar/Sidebar.d.ts +8 -1
- package/es/sidebar/Sidebar.js +9 -7
- package/es/sidebar/index.d.ts +1 -0
- package/es/sidebar-item/SidebarItem.d.ts +12 -0
- package/es/sidebar-item/SidebarItem.js +12 -10
- package/es/sidebar-item/index.css +1 -1
- package/es/sidebar-item/index.d.ts +1 -0
- package/es/sidebar-item/var.less +2 -2
- package/es/skeleton/Skeleton.d.ts +29 -1
- package/es/skeleton/Skeleton.js +21 -18
- package/es/skeleton/index.d.ts +5 -6
- package/es/slider/Slider.d.ts +31 -3
- package/es/slider/Slider.js +24 -22
- package/es/slider/index.d.ts +3 -2
- package/es/step/Step.js +4 -3
- package/es/step/index.css +1 -1
- package/es/step/index.less +1 -1
- package/es/step/var.less +1 -1
- package/es/stepper/Stepper.d.ts +53 -1
- package/es/stepper/Stepper.js +40 -33
- package/es/stepper/index.css +1 -1
- package/es/stepper/index.d.ts +3 -4
- package/es/stepper/index.less +3 -18
- package/es/stepper/var.less +1 -2
- package/es/steps/Steps.d.ts +3 -2
- package/es/steps/Steps.js +7 -6
- package/es/steps/index.css +1 -1
- package/es/steps/index.d.ts +5 -6
- package/es/steps/var.less +1 -1
- package/es/sticky/Sticky.d.ts +18 -1
- package/es/sticky/Sticky.js +13 -11
- package/es/sticky/index.d.ts +1 -1
- package/es/style/base.css +1 -1
- package/es/style/base.less +4 -0
- package/es/style/css-variables.css +1 -1
- package/es/style/css-variables.less +3 -1
- package/es/style/mixins/hairline.less +3 -3
- package/es/style/var.less +5 -3
- package/es/submit-bar/SubmitBar.d.ts +30 -1
- package/es/submit-bar/SubmitBar.js +23 -20
- package/es/submit-bar/index.css +1 -1
- package/es/submit-bar/var.less +3 -3
- package/es/swipe/Swipe.d.ts +2 -2
- package/es/swipe/Swipe.js +29 -14
- package/es/swipe-cell/SwipeCell.d.ts +2 -2
- package/es/swipe-cell/SwipeCell.js +12 -7
- package/es/swipe-item/SwipeItem.js +4 -3
- package/es/switch/Switch.d.ts +18 -0
- package/es/switch/Switch.js +22 -19
- package/es/switch/index.css +1 -1
- package/es/switch/index.d.ts +1 -0
- package/es/switch/var.less +1 -1
- package/es/tab/Tab.d.ts +19 -1
- package/es/tab/Tab.js +16 -14
- package/es/tab/index.d.ts +1 -0
- package/es/tabbar/Tabbar.d.ts +3 -2
- package/es/tabbar/Tabbar.js +7 -6
- package/es/tabbar/index.css +1 -1
- package/es/tabbar/index.d.ts +1 -0
- package/es/tabbar/var.less +1 -1
- package/es/tabbar-item/TabbarItem.d.ts +13 -0
- package/es/tabbar-item/TabbarItem.js +14 -12
- package/es/tabbar-item/index.css +1 -1
- package/es/tabbar-item/index.d.ts +1 -0
- package/es/tabbar-item/var.less +1 -1
- package/es/tabs/Tabs.d.ts +2 -2
- package/es/tabs/Tabs.js +13 -7
- package/es/tabs/TabsContent.js +5 -4
- package/es/tabs/index.css +1 -1
- package/es/tabs/var.less +2 -2
- package/es/tag/Tag.d.ts +23 -3
- package/es/tag/Tag.js +18 -15
- package/es/tag/index.css +1 -1
- package/es/tag/index.d.ts +3 -2
- package/es/tag/var.less +1 -1
- package/es/toast/Toast.d.ts +33 -1
- package/es/toast/Toast.js +26 -24
- package/es/toast/function-call.js +10 -2
- package/es/toast/index.d.ts +1 -0
- package/es/tree-select/TreeSelect.d.ts +28 -1
- package/es/tree-select/TreeSelect.js +18 -15
- package/es/tree-select/index.css +1 -1
- package/es/tree-select/index.d.ts +1 -1
- package/es/tree-select/var.less +1 -1
- package/es/uploader/Uploader.d.ts +2 -2
- package/es/uploader/Uploader.js +17 -10
- package/es/uploader/UploaderPreviewItem.js +6 -4
- package/es/uploader/index.css +1 -1
- package/es/uploader/var.less +1 -1
- package/es/utils/constant.d.ts +1 -0
- package/es/utils/constant.js +1 -0
- package/es/utils/create.d.ts +2 -2
- package/es/utils/create.js +6 -1
- package/es/utils/deep-assign.d.ts +1 -1
- package/es/utils/deep-assign.js +1 -1
- package/es/utils/deep-clone.js +2 -2
- package/es/utils/dom.d.ts +0 -1
- package/es/utils/dom.js +0 -5
- package/es/utils/format.js +14 -2
- package/es/utils/interceptor.d.ts +2 -2
- package/es/utils/interceptor.js +7 -5
- package/lib/action-bar/ActionBar.d.ts +8 -0
- package/lib/action-bar/ActionBar.js +8 -6
- package/lib/action-bar/index.css +1 -1
- package/lib/action-bar/index.d.ts +1 -0
- package/lib/action-bar/var.less +1 -1
- package/lib/action-bar-button/ActionBarButton.d.ts +14 -1
- package/lib/action-bar-button/ActionBarButton.js +13 -11
- package/lib/action-bar-button/index.d.ts +1 -0
- package/lib/action-bar-icon/ActionBarIcon.d.ts +15 -0
- package/lib/action-bar-icon/ActionBarIcon.js +15 -13
- package/lib/action-bar-icon/index.css +1 -1
- package/lib/action-bar-icon/index.d.ts +1 -0
- package/lib/action-bar-icon/var.less +1 -1
- package/lib/action-sheet/ActionSheet.d.ts +57 -0
- package/lib/action-sheet/ActionSheet.js +22 -19
- package/lib/action-sheet/index.css +1 -1
- package/lib/action-sheet/index.d.ts +1 -1
- package/lib/action-sheet/index.less +0 -5
- package/lib/action-sheet/var.less +4 -5
- package/lib/address-edit/AddressEdit.d.ts +2 -2
- package/lib/address-edit/AddressEdit.js +7 -6
- package/lib/address-edit/AddressEditDetail.js +4 -3
- package/lib/address-list/AddressList.d.ts +20 -0
- package/lib/address-list/AddressList.js +16 -13
- package/lib/address-list/AddressListItem.js +6 -4
- package/lib/address-list/index.css +1 -1
- package/lib/address-list/index.d.ts +1 -0
- package/lib/address-list/index.less +2 -2
- package/lib/address-list/var.less +2 -2
- package/lib/area/Area.d.ts +2 -2
- package/lib/area/Area.js +19 -8
- package/lib/area/index.d.ts +1 -2
- package/lib/badge/Badge.d.ts +18 -2
- package/lib/badge/Badge.js +16 -13
- package/lib/badge/index.css +1 -1
- package/lib/badge/index.d.ts +2 -1
- package/lib/badge/index.less +1 -1
- package/lib/button/Button.d.ts +43 -5
- package/lib/button/Button.js +27 -25
- package/lib/button/index.css +1 -1
- package/lib/button/index.d.ts +18 -17
- package/lib/button/types.d.ts +5 -0
- package/lib/button/types.js +3 -0
- package/lib/button/var.less +1 -1
- package/lib/calendar/Calendar.d.ts +2 -2
- package/lib/calendar/Calendar.js +32 -10
- package/lib/calendar/CalendarDay.js +5 -4
- package/lib/calendar/CalendarHeader.js +6 -4
- package/lib/calendar/CalendarMonth.d.ts +2 -2
- package/lib/calendar/CalendarMonth.js +7 -6
- package/lib/calendar/index.css +1 -1
- package/lib/calendar/index.d.ts +1 -2
- package/lib/calendar/types.d.ts +1 -1
- package/lib/calendar/utils.d.ts +1 -1
- package/lib/calendar/var.less +2 -2
- package/lib/card/Card.d.ts +18 -0
- package/lib/card/Card.js +20 -17
- package/lib/card/index.css +1 -1
- package/lib/card/index.d.ts +1 -0
- package/lib/card/var.less +3 -3
- package/lib/cascader/Cascader.d.ts +2 -2
- package/lib/cascader/Cascader.js +18 -12
- package/lib/cascader/index.css +1 -1
- package/lib/cascader/index.d.ts +1 -2
- package/lib/cascader/index.less +0 -5
- package/lib/cascader/var.less +2 -3
- package/lib/cell/Cell.d.ts +35 -5
- package/lib/cell/Cell.js +10 -15
- package/lib/cell/index.css +1 -1
- package/lib/cell/index.d.ts +3 -3
- package/lib/cell/var.less +3 -3
- package/lib/cell-group/CellGroup.d.ts +10 -0
- package/lib/cell-group/CellGroup.js +13 -10
- package/lib/cell-group/index.css +1 -1
- package/lib/cell-group/index.d.ts +1 -0
- package/lib/cell-group/var.less +2 -2
- package/lib/checkbox/Checkbox.d.ts +2 -2
- package/lib/checkbox/Checkbox.js +12 -7
- package/lib/checkbox/Checker.js +5 -4
- package/lib/checkbox/index.css +1 -1
- package/lib/checkbox/index.d.ts +1 -2
- package/lib/checkbox/var.less +1 -1
- package/lib/checkbox-group/CheckboxGroup.d.ts +2 -2
- package/lib/checkbox-group/CheckboxGroup.js +12 -7
- package/lib/checkbox-group/index.d.ts +1 -2
- package/lib/circle/Circle.d.ts +37 -1
- package/lib/circle/Circle.js +21 -18
- package/lib/circle/index.d.ts +1 -1
- package/lib/col/Col.d.ts +13 -0
- package/lib/col/Col.js +10 -8
- package/lib/col/index.d.ts +1 -0
- package/lib/collapse/Collapse.d.ts +13 -1
- package/lib/collapse/Collapse.js +14 -12
- package/lib/collapse/index.d.ts +1 -0
- package/lib/collapse-item/CollapseItem.d.ts +5 -5
- package/lib/collapse-item/CollapseItem.js +12 -7
- package/lib/collapse-item/index.css +1 -1
- package/lib/collapse-item/index.d.ts +3 -4
- package/lib/collapse-item/var.less +3 -3
- package/lib/config-provider/ConfigProvider.d.ts +11 -2
- package/lib/config-provider/ConfigProvider.js +11 -9
- package/lib/config-provider/index.d.ts +2 -1
- package/lib/contact-card/ContactCard.d.ts +15 -0
- package/lib/contact-card/ContactCard.js +13 -10
- package/lib/contact-card/index.css +1 -1
- package/lib/contact-card/index.d.ts +1 -1
- package/lib/contact-card/index.less +2 -2
- package/lib/contact-edit/ContactEdit.d.ts +17 -1
- package/lib/contact-edit/ContactEdit.js +20 -18
- package/lib/contact-edit/index.d.ts +1 -1
- package/lib/contact-list/ContactList.d.ts +8 -1
- package/lib/contact-list/ContactList.js +12 -9
- package/lib/contact-list/index.css +1 -1
- package/lib/contact-list/index.d.ts +1 -1
- package/lib/contact-list/index.less +1 -1
- package/lib/count-down/CountDown.d.ts +2 -2
- package/lib/count-down/CountDown.js +7 -6
- package/lib/count-down/index.d.ts +1 -2
- package/lib/coupon/Coupon.js +6 -13
- package/lib/coupon/index.css +1 -1
- package/lib/coupon/index.less +2 -1
- package/lib/coupon/utils.d.ts +3 -0
- package/lib/coupon/utils.js +20 -0
- package/lib/coupon/var.less +3 -2
- package/lib/coupon-cell/CouponCell.d.ts +25 -0
- package/lib/coupon-cell/CouponCell.js +16 -11
- package/lib/coupon-cell/index.d.ts +1 -0
- package/lib/coupon-list/CouponList.d.ts +55 -0
- package/lib/coupon-list/CouponList.js +26 -24
- package/lib/coupon-list/index.css +1 -1
- package/lib/coupon-list/index.d.ts +1 -0
- package/lib/coupon-list/index.less +3 -3
- package/lib/coupon-list/var.less +1 -1
- package/lib/datetime-picker/DatePicker.js +12 -9
- package/lib/datetime-picker/DatetimePicker.d.ts +2 -2
- package/lib/datetime-picker/DatetimePicker.js +10 -9
- package/lib/datetime-picker/TimePicker.js +12 -9
- package/lib/datetime-picker/utils.d.ts +1 -1
- package/lib/datetime-picker/utils.js +4 -4
- package/lib/dialog/Dialog.d.ts +55 -1
- package/lib/dialog/Dialog.js +27 -25
- package/lib/dialog/index.css +1 -1
- package/lib/dialog/index.d.ts +1 -0
- package/lib/dialog/var.less +1 -1
- package/lib/divider/Divider.d.ts +13 -0
- package/lib/divider/Divider.js +11 -9
- package/lib/divider/index.css +1 -1
- package/lib/divider/index.d.ts +1 -1
- package/lib/divider/var.less +1 -1
- package/lib/dropdown-item/DropdownItem.d.ts +2 -2
- package/lib/dropdown-item/DropdownItem.js +16 -7
- package/lib/dropdown-menu/DropdownMenu.d.ts +2 -2
- package/lib/dropdown-menu/DropdownMenu.js +10 -7
- package/lib/dropdown-menu/index.css +1 -1
- package/lib/dropdown-menu/index.less +0 -8
- package/lib/dropdown-menu/var.less +2 -2
- package/lib/empty/Empty.d.ts +10 -0
- package/lib/empty/Empty.js +12 -9
- package/lib/empty/index.css +1 -1
- package/lib/empty/index.d.ts +1 -0
- package/lib/empty/var.less +1 -1
- package/lib/field/Field.d.ts +5 -5
- package/lib/field/Field.js +47 -34
- package/lib/field/index.css +1 -1
- package/lib/field/index.d.ts +2 -2
- package/lib/field/utils.d.ts +2 -2
- package/lib/field/utils.js +8 -5
- package/lib/field/var.less +3 -3
- package/lib/form/Form.d.ts +2 -2
- package/lib/form/Form.js +7 -6
- package/lib/grid/Grid.d.ts +3 -2
- package/lib/grid/Grid.js +6 -5
- package/lib/grid/index.d.ts +1 -1
- package/lib/grid-item/GridItem.d.ts +14 -0
- package/lib/grid-item/GridItem.js +14 -12
- package/lib/grid-item/index.css +1 -1
- package/lib/grid-item/index.d.ts +1 -0
- package/lib/grid-item/var.less +1 -1
- package/lib/icon/Icon.d.ts +14 -0
- package/lib/icon/Icon.js +15 -12
- package/lib/icon/index.d.ts +1 -0
- package/lib/image/Image.d.ts +31 -2
- package/lib/image/Image.js +32 -26
- package/lib/image/index.css +1 -1
- package/lib/image/index.d.ts +2 -2
- package/lib/image/var.less +1 -1
- package/lib/image-preview/ImagePreview.d.ts +2 -2
- package/lib/image-preview/ImagePreview.js +8 -7
- package/lib/image-preview/ImagePreviewItem.js +4 -3
- package/lib/image-preview/function-call.js +5 -1
- package/lib/image-preview/index.css +1 -1
- package/lib/image-preview/index.less +0 -5
- package/lib/image-preview/var.less +0 -1
- package/lib/index-anchor/IndexAnchor.d.ts +5 -0
- package/lib/index-anchor/IndexAnchor.js +8 -6
- package/lib/index-anchor/index.css +1 -1
- package/lib/index-anchor/index.d.ts +1 -0
- package/lib/index-anchor/var.less +1 -1
- package/lib/index-bar/IndexBar.d.ts +2 -2
- package/lib/index-bar/IndexBar.js +7 -6
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/list/List.d.ts +2 -2
- package/lib/list/List.js +7 -6
- package/lib/list/index.css +1 -1
- package/lib/list/var.less +1 -1
- package/lib/loading/Loading.d.ts +13 -0
- package/lib/loading/Loading.js +13 -11
- package/lib/loading/index.css +1 -1
- package/lib/loading/index.d.ts +1 -1
- package/lib/loading/var.less +1 -1
- package/lib/locale/index.js +5 -1
- package/lib/nav-bar/NavBar.d.ts +16 -0
- package/lib/nav-bar/NavBar.js +19 -17
- package/lib/nav-bar/index.css +1 -1
- package/lib/nav-bar/index.d.ts +1 -0
- package/lib/nav-bar/index.less +0 -4
- package/lib/nav-bar/var.less +1 -1
- package/lib/notice-bar/NoticeBar.d.ts +2 -2
- package/lib/notice-bar/NoticeBar.js +7 -6
- package/lib/notify/Notify.d.ts +38 -0
- package/lib/notify/Notify.js +15 -12
- package/lib/notify/index.d.ts +1 -0
- package/lib/number-keyboard/NumberKeyboard.d.ts +48 -1
- package/lib/number-keyboard/NumberKeyboard.js +29 -27
- package/lib/number-keyboard/NumberKeyboardKey.js +5 -4
- package/lib/number-keyboard/index.css +1 -1
- package/lib/number-keyboard/index.d.ts +1 -1
- package/lib/number-keyboard/index.less +0 -4
- package/lib/number-keyboard/var.less +1 -1
- package/lib/overlay/Overlay.d.ts +13 -1
- package/lib/overlay/Overlay.js +14 -12
- package/lib/overlay/index.d.ts +1 -0
- package/lib/pagination/Pagination.d.ts +31 -0
- package/lib/pagination/Pagination.js +18 -15
- package/lib/pagination/index.css +1 -1
- package/lib/pagination/index.d.ts +1 -1
- package/lib/pagination/var.less +1 -1
- package/lib/password-input/PasswordInput.js +5 -3
- package/lib/password-input/index.css +1 -1
- package/lib/password-input/var.less +3 -3
- package/lib/picker/Picker.d.ts +40 -1
- package/lib/picker/Picker.js +21 -18
- package/lib/picker/PickerColumn.js +5 -4
- package/lib/picker/index.css +1 -1
- package/lib/picker/index.less +2 -10
- package/lib/picker/var.less +9 -3
- package/lib/popover/Popover.d.ts +50 -11
- package/lib/popover/Popover.js +31 -29
- package/lib/popover/index.css +1 -1
- package/lib/popover/index.d.ts +17 -16
- package/lib/popover/types.d.ts +11 -0
- package/lib/popover/types.js +3 -0
- package/lib/popover/var.less +3 -3
- package/lib/popup/Popup.d.ts +47 -1
- package/lib/popup/Popup.js +19 -17
- package/lib/popup/index.css +1 -1
- package/lib/popup/index.d.ts +1 -1
- package/lib/popup/index.less +0 -5
- package/lib/popup/var.less +1 -2
- package/lib/progress/Progress.d.ts +2 -2
- package/lib/progress/Progress.js +2 -2
- package/lib/pull-refresh/PullRefresh.d.ts +23 -0
- package/lib/pull-refresh/PullRefresh.js +18 -16
- package/lib/pull-refresh/index.css +1 -1
- package/lib/pull-refresh/index.d.ts +1 -0
- package/lib/pull-refresh/var.less +1 -1
- package/lib/radio/Radio.d.ts +3 -1
- package/lib/radio/Radio.js +5 -4
- package/lib/radio/index.css +1 -1
- package/lib/radio/index.d.ts +1 -2
- package/lib/radio/var.less +1 -1
- package/lib/radio-group/RadioGroup.d.ts +3 -2
- package/lib/radio-group/RadioGroup.js +7 -6
- package/lib/radio-group/index.d.ts +1 -2
- package/lib/rate/Rate.d.ts +33 -0
- package/lib/rate/Rate.js +22 -19
- package/lib/rate/index.d.ts +1 -0
- package/lib/row/Row.d.ts +18 -1
- package/lib/row/Row.js +12 -10
- package/lib/row/index.d.ts +1 -1
- package/lib/search/Search.d.ts +2 -2
- package/lib/search/Search.js +8 -7
- package/lib/search/index.css +1 -1
- package/lib/search/var.less +1 -1
- package/lib/share-sheet/ShareSheet.d.ts +48 -0
- package/lib/share-sheet/ShareSheet.js +19 -16
- package/lib/share-sheet/index.css +1 -1
- package/lib/share-sheet/index.d.ts +1 -1
- package/lib/share-sheet/index.less +0 -4
- package/lib/share-sheet/var.less +3 -3
- package/lib/sidebar/Sidebar.d.ts +8 -1
- package/lib/sidebar/Sidebar.js +9 -7
- package/lib/sidebar/index.d.ts +1 -0
- package/lib/sidebar-item/SidebarItem.d.ts +12 -0
- package/lib/sidebar-item/SidebarItem.js +12 -10
- package/lib/sidebar-item/index.css +1 -1
- package/lib/sidebar-item/index.d.ts +1 -0
- package/lib/sidebar-item/var.less +2 -2
- package/lib/skeleton/Skeleton.d.ts +29 -1
- package/lib/skeleton/Skeleton.js +22 -19
- package/lib/skeleton/index.d.ts +5 -6
- package/lib/slider/Slider.d.ts +31 -3
- package/lib/slider/Slider.js +24 -22
- package/lib/slider/index.d.ts +3 -2
- package/lib/step/Step.js +4 -3
- package/lib/step/index.css +1 -1
- package/lib/step/index.less +1 -1
- package/lib/step/var.less +1 -1
- package/lib/stepper/Stepper.d.ts +53 -1
- package/lib/stepper/Stepper.js +39 -31
- package/lib/stepper/index.css +1 -1
- package/lib/stepper/index.d.ts +3 -4
- package/lib/stepper/index.less +3 -18
- package/lib/stepper/var.less +1 -2
- package/lib/steps/Steps.d.ts +3 -2
- package/lib/steps/Steps.js +7 -6
- package/lib/steps/index.css +1 -1
- package/lib/steps/index.d.ts +5 -6
- package/lib/steps/var.less +1 -1
- package/lib/sticky/Sticky.d.ts +18 -1
- package/lib/sticky/Sticky.js +13 -11
- package/lib/sticky/index.d.ts +1 -1
- package/lib/style/base.css +1 -1
- package/lib/style/base.less +4 -0
- package/lib/style/css-variables.css +1 -1
- package/lib/style/css-variables.less +3 -1
- package/lib/style/mixins/hairline.less +3 -3
- package/lib/style/var.less +5 -3
- package/lib/submit-bar/SubmitBar.d.ts +30 -1
- package/lib/submit-bar/SubmitBar.js +23 -20
- package/lib/submit-bar/index.css +1 -1
- package/lib/submit-bar/var.less +3 -3
- package/lib/swipe/Swipe.d.ts +2 -2
- package/lib/swipe/Swipe.js +29 -14
- package/lib/swipe-cell/SwipeCell.d.ts +2 -2
- package/lib/swipe-cell/SwipeCell.js +12 -7
- package/lib/swipe-item/SwipeItem.js +4 -3
- package/lib/switch/Switch.d.ts +18 -0
- package/lib/switch/Switch.js +22 -19
- package/lib/switch/index.css +1 -1
- package/lib/switch/index.d.ts +1 -0
- package/lib/switch/var.less +1 -1
- package/lib/tab/Tab.d.ts +19 -1
- package/lib/tab/Tab.js +16 -14
- package/lib/tab/index.d.ts +1 -0
- package/lib/tabbar/Tabbar.d.ts +3 -2
- package/lib/tabbar/Tabbar.js +7 -6
- package/lib/tabbar/index.css +1 -1
- package/lib/tabbar/index.d.ts +1 -0
- package/lib/tabbar/var.less +1 -1
- package/lib/tabbar-item/TabbarItem.d.ts +13 -0
- package/lib/tabbar-item/TabbarItem.js +13 -11
- package/lib/tabbar-item/index.css +1 -1
- package/lib/tabbar-item/index.d.ts +1 -0
- package/lib/tabbar-item/var.less +1 -1
- package/lib/tabs/Tabs.d.ts +2 -2
- package/lib/tabs/Tabs.js +13 -7
- package/lib/tabs/TabsContent.js +5 -4
- package/lib/tabs/index.css +1 -1
- package/lib/tabs/var.less +2 -2
- package/lib/tag/Tag.d.ts +23 -3
- package/lib/tag/Tag.js +18 -15
- package/lib/tag/index.css +1 -1
- package/lib/tag/index.d.ts +3 -2
- package/lib/tag/var.less +1 -1
- package/lib/toast/Toast.d.ts +33 -1
- package/lib/toast/Toast.js +26 -24
- package/lib/toast/function-call.js +10 -2
- package/lib/toast/index.d.ts +1 -0
- package/lib/tree-select/TreeSelect.d.ts +28 -1
- package/lib/tree-select/TreeSelect.js +18 -15
- package/lib/tree-select/index.css +1 -1
- package/lib/tree-select/index.d.ts +1 -1
- package/lib/tree-select/var.less +1 -1
- package/lib/uploader/Uploader.d.ts +2 -2
- package/lib/uploader/Uploader.js +17 -10
- package/lib/uploader/UploaderPreviewItem.js +6 -4
- package/lib/uploader/index.css +1 -1
- package/lib/uploader/var.less +1 -1
- package/lib/utils/constant.d.ts +1 -0
- package/lib/utils/constant.js +3 -1
- package/lib/utils/create.d.ts +2 -2
- package/lib/utils/create.js +6 -1
- package/lib/utils/deep-assign.d.ts +1 -1
- package/lib/utils/deep-assign.js +1 -1
- package/lib/utils/deep-clone.js +1 -1
- package/lib/utils/dom.d.ts +0 -1
- package/lib/utils/dom.js +0 -7
- package/lib/utils/format.js +14 -2
- package/lib/utils/interceptor.d.ts +2 -2
- package/lib/utils/interceptor.js +7 -5
- package/lib/vant.es.js +2433 -2175
- package/lib/vant.es.min.js +2433 -2175
- package/lib/vant.js +2433 -2175
- package/lib/vant.min.js +1 -1
- package/package.json +2 -2
- package/vetur/attributes.json +52 -52
- package/vetur/tags.json +17 -17
- package/vetur/web-types.json +181 -177
@@ -13,28 +13,30 @@ var DEFAULT_CONTACT = {
|
|
13
13
|
tel: '',
|
14
14
|
name: ''
|
15
15
|
};
|
16
|
+
var contactEditProps = {
|
17
|
+
isEdit: Boolean,
|
18
|
+
isSaving: Boolean,
|
19
|
+
isDeleting: Boolean,
|
20
|
+
showSetDefault: Boolean,
|
21
|
+
setDefaultLabel: String,
|
22
|
+
contactInfo: {
|
23
|
+
type: Object,
|
24
|
+
default: () => extend({}, DEFAULT_CONTACT)
|
25
|
+
},
|
26
|
+
telValidator: {
|
27
|
+
type: Function,
|
28
|
+
default: isMobile
|
29
|
+
}
|
30
|
+
};
|
16
31
|
export default defineComponent({
|
17
32
|
name,
|
18
|
-
props:
|
19
|
-
isEdit: Boolean,
|
20
|
-
isSaving: Boolean,
|
21
|
-
isDeleting: Boolean,
|
22
|
-
showSetDefault: Boolean,
|
23
|
-
setDefaultLabel: String,
|
24
|
-
contactInfo: {
|
25
|
-
type: Object,
|
26
|
-
default: () => extend({}, DEFAULT_CONTACT)
|
27
|
-
},
|
28
|
-
telValidator: {
|
29
|
-
type: Function,
|
30
|
-
default: isMobile
|
31
|
-
}
|
32
|
-
},
|
33
|
+
props: contactEditProps,
|
33
34
|
emits: ['save', 'delete', 'change-default'],
|
34
35
|
|
35
|
-
setup(props, {
|
36
|
-
|
37
|
-
|
36
|
+
setup(props, _ref) {
|
37
|
+
var {
|
38
|
+
emit
|
39
|
+
} = _ref;
|
38
40
|
var contact = reactive(extend({}, DEFAULT_CONTACT, props.contactInfo));
|
39
41
|
|
40
42
|
var onSave = () => {
|
@@ -42,4 +42,4 @@ export declare const ContactEdit: import("../utils").WithInstall<import("vue").D
|
|
42
42
|
contactInfo: import("./ContactEdit").ContactEditInfo;
|
43
43
|
}>>;
|
44
44
|
export default ContactEdit;
|
45
|
-
export type { ContactEditInfo } from './ContactEdit';
|
45
|
+
export type { ContactEditInfo, ContactEditProps } from './ContactEdit';
|
@@ -1,10 +1,17 @@
|
|
1
|
-
import { PropType } from 'vue';
|
1
|
+
import { PropType, ExtractPropTypes } from 'vue';
|
2
2
|
export declare type ContactListItem = {
|
3
3
|
id?: number | string;
|
4
4
|
tel: number | string;
|
5
5
|
name: string;
|
6
6
|
isDefault?: boolean;
|
7
7
|
};
|
8
|
+
declare const contactListProps: {
|
9
|
+
list: PropType<ContactListItem[]>;
|
10
|
+
addText: StringConstructor;
|
11
|
+
modelValue: PropType<unknown>;
|
12
|
+
defaultTagText: StringConstructor;
|
13
|
+
};
|
14
|
+
export declare type ContactListProps = ExtractPropTypes<typeof contactListProps>;
|
8
15
|
declare const _default: import("vue").DefineComponent<{
|
9
16
|
list: PropType<ContactListItem[]>;
|
10
17
|
addText: StringConstructor;
|
@@ -10,19 +10,22 @@ import { Radio } from '../radio';
|
|
10
10
|
import { Button } from '../button';
|
11
11
|
import { RadioGroup } from '../radio-group';
|
12
12
|
var [name, bem, t] = createNamespace('contact-list');
|
13
|
+
var contactListProps = {
|
14
|
+
list: Array,
|
15
|
+
addText: String,
|
16
|
+
modelValue: unknownProp,
|
17
|
+
defaultTagText: String
|
18
|
+
};
|
13
19
|
export default defineComponent({
|
14
20
|
name,
|
15
|
-
props:
|
16
|
-
list: Array,
|
17
|
-
addText: String,
|
18
|
-
modelValue: unknownProp,
|
19
|
-
defaultTagText: String
|
20
|
-
},
|
21
|
+
props: contactListProps,
|
21
22
|
emits: ['add', 'edit', 'select', 'update:modelValue'],
|
22
23
|
|
23
|
-
setup(props, {
|
24
|
-
|
25
|
-
|
24
|
+
setup(props, _ref) {
|
25
|
+
var {
|
26
|
+
emit
|
27
|
+
} = _ref;
|
28
|
+
|
26
29
|
var renderItem = (item, index) => {
|
27
30
|
var onClick = () => {
|
28
31
|
emit('update:modelValue', item.id);
|
@@ -1 +1 @@
|
|
1
|
-
:root{--van-contact-list-edit-icon-size:16px;--van-contact-list-add-button-z-index:999;--van-contact-list-item-padding:var(--van-padding-md);--van-contact-list-item-radio-icon-color:var(--van-danger-color)}.van-contact-list{box-sizing:border-box;height:100%;padding-bottom:80px}.van-contact-list__item{padding:var(--van-contact-list-item-padding)}.van-contact-list__item-value{display:flex;align-items:center;padding-right:var(--van-padding-xl);padding-left:var(--van-padding-xs)}.van-contact-list__item-tag{flex:none;margin-left:var(--van-padding-xs);padding-top:0;padding-bottom:0;line-height:1.4em}.van-contact-list__group{box-sizing:border-box;height:100%;overflow-y:scroll;-webkit-overflow-scrolling:touch}.van-contact-list__edit{font-size:var(--van-contact-list-edit-icon-size)}.van-contact-list__radio .van-radio__icon--checked .van-icon{background-color:var(--van-contact-list-item-radio-icon-color);border-color:var(--van-contact-list-item-radio-icon-color)}.van-contact-list__bottom{position:fixed;right:0;bottom:0;left:0;z-index:var(--van-contact-list-add-button-z-index);padding-left:var(--van-padding-md);padding-right:var(--van-padding-md);background-color:var(--van-
|
1
|
+
:root{--van-contact-list-edit-icon-size:16px;--van-contact-list-add-button-z-index:999;--van-contact-list-item-padding:var(--van-padding-md);--van-contact-list-item-radio-icon-color:var(--van-danger-color)}.van-contact-list{box-sizing:border-box;height:100%;padding-bottom:80px}.van-contact-list__item{padding:var(--van-contact-list-item-padding)}.van-contact-list__item-value{display:flex;align-items:center;padding-right:var(--van-padding-xl);padding-left:var(--van-padding-xs)}.van-contact-list__item-tag{flex:none;margin-left:var(--van-padding-xs);padding-top:0;padding-bottom:0;line-height:1.4em}.van-contact-list__group{box-sizing:border-box;height:100%;overflow-y:scroll;-webkit-overflow-scrolling:touch}.van-contact-list__edit{font-size:var(--van-contact-list-edit-icon-size)}.van-contact-list__radio .van-radio__icon--checked .van-icon{background-color:var(--van-contact-list-item-radio-icon-color);border-color:var(--van-contact-list-item-radio-icon-color)}.van-contact-list__bottom{position:fixed;right:0;bottom:0;left:0;z-index:var(--van-contact-list-add-button-z-index);padding-left:var(--van-padding-md);padding-right:var(--van-padding-md);background-color:var(--van-background-color-light)}.van-contact-list__add{height:40px;margin:5px 0}
|
@@ -20,4 +20,4 @@ export declare const ContactList: import("../utils").WithInstall<import("vue").D
|
|
20
20
|
onAdd?: ((...args: any[]) => any) | undefined;
|
21
21
|
}, {}>>;
|
22
22
|
export default ContactList;
|
23
|
-
export type { ContactListItem } from './ContactList';
|
23
|
+
export type { ContactListItem, ContactListProps } from './ContactList';
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ExtractPropTypes } from 'vue';
|
2
|
-
declare const
|
2
|
+
declare const countDownProps: {
|
3
3
|
time: {
|
4
4
|
type: (NumberConstructor | StringConstructor)[];
|
5
5
|
default: number;
|
@@ -14,7 +14,7 @@ declare const props: {
|
|
14
14
|
};
|
15
15
|
millisecond: BooleanConstructor;
|
16
16
|
};
|
17
|
-
export declare type CountDownProps = ExtractPropTypes<typeof
|
17
|
+
export declare type CountDownProps = ExtractPropTypes<typeof countDownProps>;
|
18
18
|
declare const _default: import("vue").DefineComponent<{
|
19
19
|
time: {
|
20
20
|
type: (NumberConstructor | StringConstructor)[];
|
@@ -7,7 +7,7 @@ import { parseFormat } from './utils'; // Composables
|
|
7
7
|
import { useCountDown } from '@vant/use';
|
8
8
|
import { useExpose } from '../composables/use-expose';
|
9
9
|
var [name, bem] = createNamespace('count-down');
|
10
|
-
var
|
10
|
+
var countDownProps = {
|
11
11
|
time: makeNumericProp(0),
|
12
12
|
format: makeStringProp('HH:mm:ss'),
|
13
13
|
autoStart: truthProp,
|
@@ -15,13 +15,14 @@ var props = {
|
|
15
15
|
};
|
16
16
|
export default defineComponent({
|
17
17
|
name,
|
18
|
-
props,
|
18
|
+
props: countDownProps,
|
19
19
|
emits: ['change', 'finish'],
|
20
20
|
|
21
|
-
setup(props, {
|
22
|
-
|
23
|
-
|
24
|
-
|
21
|
+
setup(props, _ref) {
|
22
|
+
var {
|
23
|
+
emit,
|
24
|
+
slots
|
25
|
+
} = _ref;
|
25
26
|
var {
|
26
27
|
start,
|
27
28
|
pause,
|
package/es/count-down/index.d.ts
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
import { CountDownProps } from './CountDown';
|
2
1
|
export declare const CountDown: import("../utils").WithInstall<import("vue").DefineComponent<{
|
3
2
|
time: {
|
4
3
|
type: (NumberConstructor | StringConstructor)[];
|
@@ -33,5 +32,5 @@ export declare const CountDown: import("../utils").WithInstall<import("vue").Def
|
|
33
32
|
millisecond: boolean;
|
34
33
|
}>>;
|
35
34
|
export default CountDown;
|
36
|
-
export type { CountDownProps };
|
35
|
+
export type { CountDownProps } from './CountDown';
|
37
36
|
export type { CountDownInstance, CountDownCurrentTime } from './types';
|
package/es/coupon/Coupon.js
CHANGED
@@ -1,18 +1,9 @@
|
|
1
1
|
import { createVNode as _createVNode } from "vue";
|
2
2
|
import { computed, defineComponent } from 'vue';
|
3
|
-
import {
|
3
|
+
import { makeStringProp, createNamespace, makeRequiredProp } from '../utils';
|
4
|
+
import { getDate, formatAmount, formatDiscount } from './utils';
|
4
5
|
import { Checkbox } from '../checkbox';
|
5
6
|
var [name, bem, t] = createNamespace('coupon');
|
6
|
-
|
7
|
-
function getDate(timeStamp) {
|
8
|
-
var date = new Date(timeStamp * 1000);
|
9
|
-
return date.getFullYear() + "." + padZero(date.getMonth() + 1) + "." + padZero(date.getDate());
|
10
|
-
}
|
11
|
-
|
12
|
-
var formatDiscount = discount => (discount / 10).toFixed(discount % 10 === 0 ? 0 : 1);
|
13
|
-
|
14
|
-
var formatAmount = amount => (amount / 100).toFixed(amount % 100 === 0 ? 0 : amount % 10 === 0 ? 1 : 2);
|
15
|
-
|
16
7
|
export default defineComponent({
|
17
8
|
name,
|
18
9
|
props: {
|
package/es/coupon/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
:root{--van-coupon-margin:0 var(--van-padding-sm) var(--van-padding-sm);--van-coupon-content-height:84px;--van-coupon-content-padding:14px 0;--van-coupon-background-color:var(--van-
|
1
|
+
:root{--van-coupon-margin:0 var(--van-padding-sm) var(--van-padding-sm);--van-coupon-content-height:84px;--van-coupon-content-padding:14px 0;--van-coupon-content-text-color:var(--van-text-color);--van-coupon-background-color:var(--van-background-color-light);--van-coupon-active-background-color:var(--van-active-color);--van-coupon-border-radius:var(--van-border-radius-lg);--van-coupon-box-shadow:0 0 4px rgba(0, 0, 0, 0.1);--van-coupon-head-width:96px;--van-coupon-amount-color:var(--van-danger-color);--van-coupon-amount-font-size:30px;--van-coupon-currency-font-size:40%;--van-coupon-name-font-size:var(--van-font-size-md);--van-coupon-disabled-text-color:var(--van-text-color-2);--van-coupon-description-padding:var(--van-padding-xs) var(--van-padding-md);--van-coupon-description-border-color:var(--van-border-color);--van-coupon-corner-checkbox-icon-color:var(--van-danger-color)}.van-coupon{margin:var(--van-coupon-margin);overflow:hidden;background:var(--van-coupon-background-color);border-radius:var(--van-coupon-border-radius);box-shadow:var(--van-coupon-box-shadow)}.van-coupon:active{background-color:var(--van-coupon-active-background-color)}.van-coupon__content{display:flex;align-items:center;box-sizing:border-box;min-height:var(--van-coupon-content-height);padding:var(--van-coupon-content-padding);color:var(--van-coupon-content-text-color)}.van-coupon__head{position:relative;min-width:var(--van-coupon-head-width);padding:0 var(--van-padding-xs);color:var(--van-coupon-amount-color);text-align:center}.van-coupon__amount,.van-coupon__condition,.van-coupon__name,.van-coupon__valid{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-coupon__amount{margin-bottom:6px;font-weight:var(--van-font-weight-bold);font-size:var(--van-coupon-amount-font-size);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-coupon__amount span{font-weight:400;font-size:var(--van-coupon-currency-font-size)}.van-coupon__amount span:not(:empty){margin-left:2px}.van-coupon__condition{font-size:var(--van-font-size-sm);line-height:16px;white-space:pre-wrap}.van-coupon__body{position:relative;flex:1;border-radius:0 var(--van-coupon-border-radius) var(--van-coupon-border-radius) 0}.van-coupon__name{margin-bottom:10px;font-weight:700;font-size:var(--van-coupon-name-font-size);line-height:var(--van-line-height-md)}.van-coupon__valid{font-size:var(--van-font-size-sm)}.van-coupon__corner{position:absolute;top:0;right:var(--van-padding-md);bottom:0}.van-coupon__corner .van-checkbox__icon--checked .van-icon{background-color:var(--van-coupon-corner-checkbox-icon-color);border-color:var(--van-coupon-corner-checkbox-icon-color)}.van-coupon__description{padding:var(--van-coupon-description-padding);font-size:var(--van-font-size-sm);border-top:1px dashed var(--van-coupon-description-border-color)}.van-coupon--disabled:active{background-color:var(--van-coupon-background-color)}.van-coupon--disabled .van-coupon-item__content{height:calc(var(--van-coupon-content-height) - 10px)}.van-coupon--disabled .van-coupon__head{color:inherit}
|
package/es/coupon/index.less
CHANGED
@@ -5,6 +5,7 @@
|
|
5
5
|
--van-coupon-margin: @coupon-margin;
|
6
6
|
--van-coupon-content-height: @coupon-content-height;
|
7
7
|
--van-coupon-content-padding: @coupon-content-padding;
|
8
|
+
--van-coupon-content-text-color: @coupon-content-text-color;
|
8
9
|
--van-coupon-background-color: @coupon-background-color;
|
9
10
|
--van-coupon-active-background-color: @coupon-active-background-color;
|
10
11
|
--van-coupon-border-radius: @coupon-border-radius;
|
@@ -37,7 +38,7 @@
|
|
37
38
|
box-sizing: border-box;
|
38
39
|
min-height: var(--van-coupon-content-height);
|
39
40
|
padding: var(--van-coupon-content-padding);
|
40
|
-
color: var(--van-
|
41
|
+
color: var(--van-coupon-content-text-color);
|
41
42
|
}
|
42
43
|
|
43
44
|
&__head {
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { padZero } from '../utils';
|
2
|
+
export function getDate(timeStamp) {
|
3
|
+
var date = new Date(timeStamp * 1000);
|
4
|
+
return date.getFullYear() + "." + padZero(date.getMonth() + 1) + "." + padZero(date.getDate());
|
5
|
+
}
|
6
|
+
export var formatDiscount = discount => (discount / 10).toFixed(discount % 10 === 0 ? 0 : 1);
|
7
|
+
export var formatAmount = amount => (amount / 100).toFixed(amount % 100 === 0 ? 0 : amount % 10 === 0 ? 1 : 2);
|
package/es/coupon/var.less
CHANGED
@@ -3,7 +3,8 @@
|
|
3
3
|
@coupon-margin: 0 var(--van-padding-sm) var(--van-padding-sm);
|
4
4
|
@coupon-content-height: 84px;
|
5
5
|
@coupon-content-padding: 14px 0;
|
6
|
-
@coupon-
|
6
|
+
@coupon-content-text-color: var(--van-text-color);
|
7
|
+
@coupon-background-color: var(--van-background-color-light);
|
7
8
|
@coupon-active-background-color: var(--van-active-color);
|
8
9
|
@coupon-border-radius: var(--van-border-radius-lg);
|
9
10
|
@coupon-box-shadow: 0 0 4px rgba(0, 0, 0, 0.1);
|
@@ -12,7 +13,7 @@
|
|
12
13
|
@coupon-amount-font-size: 30px;
|
13
14
|
@coupon-currency-font-size: 40%;
|
14
15
|
@coupon-name-font-size: var(--van-font-size-md);
|
15
|
-
@coupon-disabled-text-color: var(--van-
|
16
|
+
@coupon-disabled-text-color: var(--van-text-color-2);
|
16
17
|
@coupon-description-padding: var(--van-padding-xs) var(--van-padding-md);
|
17
18
|
@coupon-description-border-color: var(--van-border-color);
|
18
19
|
@coupon-corner-checkbox-icon-color: var(--van-danger-color);
|
@@ -1,4 +1,29 @@
|
|
1
|
+
import { ExtractPropTypes } from 'vue';
|
1
2
|
import type { CouponInfo } from '../coupon';
|
3
|
+
declare const couponCellProps: {
|
4
|
+
title: StringConstructor;
|
5
|
+
border: {
|
6
|
+
type: BooleanConstructor;
|
7
|
+
default: true;
|
8
|
+
};
|
9
|
+
editable: {
|
10
|
+
type: BooleanConstructor;
|
11
|
+
default: true;
|
12
|
+
};
|
13
|
+
coupons: {
|
14
|
+
type: import("vue").PropType<CouponInfo[]>;
|
15
|
+
default: () => never[];
|
16
|
+
};
|
17
|
+
currency: {
|
18
|
+
type: import("vue").PropType<string>;
|
19
|
+
default: string;
|
20
|
+
};
|
21
|
+
chosenCoupon: {
|
22
|
+
type: (NumberConstructor | StringConstructor)[];
|
23
|
+
default: number;
|
24
|
+
};
|
25
|
+
};
|
26
|
+
export declare type CouponCellProps = ExtractPropTypes<typeof couponCellProps>;
|
2
27
|
declare const _default: import("vue").DefineComponent<{
|
3
28
|
title: StringConstructor;
|
4
29
|
border: {
|
@@ -6,8 +6,21 @@ import { isDef, truthProp, makeArrayProp, makeStringProp, makeNumericProp, creat
|
|
6
6
|
import { Cell } from '../cell'; // Types
|
7
7
|
|
8
8
|
var [name, bem, t] = createNamespace('coupon-cell');
|
9
|
-
|
10
|
-
|
9
|
+
var couponCellProps = {
|
10
|
+
title: String,
|
11
|
+
border: truthProp,
|
12
|
+
editable: truthProp,
|
13
|
+
coupons: makeArrayProp(),
|
14
|
+
currency: makeStringProp('¥'),
|
15
|
+
chosenCoupon: makeNumericProp(-1)
|
16
|
+
};
|
17
|
+
|
18
|
+
function formatValue(_ref) {
|
19
|
+
var {
|
20
|
+
coupons,
|
21
|
+
chosenCoupon,
|
22
|
+
currency
|
23
|
+
} = _ref;
|
11
24
|
var coupon = coupons[+chosenCoupon];
|
12
25
|
|
13
26
|
if (coupon) {
|
@@ -29,22 +42,14 @@ function formatValue(coupons, chosenCoupon, currency) {
|
|
29
42
|
|
30
43
|
export default defineComponent({
|
31
44
|
name,
|
32
|
-
props:
|
33
|
-
title: String,
|
34
|
-
border: truthProp,
|
35
|
-
editable: truthProp,
|
36
|
-
coupons: makeArrayProp(),
|
37
|
-
currency: makeStringProp('¥'),
|
38
|
-
chosenCoupon: makeNumericProp(-1)
|
39
|
-
},
|
45
|
+
props: couponCellProps,
|
40
46
|
|
41
47
|
setup(props) {
|
42
48
|
return () => {
|
43
49
|
var selected = props.coupons[+props.chosenCoupon];
|
44
|
-
var value = formatValue(props.coupons, props.chosenCoupon, props.currency);
|
45
50
|
return _createVNode(Cell, {
|
46
51
|
"class": bem(),
|
47
|
-
"value":
|
52
|
+
"value": formatValue(props),
|
48
53
|
"title": props.title || t('title'),
|
49
54
|
"border": props.border,
|
50
55
|
"isLink": props.editable,
|
@@ -1,4 +1,59 @@
|
|
1
|
+
import { ExtractPropTypes } from 'vue';
|
1
2
|
import { CouponInfo } from '../coupon';
|
3
|
+
declare const couponListProps: {
|
4
|
+
code: {
|
5
|
+
type: import("vue").PropType<string>;
|
6
|
+
default: string;
|
7
|
+
};
|
8
|
+
coupons: {
|
9
|
+
type: import("vue").PropType<CouponInfo[]>;
|
10
|
+
default: () => never[];
|
11
|
+
};
|
12
|
+
currency: {
|
13
|
+
type: import("vue").PropType<string>;
|
14
|
+
default: string;
|
15
|
+
};
|
16
|
+
showCount: {
|
17
|
+
type: BooleanConstructor;
|
18
|
+
default: true;
|
19
|
+
};
|
20
|
+
emptyImage: {
|
21
|
+
type: import("vue").PropType<string>;
|
22
|
+
default: string;
|
23
|
+
};
|
24
|
+
chosenCoupon: {
|
25
|
+
type: NumberConstructor;
|
26
|
+
default: number;
|
27
|
+
};
|
28
|
+
enabledTitle: StringConstructor;
|
29
|
+
disabledTitle: StringConstructor;
|
30
|
+
disabledCoupons: {
|
31
|
+
type: import("vue").PropType<CouponInfo[]>;
|
32
|
+
default: () => never[];
|
33
|
+
};
|
34
|
+
showExchangeBar: {
|
35
|
+
type: BooleanConstructor;
|
36
|
+
default: true;
|
37
|
+
};
|
38
|
+
showCloseButton: {
|
39
|
+
type: BooleanConstructor;
|
40
|
+
default: true;
|
41
|
+
};
|
42
|
+
closeButtonText: StringConstructor;
|
43
|
+
inputPlaceholder: StringConstructor;
|
44
|
+
exchangeMinLength: {
|
45
|
+
type: NumberConstructor;
|
46
|
+
default: number;
|
47
|
+
};
|
48
|
+
exchangeButtonText: StringConstructor;
|
49
|
+
displayedCouponIndex: {
|
50
|
+
type: NumberConstructor;
|
51
|
+
default: number;
|
52
|
+
};
|
53
|
+
exchangeButtonLoading: BooleanConstructor;
|
54
|
+
exchangeButtonDisabled: BooleanConstructor;
|
55
|
+
};
|
56
|
+
export declare type CouponListProps = ExtractPropTypes<typeof couponListProps>;
|
2
57
|
declare const _default: import("vue").DefineComponent<{
|
3
58
|
code: {
|
4
59
|
type: import("vue").PropType<string>;
|
@@ -12,34 +12,36 @@ import { Button } from '../button';
|
|
12
12
|
import { Coupon } from '../coupon';
|
13
13
|
var [name, bem, t] = createNamespace('coupon-list');
|
14
14
|
var EMPTY_IMAGE = 'https://img.yzcdn.cn/vant/coupon-empty.png';
|
15
|
+
var couponListProps = {
|
16
|
+
code: makeStringProp(''),
|
17
|
+
coupons: makeArrayProp(),
|
18
|
+
currency: makeStringProp('¥'),
|
19
|
+
showCount: truthProp,
|
20
|
+
emptyImage: makeStringProp(EMPTY_IMAGE),
|
21
|
+
chosenCoupon: makeNumberProp(-1),
|
22
|
+
enabledTitle: String,
|
23
|
+
disabledTitle: String,
|
24
|
+
disabledCoupons: makeArrayProp(),
|
25
|
+
showExchangeBar: truthProp,
|
26
|
+
showCloseButton: truthProp,
|
27
|
+
closeButtonText: String,
|
28
|
+
inputPlaceholder: String,
|
29
|
+
exchangeMinLength: makeNumberProp(1),
|
30
|
+
exchangeButtonText: String,
|
31
|
+
displayedCouponIndex: makeNumberProp(-1),
|
32
|
+
exchangeButtonLoading: Boolean,
|
33
|
+
exchangeButtonDisabled: Boolean
|
34
|
+
};
|
15
35
|
export default defineComponent({
|
16
36
|
name,
|
17
|
-
props:
|
18
|
-
code: makeStringProp(''),
|
19
|
-
coupons: makeArrayProp(),
|
20
|
-
currency: makeStringProp('¥'),
|
21
|
-
showCount: truthProp,
|
22
|
-
emptyImage: makeStringProp(EMPTY_IMAGE),
|
23
|
-
chosenCoupon: makeNumberProp(-1),
|
24
|
-
enabledTitle: String,
|
25
|
-
disabledTitle: String,
|
26
|
-
disabledCoupons: makeArrayProp(),
|
27
|
-
showExchangeBar: truthProp,
|
28
|
-
showCloseButton: truthProp,
|
29
|
-
closeButtonText: String,
|
30
|
-
inputPlaceholder: String,
|
31
|
-
exchangeMinLength: makeNumberProp(1),
|
32
|
-
exchangeButtonText: String,
|
33
|
-
displayedCouponIndex: makeNumberProp(-1),
|
34
|
-
exchangeButtonLoading: Boolean,
|
35
|
-
exchangeButtonDisabled: Boolean
|
36
|
-
},
|
37
|
+
props: couponListProps,
|
37
38
|
emits: ['change', 'exchange', 'update:code'],
|
38
39
|
|
39
|
-
setup(props, {
|
40
|
-
|
41
|
-
|
42
|
-
|
40
|
+
setup(props, _ref) {
|
41
|
+
var {
|
42
|
+
emit,
|
43
|
+
slots
|
44
|
+
} = _ref;
|
43
45
|
var [couponRefs, setCouponRefs] = useRefs();
|
44
46
|
var state = reactive({
|
45
47
|
tab: 0,
|
package/es/coupon-list/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
:root{--van-coupon-list-background-color:var(--van-background-color);--van-coupon-list-field-padding:5px 0 5px var(--van-padding-md);--van-coupon-list-exchange-button-height:32px;--van-coupon-list-close-button-height:40px;--van-coupon-list-empty-image-size:200px;--van-coupon-list-empty-tip-color:var(--van-
|
1
|
+
:root{--van-coupon-list-background-color:var(--van-background-color);--van-coupon-list-field-padding:5px 0 5px var(--van-padding-md);--van-coupon-list-exchange-button-height:32px;--van-coupon-list-close-button-height:40px;--van-coupon-list-empty-image-size:200px;--van-coupon-list-empty-tip-color:var(--van-text-color-2);--van-coupon-list-empty-tip-font-size:var(--van-font-size-md);--van-coupon-list-empty-tip-line-height:var(--van-line-height-md)}.van-coupon-list{position:relative;height:100%;background:var(--van-coupon-list-background-color)}.van-coupon-list__field{padding:var(--van-coupon-list-field-padding)}.van-coupon-list__field .van-field__body{height:34px;padding-left:var(--van-padding-sm);line-height:34px;background:var(--van-gray-1);border-radius:17px}.van-coupon-list__field .van-field__body::-webkit-input-placeholder{color:var(--van-text-color-3)}.van-coupon-list__field .van-field__body::placeholder{color:var(--van-text-color-3)}.van-coupon-list__field .van-field__clear{margin-right:0}.van-coupon-list__exchange-bar{display:flex;align-items:center;background-color:var(--van-background-color-light)}.van-coupon-list__exchange{flex:none;height:var(--van-coupon-list-exchange-button-height);font-size:var(--van-font-size-lg);line-height:calc(var(--van-coupon-list-exchange-button-height) - 2px);border:0}.van-coupon-list .van-tabs__wrap{box-shadow:0 6px 12px -12px var(--van-gray-6)}.van-coupon-list__list{box-sizing:border-box;height:calc(100vh - 108px);padding:var(--van-padding-md) 0 var(--van-padding-lg);overflow-y:auto;-webkit-overflow-scrolling:touch}.van-coupon-list__list--with-bar{height:calc(100vh - 152px)}.van-coupon-list__list--with-bottom{padding-bottom:50px}.van-coupon-list__bottom{position:absolute;bottom:0;left:0;z-index:999;box-sizing:border-box;width:100%;padding:5px var(--van-padding-md);font-weight:var(--van-font-weight-bold);background-color:var(--van-background-color-light)}.van-coupon-list__close{height:var(--van-coupon-list-close-button-height)}.van-coupon-list__empty{padding-top:60px;text-align:center}.van-coupon-list__empty p{margin:var(--van-padding-md) 0;color:var(--van-coupon-list-empty-tip-color);font-size:var(--van-coupon-list-empty-tip-font-size);line-height:var(--van-coupon-list-empty-tip-line-height)}.van-coupon-list__empty img{width:var(--van-coupon-list-empty-image-size);height:var(--van-coupon-list-empty-image-size)}
|
@@ -27,7 +27,7 @@
|
|
27
27
|
border-radius: 17px;
|
28
28
|
|
29
29
|
&::placeholder {
|
30
|
-
color: var(--van-
|
30
|
+
color: var(--van-text-color-3);
|
31
31
|
}
|
32
32
|
}
|
33
33
|
|
@@ -39,7 +39,7 @@
|
|
39
39
|
&__exchange-bar {
|
40
40
|
display: flex;
|
41
41
|
align-items: center;
|
42
|
-
background-color: var(--van-
|
42
|
+
background-color: var(--van-background-color-light);
|
43
43
|
}
|
44
44
|
|
45
45
|
&__exchange {
|
@@ -79,7 +79,7 @@
|
|
79
79
|
width: 100%;
|
80
80
|
padding: 5px var(--van-padding-md);
|
81
81
|
font-weight: var(--van-font-weight-bold);
|
82
|
-
background-color: var(--van-
|
82
|
+
background-color: var(--van-background-color-light);
|
83
83
|
}
|
84
84
|
|
85
85
|
&__close {
|
package/es/coupon-list/var.less
CHANGED
@@ -5,6 +5,6 @@
|
|
5
5
|
@coupon-list-exchange-button-height: 32px;
|
6
6
|
@coupon-list-close-button-height: 40px;
|
7
7
|
@coupon-list-empty-image-size: 200px;
|
8
|
-
@coupon-list-empty-tip-color: var(--van-
|
8
|
+
@coupon-list-empty-tip-color: var(--van-text-color-2);
|
9
9
|
@coupon-list-empty-tip-font-size: var(--van-font-size-md);
|
10
10
|
@coupon-list-empty-tip-line-height: var(--van-line-height-md);
|
@@ -2,7 +2,7 @@ import { createVNode as _createVNode, mergeProps as _mergeProps, resolveDirectiv
|
|
2
2
|
import { ref, watch, computed, nextTick, onMounted, defineComponent } from 'vue'; // Utils
|
3
3
|
|
4
4
|
import { pick, clamp, extend, isDate, padZero, makeStringProp, createNamespace } from '../utils';
|
5
|
-
import { times,
|
5
|
+
import { times, sharedProps, getTrueValue, getMonthEndDay, pickerInheritKeys } from './utils'; // Composables
|
6
6
|
|
7
7
|
import { useExpose } from '../composables/use-expose'; // Components
|
8
8
|
|
@@ -28,10 +28,12 @@ export default defineComponent({
|
|
28
28
|
}),
|
29
29
|
emits: ['confirm', 'cancel', 'change', 'update:modelValue'],
|
30
30
|
|
31
|
-
setup(props, {
|
32
|
-
|
33
|
-
|
34
|
-
|
31
|
+
setup(props, _ref) {
|
32
|
+
var {
|
33
|
+
emit,
|
34
|
+
slots
|
35
|
+
} = _ref;
|
36
|
+
|
35
37
|
var formatValue = value => {
|
36
38
|
if (isDate(value)) {
|
37
39
|
var timestamp = clamp(value.getTime(), props.minDate.getTime(), props.maxDate.getTime());
|
@@ -141,10 +143,11 @@ export default defineComponent({
|
|
141
143
|
|
142
144
|
return result;
|
143
145
|
});
|
144
|
-
var originColumns = computed(() => ranges.value.map(
|
145
|
-
|
146
|
-
|
147
|
-
|
146
|
+
var originColumns = computed(() => ranges.value.map(_ref2 => {
|
147
|
+
var {
|
148
|
+
type,
|
149
|
+
range: rangeArr
|
150
|
+
} = _ref2;
|
148
151
|
var values = times(rangeArr[1] - rangeArr[0] + 1, index => padZero(rangeArr[0] + index));
|
149
152
|
|
150
153
|
if (props.filter) {
|
@@ -286,7 +289,7 @@ export default defineComponent({
|
|
286
289
|
"onChange": onChange,
|
287
290
|
"onCancel": onCancel,
|
288
291
|
"onConfirm": onConfirm
|
289
|
-
}, pick(props,
|
292
|
+
}, pick(props, pickerInheritKeys)), slots);
|
290
293
|
}
|
291
294
|
|
292
295
|
});
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ExtractPropTypes } from 'vue';
|
2
|
-
declare const
|
3
|
-
export declare type DatetimePickerProps = ExtractPropTypes<typeof
|
2
|
+
declare const datetimePickerProps: any;
|
3
|
+
export declare type DatetimePickerProps = ExtractPropTypes<typeof datetimePickerProps>;
|
4
4
|
declare const _default: import("vue").DefineComponent<any, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("@vue/runtime-core").ComponentCustomProps, Readonly<any>, {} | {
|
5
5
|
[x: string]: any;
|
6
6
|
}>;
|
@@ -5,19 +5,20 @@ import { useExpose } from '../composables/use-expose';
|
|
5
5
|
import TimePicker from './TimePicker';
|
6
6
|
import DatePicker from './DatePicker';
|
7
7
|
var [name, bem] = createNamespace('datetime-picker');
|
8
|
-
var
|
9
|
-
var
|
10
|
-
var
|
8
|
+
var timePickerPropKeys = Object.keys(TimePicker.props);
|
9
|
+
var datePickerPropKeys = Object.keys(DatePicker.props);
|
10
|
+
var datetimePickerProps = extend({}, TimePicker.props, DatePicker.props, {
|
11
11
|
modelValue: [String, Date]
|
12
12
|
});
|
13
13
|
export default defineComponent({
|
14
14
|
name,
|
15
|
-
props,
|
15
|
+
props: datetimePickerProps,
|
16
16
|
|
17
|
-
setup(props, {
|
18
|
-
|
19
|
-
|
20
|
-
|
17
|
+
setup(props, _ref) {
|
18
|
+
var {
|
19
|
+
attrs,
|
20
|
+
slots
|
21
|
+
} = _ref;
|
21
22
|
var root = ref();
|
22
23
|
useExpose({
|
23
24
|
getPicker: () => {
|
@@ -29,7 +30,7 @@ export default defineComponent({
|
|
29
30
|
return () => {
|
30
31
|
var isTimePicker = props.type === 'time';
|
31
32
|
var Component = isTimePicker ? TimePicker : DatePicker;
|
32
|
-
var inheritProps = pick(props, isTimePicker ?
|
33
|
+
var inheritProps = pick(props, isTimePicker ? timePickerPropKeys : datePickerPropKeys);
|
33
34
|
return _createVNode(Component, _mergeProps({
|
34
35
|
"ref": root,
|
35
36
|
"class": bem()
|