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.js
CHANGED
@@ -472,6 +472,12 @@
|
|
472
472
|
}
|
473
473
|
function getSizeStyle(originSize) {
|
474
474
|
if (isDef(originSize)) {
|
475
|
+
if (Array.isArray(originSize)) {
|
476
|
+
return {
|
477
|
+
width: addUnit(originSize[0]),
|
478
|
+
height: addUnit(originSize[1])
|
479
|
+
};
|
480
|
+
}
|
475
481
|
const size = addUnit(originSize);
|
476
482
|
return {
|
477
483
|
width: size,
|
@@ -613,7 +619,7 @@
|
|
613
619
|
loosing: "\u91CA\u653E\u5373\u53EF\u5237\u65B0..."
|
614
620
|
},
|
615
621
|
vanSubmitBar: {
|
616
|
-
label: "\u5408\u8BA1
|
622
|
+
label: "\u5408\u8BA1:"
|
617
623
|
},
|
618
624
|
vanCoupon: {
|
619
625
|
unlimited: "\u65E0\u95E8\u69DB",
|
@@ -1340,7 +1346,7 @@
|
|
1340
1346
|
};
|
1341
1347
|
const move = (event) => {
|
1342
1348
|
const touch = event.touches[0];
|
1343
|
-
deltaX.value = touch.clientX < 0 ? 0 : touch.clientX - startX.value;
|
1349
|
+
deltaX.value = (touch.clientX < 0 ? 0 : touch.clientX) - startX.value;
|
1344
1350
|
deltaY.value = touch.clientY - startY.value;
|
1345
1351
|
offsetX.value = Math.abs(deltaX.value);
|
1346
1352
|
offsetY.value = Math.abs(deltaY.value);
|
@@ -1480,6 +1486,7 @@
|
|
1480
1486
|
iconPrefix: String,
|
1481
1487
|
closeOnPopstate: Boolean,
|
1482
1488
|
closeIconPosition: makeStringProp("top-right"),
|
1489
|
+
safeAreaInsetTop: Boolean,
|
1483
1490
|
safeAreaInsetBottom: Boolean
|
1484
1491
|
});
|
1485
1492
|
const [name$1l, bem$1h] = createNamespace("popup");
|
@@ -1488,7 +1495,7 @@
|
|
1488
1495
|
name: name$1l,
|
1489
1496
|
inheritAttrs: false,
|
1490
1497
|
props: popupProps$2,
|
1491
|
-
emits: ["open", "close", "opened", "closed", "update:show", "click-overlay", "click-close-icon"],
|
1498
|
+
emits: ["open", "close", "opened", "closed", "keydown", "update:show", "click-overlay", "click-close-icon"],
|
1492
1499
|
setup(props, {
|
1493
1500
|
emit,
|
1494
1501
|
attrs,
|
@@ -1568,11 +1575,13 @@
|
|
1568
1575
|
};
|
1569
1576
|
const onOpened = () => emit("opened");
|
1570
1577
|
const onClosed = () => emit("closed");
|
1578
|
+
const onKeydown = (event) => emit("keydown", event);
|
1571
1579
|
const renderPopup = lazyRender(() => {
|
1572
1580
|
var _a;
|
1573
1581
|
const {
|
1574
1582
|
round: round2,
|
1575
1583
|
position,
|
1584
|
+
safeAreaInsetTop,
|
1576
1585
|
safeAreaInsetBottom
|
1577
1586
|
} = props;
|
1578
1587
|
return vue.withDirectives(vue.createVNode("div", vue.mergeProps({
|
@@ -1582,8 +1591,10 @@
|
|
1582
1591
|
round: round2,
|
1583
1592
|
[position]: position
|
1584
1593
|
}), {
|
1594
|
+
"van-safe-area-top": safeAreaInsetTop,
|
1585
1595
|
"van-safe-area-bottom": safeAreaInsetBottom
|
1586
|
-
}]
|
1596
|
+
}],
|
1597
|
+
"onKeydown": onKeydown
|
1587
1598
|
}, attrs), [(_a = slots.default) == null ? void 0 : _a.call(slots), renderCloseIcon()]), [[vue.vShow, props.show]]);
|
1588
1599
|
});
|
1589
1600
|
const renderTransition = () => {
|
@@ -1605,6 +1616,12 @@
|
|
1605
1616
|
vue.watch(() => props.show, (show) => {
|
1606
1617
|
if (show && !opened) {
|
1607
1618
|
open();
|
1619
|
+
if (attrs.tabindex === 0) {
|
1620
|
+
vue.nextTick(() => {
|
1621
|
+
var _a;
|
1622
|
+
(_a = popupRef.value) == null ? void 0 : _a.focus();
|
1623
|
+
});
|
1624
|
+
}
|
1608
1625
|
}
|
1609
1626
|
if (!show && opened) {
|
1610
1627
|
opened = false;
|
@@ -3359,7 +3376,7 @@
|
|
3359
3376
|
}
|
3360
3377
|
}
|
3361
3378
|
const [name$1d, bem$19] = createNamespace("toast");
|
3362
|
-
const popupInheritProps = ["show", "overlay", "transition", "overlayClass", "overlayStyle", "closeOnClickOverlay"];
|
3379
|
+
const popupInheritProps = ["show", "overlay", "teleport", "transition", "overlayClass", "overlayStyle", "closeOnClickOverlay"];
|
3363
3380
|
const toastProps = {
|
3364
3381
|
icon: String,
|
3365
3382
|
show: Boolean,
|
@@ -3369,6 +3386,7 @@
|
|
3369
3386
|
iconSize: numericProp,
|
3370
3387
|
duration: makeNumberProp(2e3),
|
3371
3388
|
position: makeStringProp("middle"),
|
3389
|
+
teleport: [String, Object],
|
3372
3390
|
className: unknownProp,
|
3373
3391
|
iconPrefix: String,
|
3374
3392
|
transition: makeStringProp("van-fade"),
|
@@ -3434,6 +3452,7 @@
|
|
3434
3452
|
} = props;
|
3435
3453
|
if (isDef(message) && message !== "") {
|
3436
3454
|
return type === "html" ? vue.createVNode("div", {
|
3455
|
+
"key": 0,
|
3437
3456
|
"class": bem$19("text"),
|
3438
3457
|
"innerHTML": String(message)
|
3439
3458
|
}, null) : vue.createVNode("div", {
|
@@ -4957,6 +4976,7 @@
|
|
4957
4976
|
showRangePrompt: truthProp,
|
4958
4977
|
confirmDisabledText: String,
|
4959
4978
|
closeOnClickOverlay: truthProp,
|
4979
|
+
safeAreaInsetTop: Boolean,
|
4960
4980
|
safeAreaInsetBottom: truthProp,
|
4961
4981
|
minDate: {
|
4962
4982
|
type: Date,
|
@@ -5119,8 +5139,8 @@
|
|
5119
5139
|
}
|
5120
5140
|
raf(() => {
|
5121
5141
|
bodyHeight = Math.floor(useRect(bodyRef).height);
|
5122
|
-
scrollToCurrentDate();
|
5123
5142
|
});
|
5143
|
+
scrollToCurrentDate();
|
5124
5144
|
};
|
5125
5145
|
const reset = (date = getInitialDate()) => {
|
5126
5146
|
currentDate.value = date;
|
@@ -5305,6 +5325,7 @@
|
|
5305
5325
|
"closeable": props.showTitle || props.showSubtitle,
|
5306
5326
|
"teleport": props.teleport,
|
5307
5327
|
"closeOnPopstate": props.closeOnPopstate,
|
5328
|
+
"safeAreaInsetTop": props.safeAreaInsetTop,
|
5308
5329
|
"closeOnClickOverlay": props.closeOnClickOverlay,
|
5309
5330
|
"onUpdate:show": updateShow
|
5310
5331
|
}, {
|
@@ -6433,6 +6454,7 @@
|
|
6433
6454
|
}
|
6434
6455
|
};
|
6435
6456
|
const renderNav = () => children.map((item, index) => vue.createVNode(stdin_default$13, vue.mergeProps({
|
6457
|
+
"key": item.id,
|
6436
6458
|
"id": `${id}-${index}`,
|
6437
6459
|
"ref": setTitleRefs(index),
|
6438
6460
|
"type": props.type,
|
@@ -7477,7 +7499,8 @@
|
|
7477
7499
|
name: numericProp,
|
7478
7500
|
isLink: truthProp,
|
7479
7501
|
disabled: Boolean,
|
7480
|
-
readonly: Boolean
|
7502
|
+
readonly: Boolean,
|
7503
|
+
lazyRender: truthProp
|
7481
7504
|
});
|
7482
7505
|
var stdin_default$R = vue.defineComponent({
|
7483
7506
|
name: name$L,
|
@@ -7500,7 +7523,7 @@
|
|
7500
7523
|
});
|
7501
7524
|
const expanded = vue.computed(() => parent.isExpanded(name2.value));
|
7502
7525
|
const show = vue.ref(expanded.value);
|
7503
|
-
const lazyRender = useLazyRender(show);
|
7526
|
+
const lazyRender = useLazyRender(() => show.value || !props.lazyRender);
|
7504
7527
|
const onTransitionEnd = () => {
|
7505
7528
|
if (!expanded.value) {
|
7506
7529
|
show.value = false;
|
@@ -8022,14 +8045,152 @@
|
|
8022
8045
|
}
|
8023
8046
|
});
|
8024
8047
|
const CouponCell = withInstall(stdin_default$L);
|
8025
|
-
const
|
8026
|
-
const
|
8048
|
+
const prefix = "van-empty-network-";
|
8049
|
+
const renderStop = (color, offset2, opacity) => vue.createVNode("stop", {
|
8050
|
+
"stop-color": color,
|
8051
|
+
"offset": `${offset2}%`,
|
8052
|
+
"stop-opacity": opacity
|
8053
|
+
}, null);
|
8054
|
+
const Network = vue.createVNode("svg", {
|
8055
|
+
"viewBox": "0 0 160 160"
|
8056
|
+
}, [vue.createVNode("defs", null, [vue.createVNode("linearGradient", {
|
8057
|
+
"id": `${prefix}1`,
|
8058
|
+
"x1": "64%",
|
8059
|
+
"y1": "100%",
|
8060
|
+
"x2": "64%"
|
8061
|
+
}, [renderStop("#FFF", 0, 0.5), renderStop("#F2F3F5", 100)]), vue.createVNode("linearGradient", {
|
8062
|
+
"id": `${prefix}2`,
|
8063
|
+
"x1": "50%",
|
8064
|
+
"x2": "50%",
|
8065
|
+
"y2": "84%"
|
8066
|
+
}, [renderStop("#EBEDF0", 0), renderStop("#DCDEE0", 100, 0)]), vue.createVNode("linearGradient", {
|
8067
|
+
"id": `${prefix}3`,
|
8068
|
+
"x1": "100%",
|
8069
|
+
"x2": "100%",
|
8070
|
+
"y2": "100%"
|
8071
|
+
}, [renderStop("#EAEDF0", 0), renderStop("#DCDEE0", 100)]), vue.createVNode("radialGradient", {
|
8072
|
+
"id": `${prefix}4`,
|
8073
|
+
"cx": "50%",
|
8074
|
+
"cy": "0%",
|
8075
|
+
"fx": "50%",
|
8076
|
+
"fy": "0%",
|
8077
|
+
"r": "100%",
|
8078
|
+
"gradientTransform": "matrix(0 1 -.54 0 .5 -.5)"
|
8079
|
+
}, [renderStop("#EBEDF0", 0), renderStop("#FFF", 100, 0)])]), vue.createVNode("g", {
|
8080
|
+
"fill": "none"
|
8081
|
+
}, [vue.createVNode("g", {
|
8082
|
+
"opacity": ".8"
|
8083
|
+
}, [vue.createVNode("path", {
|
8084
|
+
"d": "M36 131V53H16v20H2v58h34z",
|
8085
|
+
"fill": `url(#${prefix}1)`
|
8086
|
+
}, null), vue.createVNode("path", {
|
8087
|
+
"d": "M123 15h22v14h9v77h-31V15z",
|
8088
|
+
"fill": `url(#${prefix}1)`
|
8089
|
+
}, null)]), vue.createVNode("path", {
|
8090
|
+
"fill": `url(#${prefix}4)`,
|
8091
|
+
"d": "M0 139h160v21H0z"
|
8092
|
+
}, null), vue.createVNode("path", {
|
8093
|
+
"d": "M80 54a7 7 0 0 1 3 13v27l-2 2h-2a2 2 0 0 1-2-2V67a7 7 0 0 1 3-13z",
|
8094
|
+
"fill": `url(#${prefix}2)`
|
8095
|
+
}, null), vue.createVNode("g", {
|
8096
|
+
"opacity": ".6",
|
8097
|
+
"stroke-linecap": "round",
|
8098
|
+
"stroke-width": "7"
|
8099
|
+
}, [vue.createVNode("path", {
|
8100
|
+
"d": "M64 47a19 19 0 0 0-5 13c0 5 2 10 5 13",
|
8101
|
+
"stroke": `url(#${prefix}3)`
|
8102
|
+
}, null), vue.createVNode("path", {
|
8103
|
+
"d": "M53 36a34 34 0 0 0 0 48",
|
8104
|
+
"stroke": `url(#${prefix}3)`
|
8105
|
+
}, null), vue.createVNode("path", {
|
8106
|
+
"d": "M95 73a19 19 0 0 0 6-13c0-5-2-9-6-13",
|
8107
|
+
"stroke": `url(#${prefix}3)`
|
8108
|
+
}, null), vue.createVNode("path", {
|
8109
|
+
"d": "M106 84a34 34 0 0 0 0-48",
|
8110
|
+
"stroke": `url(#${prefix}3)`
|
8111
|
+
}, null)]), vue.createVNode("g", {
|
8112
|
+
"transform": "translate(31 105)"
|
8113
|
+
}, [vue.createVNode("rect", {
|
8114
|
+
"fill": "#EBEDF0",
|
8115
|
+
"width": "98",
|
8116
|
+
"height": "34",
|
8117
|
+
"rx": "2"
|
8118
|
+
}, null), vue.createVNode("rect", {
|
8119
|
+
"fill": "#FFF",
|
8120
|
+
"x": "9",
|
8121
|
+
"y": "8",
|
8122
|
+
"width": "80",
|
8123
|
+
"height": "18",
|
8124
|
+
"rx": "1.1"
|
8125
|
+
}, null), vue.createVNode("rect", {
|
8126
|
+
"fill": "#EBEDF0",
|
8127
|
+
"x": "15",
|
8128
|
+
"y": "12",
|
8129
|
+
"width": "18",
|
8130
|
+
"height": "6",
|
8131
|
+
"rx": "1.1"
|
8132
|
+
}, null)])])]);
|
8133
|
+
const [name$E, bem$D] = createNamespace("empty");
|
8134
|
+
const PRESET_IMAGES = ["error", "search", "default"];
|
8135
|
+
const emptyProps = {
|
8136
|
+
image: makeStringProp("default"),
|
8137
|
+
imageSize: numericProp,
|
8138
|
+
description: String
|
8139
|
+
};
|
8140
|
+
var stdin_default$K = vue.defineComponent({
|
8141
|
+
name: name$E,
|
8142
|
+
props: emptyProps,
|
8143
|
+
setup(props, {
|
8144
|
+
slots
|
8145
|
+
}) {
|
8146
|
+
const renderImage = () => {
|
8147
|
+
if (slots.image) {
|
8148
|
+
return slots.image();
|
8149
|
+
}
|
8150
|
+
let {
|
8151
|
+
image
|
8152
|
+
} = props;
|
8153
|
+
if (image === "network") {
|
8154
|
+
return Network;
|
8155
|
+
}
|
8156
|
+
if (PRESET_IMAGES.includes(image)) {
|
8157
|
+
image = `https://img.yzcdn.cn/vant/empty-image-${image}.png`;
|
8158
|
+
}
|
8159
|
+
return vue.createVNode("img", {
|
8160
|
+
"src": image
|
8161
|
+
}, null);
|
8162
|
+
};
|
8163
|
+
const renderDescription = () => {
|
8164
|
+
const description = slots.description ? slots.description() : props.description;
|
8165
|
+
if (description) {
|
8166
|
+
return vue.createVNode("p", {
|
8167
|
+
"class": bem$D("description")
|
8168
|
+
}, [description]);
|
8169
|
+
}
|
8170
|
+
};
|
8171
|
+
const renderBottom = () => {
|
8172
|
+
if (slots.default) {
|
8173
|
+
return vue.createVNode("div", {
|
8174
|
+
"class": bem$D("bottom")
|
8175
|
+
}, [slots.default()]);
|
8176
|
+
}
|
8177
|
+
};
|
8178
|
+
return () => vue.createVNode("div", {
|
8179
|
+
"class": bem$D()
|
8180
|
+
}, [vue.createVNode("div", {
|
8181
|
+
"class": bem$D("image"),
|
8182
|
+
"style": getSizeStyle(props.imageSize)
|
8183
|
+
}, [renderImage()]), renderDescription(), renderBottom()]);
|
8184
|
+
}
|
8185
|
+
});
|
8186
|
+
const Empty = withInstall(stdin_default$K);
|
8187
|
+
const [name$D, bem$C, t$8] = createNamespace("coupon-list");
|
8027
8188
|
const couponListProps = {
|
8028
8189
|
code: makeStringProp(""),
|
8029
8190
|
coupons: makeArrayProp(),
|
8030
8191
|
currency: makeStringProp("\xA5"),
|
8031
8192
|
showCount: truthProp,
|
8032
|
-
emptyImage:
|
8193
|
+
emptyImage: String,
|
8033
8194
|
chosenCoupon: makeNumberProp(-1),
|
8034
8195
|
enabledTitle: String,
|
8035
8196
|
disabledTitle: String,
|
@@ -8044,8 +8205,8 @@
|
|
8044
8205
|
exchangeButtonLoading: Boolean,
|
8045
8206
|
exchangeButtonDisabled: Boolean
|
8046
8207
|
};
|
8047
|
-
var stdin_default$
|
8048
|
-
name: name$
|
8208
|
+
var stdin_default$J = vue.defineComponent({
|
8209
|
+
name: name$D,
|
8049
8210
|
props: couponListProps,
|
8050
8211
|
emits: ["change", "exchange", "update:code"],
|
8051
8212
|
setup(props, {
|
@@ -8077,28 +8238,30 @@
|
|
8077
8238
|
return (_a = couponRefs.value[index]) == null ? void 0 : _a.scrollIntoView();
|
8078
8239
|
});
|
8079
8240
|
};
|
8080
|
-
const renderEmpty = () => vue.createVNode(
|
8081
|
-
"
|
8082
|
-
},
|
8083
|
-
"
|
8084
|
-
|
8241
|
+
const renderEmpty = () => vue.createVNode(Empty, {
|
8242
|
+
"image": props.emptyImage
|
8243
|
+
}, {
|
8244
|
+
default: () => [vue.createVNode("p", {
|
8245
|
+
"class": bem$C("empty-tip")
|
8246
|
+
}, [t$8("noCoupon")])]
|
8247
|
+
});
|
8085
8248
|
const renderExchangeBar = () => {
|
8086
8249
|
if (props.showExchangeBar) {
|
8087
8250
|
return vue.createVNode("div", {
|
8088
8251
|
"ref": barRef,
|
8089
|
-
"class": bem$
|
8252
|
+
"class": bem$C("exchange-bar")
|
8090
8253
|
}, [vue.createVNode(Field, {
|
8091
8254
|
"modelValue": currentCode.value,
|
8092
8255
|
"onUpdate:modelValue": ($event) => currentCode.value = $event,
|
8093
8256
|
"clearable": true,
|
8094
8257
|
"border": false,
|
8095
|
-
"class": bem$
|
8258
|
+
"class": bem$C("field"),
|
8096
8259
|
"placeholder": props.inputPlaceholder || t$8("placeholder"),
|
8097
8260
|
"maxlength": "20"
|
8098
8261
|
}, null), vue.createVNode(Button, {
|
8099
8262
|
"plain": true,
|
8100
8263
|
"type": "danger",
|
8101
|
-
"class": bem$
|
8264
|
+
"class": bem$C("exchange"),
|
8102
8265
|
"text": props.exchangeButtonText || t$8("exchange"),
|
8103
8266
|
"loading": props.exchangeButtonLoading,
|
8104
8267
|
"disabled": buttonDisabled.value,
|
@@ -8118,7 +8281,7 @@
|
|
8118
8281
|
default: () => {
|
8119
8282
|
var _a;
|
8120
8283
|
return [vue.createVNode("div", {
|
8121
|
-
"class": bem$
|
8284
|
+
"class": bem$C("list", {
|
8122
8285
|
"with-bottom": props.showCloseButton
|
8123
8286
|
}),
|
8124
8287
|
"style": {
|
@@ -8147,7 +8310,7 @@
|
|
8147
8310
|
default: () => {
|
8148
8311
|
var _a;
|
8149
8312
|
return [vue.createVNode("div", {
|
8150
|
-
"class": bem$
|
8313
|
+
"class": bem$C("list", {
|
8151
8314
|
"with-bottom": props.showCloseButton
|
8152
8315
|
}),
|
8153
8316
|
"style": {
|
@@ -8174,29 +8337,29 @@
|
|
8174
8337
|
});
|
8175
8338
|
return () => vue.createVNode("div", {
|
8176
8339
|
"ref": root,
|
8177
|
-
"class": bem$
|
8340
|
+
"class": bem$C()
|
8178
8341
|
}, [renderExchangeBar(), vue.createVNode(Tabs, {
|
8179
8342
|
"active": activeTab.value,
|
8180
8343
|
"onUpdate:active": ($event) => activeTab.value = $event,
|
8181
|
-
"class": bem$
|
8344
|
+
"class": bem$C("tab")
|
8182
8345
|
}, {
|
8183
8346
|
default: () => [renderCouponTab(), renderDisabledTab()]
|
8184
8347
|
}), vue.createVNode("div", {
|
8185
|
-
"class": bem$
|
8348
|
+
"class": bem$C("bottom")
|
8186
8349
|
}, [vue.withDirectives(vue.createVNode(Button, {
|
8187
8350
|
"round": true,
|
8188
8351
|
"block": true,
|
8189
8352
|
"type": "danger",
|
8190
|
-
"class": bem$
|
8353
|
+
"class": bem$C("close"),
|
8191
8354
|
"text": props.closeButtonText || t$8("close"),
|
8192
8355
|
"onClick": () => emit("change", -1)
|
8193
8356
|
}, null), [[vue.vShow, props.showCloseButton]])])]);
|
8194
8357
|
}
|
8195
8358
|
});
|
8196
|
-
const CouponList = withInstall(stdin_default$
|
8197
|
-
const [name$
|
8198
|
-
var stdin_default$
|
8199
|
-
name: name$
|
8359
|
+
const CouponList = withInstall(stdin_default$J);
|
8360
|
+
const [name$C] = createNamespace("time-picker");
|
8361
|
+
var stdin_default$I = vue.defineComponent({
|
8362
|
+
name: name$C,
|
8200
8363
|
props: extend({}, sharedProps, {
|
8201
8364
|
minHour: makeNumericProp(0),
|
8202
8365
|
maxHour: makeNumericProp(23),
|
@@ -8303,9 +8466,9 @@
|
|
8303
8466
|
}
|
8304
8467
|
});
|
8305
8468
|
const currentYear = new Date().getFullYear();
|
8306
|
-
const [name$
|
8307
|
-
var stdin_default$
|
8308
|
-
name: name$
|
8469
|
+
const [name$B] = createNamespace("date-picker");
|
8470
|
+
var stdin_default$H = vue.defineComponent({
|
8471
|
+
name: name$B,
|
8309
8472
|
props: extend({}, sharedProps, {
|
8310
8473
|
type: makeStringProp("datetime"),
|
8311
8474
|
modelValue: Date,
|
@@ -8520,8 +8683,7 @@
|
|
8520
8683
|
});
|
8521
8684
|
vue.watch(columns, updateColumnValue);
|
8522
8685
|
vue.watch(currentDate, (value, oldValue) => emit("update:modelValue", oldValue ? value : null));
|
8523
|
-
vue.watch(() => [props.filter, props.maxDate],
|
8524
|
-
vue.watch(() => props.minDate, () => {
|
8686
|
+
vue.watch(() => [props.filter, props.minDate, props.maxDate], () => {
|
8525
8687
|
vue.nextTick(updateInnerValue);
|
8526
8688
|
});
|
8527
8689
|
vue.watch(() => props.modelValue, (value) => {
|
@@ -8543,14 +8705,14 @@
|
|
8543
8705
|
}, pick(props, pickerInheritKeys)), slots);
|
8544
8706
|
}
|
8545
8707
|
});
|
8546
|
-
const [name$
|
8547
|
-
const timePickerPropKeys = Object.keys(stdin_default$
|
8548
|
-
const datePickerPropKeys = Object.keys(stdin_default$
|
8549
|
-
const datetimePickerProps = extend({}, stdin_default$
|
8708
|
+
const [name$A, bem$B] = createNamespace("datetime-picker");
|
8709
|
+
const timePickerPropKeys = Object.keys(stdin_default$I.props);
|
8710
|
+
const datePickerPropKeys = Object.keys(stdin_default$H.props);
|
8711
|
+
const datetimePickerProps = extend({}, stdin_default$I.props, stdin_default$H.props, {
|
8550
8712
|
modelValue: [String, Date]
|
8551
8713
|
});
|
8552
|
-
var stdin_default$
|
8553
|
-
name: name$
|
8714
|
+
var stdin_default$G = vue.defineComponent({
|
8715
|
+
name: name$A,
|
8554
8716
|
props: datetimePickerProps,
|
8555
8717
|
setup(props, {
|
8556
8718
|
attrs,
|
@@ -8565,17 +8727,17 @@
|
|
8565
8727
|
});
|
8566
8728
|
return () => {
|
8567
8729
|
const isTimePicker = props.type === "time";
|
8568
|
-
const Component = isTimePicker ? stdin_default$
|
8730
|
+
const Component = isTimePicker ? stdin_default$I : stdin_default$H;
|
8569
8731
|
const inheritProps = pick(props, isTimePicker ? timePickerPropKeys : datePickerPropKeys);
|
8570
8732
|
return vue.createVNode(Component, vue.mergeProps({
|
8571
8733
|
"ref": root,
|
8572
|
-
"class": bem$
|
8734
|
+
"class": bem$B()
|
8573
8735
|
}, inheritProps, attrs), slots);
|
8574
8736
|
};
|
8575
8737
|
}
|
8576
8738
|
});
|
8577
|
-
const DatetimePicker = withInstall(stdin_default$
|
8578
|
-
const [name$
|
8739
|
+
const DatetimePicker = withInstall(stdin_default$G);
|
8740
|
+
const [name$z, bem$A, t$7] = createNamespace("dialog");
|
8579
8741
|
const dialogProps = extend({}, popupSharedProps, {
|
8580
8742
|
title: String,
|
8581
8743
|
theme: String,
|
@@ -8596,14 +8758,15 @@
|
|
8596
8758
|
closeOnClickOverlay: Boolean
|
8597
8759
|
});
|
8598
8760
|
const popupInheritKeys$1 = [...popupSharedPropKeys, "transition", "closeOnPopstate"];
|
8599
|
-
var stdin_default$
|
8600
|
-
name: name$
|
8761
|
+
var stdin_default$F = vue.defineComponent({
|
8762
|
+
name: name$z,
|
8601
8763
|
props: dialogProps,
|
8602
|
-
emits: ["confirm", "cancel", "update:show"],
|
8764
|
+
emits: ["confirm", "cancel", "keydown", "update:show"],
|
8603
8765
|
setup(props, {
|
8604
8766
|
emit,
|
8605
8767
|
slots
|
8606
8768
|
}) {
|
8769
|
+
const root = vue.ref();
|
8607
8770
|
const loading = vue.reactive({
|
8608
8771
|
confirm: false,
|
8609
8772
|
cancel: false
|
@@ -8637,11 +8800,23 @@
|
|
8637
8800
|
};
|
8638
8801
|
const onCancel = getActionHandler("cancel");
|
8639
8802
|
const onConfirm = getActionHandler("confirm");
|
8803
|
+
const onKeydown = vue.withKeys((event) => {
|
8804
|
+
var _a, _b;
|
8805
|
+
if (event.target !== ((_b = (_a = root.value) == null ? void 0 : _a.popupRef) == null ? void 0 : _b.value)) {
|
8806
|
+
return;
|
8807
|
+
}
|
8808
|
+
const onEventType = {
|
8809
|
+
Enter: props.showConfirmButton ? onConfirm : noop,
|
8810
|
+
Escape: props.showCancelButton ? onCancel : noop
|
8811
|
+
};
|
8812
|
+
onEventType[event.key]();
|
8813
|
+
emit("keydown", event);
|
8814
|
+
}, ["enter", "esc"]);
|
8640
8815
|
const renderTitle = () => {
|
8641
8816
|
const title = slots.title ? slots.title() : props.title;
|
8642
8817
|
if (title) {
|
8643
8818
|
return vue.createVNode("div", {
|
8644
|
-
"class": bem$
|
8819
|
+
"class": bem$A("header", {
|
8645
8820
|
isolated: !props.message && !slots.default
|
8646
8821
|
})
|
8647
8822
|
}, [title]);
|
@@ -8653,7 +8828,7 @@
|
|
8653
8828
|
allowHtml,
|
8654
8829
|
messageAlign
|
8655
8830
|
} = props;
|
8656
|
-
const classNames = bem$
|
8831
|
+
const classNames = bem$A("message", {
|
8657
8832
|
"has-title": hasTitle,
|
8658
8833
|
[messageAlign]: messageAlign
|
8659
8834
|
});
|
@@ -8671,7 +8846,7 @@
|
|
8671
8846
|
const renderContent = () => {
|
8672
8847
|
if (slots.default) {
|
8673
8848
|
return vue.createVNode("div", {
|
8674
|
-
"class": bem$
|
8849
|
+
"class": bem$A("content")
|
8675
8850
|
}, [slots.default()]);
|
8676
8851
|
}
|
8677
8852
|
const {
|
@@ -8683,18 +8858,18 @@
|
|
8683
8858
|
const hasTitle = !!(title || slots.title);
|
8684
8859
|
return vue.createVNode("div", {
|
8685
8860
|
"key": allowHtml ? 1 : 0,
|
8686
|
-
"class": bem$
|
8861
|
+
"class": bem$A("content", {
|
8687
8862
|
isolated: !hasTitle
|
8688
8863
|
})
|
8689
8864
|
}, [renderMessage(hasTitle)]);
|
8690
8865
|
}
|
8691
8866
|
};
|
8692
8867
|
const renderButtons = () => vue.createVNode("div", {
|
8693
|
-
"class": [BORDER_TOP, bem$
|
8868
|
+
"class": [BORDER_TOP, bem$A("footer")]
|
8694
8869
|
}, [props.showCancelButton && vue.createVNode(Button, {
|
8695
8870
|
"size": "large",
|
8696
8871
|
"text": props.cancelButtonText || t$7("cancel"),
|
8697
|
-
"class": bem$
|
8872
|
+
"class": bem$A("cancel"),
|
8698
8873
|
"style": {
|
8699
8874
|
color: props.cancelButtonColor
|
8700
8875
|
},
|
@@ -8703,7 +8878,7 @@
|
|
8703
8878
|
}, null), props.showConfirmButton && vue.createVNode(Button, {
|
8704
8879
|
"size": "large",
|
8705
8880
|
"text": props.confirmButtonText || t$7("confirm"),
|
8706
|
-
"class": [bem$
|
8881
|
+
"class": [bem$A("confirm"), {
|
8707
8882
|
[BORDER_LEFT]: props.showCancelButton
|
8708
8883
|
}],
|
8709
8884
|
"style": {
|
@@ -8713,19 +8888,19 @@
|
|
8713
8888
|
"onClick": onConfirm
|
8714
8889
|
}, null)]);
|
8715
8890
|
const renderRoundButtons = () => vue.createVNode(ActionBar, {
|
8716
|
-
"class": bem$
|
8891
|
+
"class": bem$A("footer")
|
8717
8892
|
}, {
|
8718
8893
|
default: () => [props.showCancelButton && vue.createVNode(ActionBarButton, {
|
8719
8894
|
"type": "warning",
|
8720
8895
|
"text": props.cancelButtonText || t$7("cancel"),
|
8721
|
-
"class": bem$
|
8896
|
+
"class": bem$A("cancel"),
|
8722
8897
|
"color": props.cancelButtonColor,
|
8723
8898
|
"loading": loading.cancel,
|
8724
8899
|
"onClick": onCancel
|
8725
8900
|
}, null), props.showConfirmButton && vue.createVNode(ActionBarButton, {
|
8726
8901
|
"type": "danger",
|
8727
8902
|
"text": props.confirmButtonText || t$7("confirm"),
|
8728
|
-
"class": bem$
|
8903
|
+
"class": bem$A("confirm"),
|
8729
8904
|
"color": props.confirmButtonColor,
|
8730
8905
|
"loading": loading.confirm,
|
8731
8906
|
"onClick": onConfirm
|
@@ -8746,12 +8921,15 @@
|
|
8746
8921
|
className
|
8747
8922
|
} = props;
|
8748
8923
|
return vue.createVNode(Popup, vue.mergeProps({
|
8924
|
+
"ref": root,
|
8749
8925
|
"role": "dialog",
|
8750
|
-
"class": [bem$
|
8926
|
+
"class": [bem$A([theme]), className],
|
8751
8927
|
"style": {
|
8752
8928
|
width: addUnit(width2)
|
8753
8929
|
},
|
8930
|
+
"tabindex": 0,
|
8754
8931
|
"aria-labelledby": title || message,
|
8932
|
+
"onKeydown": onKeydown,
|
8755
8933
|
"onUpdate:show": updateShow
|
8756
8934
|
}, pick(props, popupInheritKeys$1)), {
|
8757
8935
|
default: () => [renderTitle(), renderContent(), renderFooter()]
|
@@ -8767,7 +8945,7 @@
|
|
8767
8945
|
state,
|
8768
8946
|
toggle
|
8769
8947
|
} = usePopupState();
|
8770
|
-
return () => vue.createVNode(stdin_default$
|
8948
|
+
return () => vue.createVNode(stdin_default$F, vue.mergeProps(state, {
|
8771
8949
|
"onUpdate:show": toggle
|
8772
8950
|
}), null);
|
8773
8951
|
}
|
@@ -8832,19 +9010,19 @@
|
|
8832
9010
|
Dialog.resetDefaultOptions = () => {
|
8833
9011
|
Dialog.currentOptions = extend({}, Dialog.defaultOptions);
|
8834
9012
|
};
|
8835
|
-
Dialog.Component = withInstall(stdin_default$
|
9013
|
+
Dialog.Component = withInstall(stdin_default$F);
|
8836
9014
|
Dialog.install = (app) => {
|
8837
9015
|
app.use(Dialog.Component);
|
8838
9016
|
app.config.globalProperties.$dialog = Dialog;
|
8839
9017
|
};
|
8840
|
-
const [name$
|
9018
|
+
const [name$y, bem$z] = createNamespace("divider");
|
8841
9019
|
const dividerProps = {
|
8842
9020
|
dashed: Boolean,
|
8843
9021
|
hairline: truthProp,
|
8844
9022
|
contentPosition: makeStringProp("center")
|
8845
9023
|
};
|
8846
|
-
var stdin_default$
|
8847
|
-
name: name$
|
9024
|
+
var stdin_default$E = vue.defineComponent({
|
9025
|
+
name: name$y,
|
8848
9026
|
props: dividerProps,
|
8849
9027
|
setup(props, {
|
8850
9028
|
slots
|
@@ -8853,7 +9031,7 @@
|
|
8853
9031
|
var _a;
|
8854
9032
|
return vue.createVNode("div", {
|
8855
9033
|
"role": "separator",
|
8856
|
-
"class": bem$
|
9034
|
+
"class": bem$z({
|
8857
9035
|
dashed: props.dashed,
|
8858
9036
|
hairline: props.hairline,
|
8859
9037
|
[`content-${props.contentPosition}`]: !!slots.default
|
@@ -8862,8 +9040,8 @@
|
|
8862
9040
|
};
|
8863
9041
|
}
|
8864
9042
|
});
|
8865
|
-
const Divider = withInstall(stdin_default$
|
8866
|
-
const [name$
|
9043
|
+
const Divider = withInstall(stdin_default$E);
|
9044
|
+
const [name$x, bem$y] = createNamespace("dropdown-menu");
|
8867
9045
|
const dropdownMenuProps = {
|
8868
9046
|
overlay: truthProp,
|
8869
9047
|
zIndex: numericProp,
|
@@ -8873,9 +9051,9 @@
|
|
8873
9051
|
closeOnClickOutside: truthProp,
|
8874
9052
|
closeOnClickOverlay: truthProp
|
8875
9053
|
};
|
8876
|
-
const DROPDOWN_KEY = Symbol(name$
|
8877
|
-
var stdin_default$
|
8878
|
-
name: name$
|
9054
|
+
const DROPDOWN_KEY = Symbol(name$x);
|
9055
|
+
var stdin_default$D = vue.defineComponent({
|
9056
|
+
name: name$x,
|
8879
9057
|
props: dropdownMenuProps,
|
8880
9058
|
setup(props, {
|
8881
9059
|
slots
|
@@ -8943,7 +9121,7 @@
|
|
8943
9121
|
"id": `${id}-${index}`,
|
8944
9122
|
"role": "button",
|
8945
9123
|
"tabindex": disabled ? void 0 : 0,
|
8946
|
-
"class": [bem$
|
9124
|
+
"class": [bem$y("item", {
|
8947
9125
|
disabled
|
8948
9126
|
}), {
|
8949
9127
|
[HAPTICS_FEEDBACK]: !disabled
|
@@ -8954,7 +9132,7 @@
|
|
8954
9132
|
}
|
8955
9133
|
}
|
8956
9134
|
}, [vue.createVNode("span", {
|
8957
|
-
"class": [bem$
|
9135
|
+
"class": [bem$y("title", {
|
8958
9136
|
down: showPopup === (props.direction === "down"),
|
8959
9137
|
active: showPopup
|
8960
9138
|
}), titleClass],
|
@@ -8978,18 +9156,18 @@
|
|
8978
9156
|
var _a;
|
8979
9157
|
return vue.createVNode("div", {
|
8980
9158
|
"ref": root,
|
8981
|
-
"class": bem$
|
9159
|
+
"class": bem$y()
|
8982
9160
|
}, [vue.createVNode("div", {
|
8983
9161
|
"ref": barRef,
|
8984
9162
|
"style": barStyle.value,
|
8985
|
-
"class": bem$
|
9163
|
+
"class": bem$y("bar", {
|
8986
9164
|
opened: opened.value
|
8987
9165
|
})
|
8988
9166
|
}, [children.map(renderTitle)]), (_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
8989
9167
|
};
|
8990
9168
|
}
|
8991
9169
|
});
|
8992
|
-
const [name$
|
9170
|
+
const [name$w, bem$x] = createNamespace("dropdown-item");
|
8993
9171
|
const dropdownItemProps = {
|
8994
9172
|
title: String,
|
8995
9173
|
options: makeArrayProp(),
|
@@ -8999,8 +9177,8 @@
|
|
8999
9177
|
modelValue: unknownProp,
|
9000
9178
|
titleClass: unknownProp
|
9001
9179
|
};
|
9002
|
-
var stdin_default$
|
9003
|
-
name: name$
|
9180
|
+
var stdin_default$C = vue.defineComponent({
|
9181
|
+
name: name$w,
|
9004
9182
|
props: dropdownItemProps,
|
9005
9183
|
emits: ["open", "opened", "close", "closed", "change", "update:modelValue"],
|
9006
9184
|
setup(props, {
|
@@ -9067,7 +9245,7 @@
|
|
9067
9245
|
const renderIcon = () => {
|
9068
9246
|
if (active) {
|
9069
9247
|
return vue.createVNode(Icon, {
|
9070
|
-
"class": bem$
|
9248
|
+
"class": bem$x("icon"),
|
9071
9249
|
"color": activeColor,
|
9072
9250
|
"name": "success"
|
9073
9251
|
}, null);
|
@@ -9078,7 +9256,7 @@
|
|
9078
9256
|
"key": option.value,
|
9079
9257
|
"icon": option.icon,
|
9080
9258
|
"title": option.text,
|
9081
|
-
"class": bem$
|
9259
|
+
"class": bem$x("option", {
|
9082
9260
|
active
|
9083
9261
|
}),
|
9084
9262
|
"style": {
|
@@ -9110,13 +9288,13 @@
|
|
9110
9288
|
}
|
9111
9289
|
return vue.withDirectives(vue.createVNode("div", {
|
9112
9290
|
"style": style,
|
9113
|
-
"class": bem$
|
9291
|
+
"class": bem$x([direction]),
|
9114
9292
|
"onClick": onClickWrapper
|
9115
9293
|
}, [vue.createVNode(Popup, {
|
9116
9294
|
"show": state.showPopup,
|
9117
9295
|
"onUpdate:show": ($event) => state.showPopup = $event,
|
9118
9296
|
"role": "menu",
|
9119
|
-
"class": bem$
|
9297
|
+
"class": bem$x("content"),
|
9120
9298
|
"overlay": overlay,
|
9121
9299
|
"position": direction === "down" ? "top" : "bottom",
|
9122
9300
|
"duration": state.transition ? duration : 0,
|
@@ -9154,147 +9332,8 @@
|
|
9154
9332
|
};
|
9155
9333
|
}
|
9156
9334
|
});
|
9157
|
-
const DropdownItem = withInstall(stdin_default$
|
9158
|
-
const DropdownMenu = withInstall(stdin_default$
|
9159
|
-
const prefix = "van-empty-network-";
|
9160
|
-
const renderStop = (color, offset2, opacity) => vue.createVNode("stop", {
|
9161
|
-
"stop-color": color,
|
9162
|
-
"offset": `${offset2}%`,
|
9163
|
-
"stop-opacity": opacity
|
9164
|
-
}, null);
|
9165
|
-
const Network = vue.createVNode("svg", {
|
9166
|
-
"viewBox": "0 0 160 160"
|
9167
|
-
}, [vue.createVNode("defs", null, [vue.createVNode("linearGradient", {
|
9168
|
-
"id": `${prefix}1`,
|
9169
|
-
"x1": "64%",
|
9170
|
-
"y1": "100%",
|
9171
|
-
"x2": "64%"
|
9172
|
-
}, [renderStop("#FFF", 0, 0.5), renderStop("#F2F3F5", 100)]), vue.createVNode("linearGradient", {
|
9173
|
-
"id": `${prefix}2`,
|
9174
|
-
"x1": "50%",
|
9175
|
-
"x2": "50%",
|
9176
|
-
"y2": "84%"
|
9177
|
-
}, [renderStop("#EBEDF0", 0), renderStop("#DCDEE0", 100, 0)]), vue.createVNode("linearGradient", {
|
9178
|
-
"id": `${prefix}3`,
|
9179
|
-
"x1": "100%",
|
9180
|
-
"x2": "100%",
|
9181
|
-
"y2": "100%"
|
9182
|
-
}, [renderStop("#EAEDF0", 0), renderStop("#DCDEE0", 100)]), vue.createVNode("radialGradient", {
|
9183
|
-
"id": `${prefix}4`,
|
9184
|
-
"cx": "50%",
|
9185
|
-
"cy": "0%",
|
9186
|
-
"fx": "50%",
|
9187
|
-
"fy": "0%",
|
9188
|
-
"r": "100%",
|
9189
|
-
"gradientTransform": "matrix(0 1 -.54 0 .5 -.5)"
|
9190
|
-
}, [renderStop("#EBEDF0", 0), renderStop("#FFF", 100, 0)])]), vue.createVNode("g", {
|
9191
|
-
"fill": "none"
|
9192
|
-
}, [vue.createVNode("g", {
|
9193
|
-
"opacity": ".8"
|
9194
|
-
}, [vue.createVNode("path", {
|
9195
|
-
"d": "M36 131V53H16v20H2v58h34z",
|
9196
|
-
"fill": `url(#${prefix}1)`
|
9197
|
-
}, null), vue.createVNode("path", {
|
9198
|
-
"d": "M123 15h22v14h9v77h-31V15z",
|
9199
|
-
"fill": `url(#${prefix}1)`
|
9200
|
-
}, null)]), vue.createVNode("path", {
|
9201
|
-
"fill": `url(#${prefix}4)`,
|
9202
|
-
"d": "M0 139h160v21H0z"
|
9203
|
-
}, null), vue.createVNode("path", {
|
9204
|
-
"d": "M80 54a7 7 0 0 1 3 13v27l-2 2h-2a2 2 0 0 1-2-2V67a7 7 0 0 1 3-13z",
|
9205
|
-
"fill": `url(#${prefix}2)`
|
9206
|
-
}, null), vue.createVNode("g", {
|
9207
|
-
"opacity": ".6",
|
9208
|
-
"stroke-linecap": "round",
|
9209
|
-
"stroke-width": "7"
|
9210
|
-
}, [vue.createVNode("path", {
|
9211
|
-
"d": "M64 47a19 19 0 0 0-5 13c0 5 2 10 5 13",
|
9212
|
-
"stroke": `url(#${prefix}3)`
|
9213
|
-
}, null), vue.createVNode("path", {
|
9214
|
-
"d": "M53 36a34 34 0 0 0 0 48",
|
9215
|
-
"stroke": `url(#${prefix}3)`
|
9216
|
-
}, null), vue.createVNode("path", {
|
9217
|
-
"d": "M95 73a19 19 0 0 0 6-13c0-5-2-9-6-13",
|
9218
|
-
"stroke": `url(#${prefix}3)`
|
9219
|
-
}, null), vue.createVNode("path", {
|
9220
|
-
"d": "M106 84a34 34 0 0 0 0-48",
|
9221
|
-
"stroke": `url(#${prefix}3)`
|
9222
|
-
}, null)]), vue.createVNode("g", {
|
9223
|
-
"transform": "translate(31 105)"
|
9224
|
-
}, [vue.createVNode("rect", {
|
9225
|
-
"fill": "#EBEDF0",
|
9226
|
-
"width": "98",
|
9227
|
-
"height": "34",
|
9228
|
-
"rx": "2"
|
9229
|
-
}, null), vue.createVNode("rect", {
|
9230
|
-
"fill": "#FFF",
|
9231
|
-
"x": "9",
|
9232
|
-
"y": "8",
|
9233
|
-
"width": "80",
|
9234
|
-
"height": "18",
|
9235
|
-
"rx": "1.1"
|
9236
|
-
}, null), vue.createVNode("rect", {
|
9237
|
-
"fill": "#EBEDF0",
|
9238
|
-
"x": "15",
|
9239
|
-
"y": "12",
|
9240
|
-
"width": "18",
|
9241
|
-
"height": "6",
|
9242
|
-
"rx": "1.1"
|
9243
|
-
}, null)])])]);
|
9244
|
-
const [name$w, bem$x] = createNamespace("empty");
|
9245
|
-
const PRESET_IMAGES = ["error", "search", "default"];
|
9246
|
-
const emptyProps = {
|
9247
|
-
image: makeStringProp("default"),
|
9248
|
-
imageSize: numericProp,
|
9249
|
-
description: String
|
9250
|
-
};
|
9251
|
-
var stdin_default$C = vue.defineComponent({
|
9252
|
-
name: name$w,
|
9253
|
-
props: emptyProps,
|
9254
|
-
setup(props, {
|
9255
|
-
slots
|
9256
|
-
}) {
|
9257
|
-
const renderImage = () => {
|
9258
|
-
if (slots.image) {
|
9259
|
-
return slots.image();
|
9260
|
-
}
|
9261
|
-
let {
|
9262
|
-
image
|
9263
|
-
} = props;
|
9264
|
-
if (image === "network") {
|
9265
|
-
return Network;
|
9266
|
-
}
|
9267
|
-
if (PRESET_IMAGES.includes(image)) {
|
9268
|
-
image = `https://img.yzcdn.cn/vant/empty-image-${image}.png`;
|
9269
|
-
}
|
9270
|
-
return vue.createVNode("img", {
|
9271
|
-
"src": image
|
9272
|
-
}, null);
|
9273
|
-
};
|
9274
|
-
const renderDescription = () => {
|
9275
|
-
const description = slots.description ? slots.description() : props.description;
|
9276
|
-
if (description) {
|
9277
|
-
return vue.createVNode("p", {
|
9278
|
-
"class": bem$x("description")
|
9279
|
-
}, [description]);
|
9280
|
-
}
|
9281
|
-
};
|
9282
|
-
const renderBottom = () => {
|
9283
|
-
if (slots.default) {
|
9284
|
-
return vue.createVNode("div", {
|
9285
|
-
"class": bem$x("bottom")
|
9286
|
-
}, [slots.default()]);
|
9287
|
-
}
|
9288
|
-
};
|
9289
|
-
return () => vue.createVNode("div", {
|
9290
|
-
"class": bem$x()
|
9291
|
-
}, [vue.createVNode("div", {
|
9292
|
-
"class": bem$x("image"),
|
9293
|
-
"style": getSizeStyle(props.imageSize)
|
9294
|
-
}, [renderImage()]), renderDescription(), renderBottom()]);
|
9295
|
-
}
|
9296
|
-
});
|
9297
|
-
const Empty = withInstall(stdin_default$C);
|
9335
|
+
const DropdownItem = withInstall(stdin_default$C);
|
9336
|
+
const DropdownMenu = withInstall(stdin_default$D);
|
9298
9337
|
const [name$v, bem$w] = createNamespace("grid");
|
9299
9338
|
const gridProps = {
|
9300
9339
|
square: Boolean,
|
@@ -9948,6 +9987,7 @@
|
|
9948
9987
|
children,
|
9949
9988
|
linkChildren
|
9950
9989
|
} = useChildren(INDEX_BAR_KEY);
|
9990
|
+
let selectActiveIndex;
|
9951
9991
|
linkChildren({
|
9952
9992
|
props
|
9953
9993
|
});
|
@@ -9975,6 +10015,7 @@
|
|
9975
10015
|
}
|
9976
10016
|
return -1;
|
9977
10017
|
};
|
10018
|
+
const getMatchAnchor = (index) => children.find((item) => String(item.index) === index);
|
9978
10019
|
const onScroll = () => {
|
9979
10020
|
if (isHidden(root)) {
|
9980
10021
|
return;
|
@@ -9986,7 +10027,16 @@
|
|
9986
10027
|
const scrollTop = getScrollTop(scrollParent.value);
|
9987
10028
|
const scrollParentRect = useRect(scrollParent);
|
9988
10029
|
const rects = children.map((item) => item.getRect(scrollParent.value, scrollParentRect));
|
9989
|
-
|
10030
|
+
let active = -1;
|
10031
|
+
if (selectActiveIndex) {
|
10032
|
+
const match = getMatchAnchor(selectActiveIndex);
|
10033
|
+
if (match) {
|
10034
|
+
const rect = match.getRect(scrollParent.value, scrollParentRect);
|
10035
|
+
active = getActiveAnchor(rect.top, rects);
|
10036
|
+
}
|
10037
|
+
} else {
|
10038
|
+
active = getActiveAnchor(scrollTop, rects);
|
10039
|
+
}
|
9990
10040
|
activeAnchor.value = indexList[active];
|
9991
10041
|
if (sticky) {
|
9992
10042
|
children.forEach((item, index) => {
|
@@ -10005,7 +10055,7 @@
|
|
10005
10055
|
if (index === active) {
|
10006
10056
|
state.active = true;
|
10007
10057
|
state.top = Math.max(props.stickyOffsetTop, rects[index].top - scrollTop) + scrollParentRect.top;
|
10008
|
-
} else if (index === active - 1) {
|
10058
|
+
} else if (index === active - 1 && selectActiveIndex === "") {
|
10009
10059
|
const activeItemTop = rects[active].top - scrollTop;
|
10010
10060
|
state.active = activeItemTop > 0;
|
10011
10061
|
state.top = activeItemTop + scrollParentRect.top - rects[index].height;
|
@@ -10014,6 +10064,7 @@
|
|
10014
10064
|
}
|
10015
10065
|
});
|
10016
10066
|
}
|
10067
|
+
selectActiveIndex = "";
|
10017
10068
|
};
|
10018
10069
|
const init = () => {
|
10019
10070
|
vue.nextTick(onScroll);
|
@@ -10039,9 +10090,18 @@
|
|
10039
10090
|
}, [index]);
|
10040
10091
|
});
|
10041
10092
|
const scrollTo = (index) => {
|
10042
|
-
|
10043
|
-
const match =
|
10093
|
+
selectActiveIndex = String(index);
|
10094
|
+
const match = getMatchAnchor(selectActiveIndex);
|
10044
10095
|
if (match) {
|
10096
|
+
const scrollTop = getScrollTop(scrollParent.value);
|
10097
|
+
const scrollParentRect = useRect(scrollParent);
|
10098
|
+
const {
|
10099
|
+
offsetHeight
|
10100
|
+
} = document.documentElement;
|
10101
|
+
if (scrollTop === offsetHeight - scrollParentRect.height) {
|
10102
|
+
onScroll();
|
10103
|
+
return;
|
10104
|
+
}
|
10045
10105
|
match.$el.scrollIntoView();
|
10046
10106
|
if (props.sticky && props.stickyOffsetTop) {
|
10047
10107
|
setRootScrollTop(getRootScrollTop() - props.stickyOffsetTop);
|
@@ -10375,10 +10435,10 @@
|
|
10375
10435
|
"ref": navBarRef,
|
10376
10436
|
"style": style,
|
10377
10437
|
"class": [bem$p({
|
10378
|
-
fixed
|
10379
|
-
"safe-area-inset-top": props.safeAreaInsetTop
|
10438
|
+
fixed
|
10380
10439
|
}), {
|
10381
|
-
[BORDER_BOTTOM]: border
|
10440
|
+
[BORDER_BOTTOM]: border,
|
10441
|
+
"van-safe-area-top": props.safeAreaInsetTop
|
10382
10442
|
}]
|
10383
10443
|
}, [vue.createVNode("div", {
|
10384
10444
|
"class": bem$p("content")
|
@@ -10767,6 +10827,15 @@
|
|
10767
10827
|
default: ""
|
10768
10828
|
}
|
10769
10829
|
};
|
10830
|
+
function shuffle(array) {
|
10831
|
+
for (let i = array.length - 1; i > 0; i--) {
|
10832
|
+
const j = Math.floor(Math.random() * (i + 1));
|
10833
|
+
const temp = array[i];
|
10834
|
+
array[i] = array[j];
|
10835
|
+
array[j] = temp;
|
10836
|
+
}
|
10837
|
+
return array;
|
10838
|
+
}
|
10770
10839
|
var stdin_default$q = vue.defineComponent({
|
10771
10840
|
name: name$l,
|
10772
10841
|
props: numberKeyboardProps,
|
@@ -10781,7 +10850,7 @@
|
|
10781
10850
|
text: i + 1
|
10782
10851
|
}));
|
10783
10852
|
if (props.randomKeyOrder) {
|
10784
|
-
keys2
|
10853
|
+
shuffle(keys2);
|
10785
10854
|
}
|
10786
10855
|
return keys2;
|
10787
10856
|
};
|
@@ -11394,8 +11463,8 @@
|
|
11394
11463
|
var afterWrite = "afterWrite";
|
11395
11464
|
var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];
|
11396
11465
|
function order(modifiers) {
|
11397
|
-
var map = new Map();
|
11398
|
-
var visited = new Set();
|
11466
|
+
var map = /* @__PURE__ */ new Map();
|
11467
|
+
var visited = /* @__PURE__ */ new Set();
|
11399
11468
|
var result = [];
|
11400
11469
|
modifiers.forEach(function(modifier) {
|
11401
11470
|
map.set(modifier.name, modifier);
|
@@ -11513,7 +11582,7 @@
|
|
11513
11582
|
});
|
11514
11583
|
}
|
11515
11584
|
function uniqueBy(arr, fn2) {
|
11516
|
-
var identifiers = new Set();
|
11585
|
+
var identifiers = /* @__PURE__ */ new Set();
|
11517
11586
|
return arr.filter(function(item) {
|
11518
11587
|
var identifier = fn2(item);
|
11519
11588
|
if (!identifiers.has(identifier)) {
|
@@ -12956,9 +13025,11 @@
|
|
12956
13025
|
};
|
12957
13026
|
var stdin_default$f = vue.defineComponent({
|
12958
13027
|
name: name$a,
|
13028
|
+
inheritAttrs: false,
|
12959
13029
|
props: skeletonProps,
|
12960
13030
|
setup(props, {
|
12961
|
-
slots
|
13031
|
+
slots,
|
13032
|
+
attrs
|
12962
13033
|
}) {
|
12963
13034
|
const renderAvatar = () => {
|
12964
13035
|
if (props.avatar) {
|
@@ -13001,12 +13072,12 @@
|
|
13001
13072
|
if (!props.loading) {
|
13002
13073
|
return (_a = slots.default) == null ? void 0 : _a.call(slots);
|
13003
13074
|
}
|
13004
|
-
return vue.createVNode("div", {
|
13075
|
+
return vue.createVNode("div", vue.mergeProps({
|
13005
13076
|
"class": bem$a({
|
13006
13077
|
animate: props.animate,
|
13007
13078
|
round: props.round
|
13008
13079
|
})
|
13009
|
-
}, [renderAvatar(), vue.createVNode("div", {
|
13080
|
+
}, attrs), [renderAvatar(), vue.createVNode("div", {
|
13010
13081
|
"class": bem$a("content")
|
13011
13082
|
}, [renderTitle(), renderRows()])]);
|
13012
13083
|
};
|
@@ -13897,7 +13968,7 @@
|
|
13897
13968
|
return vue.createVNode("div", {
|
13898
13969
|
"ref": root,
|
13899
13970
|
"class": bem$4(),
|
13900
|
-
"onClick": getClickHandler("cell"),
|
13971
|
+
"onClick": getClickHandler("cell", lockClick2),
|
13901
13972
|
"onTouchstart": onTouchStart,
|
13902
13973
|
"onTouchmove": onTouchMove,
|
13903
13974
|
"onTouchend": onTouchEnd,
|
@@ -14254,7 +14325,7 @@
|
|
14254
14325
|
imageFit: String,
|
14255
14326
|
lazyLoad: Boolean,
|
14256
14327
|
deletable: Boolean,
|
14257
|
-
previewSize:
|
14328
|
+
previewSize: [Number, String, Array],
|
14258
14329
|
beforeDelete: Function
|
14259
14330
|
},
|
14260
14331
|
emits: ["delete", "preview"],
|
@@ -14328,16 +14399,19 @@
|
|
14328
14399
|
};
|
14329
14400
|
const renderPreview = () => {
|
14330
14401
|
const {
|
14331
|
-
item
|
14402
|
+
item,
|
14403
|
+
lazyLoad,
|
14404
|
+
imageFit,
|
14405
|
+
previewSize
|
14332
14406
|
} = props;
|
14333
14407
|
if (isImageFile(item)) {
|
14334
14408
|
return vue.createVNode(Image$1, {
|
14335
|
-
"fit":
|
14409
|
+
"fit": imageFit,
|
14336
14410
|
"src": item.content || item.url,
|
14337
14411
|
"class": bem("preview-image"),
|
14338
|
-
"width":
|
14339
|
-
"height":
|
14340
|
-
"lazyLoad":
|
14412
|
+
"width": Array.isArray(previewSize) ? previewSize[0] : previewSize,
|
14413
|
+
"height": Array.isArray(previewSize) ? previewSize[1] : previewSize,
|
14414
|
+
"lazyLoad": lazyLoad,
|
14341
14415
|
"onClick": onPreview
|
14342
14416
|
}, {
|
14343
14417
|
default: renderCover
|
@@ -14377,7 +14451,7 @@
|
|
14377
14451
|
modelValue: makeArrayProp(),
|
14378
14452
|
beforeRead: Function,
|
14379
14453
|
beforeDelete: Function,
|
14380
|
-
previewSize:
|
14454
|
+
previewSize: [Number, String, Array],
|
14381
14455
|
previewImage: truthProp,
|
14382
14456
|
previewOptions: Object,
|
14383
14457
|
previewFullImage: truthProp,
|
@@ -15444,7 +15518,7 @@
|
|
15444
15518
|
});
|
15445
15519
|
}
|
15446
15520
|
};
|
15447
|
-
const version = "3.4.
|
15521
|
+
const version = "3.4.7";
|
15448
15522
|
function install(app) {
|
15449
15523
|
const components = [
|
15450
15524
|
ActionBar,
|