vant 3.4.4 → 3.4.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/changelog.generated.md +81 -0
- package/es/address-list/AddressListItem.d.ts +3 -2
- package/es/address-list/AddressListItem.js +1 -1
- package/es/badge/Badge.d.ts +4 -3
- package/es/badge/index.d.ts +2 -2
- package/es/calendar/Calendar.d.ts +4 -0
- package/es/calendar/Calendar.js +3 -1
- package/es/calendar/index.d.ts +3 -0
- package/es/calendar/types.d.ts +2 -1
- package/es/cascader/types.d.ts +2 -1
- package/es/checkbox/Checker.d.ts +2 -1
- package/es/collapse/Collapse.d.ts +7 -6
- package/es/collapse/index.d.ts +3 -3
- package/es/collapse-item/CollapseItem.d.ts +13 -0
- package/es/collapse-item/CollapseItem.js +3 -2
- package/es/collapse-item/index.d.ts +9 -0
- package/es/composables/use-touch.js +1 -1
- package/es/config-provider/ConfigProvider.d.ts +4 -3
- package/es/config-provider/index.d.ts +2 -2
- package/es/contact-list/ContactList.d.ts +3 -2
- package/es/coupon/Coupon.d.ts +2 -1
- package/es/coupon-list/CouponList.d.ts +3 -13
- package/es/coupon-list/CouponList.js +9 -7
- package/es/coupon-list/index.css +1 -1
- package/es/coupon-list/index.d.ts +2 -9
- package/es/coupon-list/index.less +4 -16
- package/es/coupon-list/style/index.js +1 -0
- package/es/coupon-list/style/less.js +1 -0
- package/es/coupon-list/var.less +0 -1
- package/es/datetime-picker/DatePicker.js +1 -2
- package/es/dialog/Dialog.d.ts +2 -1
- package/es/dialog/Dialog.js +19 -3
- package/es/dialog/function-call.d.ts +2 -1
- package/es/dialog/types.d.ts +2 -2
- package/es/dropdown-item/types.d.ts +2 -1
- package/es/index-bar/IndexBar.d.ts +5 -4
- package/es/index-bar/IndexBar.js +25 -4
- package/es/index-bar/index.d.ts +3 -3
- package/es/index-bar/types.d.ts +2 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/locale/lang/bn-BD.d.ts +64 -0
- package/es/locale/lang/bn-BD.js +74 -0
- package/es/locale/lang/de-DE-formal.js +1 -1
- package/es/locale/lang/de-DE.js +1 -1
- package/es/locale/lang/en-US.js +1 -1
- package/es/locale/lang/es-ES.js +1 -1
- package/es/locale/lang/fr-FR.js +1 -1
- package/es/locale/lang/hi-IN.js +1 -1
- package/es/locale/lang/id-ID.d.ts +64 -0
- package/es/locale/lang/id-ID.js +66 -0
- package/es/locale/lang/is-IS.d.ts +64 -0
- package/es/locale/lang/is-IS.js +74 -0
- package/es/locale/lang/it-IT.d.ts +64 -0
- package/es/locale/lang/it-IT.js +74 -0
- package/es/locale/lang/ja-JP.js +1 -1
- package/es/locale/lang/ko-KR.js +1 -1
- package/es/locale/lang/la-LA.d.ts +64 -0
- package/es/locale/lang/la-LA.js +66 -0
- package/es/locale/lang/nb-NO.js +1 -1
- package/es/locale/lang/pt-BR.js +1 -1
- package/es/locale/lang/ro-RO.js +1 -1
- package/es/locale/lang/ru-RU.js +1 -1
- package/es/locale/lang/sv-SE.d.ts +64 -0
- package/es/locale/lang/sv-SE.js +66 -0
- package/es/locale/lang/th-TH.js +1 -1
- package/es/locale/lang/uk-UA.d.ts +64 -0
- package/es/locale/lang/uk-UA.js +74 -0
- package/es/locale/lang/vi-VN.d.ts +64 -0
- package/es/locale/lang/vi-VN.js +74 -0
- package/es/locale/lang/zh-CN.js +1 -1
- package/es/locale/lang/zh-HK.js +1 -1
- package/es/locale/lang/zh-TW.js +1 -1
- package/es/nav-bar/NavBar.d.ts +1 -1
- package/es/nav-bar/NavBar.js +3 -3
- package/es/nav-bar/index.d.ts +1 -1
- package/es/notify/types.d.ts +2 -1
- package/es/number-keyboard/NumberKeyboard.js +10 -1
- package/es/picker/types.d.ts +3 -2
- package/es/popup/Popup.d.ts +6 -1
- package/es/popup/Popup.js +14 -3
- package/es/popup/index.d.ts +5 -1
- package/es/popup/types.d.ts +5 -2
- package/es/progress/Progress.d.ts +4 -3
- package/es/progress/index.d.ts +2 -2
- package/es/skeleton/Skeleton.d.ts +5 -4
- package/es/skeleton/Skeleton.js +6 -4
- package/es/skeleton/index.d.ts +3 -3
- package/es/style/base.css +1 -1
- package/es/style/base.less +5 -0
- package/es/submit-bar/index.css +1 -1
- package/es/submit-bar/index.less +1 -0
- package/es/swipe-cell/SwipeCell.js +1 -1
- package/es/tabbar/Tabbar.d.ts +2 -2
- package/es/tabs/Tabs.d.ts +1 -1
- package/es/tabs/Tabs.js +1 -0
- package/es/tabs/types.d.ts +5 -4
- package/es/toast/Toast.d.ts +3 -0
- package/es/toast/Toast.js +3 -1
- package/es/toast/types.d.ts +3 -2
- package/es/tree-select/TreeSelect.d.ts +7 -6
- package/es/tree-select/index.d.ts +3 -3
- package/es/uploader/Uploader.d.ts +4 -4
- package/es/uploader/Uploader.js +2 -2
- package/es/uploader/UploaderPreviewItem.d.ts +3 -3
- package/es/uploader/UploaderPreviewItem.js +9 -6
- package/es/uploader/index.d.ts +2 -2
- package/es/uploader/types.d.ts +6 -8
- package/es/utils/basic.d.ts +1 -0
- package/es/utils/format.d.ts +7 -6
- package/es/utils/format.js +6 -0
- package/es/utils/interceptor.d.ts +1 -1
- package/es/utils/validate.d.ts +2 -1
- package/lib/action-bar/ActionBar.js +14 -13
- package/lib/action-bar/index.js +14 -8
- package/lib/action-bar-button/ActionBarButton.js +18 -17
- package/lib/action-bar-button/index.js +14 -8
- package/lib/action-bar-icon/ActionBarIcon.js +18 -17
- package/lib/action-bar-icon/index.js +14 -8
- package/lib/action-sheet/ActionSheet.js +17 -16
- package/lib/action-sheet/index.js +14 -8
- package/lib/address-edit/AddressEdit.js +25 -19
- package/lib/address-edit/AddressEditDetail.js +15 -14
- package/lib/address-edit/index.js +14 -8
- package/lib/address-edit/types.js +18 -1
- package/lib/address-list/AddressList.js +18 -12
- package/lib/address-list/AddressListItem.d.ts +3 -2
- package/lib/address-list/AddressListItem.js +17 -16
- package/lib/address-list/index.js +14 -8
- package/lib/area/Area.js +17 -16
- package/lib/area/index.js +14 -8
- package/lib/area/types.js +18 -1
- package/lib/badge/Badge.d.ts +4 -3
- package/lib/badge/Badge.js +13 -12
- package/lib/badge/index.d.ts +2 -2
- package/lib/badge/index.js +14 -8
- package/lib/button/Button.js +16 -15
- package/lib/button/index.js +14 -8
- package/lib/button/types.js +18 -1
- package/lib/calendar/Calendar.d.ts +4 -0
- package/lib/calendar/Calendar.js +27 -19
- package/lib/calendar/CalendarDay.js +14 -13
- package/lib/calendar/CalendarHeader.js +14 -13
- package/lib/calendar/CalendarMonth.js +21 -15
- package/lib/calendar/index.d.ts +3 -0
- package/lib/calendar/index.js +14 -8
- package/lib/calendar/types.d.ts +2 -1
- package/lib/calendar/types.js +18 -1
- package/lib/calendar/utils.js +11 -10
- package/lib/card/Card.js +15 -14
- package/lib/card/index.js +14 -8
- package/lib/cascader/Cascader.js +16 -15
- package/lib/cascader/index.js +14 -8
- package/lib/cascader/types.d.ts +2 -1
- package/lib/cascader/types.js +18 -1
- package/lib/cell/Cell.js +15 -14
- package/lib/cell/index.js +14 -8
- package/lib/cell-group/CellGroup.js +13 -12
- package/lib/cell-group/index.js +14 -8
- package/lib/checkbox/Checkbox.js +19 -13
- package/lib/checkbox/Checker.d.ts +2 -1
- package/lib/checkbox/Checker.js +14 -13
- package/lib/checkbox/index.js +14 -8
- package/lib/checkbox/types.js +18 -1
- package/lib/checkbox-group/CheckboxGroup.js +15 -14
- package/lib/checkbox-group/index.js +14 -8
- package/lib/checkbox-group/types.js +18 -1
- package/lib/circle/Circle.js +14 -13
- package/lib/circle/index.js +14 -8
- package/lib/col/Col.js +15 -14
- package/lib/col/index.js +14 -8
- package/lib/collapse/Collapse.d.ts +7 -6
- package/lib/collapse/Collapse.js +14 -13
- package/lib/collapse/index.d.ts +3 -3
- package/lib/collapse/index.js +14 -8
- package/lib/collapse-item/CollapseItem.d.ts +13 -0
- package/lib/collapse-item/CollapseItem.js +22 -20
- package/lib/collapse-item/index.d.ts +9 -0
- package/lib/collapse-item/index.js +14 -8
- package/lib/collapse-item/types.js +18 -1
- package/lib/composables/on-popup-reopen.js +11 -10
- package/lib/composables/use-expose.js +12 -11
- package/lib/composables/use-height.js +12 -11
- package/lib/composables/use-id.js +11 -10
- package/lib/composables/use-lazy-render.js +11 -10
- package/lib/composables/use-lock-scroll.js +14 -13
- package/lib/composables/use-placeholder.js +12 -11
- package/lib/composables/use-refs.js +11 -10
- package/lib/composables/use-route.js +11 -10
- package/lib/composables/use-tab-status.js +11 -10
- package/lib/composables/use-touch.js +12 -11
- package/lib/composables/use-visibility-change.js +13 -12
- package/lib/config-provider/ConfigProvider.d.ts +4 -3
- package/lib/config-provider/ConfigProvider.js +13 -12
- package/lib/config-provider/index.d.ts +2 -2
- package/lib/config-provider/index.js +14 -8
- package/lib/contact-card/ContactCard.js +14 -13
- package/lib/contact-card/index.js +14 -8
- package/lib/contact-edit/ContactEdit.js +18 -17
- package/lib/contact-edit/index.js +14 -8
- package/lib/contact-list/ContactList.d.ts +3 -2
- package/lib/contact-list/ContactList.js +19 -18
- package/lib/contact-list/index.js +14 -8
- package/lib/count-down/CountDown.js +16 -15
- package/lib/count-down/index.js +14 -8
- package/lib/count-down/types.js +18 -1
- package/lib/count-down/utils.js +11 -10
- package/lib/coupon/Coupon.d.ts +2 -1
- package/lib/coupon/Coupon.js +15 -14
- package/lib/coupon/index.js +14 -8
- package/lib/coupon/utils.js +11 -10
- package/lib/coupon-cell/CouponCell.js +14 -13
- package/lib/coupon-cell/index.js +14 -8
- package/lib/coupon-list/CouponList.d.ts +3 -13
- package/lib/coupon-list/CouponList.js +29 -26
- package/lib/coupon-list/index.css +1 -1
- package/lib/coupon-list/index.d.ts +2 -9
- package/lib/coupon-list/index.js +14 -8
- package/lib/coupon-list/index.less +4 -16
- package/lib/coupon-list/style/index.js +1 -0
- package/lib/coupon-list/style/less.js +1 -0
- package/lib/coupon-list/var.less +0 -1
- package/lib/datetime-picker/DatePicker.js +17 -17
- package/lib/datetime-picker/DatetimePicker.js +18 -12
- package/lib/datetime-picker/TimePicker.js +16 -15
- package/lib/datetime-picker/index.js +14 -8
- package/lib/datetime-picker/types.js +18 -1
- package/lib/datetime-picker/utils.js +12 -11
- package/lib/dialog/Dialog.d.ts +2 -1
- package/lib/dialog/Dialog.js +35 -18
- package/lib/dialog/function-call.d.ts +2 -1
- package/lib/dialog/function-call.js +16 -10
- package/lib/dialog/index.js +11 -10
- package/lib/dialog/types.d.ts +2 -2
- package/lib/dialog/types.js +18 -1
- package/lib/divider/Divider.js +13 -12
- package/lib/divider/index.js +14 -8
- package/lib/dropdown-item/DropdownItem.js +19 -18
- package/lib/dropdown-item/index.js +14 -8
- package/lib/dropdown-item/types.d.ts +2 -1
- package/lib/dropdown-item/types.js +18 -1
- package/lib/dropdown-menu/DropdownMenu.js +15 -14
- package/lib/dropdown-menu/index.js +14 -8
- package/lib/dropdown-menu/types.js +18 -1
- package/lib/empty/Empty.js +14 -13
- package/lib/empty/Network.js +11 -10
- package/lib/empty/index.js +14 -8
- package/lib/field/Field.js +20 -19
- package/lib/field/index.js +14 -8
- package/lib/field/types.js +18 -1
- package/lib/field/utils.js +11 -10
- package/lib/form/Form.js +15 -14
- package/lib/form/index.js +14 -8
- package/lib/form/types.js +18 -1
- package/lib/grid/Grid.js +15 -14
- package/lib/grid/index.js +14 -8
- package/lib/grid-item/GridItem.js +18 -17
- package/lib/grid-item/index.js +14 -8
- package/lib/icon/Icon.js +15 -14
- package/lib/icon/index.js +14 -8
- package/lib/image/Image.js +14 -13
- package/lib/image/index.js +14 -8
- package/lib/image-preview/ImagePreview.js +21 -15
- package/lib/image-preview/ImagePreviewItem.js +17 -16
- package/lib/image-preview/function-call.js +16 -10
- package/lib/image-preview/index.js +11 -10
- package/lib/image-preview/types.js +18 -1
- package/lib/index-anchor/IndexAnchor.js +17 -16
- package/lib/index-anchor/index.js +14 -8
- package/lib/index-bar/IndexBar.d.ts +5 -4
- package/lib/index-bar/IndexBar.js +41 -19
- package/lib/index-bar/index.d.ts +3 -3
- package/lib/index-bar/index.js +14 -8
- package/lib/index-bar/types.d.ts +2 -1
- package/lib/index-bar/types.js +18 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +182 -181
- package/lib/index.less +2 -2
- package/lib/lazyload/index.js +11 -10
- package/lib/lazyload/vue-lazyload/index.js +16 -10
- package/lib/lazyload/vue-lazyload/lazy-component.js +12 -11
- package/lib/lazyload/vue-lazyload/lazy-container.js +11 -10
- package/lib/lazyload/vue-lazyload/lazy-image.js +13 -12
- package/lib/lazyload/vue-lazyload/lazy.js +17 -11
- package/lib/lazyload/vue-lazyload/listener.js +13 -12
- package/lib/lazyload/vue-lazyload/util.js +11 -10
- package/lib/list/List.js +17 -16
- package/lib/list/index.js +14 -8
- package/lib/list/types.js +18 -1
- package/lib/loading/Loading.js +13 -12
- package/lib/loading/index.js +14 -8
- package/lib/locale/index.js +15 -9
- package/lib/locale/lang/bn-BD.d.ts +64 -0
- package/lib/locale/lang/bn-BD.js +98 -0
- package/lib/locale/lang/de-DE-formal.js +20 -3
- package/lib/locale/lang/de-DE.js +20 -3
- package/lib/locale/lang/en-US.js +20 -3
- package/lib/locale/lang/es-ES.js +20 -3
- package/lib/locale/lang/fr-FR.js +20 -3
- package/lib/locale/lang/hi-IN.js +20 -3
- package/lib/locale/lang/id-ID.d.ts +64 -0
- package/lib/locale/lang/id-ID.js +90 -0
- package/lib/locale/lang/is-IS.d.ts +64 -0
- package/lib/locale/lang/is-IS.js +98 -0
- package/lib/locale/lang/it-IT.d.ts +64 -0
- package/lib/locale/lang/it-IT.js +98 -0
- package/lib/locale/lang/ja-JP.js +20 -3
- package/lib/locale/lang/ko-KR.js +20 -3
- package/lib/locale/lang/la-LA.d.ts +64 -0
- package/lib/locale/lang/la-LA.js +90 -0
- package/lib/locale/lang/nb-NO.js +20 -3
- package/lib/locale/lang/pt-BR.js +20 -3
- package/lib/locale/lang/ro-RO.js +20 -3
- package/lib/locale/lang/ru-RU.js +20 -3
- package/lib/locale/lang/sv-SE.d.ts +64 -0
- package/lib/locale/lang/sv-SE.js +90 -0
- package/lib/locale/lang/th-TH.js +20 -3
- package/lib/locale/lang/tr-TR.js +19 -2
- package/lib/locale/lang/uk-UA.d.ts +64 -0
- package/lib/locale/lang/uk-UA.js +98 -0
- package/lib/locale/lang/vi-VN.d.ts +64 -0
- package/lib/locale/lang/vi-VN.js +98 -0
- package/lib/locale/lang/zh-CN.js +20 -3
- package/lib/locale/lang/zh-HK.js +20 -3
- package/lib/locale/lang/zh-TW.js +20 -3
- package/lib/nav-bar/NavBar.d.ts +1 -1
- package/lib/nav-bar/NavBar.js +18 -17
- package/lib/nav-bar/index.d.ts +1 -1
- package/lib/nav-bar/index.js +14 -8
- package/lib/notice-bar/NoticeBar.js +17 -16
- package/lib/notice-bar/index.js +14 -8
- package/lib/notice-bar/types.js +18 -1
- package/lib/notify/Notify.js +15 -14
- package/lib/notify/function-call.js +16 -10
- package/lib/notify/index.js +11 -10
- package/lib/notify/types.d.ts +2 -1
- package/lib/notify/types.js +18 -1
- package/lib/number-keyboard/NumberKeyboard.js +27 -12
- package/lib/number-keyboard/NumberKeyboardKey.js +15 -14
- package/lib/number-keyboard/index.js +14 -8
- package/lib/overlay/Overlay.js +14 -13
- package/lib/overlay/index.js +14 -8
- package/lib/pagination/Pagination.js +13 -12
- package/lib/pagination/index.js +14 -8
- package/lib/password-input/PasswordInput.js +13 -12
- package/lib/password-input/index.js +14 -8
- package/lib/picker/Picker.js +19 -13
- package/lib/picker/PickerColumn.js +17 -16
- package/lib/picker/index.js +14 -8
- package/lib/picker/types.d.ts +3 -2
- package/lib/picker/types.js +18 -1
- package/lib/popover/Popover.js +17 -16
- package/lib/popover/index.js +14 -8
- package/lib/popover/types.js +18 -1
- package/lib/popup/Popup.d.ts +6 -1
- package/lib/popup/Popup.js +34 -22
- package/lib/popup/index.d.ts +5 -1
- package/lib/popup/index.js +14 -8
- package/lib/popup/shared.js +11 -10
- package/lib/popup/types.d.ts +5 -2
- package/lib/popup/types.js +18 -1
- package/lib/progress/Progress.d.ts +4 -3
- package/lib/progress/Progress.js +13 -12
- package/lib/progress/index.d.ts +2 -2
- package/lib/progress/index.js +14 -8
- package/lib/progress/types.js +18 -1
- package/lib/pull-refresh/PullRefresh.js +16 -15
- package/lib/pull-refresh/index.js +14 -8
- package/lib/radio/Radio.js +18 -12
- package/lib/radio/index.js +14 -8
- package/lib/radio-group/RadioGroup.js +14 -13
- package/lib/radio-group/index.js +14 -8
- package/lib/rate/Rate.js +17 -16
- package/lib/rate/index.js +14 -8
- package/lib/row/Row.js +14 -13
- package/lib/row/index.js +14 -8
- package/lib/search/Search.js +17 -16
- package/lib/search/index.js +14 -8
- package/lib/search/types.js +18 -1
- package/lib/share-sheet/ShareSheet.js +15 -14
- package/lib/share-sheet/index.js +14 -8
- package/lib/sidebar/Sidebar.js +14 -13
- package/lib/sidebar/index.js +14 -8
- package/lib/sidebar-item/SidebarItem.js +17 -16
- package/lib/sidebar-item/index.js +14 -8
- package/lib/skeleton/Skeleton.d.ts +5 -4
- package/lib/skeleton/Skeleton.js +18 -15
- package/lib/skeleton/index.d.ts +3 -3
- package/lib/skeleton/index.js +14 -8
- package/lib/slider/Slider.js +15 -14
- package/lib/slider/index.js +14 -8
- package/lib/step/Step.js +16 -15
- package/lib/step/index.js +14 -8
- package/lib/stepper/Stepper.js +14 -13
- package/lib/stepper/index.js +14 -8
- package/lib/steps/Steps.js +14 -13
- package/lib/steps/index.js +14 -8
- package/lib/sticky/Sticky.js +15 -14
- package/lib/sticky/index.js +14 -8
- package/lib/style/base.css +1 -1
- package/lib/style/base.less +5 -0
- package/lib/submit-bar/SubmitBar.js +15 -14
- package/lib/submit-bar/index.css +1 -1
- package/lib/submit-bar/index.js +14 -8
- package/lib/submit-bar/index.less +1 -0
- package/lib/swipe/Swipe.js +17 -16
- package/lib/swipe/index.js +14 -8
- package/lib/swipe/types.js +18 -1
- package/lib/swipe-cell/SwipeCell.js +17 -16
- package/lib/swipe-cell/index.js +14 -8
- package/lib/swipe-cell/types.js +18 -1
- package/lib/swipe-item/SwipeItem.js +16 -15
- package/lib/swipe-item/index.js +14 -8
- package/lib/switch/Switch.js +15 -14
- package/lib/switch/index.js +14 -8
- package/lib/tab/Tab.js +20 -19
- package/lib/tab/index.js +14 -8
- package/lib/tabbar/Tabbar.d.ts +2 -2
- package/lib/tabbar/Tabbar.js +15 -14
- package/lib/tabbar/index.js +14 -8
- package/lib/tabbar-item/TabbarItem.js +18 -17
- package/lib/tabbar-item/index.js +14 -8
- package/lib/tabs/Tabs.d.ts +1 -1
- package/lib/tabs/Tabs.js +26 -19
- package/lib/tabs/TabsContent.js +14 -13
- package/lib/tabs/TabsTitle.js +14 -13
- package/lib/tabs/index.js +14 -8
- package/lib/tabs/types.d.ts +5 -4
- package/lib/tabs/types.js +18 -1
- package/lib/tabs/utils.js +12 -11
- package/lib/tag/Tag.js +14 -13
- package/lib/tag/index.js +14 -8
- package/lib/toast/Toast.d.ts +3 -0
- package/lib/toast/Toast.js +20 -17
- package/lib/toast/function-call.js +17 -11
- package/lib/toast/index.js +11 -10
- package/lib/toast/lock-click.js +19 -2
- package/lib/toast/types.d.ts +3 -2
- package/lib/toast/types.js +18 -1
- package/lib/tree-select/TreeSelect.d.ts +7 -6
- package/lib/tree-select/TreeSelect.js +16 -15
- package/lib/tree-select/index.d.ts +3 -3
- package/lib/tree-select/index.js +14 -8
- package/lib/uploader/Uploader.d.ts +4 -4
- package/lib/uploader/Uploader.js +22 -16
- package/lib/uploader/UploaderPreviewItem.d.ts +3 -3
- package/lib/uploader/UploaderPreviewItem.js +26 -22
- package/lib/uploader/index.d.ts +2 -2
- package/lib/uploader/index.js +14 -8
- package/lib/uploader/types.d.ts +6 -8
- package/lib/uploader/types.js +18 -1
- package/lib/uploader/utils.js +11 -10
- package/lib/utils/basic.d.ts +1 -0
- package/lib/utils/basic.js +19 -2
- package/lib/utils/constant.js +19 -2
- package/lib/utils/create.js +16 -10
- package/lib/utils/deep-assign.js +11 -10
- package/lib/utils/deep-clone.js +11 -10
- package/lib/utils/dom.js +13 -12
- package/lib/utils/format.d.ts +7 -6
- package/lib/utils/format.js +19 -12
- package/lib/utils/index.js +18 -17
- package/lib/utils/interceptor.d.ts +1 -1
- package/lib/utils/interceptor.js +12 -11
- package/lib/utils/mount-component.js +13 -12
- package/lib/utils/props.js +19 -2
- package/lib/utils/validate.d.ts +2 -1
- package/lib/utils/validate.js +11 -10
- package/lib/utils/with-install.js +11 -10
- package/lib/vant.cjs.js +317 -243
- package/lib/vant.cjs.min.js +1 -1
- package/lib/vant.es.js +318 -244
- package/lib/vant.es.min.js +318 -244
- package/lib/vant.js +320 -246
- package/lib/vant.min.js +1 -1
- package/package.json +2 -2
- package/vetur/attributes.json +631 -616
- package/vetur/tags.json +220 -217
- package/vetur/web-types.json +2358 -2326
package/lib/vant.es.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { useWindowSize, useRect, useChildren, useParent, onMountedOrActivated, getScrollParent, useEventListener, CUSTOM_FIELD_INJECTION_KEY, useCustomFieldValue, useToggle, raf, useScrollParent, usePageVisibility, doubleRaf, cancelRaf, useCountDown, useClickAway, inBrowser as inBrowser$1 } from "@vant/use";
|
2
|
-
import { unref, ref, reactive, defineComponent, createVNode, getCurrentInstance, computed, provide, inject, mergeProps, onDeactivated, onBeforeUnmount, watch, Transition, withDirectives, vShow, onMounted, onActivated, Teleport, Fragment,
|
2
|
+
import { unref, ref, reactive, defineComponent, createVNode, getCurrentInstance, computed, provide, inject, mergeProps, onDeactivated, onBeforeUnmount, watch, Transition, withDirectives, vShow, nextTick, onMounted, onActivated, Teleport, Fragment, createTextVNode, createApp, onUnmounted, onBeforeUpdate, resolveDirective, withKeys, onUpdated, watchEffect, h } from "vue";
|
3
3
|
import { createPopper, offsetModifier } from "@vant/popperjs";
|
4
4
|
function noop() {
|
5
5
|
}
|
@@ -118,6 +118,12 @@ function addUnit(value) {
|
|
118
118
|
}
|
119
119
|
function getSizeStyle(originSize) {
|
120
120
|
if (isDef(originSize)) {
|
121
|
+
if (Array.isArray(originSize)) {
|
122
|
+
return {
|
123
|
+
width: addUnit(originSize[0]),
|
124
|
+
height: addUnit(originSize[1])
|
125
|
+
};
|
126
|
+
}
|
121
127
|
const size = addUnit(originSize);
|
122
128
|
return {
|
123
129
|
width: size,
|
@@ -259,7 +265,7 @@ var stdin_default$1D = {
|
|
259
265
|
loosing: "\u91CA\u653E\u5373\u53EF\u5237\u65B0..."
|
260
266
|
},
|
261
267
|
vanSubmitBar: {
|
262
|
-
label: "\u5408\u8BA1
|
268
|
+
label: "\u5408\u8BA1:"
|
263
269
|
},
|
264
270
|
vanCoupon: {
|
265
271
|
unlimited: "\u65E0\u95E8\u69DB",
|
@@ -986,7 +992,7 @@ function useTouch() {
|
|
986
992
|
};
|
987
993
|
const move = (event) => {
|
988
994
|
const touch = event.touches[0];
|
989
|
-
deltaX.value = touch.clientX < 0 ? 0 : touch.clientX - startX.value;
|
995
|
+
deltaX.value = (touch.clientX < 0 ? 0 : touch.clientX) - startX.value;
|
990
996
|
deltaY.value = touch.clientY - startY.value;
|
991
997
|
offsetX.value = Math.abs(deltaX.value);
|
992
998
|
offsetY.value = Math.abs(deltaY.value);
|
@@ -1126,6 +1132,7 @@ const popupProps$2 = extend({}, popupSharedProps, {
|
|
1126
1132
|
iconPrefix: String,
|
1127
1133
|
closeOnPopstate: Boolean,
|
1128
1134
|
closeIconPosition: makeStringProp("top-right"),
|
1135
|
+
safeAreaInsetTop: Boolean,
|
1129
1136
|
safeAreaInsetBottom: Boolean
|
1130
1137
|
});
|
1131
1138
|
const [name$1l, bem$1h] = createNamespace("popup");
|
@@ -1134,7 +1141,7 @@ var stdin_default$1s = defineComponent({
|
|
1134
1141
|
name: name$1l,
|
1135
1142
|
inheritAttrs: false,
|
1136
1143
|
props: popupProps$2,
|
1137
|
-
emits: ["open", "close", "opened", "closed", "update:show", "click-overlay", "click-close-icon"],
|
1144
|
+
emits: ["open", "close", "opened", "closed", "keydown", "update:show", "click-overlay", "click-close-icon"],
|
1138
1145
|
setup(props, {
|
1139
1146
|
emit,
|
1140
1147
|
attrs,
|
@@ -1214,11 +1221,13 @@ var stdin_default$1s = defineComponent({
|
|
1214
1221
|
};
|
1215
1222
|
const onOpened = () => emit("opened");
|
1216
1223
|
const onClosed = () => emit("closed");
|
1224
|
+
const onKeydown = (event) => emit("keydown", event);
|
1217
1225
|
const renderPopup = lazyRender(() => {
|
1218
1226
|
var _a;
|
1219
1227
|
const {
|
1220
1228
|
round,
|
1221
1229
|
position,
|
1230
|
+
safeAreaInsetTop,
|
1222
1231
|
safeAreaInsetBottom
|
1223
1232
|
} = props;
|
1224
1233
|
return withDirectives(createVNode("div", mergeProps({
|
@@ -1228,8 +1237,10 @@ var stdin_default$1s = defineComponent({
|
|
1228
1237
|
round,
|
1229
1238
|
[position]: position
|
1230
1239
|
}), {
|
1240
|
+
"van-safe-area-top": safeAreaInsetTop,
|
1231
1241
|
"van-safe-area-bottom": safeAreaInsetBottom
|
1232
|
-
}]
|
1242
|
+
}],
|
1243
|
+
"onKeydown": onKeydown
|
1233
1244
|
}, attrs), [(_a = slots.default) == null ? void 0 : _a.call(slots), renderCloseIcon()]), [[vShow, props.show]]);
|
1234
1245
|
});
|
1235
1246
|
const renderTransition = () => {
|
@@ -1251,6 +1262,12 @@ var stdin_default$1s = defineComponent({
|
|
1251
1262
|
watch(() => props.show, (show) => {
|
1252
1263
|
if (show && !opened) {
|
1253
1264
|
open();
|
1265
|
+
if (attrs.tabindex === 0) {
|
1266
|
+
nextTick(() => {
|
1267
|
+
var _a;
|
1268
|
+
(_a = popupRef.value) == null ? void 0 : _a.focus();
|
1269
|
+
});
|
1270
|
+
}
|
1254
1271
|
}
|
1255
1272
|
if (!show && opened) {
|
1256
1273
|
opened = false;
|
@@ -3005,7 +3022,7 @@ function lockClick(lock) {
|
|
3005
3022
|
}
|
3006
3023
|
}
|
3007
3024
|
const [name$1d, bem$19] = createNamespace("toast");
|
3008
|
-
const popupInheritProps = ["show", "overlay", "transition", "overlayClass", "overlayStyle", "closeOnClickOverlay"];
|
3025
|
+
const popupInheritProps = ["show", "overlay", "teleport", "transition", "overlayClass", "overlayStyle", "closeOnClickOverlay"];
|
3009
3026
|
const toastProps = {
|
3010
3027
|
icon: String,
|
3011
3028
|
show: Boolean,
|
@@ -3015,6 +3032,7 @@ const toastProps = {
|
|
3015
3032
|
iconSize: numericProp,
|
3016
3033
|
duration: makeNumberProp(2e3),
|
3017
3034
|
position: makeStringProp("middle"),
|
3035
|
+
teleport: [String, Object],
|
3018
3036
|
className: unknownProp,
|
3019
3037
|
iconPrefix: String,
|
3020
3038
|
transition: makeStringProp("van-fade"),
|
@@ -3080,6 +3098,7 @@ var stdin_default$1k = defineComponent({
|
|
3080
3098
|
} = props;
|
3081
3099
|
if (isDef(message) && message !== "") {
|
3082
3100
|
return type === "html" ? createVNode("div", {
|
3101
|
+
"key": 0,
|
3083
3102
|
"class": bem$19("text"),
|
3084
3103
|
"innerHTML": String(message)
|
3085
3104
|
}, null) : createVNode("div", {
|
@@ -4603,6 +4622,7 @@ const calendarProps = {
|
|
4603
4622
|
showRangePrompt: truthProp,
|
4604
4623
|
confirmDisabledText: String,
|
4605
4624
|
closeOnClickOverlay: truthProp,
|
4625
|
+
safeAreaInsetTop: Boolean,
|
4606
4626
|
safeAreaInsetBottom: truthProp,
|
4607
4627
|
minDate: {
|
4608
4628
|
type: Date,
|
@@ -4765,8 +4785,8 @@ var stdin_default$17 = defineComponent({
|
|
4765
4785
|
}
|
4766
4786
|
raf(() => {
|
4767
4787
|
bodyHeight = Math.floor(useRect(bodyRef).height);
|
4768
|
-
scrollToCurrentDate();
|
4769
4788
|
});
|
4789
|
+
scrollToCurrentDate();
|
4770
4790
|
};
|
4771
4791
|
const reset = (date = getInitialDate()) => {
|
4772
4792
|
currentDate.value = date;
|
@@ -4951,6 +4971,7 @@ var stdin_default$17 = defineComponent({
|
|
4951
4971
|
"closeable": props.showTitle || props.showSubtitle,
|
4952
4972
|
"teleport": props.teleport,
|
4953
4973
|
"closeOnPopstate": props.closeOnPopstate,
|
4974
|
+
"safeAreaInsetTop": props.safeAreaInsetTop,
|
4954
4975
|
"closeOnClickOverlay": props.closeOnClickOverlay,
|
4955
4976
|
"onUpdate:show": updateShow
|
4956
4977
|
}, {
|
@@ -6079,6 +6100,7 @@ var stdin_default$10 = defineComponent({
|
|
6079
6100
|
}
|
6080
6101
|
};
|
6081
6102
|
const renderNav = () => children.map((item, index) => createVNode(stdin_default$13, mergeProps({
|
6103
|
+
"key": item.id,
|
6082
6104
|
"id": `${id}-${index}`,
|
6083
6105
|
"ref": setTitleRefs(index),
|
6084
6106
|
"type": props.type,
|
@@ -7123,7 +7145,8 @@ const collapseItemProps = extend({}, cellSharedProps, {
|
|
7123
7145
|
name: numericProp,
|
7124
7146
|
isLink: truthProp,
|
7125
7147
|
disabled: Boolean,
|
7126
|
-
readonly: Boolean
|
7148
|
+
readonly: Boolean,
|
7149
|
+
lazyRender: truthProp
|
7127
7150
|
});
|
7128
7151
|
var stdin_default$R = defineComponent({
|
7129
7152
|
name: name$L,
|
@@ -7146,7 +7169,7 @@ var stdin_default$R = defineComponent({
|
|
7146
7169
|
});
|
7147
7170
|
const expanded = computed(() => parent.isExpanded(name2.value));
|
7148
7171
|
const show = ref(expanded.value);
|
7149
|
-
const lazyRender = useLazyRender(show);
|
7172
|
+
const lazyRender = useLazyRender(() => show.value || !props.lazyRender);
|
7150
7173
|
const onTransitionEnd = () => {
|
7151
7174
|
if (!expanded.value) {
|
7152
7175
|
show.value = false;
|
@@ -7668,14 +7691,152 @@ var stdin_default$L = defineComponent({
|
|
7668
7691
|
}
|
7669
7692
|
});
|
7670
7693
|
const CouponCell = withInstall(stdin_default$L);
|
7671
|
-
const
|
7672
|
-
const
|
7694
|
+
const prefix = "van-empty-network-";
|
7695
|
+
const renderStop = (color, offset, opacity) => createVNode("stop", {
|
7696
|
+
"stop-color": color,
|
7697
|
+
"offset": `${offset}%`,
|
7698
|
+
"stop-opacity": opacity
|
7699
|
+
}, null);
|
7700
|
+
const Network = createVNode("svg", {
|
7701
|
+
"viewBox": "0 0 160 160"
|
7702
|
+
}, [createVNode("defs", null, [createVNode("linearGradient", {
|
7703
|
+
"id": `${prefix}1`,
|
7704
|
+
"x1": "64%",
|
7705
|
+
"y1": "100%",
|
7706
|
+
"x2": "64%"
|
7707
|
+
}, [renderStop("#FFF", 0, 0.5), renderStop("#F2F3F5", 100)]), createVNode("linearGradient", {
|
7708
|
+
"id": `${prefix}2`,
|
7709
|
+
"x1": "50%",
|
7710
|
+
"x2": "50%",
|
7711
|
+
"y2": "84%"
|
7712
|
+
}, [renderStop("#EBEDF0", 0), renderStop("#DCDEE0", 100, 0)]), createVNode("linearGradient", {
|
7713
|
+
"id": `${prefix}3`,
|
7714
|
+
"x1": "100%",
|
7715
|
+
"x2": "100%",
|
7716
|
+
"y2": "100%"
|
7717
|
+
}, [renderStop("#EAEDF0", 0), renderStop("#DCDEE0", 100)]), createVNode("radialGradient", {
|
7718
|
+
"id": `${prefix}4`,
|
7719
|
+
"cx": "50%",
|
7720
|
+
"cy": "0%",
|
7721
|
+
"fx": "50%",
|
7722
|
+
"fy": "0%",
|
7723
|
+
"r": "100%",
|
7724
|
+
"gradientTransform": "matrix(0 1 -.54 0 .5 -.5)"
|
7725
|
+
}, [renderStop("#EBEDF0", 0), renderStop("#FFF", 100, 0)])]), createVNode("g", {
|
7726
|
+
"fill": "none"
|
7727
|
+
}, [createVNode("g", {
|
7728
|
+
"opacity": ".8"
|
7729
|
+
}, [createVNode("path", {
|
7730
|
+
"d": "M36 131V53H16v20H2v58h34z",
|
7731
|
+
"fill": `url(#${prefix}1)`
|
7732
|
+
}, null), createVNode("path", {
|
7733
|
+
"d": "M123 15h22v14h9v77h-31V15z",
|
7734
|
+
"fill": `url(#${prefix}1)`
|
7735
|
+
}, null)]), createVNode("path", {
|
7736
|
+
"fill": `url(#${prefix}4)`,
|
7737
|
+
"d": "M0 139h160v21H0z"
|
7738
|
+
}, null), createVNode("path", {
|
7739
|
+
"d": "M80 54a7 7 0 0 1 3 13v27l-2 2h-2a2 2 0 0 1-2-2V67a7 7 0 0 1 3-13z",
|
7740
|
+
"fill": `url(#${prefix}2)`
|
7741
|
+
}, null), createVNode("g", {
|
7742
|
+
"opacity": ".6",
|
7743
|
+
"stroke-linecap": "round",
|
7744
|
+
"stroke-width": "7"
|
7745
|
+
}, [createVNode("path", {
|
7746
|
+
"d": "M64 47a19 19 0 0 0-5 13c0 5 2 10 5 13",
|
7747
|
+
"stroke": `url(#${prefix}3)`
|
7748
|
+
}, null), createVNode("path", {
|
7749
|
+
"d": "M53 36a34 34 0 0 0 0 48",
|
7750
|
+
"stroke": `url(#${prefix}3)`
|
7751
|
+
}, null), createVNode("path", {
|
7752
|
+
"d": "M95 73a19 19 0 0 0 6-13c0-5-2-9-6-13",
|
7753
|
+
"stroke": `url(#${prefix}3)`
|
7754
|
+
}, null), createVNode("path", {
|
7755
|
+
"d": "M106 84a34 34 0 0 0 0-48",
|
7756
|
+
"stroke": `url(#${prefix}3)`
|
7757
|
+
}, null)]), createVNode("g", {
|
7758
|
+
"transform": "translate(31 105)"
|
7759
|
+
}, [createVNode("rect", {
|
7760
|
+
"fill": "#EBEDF0",
|
7761
|
+
"width": "98",
|
7762
|
+
"height": "34",
|
7763
|
+
"rx": "2"
|
7764
|
+
}, null), createVNode("rect", {
|
7765
|
+
"fill": "#FFF",
|
7766
|
+
"x": "9",
|
7767
|
+
"y": "8",
|
7768
|
+
"width": "80",
|
7769
|
+
"height": "18",
|
7770
|
+
"rx": "1.1"
|
7771
|
+
}, null), createVNode("rect", {
|
7772
|
+
"fill": "#EBEDF0",
|
7773
|
+
"x": "15",
|
7774
|
+
"y": "12",
|
7775
|
+
"width": "18",
|
7776
|
+
"height": "6",
|
7777
|
+
"rx": "1.1"
|
7778
|
+
}, null)])])]);
|
7779
|
+
const [name$E, bem$D] = createNamespace("empty");
|
7780
|
+
const PRESET_IMAGES = ["error", "search", "default"];
|
7781
|
+
const emptyProps = {
|
7782
|
+
image: makeStringProp("default"),
|
7783
|
+
imageSize: numericProp,
|
7784
|
+
description: String
|
7785
|
+
};
|
7786
|
+
var stdin_default$K = defineComponent({
|
7787
|
+
name: name$E,
|
7788
|
+
props: emptyProps,
|
7789
|
+
setup(props, {
|
7790
|
+
slots
|
7791
|
+
}) {
|
7792
|
+
const renderImage = () => {
|
7793
|
+
if (slots.image) {
|
7794
|
+
return slots.image();
|
7795
|
+
}
|
7796
|
+
let {
|
7797
|
+
image
|
7798
|
+
} = props;
|
7799
|
+
if (image === "network") {
|
7800
|
+
return Network;
|
7801
|
+
}
|
7802
|
+
if (PRESET_IMAGES.includes(image)) {
|
7803
|
+
image = `https://img.yzcdn.cn/vant/empty-image-${image}.png`;
|
7804
|
+
}
|
7805
|
+
return createVNode("img", {
|
7806
|
+
"src": image
|
7807
|
+
}, null);
|
7808
|
+
};
|
7809
|
+
const renderDescription = () => {
|
7810
|
+
const description = slots.description ? slots.description() : props.description;
|
7811
|
+
if (description) {
|
7812
|
+
return createVNode("p", {
|
7813
|
+
"class": bem$D("description")
|
7814
|
+
}, [description]);
|
7815
|
+
}
|
7816
|
+
};
|
7817
|
+
const renderBottom = () => {
|
7818
|
+
if (slots.default) {
|
7819
|
+
return createVNode("div", {
|
7820
|
+
"class": bem$D("bottom")
|
7821
|
+
}, [slots.default()]);
|
7822
|
+
}
|
7823
|
+
};
|
7824
|
+
return () => createVNode("div", {
|
7825
|
+
"class": bem$D()
|
7826
|
+
}, [createVNode("div", {
|
7827
|
+
"class": bem$D("image"),
|
7828
|
+
"style": getSizeStyle(props.imageSize)
|
7829
|
+
}, [renderImage()]), renderDescription(), renderBottom()]);
|
7830
|
+
}
|
7831
|
+
});
|
7832
|
+
const Empty = withInstall(stdin_default$K);
|
7833
|
+
const [name$D, bem$C, t$8] = createNamespace("coupon-list");
|
7673
7834
|
const couponListProps = {
|
7674
7835
|
code: makeStringProp(""),
|
7675
7836
|
coupons: makeArrayProp(),
|
7676
7837
|
currency: makeStringProp("\xA5"),
|
7677
7838
|
showCount: truthProp,
|
7678
|
-
emptyImage:
|
7839
|
+
emptyImage: String,
|
7679
7840
|
chosenCoupon: makeNumberProp(-1),
|
7680
7841
|
enabledTitle: String,
|
7681
7842
|
disabledTitle: String,
|
@@ -7690,8 +7851,8 @@ const couponListProps = {
|
|
7690
7851
|
exchangeButtonLoading: Boolean,
|
7691
7852
|
exchangeButtonDisabled: Boolean
|
7692
7853
|
};
|
7693
|
-
var stdin_default$
|
7694
|
-
name: name$
|
7854
|
+
var stdin_default$J = defineComponent({
|
7855
|
+
name: name$D,
|
7695
7856
|
props: couponListProps,
|
7696
7857
|
emits: ["change", "exchange", "update:code"],
|
7697
7858
|
setup(props, {
|
@@ -7723,28 +7884,30 @@ var stdin_default$K = defineComponent({
|
|
7723
7884
|
return (_a = couponRefs.value[index]) == null ? void 0 : _a.scrollIntoView();
|
7724
7885
|
});
|
7725
7886
|
};
|
7726
|
-
const renderEmpty = () => createVNode(
|
7727
|
-
"
|
7728
|
-
},
|
7729
|
-
"
|
7730
|
-
|
7887
|
+
const renderEmpty = () => createVNode(Empty, {
|
7888
|
+
"image": props.emptyImage
|
7889
|
+
}, {
|
7890
|
+
default: () => [createVNode("p", {
|
7891
|
+
"class": bem$C("empty-tip")
|
7892
|
+
}, [t$8("noCoupon")])]
|
7893
|
+
});
|
7731
7894
|
const renderExchangeBar = () => {
|
7732
7895
|
if (props.showExchangeBar) {
|
7733
7896
|
return createVNode("div", {
|
7734
7897
|
"ref": barRef,
|
7735
|
-
"class": bem$
|
7898
|
+
"class": bem$C("exchange-bar")
|
7736
7899
|
}, [createVNode(Field, {
|
7737
7900
|
"modelValue": currentCode.value,
|
7738
7901
|
"onUpdate:modelValue": ($event) => currentCode.value = $event,
|
7739
7902
|
"clearable": true,
|
7740
7903
|
"border": false,
|
7741
|
-
"class": bem$
|
7904
|
+
"class": bem$C("field"),
|
7742
7905
|
"placeholder": props.inputPlaceholder || t$8("placeholder"),
|
7743
7906
|
"maxlength": "20"
|
7744
7907
|
}, null), createVNode(Button, {
|
7745
7908
|
"plain": true,
|
7746
7909
|
"type": "danger",
|
7747
|
-
"class": bem$
|
7910
|
+
"class": bem$C("exchange"),
|
7748
7911
|
"text": props.exchangeButtonText || t$8("exchange"),
|
7749
7912
|
"loading": props.exchangeButtonLoading,
|
7750
7913
|
"disabled": buttonDisabled.value,
|
@@ -7764,7 +7927,7 @@ var stdin_default$K = defineComponent({
|
|
7764
7927
|
default: () => {
|
7765
7928
|
var _a;
|
7766
7929
|
return [createVNode("div", {
|
7767
|
-
"class": bem$
|
7930
|
+
"class": bem$C("list", {
|
7768
7931
|
"with-bottom": props.showCloseButton
|
7769
7932
|
}),
|
7770
7933
|
"style": {
|
@@ -7793,7 +7956,7 @@ var stdin_default$K = defineComponent({
|
|
7793
7956
|
default: () => {
|
7794
7957
|
var _a;
|
7795
7958
|
return [createVNode("div", {
|
7796
|
-
"class": bem$
|
7959
|
+
"class": bem$C("list", {
|
7797
7960
|
"with-bottom": props.showCloseButton
|
7798
7961
|
}),
|
7799
7962
|
"style": {
|
@@ -7820,29 +7983,29 @@ var stdin_default$K = defineComponent({
|
|
7820
7983
|
});
|
7821
7984
|
return () => createVNode("div", {
|
7822
7985
|
"ref": root,
|
7823
|
-
"class": bem$
|
7986
|
+
"class": bem$C()
|
7824
7987
|
}, [renderExchangeBar(), createVNode(Tabs, {
|
7825
7988
|
"active": activeTab.value,
|
7826
7989
|
"onUpdate:active": ($event) => activeTab.value = $event,
|
7827
|
-
"class": bem$
|
7990
|
+
"class": bem$C("tab")
|
7828
7991
|
}, {
|
7829
7992
|
default: () => [renderCouponTab(), renderDisabledTab()]
|
7830
7993
|
}), createVNode("div", {
|
7831
|
-
"class": bem$
|
7994
|
+
"class": bem$C("bottom")
|
7832
7995
|
}, [withDirectives(createVNode(Button, {
|
7833
7996
|
"round": true,
|
7834
7997
|
"block": true,
|
7835
7998
|
"type": "danger",
|
7836
|
-
"class": bem$
|
7999
|
+
"class": bem$C("close"),
|
7837
8000
|
"text": props.closeButtonText || t$8("close"),
|
7838
8001
|
"onClick": () => emit("change", -1)
|
7839
8002
|
}, null), [[vShow, props.showCloseButton]])])]);
|
7840
8003
|
}
|
7841
8004
|
});
|
7842
|
-
const CouponList = withInstall(stdin_default$
|
7843
|
-
const [name$
|
7844
|
-
var stdin_default$
|
7845
|
-
name: name$
|
8005
|
+
const CouponList = withInstall(stdin_default$J);
|
8006
|
+
const [name$C] = createNamespace("time-picker");
|
8007
|
+
var stdin_default$I = defineComponent({
|
8008
|
+
name: name$C,
|
7846
8009
|
props: extend({}, sharedProps, {
|
7847
8010
|
minHour: makeNumericProp(0),
|
7848
8011
|
maxHour: makeNumericProp(23),
|
@@ -7949,9 +8112,9 @@ var stdin_default$J = defineComponent({
|
|
7949
8112
|
}
|
7950
8113
|
});
|
7951
8114
|
const currentYear = new Date().getFullYear();
|
7952
|
-
const [name$
|
7953
|
-
var stdin_default$
|
7954
|
-
name: name$
|
8115
|
+
const [name$B] = createNamespace("date-picker");
|
8116
|
+
var stdin_default$H = defineComponent({
|
8117
|
+
name: name$B,
|
7955
8118
|
props: extend({}, sharedProps, {
|
7956
8119
|
type: makeStringProp("datetime"),
|
7957
8120
|
modelValue: Date,
|
@@ -8166,8 +8329,7 @@ var stdin_default$I = defineComponent({
|
|
8166
8329
|
});
|
8167
8330
|
watch(columns, updateColumnValue);
|
8168
8331
|
watch(currentDate, (value, oldValue) => emit("update:modelValue", oldValue ? value : null));
|
8169
|
-
watch(() => [props.filter, props.maxDate],
|
8170
|
-
watch(() => props.minDate, () => {
|
8332
|
+
watch(() => [props.filter, props.minDate, props.maxDate], () => {
|
8171
8333
|
nextTick(updateInnerValue);
|
8172
8334
|
});
|
8173
8335
|
watch(() => props.modelValue, (value) => {
|
@@ -8189,14 +8351,14 @@ var stdin_default$I = defineComponent({
|
|
8189
8351
|
}, pick(props, pickerInheritKeys)), slots);
|
8190
8352
|
}
|
8191
8353
|
});
|
8192
|
-
const [name$
|
8193
|
-
const timePickerPropKeys = Object.keys(stdin_default$
|
8194
|
-
const datePickerPropKeys = Object.keys(stdin_default$
|
8195
|
-
const datetimePickerProps = extend({}, stdin_default$
|
8354
|
+
const [name$A, bem$B] = createNamespace("datetime-picker");
|
8355
|
+
const timePickerPropKeys = Object.keys(stdin_default$I.props);
|
8356
|
+
const datePickerPropKeys = Object.keys(stdin_default$H.props);
|
8357
|
+
const datetimePickerProps = extend({}, stdin_default$I.props, stdin_default$H.props, {
|
8196
8358
|
modelValue: [String, Date]
|
8197
8359
|
});
|
8198
|
-
var stdin_default$
|
8199
|
-
name: name$
|
8360
|
+
var stdin_default$G = defineComponent({
|
8361
|
+
name: name$A,
|
8200
8362
|
props: datetimePickerProps,
|
8201
8363
|
setup(props, {
|
8202
8364
|
attrs,
|
@@ -8211,17 +8373,17 @@ var stdin_default$H = defineComponent({
|
|
8211
8373
|
});
|
8212
8374
|
return () => {
|
8213
8375
|
const isTimePicker = props.type === "time";
|
8214
|
-
const Component = isTimePicker ? stdin_default$
|
8376
|
+
const Component = isTimePicker ? stdin_default$I : stdin_default$H;
|
8215
8377
|
const inheritProps = pick(props, isTimePicker ? timePickerPropKeys : datePickerPropKeys);
|
8216
8378
|
return createVNode(Component, mergeProps({
|
8217
8379
|
"ref": root,
|
8218
|
-
"class": bem$
|
8380
|
+
"class": bem$B()
|
8219
8381
|
}, inheritProps, attrs), slots);
|
8220
8382
|
};
|
8221
8383
|
}
|
8222
8384
|
});
|
8223
|
-
const DatetimePicker = withInstall(stdin_default$
|
8224
|
-
const [name$
|
8385
|
+
const DatetimePicker = withInstall(stdin_default$G);
|
8386
|
+
const [name$z, bem$A, t$7] = createNamespace("dialog");
|
8225
8387
|
const dialogProps = extend({}, popupSharedProps, {
|
8226
8388
|
title: String,
|
8227
8389
|
theme: String,
|
@@ -8242,14 +8404,15 @@ const dialogProps = extend({}, popupSharedProps, {
|
|
8242
8404
|
closeOnClickOverlay: Boolean
|
8243
8405
|
});
|
8244
8406
|
const popupInheritKeys$1 = [...popupSharedPropKeys, "transition", "closeOnPopstate"];
|
8245
|
-
var stdin_default$
|
8246
|
-
name: name$
|
8407
|
+
var stdin_default$F = defineComponent({
|
8408
|
+
name: name$z,
|
8247
8409
|
props: dialogProps,
|
8248
|
-
emits: ["confirm", "cancel", "update:show"],
|
8410
|
+
emits: ["confirm", "cancel", "keydown", "update:show"],
|
8249
8411
|
setup(props, {
|
8250
8412
|
emit,
|
8251
8413
|
slots
|
8252
8414
|
}) {
|
8415
|
+
const root = ref();
|
8253
8416
|
const loading = reactive({
|
8254
8417
|
confirm: false,
|
8255
8418
|
cancel: false
|
@@ -8283,11 +8446,23 @@ var stdin_default$G = defineComponent({
|
|
8283
8446
|
};
|
8284
8447
|
const onCancel = getActionHandler("cancel");
|
8285
8448
|
const onConfirm = getActionHandler("confirm");
|
8449
|
+
const onKeydown = withKeys((event) => {
|
8450
|
+
var _a, _b;
|
8451
|
+
if (event.target !== ((_b = (_a = root.value) == null ? void 0 : _a.popupRef) == null ? void 0 : _b.value)) {
|
8452
|
+
return;
|
8453
|
+
}
|
8454
|
+
const onEventType = {
|
8455
|
+
Enter: props.showConfirmButton ? onConfirm : noop,
|
8456
|
+
Escape: props.showCancelButton ? onCancel : noop
|
8457
|
+
};
|
8458
|
+
onEventType[event.key]();
|
8459
|
+
emit("keydown", event);
|
8460
|
+
}, ["enter", "esc"]);
|
8286
8461
|
const renderTitle = () => {
|
8287
8462
|
const title = slots.title ? slots.title() : props.title;
|
8288
8463
|
if (title) {
|
8289
8464
|
return createVNode("div", {
|
8290
|
-
"class": bem$
|
8465
|
+
"class": bem$A("header", {
|
8291
8466
|
isolated: !props.message && !slots.default
|
8292
8467
|
})
|
8293
8468
|
}, [title]);
|
@@ -8299,7 +8474,7 @@ var stdin_default$G = defineComponent({
|
|
8299
8474
|
allowHtml,
|
8300
8475
|
messageAlign
|
8301
8476
|
} = props;
|
8302
|
-
const classNames = bem$
|
8477
|
+
const classNames = bem$A("message", {
|
8303
8478
|
"has-title": hasTitle,
|
8304
8479
|
[messageAlign]: messageAlign
|
8305
8480
|
});
|
@@ -8317,7 +8492,7 @@ var stdin_default$G = defineComponent({
|
|
8317
8492
|
const renderContent = () => {
|
8318
8493
|
if (slots.default) {
|
8319
8494
|
return createVNode("div", {
|
8320
|
-
"class": bem$
|
8495
|
+
"class": bem$A("content")
|
8321
8496
|
}, [slots.default()]);
|
8322
8497
|
}
|
8323
8498
|
const {
|
@@ -8329,18 +8504,18 @@ var stdin_default$G = defineComponent({
|
|
8329
8504
|
const hasTitle = !!(title || slots.title);
|
8330
8505
|
return createVNode("div", {
|
8331
8506
|
"key": allowHtml ? 1 : 0,
|
8332
|
-
"class": bem$
|
8507
|
+
"class": bem$A("content", {
|
8333
8508
|
isolated: !hasTitle
|
8334
8509
|
})
|
8335
8510
|
}, [renderMessage(hasTitle)]);
|
8336
8511
|
}
|
8337
8512
|
};
|
8338
8513
|
const renderButtons = () => createVNode("div", {
|
8339
|
-
"class": [BORDER_TOP, bem$
|
8514
|
+
"class": [BORDER_TOP, bem$A("footer")]
|
8340
8515
|
}, [props.showCancelButton && createVNode(Button, {
|
8341
8516
|
"size": "large",
|
8342
8517
|
"text": props.cancelButtonText || t$7("cancel"),
|
8343
|
-
"class": bem$
|
8518
|
+
"class": bem$A("cancel"),
|
8344
8519
|
"style": {
|
8345
8520
|
color: props.cancelButtonColor
|
8346
8521
|
},
|
@@ -8349,7 +8524,7 @@ var stdin_default$G = defineComponent({
|
|
8349
8524
|
}, null), props.showConfirmButton && createVNode(Button, {
|
8350
8525
|
"size": "large",
|
8351
8526
|
"text": props.confirmButtonText || t$7("confirm"),
|
8352
|
-
"class": [bem$
|
8527
|
+
"class": [bem$A("confirm"), {
|
8353
8528
|
[BORDER_LEFT]: props.showCancelButton
|
8354
8529
|
}],
|
8355
8530
|
"style": {
|
@@ -8359,19 +8534,19 @@ var stdin_default$G = defineComponent({
|
|
8359
8534
|
"onClick": onConfirm
|
8360
8535
|
}, null)]);
|
8361
8536
|
const renderRoundButtons = () => createVNode(ActionBar, {
|
8362
|
-
"class": bem$
|
8537
|
+
"class": bem$A("footer")
|
8363
8538
|
}, {
|
8364
8539
|
default: () => [props.showCancelButton && createVNode(ActionBarButton, {
|
8365
8540
|
"type": "warning",
|
8366
8541
|
"text": props.cancelButtonText || t$7("cancel"),
|
8367
|
-
"class": bem$
|
8542
|
+
"class": bem$A("cancel"),
|
8368
8543
|
"color": props.cancelButtonColor,
|
8369
8544
|
"loading": loading.cancel,
|
8370
8545
|
"onClick": onCancel
|
8371
8546
|
}, null), props.showConfirmButton && createVNode(ActionBarButton, {
|
8372
8547
|
"type": "danger",
|
8373
8548
|
"text": props.confirmButtonText || t$7("confirm"),
|
8374
|
-
"class": bem$
|
8549
|
+
"class": bem$A("confirm"),
|
8375
8550
|
"color": props.confirmButtonColor,
|
8376
8551
|
"loading": loading.confirm,
|
8377
8552
|
"onClick": onConfirm
|
@@ -8392,12 +8567,15 @@ var stdin_default$G = defineComponent({
|
|
8392
8567
|
className
|
8393
8568
|
} = props;
|
8394
8569
|
return createVNode(Popup, mergeProps({
|
8570
|
+
"ref": root,
|
8395
8571
|
"role": "dialog",
|
8396
|
-
"class": [bem$
|
8572
|
+
"class": [bem$A([theme]), className],
|
8397
8573
|
"style": {
|
8398
8574
|
width: addUnit(width)
|
8399
8575
|
},
|
8576
|
+
"tabindex": 0,
|
8400
8577
|
"aria-labelledby": title || message,
|
8578
|
+
"onKeydown": onKeydown,
|
8401
8579
|
"onUpdate:show": updateShow
|
8402
8580
|
}, pick(props, popupInheritKeys$1)), {
|
8403
8581
|
default: () => [renderTitle(), renderContent(), renderFooter()]
|
@@ -8413,7 +8591,7 @@ function initInstance$2() {
|
|
8413
8591
|
state,
|
8414
8592
|
toggle
|
8415
8593
|
} = usePopupState();
|
8416
|
-
return () => createVNode(stdin_default$
|
8594
|
+
return () => createVNode(stdin_default$F, mergeProps(state, {
|
8417
8595
|
"onUpdate:show": toggle
|
8418
8596
|
}), null);
|
8419
8597
|
}
|
@@ -8478,19 +8656,19 @@ Dialog.setDefaultOptions = (options) => {
|
|
8478
8656
|
Dialog.resetDefaultOptions = () => {
|
8479
8657
|
Dialog.currentOptions = extend({}, Dialog.defaultOptions);
|
8480
8658
|
};
|
8481
|
-
Dialog.Component = withInstall(stdin_default$
|
8659
|
+
Dialog.Component = withInstall(stdin_default$F);
|
8482
8660
|
Dialog.install = (app) => {
|
8483
8661
|
app.use(Dialog.Component);
|
8484
8662
|
app.config.globalProperties.$dialog = Dialog;
|
8485
8663
|
};
|
8486
|
-
const [name$
|
8664
|
+
const [name$y, bem$z] = createNamespace("divider");
|
8487
8665
|
const dividerProps = {
|
8488
8666
|
dashed: Boolean,
|
8489
8667
|
hairline: truthProp,
|
8490
8668
|
contentPosition: makeStringProp("center")
|
8491
8669
|
};
|
8492
|
-
var stdin_default$
|
8493
|
-
name: name$
|
8670
|
+
var stdin_default$E = defineComponent({
|
8671
|
+
name: name$y,
|
8494
8672
|
props: dividerProps,
|
8495
8673
|
setup(props, {
|
8496
8674
|
slots
|
@@ -8499,7 +8677,7 @@ var stdin_default$F = defineComponent({
|
|
8499
8677
|
var _a;
|
8500
8678
|
return createVNode("div", {
|
8501
8679
|
"role": "separator",
|
8502
|
-
"class": bem$
|
8680
|
+
"class": bem$z({
|
8503
8681
|
dashed: props.dashed,
|
8504
8682
|
hairline: props.hairline,
|
8505
8683
|
[`content-${props.contentPosition}`]: !!slots.default
|
@@ -8508,8 +8686,8 @@ var stdin_default$F = defineComponent({
|
|
8508
8686
|
};
|
8509
8687
|
}
|
8510
8688
|
});
|
8511
|
-
const Divider = withInstall(stdin_default$
|
8512
|
-
const [name$
|
8689
|
+
const Divider = withInstall(stdin_default$E);
|
8690
|
+
const [name$x, bem$y] = createNamespace("dropdown-menu");
|
8513
8691
|
const dropdownMenuProps = {
|
8514
8692
|
overlay: truthProp,
|
8515
8693
|
zIndex: numericProp,
|
@@ -8519,9 +8697,9 @@ const dropdownMenuProps = {
|
|
8519
8697
|
closeOnClickOutside: truthProp,
|
8520
8698
|
closeOnClickOverlay: truthProp
|
8521
8699
|
};
|
8522
|
-
const DROPDOWN_KEY = Symbol(name$
|
8523
|
-
var stdin_default$
|
8524
|
-
name: name$
|
8700
|
+
const DROPDOWN_KEY = Symbol(name$x);
|
8701
|
+
var stdin_default$D = defineComponent({
|
8702
|
+
name: name$x,
|
8525
8703
|
props: dropdownMenuProps,
|
8526
8704
|
setup(props, {
|
8527
8705
|
slots
|
@@ -8589,7 +8767,7 @@ var stdin_default$E = defineComponent({
|
|
8589
8767
|
"id": `${id}-${index}`,
|
8590
8768
|
"role": "button",
|
8591
8769
|
"tabindex": disabled ? void 0 : 0,
|
8592
|
-
"class": [bem$
|
8770
|
+
"class": [bem$y("item", {
|
8593
8771
|
disabled
|
8594
8772
|
}), {
|
8595
8773
|
[HAPTICS_FEEDBACK]: !disabled
|
@@ -8600,7 +8778,7 @@ var stdin_default$E = defineComponent({
|
|
8600
8778
|
}
|
8601
8779
|
}
|
8602
8780
|
}, [createVNode("span", {
|
8603
|
-
"class": [bem$
|
8781
|
+
"class": [bem$y("title", {
|
8604
8782
|
down: showPopup === (props.direction === "down"),
|
8605
8783
|
active: showPopup
|
8606
8784
|
}), titleClass],
|
@@ -8624,18 +8802,18 @@ var stdin_default$E = defineComponent({
|
|
8624
8802
|
var _a;
|
8625
8803
|
return createVNode("div", {
|
8626
8804
|
"ref": root,
|
8627
|
-
"class": bem$
|
8805
|
+
"class": bem$y()
|
8628
8806
|
}, [createVNode("div", {
|
8629
8807
|
"ref": barRef,
|
8630
8808
|
"style": barStyle.value,
|
8631
|
-
"class": bem$
|
8809
|
+
"class": bem$y("bar", {
|
8632
8810
|
opened: opened.value
|
8633
8811
|
})
|
8634
8812
|
}, [children.map(renderTitle)]), (_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
8635
8813
|
};
|
8636
8814
|
}
|
8637
8815
|
});
|
8638
|
-
const [name$
|
8816
|
+
const [name$w, bem$x] = createNamespace("dropdown-item");
|
8639
8817
|
const dropdownItemProps = {
|
8640
8818
|
title: String,
|
8641
8819
|
options: makeArrayProp(),
|
@@ -8645,8 +8823,8 @@ const dropdownItemProps = {
|
|
8645
8823
|
modelValue: unknownProp,
|
8646
8824
|
titleClass: unknownProp
|
8647
8825
|
};
|
8648
|
-
var stdin_default$
|
8649
|
-
name: name$
|
8826
|
+
var stdin_default$C = defineComponent({
|
8827
|
+
name: name$w,
|
8650
8828
|
props: dropdownItemProps,
|
8651
8829
|
emits: ["open", "opened", "close", "closed", "change", "update:modelValue"],
|
8652
8830
|
setup(props, {
|
@@ -8713,7 +8891,7 @@ var stdin_default$D = defineComponent({
|
|
8713
8891
|
const renderIcon = () => {
|
8714
8892
|
if (active) {
|
8715
8893
|
return createVNode(Icon, {
|
8716
|
-
"class": bem$
|
8894
|
+
"class": bem$x("icon"),
|
8717
8895
|
"color": activeColor,
|
8718
8896
|
"name": "success"
|
8719
8897
|
}, null);
|
@@ -8724,7 +8902,7 @@ var stdin_default$D = defineComponent({
|
|
8724
8902
|
"key": option.value,
|
8725
8903
|
"icon": option.icon,
|
8726
8904
|
"title": option.text,
|
8727
|
-
"class": bem$
|
8905
|
+
"class": bem$x("option", {
|
8728
8906
|
active
|
8729
8907
|
}),
|
8730
8908
|
"style": {
|
@@ -8756,13 +8934,13 @@ var stdin_default$D = defineComponent({
|
|
8756
8934
|
}
|
8757
8935
|
return withDirectives(createVNode("div", {
|
8758
8936
|
"style": style,
|
8759
|
-
"class": bem$
|
8937
|
+
"class": bem$x([direction]),
|
8760
8938
|
"onClick": onClickWrapper
|
8761
8939
|
}, [createVNode(Popup, {
|
8762
8940
|
"show": state.showPopup,
|
8763
8941
|
"onUpdate:show": ($event) => state.showPopup = $event,
|
8764
8942
|
"role": "menu",
|
8765
|
-
"class": bem$
|
8943
|
+
"class": bem$x("content"),
|
8766
8944
|
"overlay": overlay,
|
8767
8945
|
"position": direction === "down" ? "top" : "bottom",
|
8768
8946
|
"duration": state.transition ? duration : 0,
|
@@ -8800,147 +8978,8 @@ var stdin_default$D = defineComponent({
|
|
8800
8978
|
};
|
8801
8979
|
}
|
8802
8980
|
});
|
8803
|
-
const DropdownItem = withInstall(stdin_default$
|
8804
|
-
const DropdownMenu = withInstall(stdin_default$
|
8805
|
-
const prefix = "van-empty-network-";
|
8806
|
-
const renderStop = (color, offset, opacity) => createVNode("stop", {
|
8807
|
-
"stop-color": color,
|
8808
|
-
"offset": `${offset}%`,
|
8809
|
-
"stop-opacity": opacity
|
8810
|
-
}, null);
|
8811
|
-
const Network = createVNode("svg", {
|
8812
|
-
"viewBox": "0 0 160 160"
|
8813
|
-
}, [createVNode("defs", null, [createVNode("linearGradient", {
|
8814
|
-
"id": `${prefix}1`,
|
8815
|
-
"x1": "64%",
|
8816
|
-
"y1": "100%",
|
8817
|
-
"x2": "64%"
|
8818
|
-
}, [renderStop("#FFF", 0, 0.5), renderStop("#F2F3F5", 100)]), createVNode("linearGradient", {
|
8819
|
-
"id": `${prefix}2`,
|
8820
|
-
"x1": "50%",
|
8821
|
-
"x2": "50%",
|
8822
|
-
"y2": "84%"
|
8823
|
-
}, [renderStop("#EBEDF0", 0), renderStop("#DCDEE0", 100, 0)]), createVNode("linearGradient", {
|
8824
|
-
"id": `${prefix}3`,
|
8825
|
-
"x1": "100%",
|
8826
|
-
"x2": "100%",
|
8827
|
-
"y2": "100%"
|
8828
|
-
}, [renderStop("#EAEDF0", 0), renderStop("#DCDEE0", 100)]), createVNode("radialGradient", {
|
8829
|
-
"id": `${prefix}4`,
|
8830
|
-
"cx": "50%",
|
8831
|
-
"cy": "0%",
|
8832
|
-
"fx": "50%",
|
8833
|
-
"fy": "0%",
|
8834
|
-
"r": "100%",
|
8835
|
-
"gradientTransform": "matrix(0 1 -.54 0 .5 -.5)"
|
8836
|
-
}, [renderStop("#EBEDF0", 0), renderStop("#FFF", 100, 0)])]), createVNode("g", {
|
8837
|
-
"fill": "none"
|
8838
|
-
}, [createVNode("g", {
|
8839
|
-
"opacity": ".8"
|
8840
|
-
}, [createVNode("path", {
|
8841
|
-
"d": "M36 131V53H16v20H2v58h34z",
|
8842
|
-
"fill": `url(#${prefix}1)`
|
8843
|
-
}, null), createVNode("path", {
|
8844
|
-
"d": "M123 15h22v14h9v77h-31V15z",
|
8845
|
-
"fill": `url(#${prefix}1)`
|
8846
|
-
}, null)]), createVNode("path", {
|
8847
|
-
"fill": `url(#${prefix}4)`,
|
8848
|
-
"d": "M0 139h160v21H0z"
|
8849
|
-
}, null), createVNode("path", {
|
8850
|
-
"d": "M80 54a7 7 0 0 1 3 13v27l-2 2h-2a2 2 0 0 1-2-2V67a7 7 0 0 1 3-13z",
|
8851
|
-
"fill": `url(#${prefix}2)`
|
8852
|
-
}, null), createVNode("g", {
|
8853
|
-
"opacity": ".6",
|
8854
|
-
"stroke-linecap": "round",
|
8855
|
-
"stroke-width": "7"
|
8856
|
-
}, [createVNode("path", {
|
8857
|
-
"d": "M64 47a19 19 0 0 0-5 13c0 5 2 10 5 13",
|
8858
|
-
"stroke": `url(#${prefix}3)`
|
8859
|
-
}, null), createVNode("path", {
|
8860
|
-
"d": "M53 36a34 34 0 0 0 0 48",
|
8861
|
-
"stroke": `url(#${prefix}3)`
|
8862
|
-
}, null), createVNode("path", {
|
8863
|
-
"d": "M95 73a19 19 0 0 0 6-13c0-5-2-9-6-13",
|
8864
|
-
"stroke": `url(#${prefix}3)`
|
8865
|
-
}, null), createVNode("path", {
|
8866
|
-
"d": "M106 84a34 34 0 0 0 0-48",
|
8867
|
-
"stroke": `url(#${prefix}3)`
|
8868
|
-
}, null)]), createVNode("g", {
|
8869
|
-
"transform": "translate(31 105)"
|
8870
|
-
}, [createVNode("rect", {
|
8871
|
-
"fill": "#EBEDF0",
|
8872
|
-
"width": "98",
|
8873
|
-
"height": "34",
|
8874
|
-
"rx": "2"
|
8875
|
-
}, null), createVNode("rect", {
|
8876
|
-
"fill": "#FFF",
|
8877
|
-
"x": "9",
|
8878
|
-
"y": "8",
|
8879
|
-
"width": "80",
|
8880
|
-
"height": "18",
|
8881
|
-
"rx": "1.1"
|
8882
|
-
}, null), createVNode("rect", {
|
8883
|
-
"fill": "#EBEDF0",
|
8884
|
-
"x": "15",
|
8885
|
-
"y": "12",
|
8886
|
-
"width": "18",
|
8887
|
-
"height": "6",
|
8888
|
-
"rx": "1.1"
|
8889
|
-
}, null)])])]);
|
8890
|
-
const [name$w, bem$x] = createNamespace("empty");
|
8891
|
-
const PRESET_IMAGES = ["error", "search", "default"];
|
8892
|
-
const emptyProps = {
|
8893
|
-
image: makeStringProp("default"),
|
8894
|
-
imageSize: numericProp,
|
8895
|
-
description: String
|
8896
|
-
};
|
8897
|
-
var stdin_default$C = defineComponent({
|
8898
|
-
name: name$w,
|
8899
|
-
props: emptyProps,
|
8900
|
-
setup(props, {
|
8901
|
-
slots
|
8902
|
-
}) {
|
8903
|
-
const renderImage = () => {
|
8904
|
-
if (slots.image) {
|
8905
|
-
return slots.image();
|
8906
|
-
}
|
8907
|
-
let {
|
8908
|
-
image
|
8909
|
-
} = props;
|
8910
|
-
if (image === "network") {
|
8911
|
-
return Network;
|
8912
|
-
}
|
8913
|
-
if (PRESET_IMAGES.includes(image)) {
|
8914
|
-
image = `https://img.yzcdn.cn/vant/empty-image-${image}.png`;
|
8915
|
-
}
|
8916
|
-
return createVNode("img", {
|
8917
|
-
"src": image
|
8918
|
-
}, null);
|
8919
|
-
};
|
8920
|
-
const renderDescription = () => {
|
8921
|
-
const description = slots.description ? slots.description() : props.description;
|
8922
|
-
if (description) {
|
8923
|
-
return createVNode("p", {
|
8924
|
-
"class": bem$x("description")
|
8925
|
-
}, [description]);
|
8926
|
-
}
|
8927
|
-
};
|
8928
|
-
const renderBottom = () => {
|
8929
|
-
if (slots.default) {
|
8930
|
-
return createVNode("div", {
|
8931
|
-
"class": bem$x("bottom")
|
8932
|
-
}, [slots.default()]);
|
8933
|
-
}
|
8934
|
-
};
|
8935
|
-
return () => createVNode("div", {
|
8936
|
-
"class": bem$x()
|
8937
|
-
}, [createVNode("div", {
|
8938
|
-
"class": bem$x("image"),
|
8939
|
-
"style": getSizeStyle(props.imageSize)
|
8940
|
-
}, [renderImage()]), renderDescription(), renderBottom()]);
|
8941
|
-
}
|
8942
|
-
});
|
8943
|
-
const Empty = withInstall(stdin_default$C);
|
8981
|
+
const DropdownItem = withInstall(stdin_default$C);
|
8982
|
+
const DropdownMenu = withInstall(stdin_default$D);
|
8944
8983
|
const [name$v, bem$w] = createNamespace("grid");
|
8945
8984
|
const gridProps = {
|
8946
8985
|
square: Boolean,
|
@@ -9594,6 +9633,7 @@ var stdin_default$x = defineComponent({
|
|
9594
9633
|
children,
|
9595
9634
|
linkChildren
|
9596
9635
|
} = useChildren(INDEX_BAR_KEY);
|
9636
|
+
let selectActiveIndex;
|
9597
9637
|
linkChildren({
|
9598
9638
|
props
|
9599
9639
|
});
|
@@ -9621,6 +9661,7 @@ var stdin_default$x = defineComponent({
|
|
9621
9661
|
}
|
9622
9662
|
return -1;
|
9623
9663
|
};
|
9664
|
+
const getMatchAnchor = (index) => children.find((item) => String(item.index) === index);
|
9624
9665
|
const onScroll = () => {
|
9625
9666
|
if (isHidden(root)) {
|
9626
9667
|
return;
|
@@ -9632,7 +9673,16 @@ var stdin_default$x = defineComponent({
|
|
9632
9673
|
const scrollTop = getScrollTop(scrollParent.value);
|
9633
9674
|
const scrollParentRect = useRect(scrollParent);
|
9634
9675
|
const rects = children.map((item) => item.getRect(scrollParent.value, scrollParentRect));
|
9635
|
-
|
9676
|
+
let active = -1;
|
9677
|
+
if (selectActiveIndex) {
|
9678
|
+
const match = getMatchAnchor(selectActiveIndex);
|
9679
|
+
if (match) {
|
9680
|
+
const rect = match.getRect(scrollParent.value, scrollParentRect);
|
9681
|
+
active = getActiveAnchor(rect.top, rects);
|
9682
|
+
}
|
9683
|
+
} else {
|
9684
|
+
active = getActiveAnchor(scrollTop, rects);
|
9685
|
+
}
|
9636
9686
|
activeAnchor.value = indexList[active];
|
9637
9687
|
if (sticky) {
|
9638
9688
|
children.forEach((item, index) => {
|
@@ -9651,7 +9701,7 @@ var stdin_default$x = defineComponent({
|
|
9651
9701
|
if (index === active) {
|
9652
9702
|
state.active = true;
|
9653
9703
|
state.top = Math.max(props.stickyOffsetTop, rects[index].top - scrollTop) + scrollParentRect.top;
|
9654
|
-
} else if (index === active - 1) {
|
9704
|
+
} else if (index === active - 1 && selectActiveIndex === "") {
|
9655
9705
|
const activeItemTop = rects[active].top - scrollTop;
|
9656
9706
|
state.active = activeItemTop > 0;
|
9657
9707
|
state.top = activeItemTop + scrollParentRect.top - rects[index].height;
|
@@ -9660,6 +9710,7 @@ var stdin_default$x = defineComponent({
|
|
9660
9710
|
}
|
9661
9711
|
});
|
9662
9712
|
}
|
9713
|
+
selectActiveIndex = "";
|
9663
9714
|
};
|
9664
9715
|
const init = () => {
|
9665
9716
|
nextTick(onScroll);
|
@@ -9685,9 +9736,18 @@ var stdin_default$x = defineComponent({
|
|
9685
9736
|
}, [index]);
|
9686
9737
|
});
|
9687
9738
|
const scrollTo = (index) => {
|
9688
|
-
|
9689
|
-
const match =
|
9739
|
+
selectActiveIndex = String(index);
|
9740
|
+
const match = getMatchAnchor(selectActiveIndex);
|
9690
9741
|
if (match) {
|
9742
|
+
const scrollTop = getScrollTop(scrollParent.value);
|
9743
|
+
const scrollParentRect = useRect(scrollParent);
|
9744
|
+
const {
|
9745
|
+
offsetHeight
|
9746
|
+
} = document.documentElement;
|
9747
|
+
if (scrollTop === offsetHeight - scrollParentRect.height) {
|
9748
|
+
onScroll();
|
9749
|
+
return;
|
9750
|
+
}
|
9691
9751
|
match.$el.scrollIntoView();
|
9692
9752
|
if (props.sticky && props.stickyOffsetTop) {
|
9693
9753
|
setRootScrollTop(getRootScrollTop() - props.stickyOffsetTop);
|
@@ -10021,10 +10081,10 @@ var stdin_default$u = defineComponent({
|
|
10021
10081
|
"ref": navBarRef,
|
10022
10082
|
"style": style,
|
10023
10083
|
"class": [bem$p({
|
10024
|
-
fixed
|
10025
|
-
"safe-area-inset-top": props.safeAreaInsetTop
|
10084
|
+
fixed
|
10026
10085
|
}), {
|
10027
|
-
[BORDER_BOTTOM]: border
|
10086
|
+
[BORDER_BOTTOM]: border,
|
10087
|
+
"van-safe-area-top": props.safeAreaInsetTop
|
10028
10088
|
}]
|
10029
10089
|
}, [createVNode("div", {
|
10030
10090
|
"class": bem$p("content")
|
@@ -10413,6 +10473,15 @@ const numberKeyboardProps = {
|
|
10413
10473
|
default: ""
|
10414
10474
|
}
|
10415
10475
|
};
|
10476
|
+
function shuffle(array) {
|
10477
|
+
for (let i = array.length - 1; i > 0; i--) {
|
10478
|
+
const j = Math.floor(Math.random() * (i + 1));
|
10479
|
+
const temp = array[i];
|
10480
|
+
array[i] = array[j];
|
10481
|
+
array[j] = temp;
|
10482
|
+
}
|
10483
|
+
return array;
|
10484
|
+
}
|
10416
10485
|
var stdin_default$q = defineComponent({
|
10417
10486
|
name: name$l,
|
10418
10487
|
props: numberKeyboardProps,
|
@@ -10427,7 +10496,7 @@ var stdin_default$q = defineComponent({
|
|
10427
10496
|
text: i + 1
|
10428
10497
|
}));
|
10429
10498
|
if (props.randomKeyOrder) {
|
10430
|
-
keys2
|
10499
|
+
shuffle(keys2);
|
10431
10500
|
}
|
10432
10501
|
return keys2;
|
10433
10502
|
};
|
@@ -11745,9 +11814,11 @@ const skeletonProps = {
|
|
11745
11814
|
};
|
11746
11815
|
var stdin_default$f = defineComponent({
|
11747
11816
|
name: name$a,
|
11817
|
+
inheritAttrs: false,
|
11748
11818
|
props: skeletonProps,
|
11749
11819
|
setup(props, {
|
11750
|
-
slots
|
11820
|
+
slots,
|
11821
|
+
attrs
|
11751
11822
|
}) {
|
11752
11823
|
const renderAvatar = () => {
|
11753
11824
|
if (props.avatar) {
|
@@ -11790,12 +11861,12 @@ var stdin_default$f = defineComponent({
|
|
11790
11861
|
if (!props.loading) {
|
11791
11862
|
return (_a = slots.default) == null ? void 0 : _a.call(slots);
|
11792
11863
|
}
|
11793
|
-
return createVNode("div", {
|
11864
|
+
return createVNode("div", mergeProps({
|
11794
11865
|
"class": bem$a({
|
11795
11866
|
animate: props.animate,
|
11796
11867
|
round: props.round
|
11797
11868
|
})
|
11798
|
-
}, [renderAvatar(), createVNode("div", {
|
11869
|
+
}, attrs), [renderAvatar(), createVNode("div", {
|
11799
11870
|
"class": bem$a("content")
|
11800
11871
|
}, [renderTitle(), renderRows()])]);
|
11801
11872
|
};
|
@@ -12686,7 +12757,7 @@ var stdin_default$9 = defineComponent({
|
|
12686
12757
|
return createVNode("div", {
|
12687
12758
|
"ref": root,
|
12688
12759
|
"class": bem$4(),
|
12689
|
-
"onClick": getClickHandler("cell"),
|
12760
|
+
"onClick": getClickHandler("cell", lockClick2),
|
12690
12761
|
"onTouchstart": onTouchStart,
|
12691
12762
|
"onTouchmove": onTouchMove,
|
12692
12763
|
"onTouchend": onTouchEnd,
|
@@ -13043,7 +13114,7 @@ var stdin_default$5 = defineComponent({
|
|
13043
13114
|
imageFit: String,
|
13044
13115
|
lazyLoad: Boolean,
|
13045
13116
|
deletable: Boolean,
|
13046
|
-
previewSize:
|
13117
|
+
previewSize: [Number, String, Array],
|
13047
13118
|
beforeDelete: Function
|
13048
13119
|
},
|
13049
13120
|
emits: ["delete", "preview"],
|
@@ -13117,16 +13188,19 @@ var stdin_default$5 = defineComponent({
|
|
13117
13188
|
};
|
13118
13189
|
const renderPreview = () => {
|
13119
13190
|
const {
|
13120
|
-
item
|
13191
|
+
item,
|
13192
|
+
lazyLoad,
|
13193
|
+
imageFit,
|
13194
|
+
previewSize
|
13121
13195
|
} = props;
|
13122
13196
|
if (isImageFile(item)) {
|
13123
13197
|
return createVNode(Image$1, {
|
13124
|
-
"fit":
|
13198
|
+
"fit": imageFit,
|
13125
13199
|
"src": item.content || item.url,
|
13126
13200
|
"class": bem("preview-image"),
|
13127
|
-
"width":
|
13128
|
-
"height":
|
13129
|
-
"lazyLoad":
|
13201
|
+
"width": Array.isArray(previewSize) ? previewSize[0] : previewSize,
|
13202
|
+
"height": Array.isArray(previewSize) ? previewSize[1] : previewSize,
|
13203
|
+
"lazyLoad": lazyLoad,
|
13130
13204
|
"onClick": onPreview
|
13131
13205
|
}, {
|
13132
13206
|
default: renderCover
|
@@ -13166,7 +13240,7 @@ const uploaderProps = {
|
|
13166
13240
|
modelValue: makeArrayProp(),
|
13167
13241
|
beforeRead: Function,
|
13168
13242
|
beforeDelete: Function,
|
13169
|
-
previewSize:
|
13243
|
+
previewSize: [Number, String, Array],
|
13170
13244
|
previewImage: truthProp,
|
13171
13245
|
previewOptions: Object,
|
13172
13246
|
previewFullImage: truthProp,
|
@@ -14233,7 +14307,7 @@ const Lazyload = {
|
|
14233
14307
|
});
|
14234
14308
|
}
|
14235
14309
|
};
|
14236
|
-
const version = "3.4.
|
14310
|
+
const version = "3.4.7";
|
14237
14311
|
function install(app) {
|
14238
14312
|
const components = [
|
14239
14313
|
ActionBar,
|