vant 4.0.0-alpha.0 → 4.0.0-alpha.3
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/README.md +141 -0
- package/changelog.generated.md +198 -0
- package/es/address-edit/AddressEdit.d.ts +0 -17
- package/es/address-edit/AddressEdit.js +3 -24
- package/es/address-edit/index.d.ts +0 -12
- package/es/address-edit/types.d.ts +0 -1
- 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/CalendarDay.js +4 -0
- package/es/calendar/index.css +1 -1
- package/es/calendar/index.d.ts +3 -0
- package/es/calendar/index.less +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/composables/use-touch.js +1 -1
- package/es/config-provider/ConfigProvider.d.ts +4 -3
- package/es/config-provider/ConfigProvider.js +2 -0
- 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/date-picker/DatePicker.js +1 -1
- package/es/dialog/index.css +1 -1
- package/es/dialog/index.less +2 -0
- package/es/dialog/types.d.ts +2 -2
- package/es/dropdown-item/types.d.ts +2 -1
- package/es/empty/Empty.d.ts +8 -7
- package/es/empty/Empty.js +12 -15
- package/es/empty/Images.d.ts +4 -0
- package/es/empty/Images.js +271 -0
- package/es/empty/index.d.ts +2 -2
- package/es/field/Field.d.ts +4 -0
- package/es/field/Field.js +8 -3
- package/es/field/index.d.ts +2 -0
- package/es/field/types.d.ts +1 -1
- package/es/form/Form.d.ts +13 -13
- package/es/form/Form.js +7 -3
- package/es/form/index.d.ts +9 -9
- package/es/form/types.d.ts +1 -0
- package/es/icon/index.css +1 -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/loading/Loading.js +3 -1
- package/es/locale/lang/bn-BD.d.ts +0 -2
- package/es/locale/lang/bn-BD.js +0 -2
- package/es/locale/lang/da-DK.d.ts +64 -0
- package/es/locale/lang/da-DK.js +66 -0
- package/es/locale/lang/de-DE-formal.d.ts +0 -2
- package/es/locale/lang/de-DE-formal.js +0 -2
- package/es/locale/lang/de-DE.d.ts +0 -2
- package/es/locale/lang/de-DE.js +0 -2
- package/es/locale/lang/en-US.d.ts +0 -2
- package/es/locale/lang/en-US.js +0 -2
- package/es/locale/lang/es-ES.d.ts +0 -2
- package/es/locale/lang/es-ES.js +0 -2
- package/es/locale/lang/fr-FR.d.ts +0 -2
- package/es/locale/lang/fr-FR.js +0 -2
- package/es/locale/lang/hi-IN.d.ts +0 -2
- package/es/locale/lang/hi-IN.js +0 -2
- package/es/locale/lang/id-ID.d.ts +0 -2
- package/es/locale/lang/id-ID.js +0 -2
- package/es/locale/lang/is-IS.d.ts +62 -0
- package/es/locale/lang/is-IS.js +72 -0
- package/es/locale/lang/it-IT.d.ts +0 -2
- package/es/locale/lang/it-IT.js +0 -2
- package/es/locale/lang/ja-JP.d.ts +0 -2
- package/es/locale/lang/ja-JP.js +0 -2
- package/es/locale/lang/ko-KR.d.ts +0 -2
- package/es/locale/lang/ko-KR.js +0 -2
- package/es/locale/lang/la-LA.d.ts +62 -0
- package/es/locale/lang/la-LA.js +64 -0
- package/es/locale/lang/nb-NO.d.ts +0 -2
- package/es/locale/lang/nb-NO.js +0 -2
- package/es/locale/lang/pt-BR.d.ts +0 -2
- package/es/locale/lang/pt-BR.js +0 -2
- package/es/locale/lang/ro-RO.d.ts +0 -2
- package/es/locale/lang/ro-RO.js +0 -2
- package/es/locale/lang/ru-RU.d.ts +0 -2
- package/es/locale/lang/ru-RU.js +0 -2
- package/es/locale/lang/sv-SE.d.ts +62 -0
- package/es/locale/lang/sv-SE.js +64 -0
- package/es/locale/lang/th-TH.d.ts +0 -2
- package/es/locale/lang/th-TH.js +0 -2
- package/es/locale/lang/tr-TR.d.ts +0 -2
- package/es/locale/lang/tr-TR.js +0 -2
- package/es/locale/lang/uk-UA.d.ts +0 -2
- package/es/locale/lang/uk-UA.js +0 -2
- package/es/locale/lang/vi-VN.d.ts +0 -2
- package/es/locale/lang/vi-VN.js +0 -2
- package/es/locale/lang/zh-CN.d.ts +0 -2
- package/es/locale/lang/zh-CN.js +0 -2
- package/es/locale/lang/zh-HK.d.ts +0 -2
- package/es/locale/lang/zh-HK.js +0 -2
- package/es/locale/lang/zh-TW.d.ts +0 -2
- package/es/locale/lang/zh-TW.js +0 -2
- package/es/nav-bar/NavBar.d.ts +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/Picker.d.ts +5 -4
- package/es/picker/index.css +1 -1
- package/es/picker/index.d.ts +3 -3
- package/es/picker/index.less +1 -0
- package/es/picker/types.d.ts +4 -3
- package/es/picker/utils.d.ts +4 -3
- package/es/popup/Popup.d.ts +4 -0
- package/es/popup/Popup.js +3 -0
- package/es/popup/index.css +1 -1
- package/es/popup/index.d.ts +3 -0
- package/es/progress/Progress.d.ts +4 -3
- package/es/progress/index.d.ts +2 -2
- package/es/rate/Rate.js +32 -10
- package/es/search/Search.d.ts +3 -0
- package/es/search/index.css +1 -1
- package/es/search/index.d.ts +2 -0
- package/es/search/index.less +1 -1
- package/es/share-sheet/ShareSheet.js +25 -11
- package/es/share-sheet/index.css +1 -1
- package/es/share-sheet/index.less +45 -1
- 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/slider/index.css +1 -1
- package/es/style/animation.css +1 -1
- package/es/style/base.css +1 -1
- package/es/style/base.less +5 -0
- package/es/swipe-cell/SwipeCell.js +1 -1
- package/es/swipe-cell/index.css +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.js +1 -0
- 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 +3 -3
- 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 +5 -5
- package/es/uploader/utils.d.ts +0 -1
- package/es/uploader/utils.js +2 -4
- package/es/utils/basic.d.ts +2 -0
- package/es/utils/basic.js +3 -1
- package/es/utils/format.d.ts +7 -6
- package/es/utils/format.js +6 -0
- package/es/utils/validate.d.ts +2 -1
- package/lib/action-bar/ActionBar.js +8 -13
- package/lib/action-bar/index.js +9 -16
- package/lib/action-bar-button/ActionBarButton.js +8 -13
- package/lib/action-bar-button/index.js +9 -16
- package/lib/action-bar-icon/ActionBarIcon.js +8 -13
- package/lib/action-bar-icon/index.js +9 -16
- package/lib/action-sheet/ActionSheet.js +8 -13
- package/lib/action-sheet/index.js +9 -16
- package/lib/address-edit/AddressEdit.d.ts +0 -17
- package/lib/address-edit/AddressEdit.js +12 -40
- package/lib/address-edit/AddressEditDetail.js +8 -13
- package/lib/address-edit/index.d.ts +0 -12
- package/lib/address-edit/index.js +9 -16
- package/lib/address-edit/types.d.ts +0 -1
- package/lib/address-edit/types.js +7 -12
- package/lib/address-list/AddressList.js +9 -16
- package/lib/address-list/AddressListItem.d.ts +3 -2
- package/lib/address-list/AddressListItem.js +8 -13
- package/lib/address-list/index.js +9 -16
- package/lib/area/Area.js +8 -13
- package/lib/area/index.js +9 -16
- package/lib/area/types.js +7 -12
- package/lib/area/utils.js +8 -13
- package/lib/badge/Badge.d.ts +4 -3
- package/lib/badge/Badge.js +8 -13
- package/lib/badge/index.d.ts +2 -2
- package/lib/badge/index.js +9 -16
- package/lib/button/Button.js +8 -13
- package/lib/button/index.js +9 -16
- package/lib/button/types.js +7 -12
- package/lib/calendar/Calendar.d.ts +4 -0
- package/lib/calendar/Calendar.js +12 -17
- package/lib/calendar/CalendarDay.js +12 -13
- package/lib/calendar/CalendarHeader.js +8 -13
- package/lib/calendar/CalendarMonth.js +9 -16
- package/lib/calendar/index.css +1 -1
- package/lib/calendar/index.d.ts +3 -0
- package/lib/calendar/index.js +9 -16
- package/lib/calendar/index.less +3 -0
- package/lib/calendar/types.d.ts +2 -1
- package/lib/calendar/types.js +7 -12
- package/lib/calendar/utils.js +8 -13
- package/lib/card/Card.js +8 -13
- package/lib/card/index.js +9 -16
- package/lib/cascader/Cascader.js +8 -13
- package/lib/cascader/index.js +9 -16
- package/lib/cascader/types.d.ts +2 -1
- package/lib/cascader/types.js +7 -12
- package/lib/cell/Cell.js +8 -13
- package/lib/cell/index.js +9 -16
- package/lib/cell-group/CellGroup.js +8 -13
- package/lib/cell-group/index.js +9 -16
- package/lib/checkbox/Checkbox.js +9 -16
- package/lib/checkbox/Checker.d.ts +2 -1
- package/lib/checkbox/Checker.js +8 -13
- package/lib/checkbox/index.js +9 -16
- package/lib/checkbox/types.js +7 -12
- package/lib/checkbox-group/CheckboxGroup.js +8 -13
- package/lib/checkbox-group/index.js +9 -16
- package/lib/checkbox-group/types.js +7 -12
- package/lib/circle/Circle.js +8 -13
- package/lib/circle/index.js +9 -16
- package/lib/col/Col.js +8 -13
- package/lib/col/index.js +9 -16
- package/lib/collapse/Collapse.d.ts +7 -6
- package/lib/collapse/Collapse.js +8 -13
- package/lib/collapse/index.d.ts +3 -3
- package/lib/collapse/index.js +9 -16
- package/lib/collapse-item/CollapseItem.js +8 -13
- package/lib/collapse-item/index.js +9 -16
- package/lib/collapse-item/types.js +7 -12
- package/lib/composables/on-popup-reopen.js +8 -13
- package/lib/composables/use-expose.js +8 -13
- package/lib/composables/use-height.js +8 -13
- package/lib/composables/use-id.js +8 -13
- package/lib/composables/use-lazy-render.js +8 -13
- package/lib/composables/use-lock-scroll.js +8 -13
- package/lib/composables/use-placeholder.js +8 -13
- package/lib/composables/use-refs.js +8 -13
- package/lib/composables/use-route.js +8 -13
- package/lib/composables/use-tab-status.js +8 -13
- package/lib/composables/use-touch.js +9 -14
- package/lib/composables/use-visibility-change.js +8 -13
- package/lib/config-provider/ConfigProvider.d.ts +4 -3
- package/lib/config-provider/ConfigProvider.js +10 -13
- package/lib/config-provider/index.d.ts +2 -2
- package/lib/config-provider/index.js +9 -16
- package/lib/contact-card/ContactCard.js +8 -13
- package/lib/contact-card/index.js +9 -16
- package/lib/contact-edit/ContactEdit.js +8 -13
- package/lib/contact-edit/index.js +9 -16
- package/lib/contact-list/ContactList.d.ts +3 -2
- package/lib/contact-list/ContactList.js +8 -13
- package/lib/contact-list/index.js +9 -16
- package/lib/count-down/CountDown.js +8 -13
- package/lib/count-down/index.js +9 -16
- package/lib/count-down/types.js +7 -12
- package/lib/count-down/utils.js +8 -13
- package/lib/coupon/Coupon.d.ts +2 -1
- package/lib/coupon/Coupon.js +8 -13
- package/lib/coupon/index.js +9 -16
- package/lib/coupon/utils.js +8 -13
- package/lib/coupon-cell/CouponCell.js +8 -13
- package/lib/coupon-cell/index.js +9 -16
- package/lib/coupon-list/CouponList.d.ts +3 -13
- package/lib/coupon-list/CouponList.js +17 -20
- package/lib/coupon-list/index.css +1 -1
- package/lib/coupon-list/index.d.ts +2 -9
- package/lib/coupon-list/index.js +9 -16
- 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/date-picker/DatePicker.js +9 -14
- package/lib/date-picker/index.js +9 -16
- package/lib/date-picker/utils.js +8 -13
- package/lib/dialog/Dialog.js +8 -13
- package/lib/dialog/function-call.js +9 -16
- package/lib/dialog/index.css +1 -1
- package/lib/dialog/index.js +8 -13
- package/lib/dialog/index.less +2 -0
- package/lib/dialog/types.d.ts +2 -2
- package/lib/dialog/types.js +7 -12
- package/lib/divider/Divider.js +8 -13
- package/lib/divider/index.js +9 -16
- package/lib/dropdown-item/DropdownItem.js +8 -13
- package/lib/dropdown-item/index.js +9 -16
- package/lib/dropdown-item/types.d.ts +2 -1
- package/lib/dropdown-item/types.js +7 -12
- package/lib/dropdown-menu/DropdownMenu.js +8 -13
- package/lib/dropdown-menu/index.js +9 -16
- package/lib/dropdown-menu/types.js +7 -12
- package/lib/empty/Empty.d.ts +8 -7
- package/lib/empty/Empty.js +19 -27
- package/lib/empty/Images.d.ts +4 -0
- package/lib/empty/Images.js +290 -0
- package/lib/empty/index.d.ts +2 -2
- package/lib/empty/index.js +9 -16
- package/lib/field/Field.d.ts +4 -0
- package/lib/field/Field.js +15 -15
- package/lib/field/index.d.ts +2 -0
- package/lib/field/index.js +9 -16
- package/lib/field/types.d.ts +1 -1
- package/lib/field/types.js +7 -12
- package/lib/field/utils.js +8 -13
- package/lib/form/Form.d.ts +13 -13
- package/lib/form/Form.js +14 -15
- package/lib/form/index.d.ts +9 -9
- package/lib/form/index.js +9 -16
- package/lib/form/types.d.ts +1 -0
- package/lib/form/types.js +7 -12
- package/lib/grid/Grid.js +8 -13
- package/lib/grid/index.js +9 -16
- package/lib/grid-item/GridItem.js +8 -13
- package/lib/grid-item/index.js +9 -16
- package/lib/icon/Icon.js +8 -13
- package/lib/icon/index.css +1 -1
- package/lib/icon/index.js +9 -16
- package/lib/image/Image.js +8 -13
- package/lib/image/index.js +9 -16
- package/lib/image-preview/ImagePreview.js +9 -16
- package/lib/image-preview/ImagePreviewItem.js +8 -13
- package/lib/image-preview/function-call.js +9 -16
- package/lib/image-preview/index.js +8 -13
- package/lib/image-preview/types.js +7 -12
- package/lib/index-anchor/IndexAnchor.js +8 -13
- package/lib/index-anchor/index.js +9 -16
- package/lib/index-bar/IndexBar.d.ts +5 -4
- package/lib/index-bar/IndexBar.js +33 -17
- package/lib/index-bar/index.d.ts +3 -3
- package/lib/index-bar/index.js +9 -16
- package/lib/index-bar/types.d.ts +2 -1
- package/lib/index-bar/types.js +7 -12
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +97 -101
- package/lib/index.less +2 -2
- package/lib/lazyload/index.js +8 -13
- package/lib/lazyload/vue-lazyload/index.js +9 -16
- package/lib/lazyload/vue-lazyload/lazy-component.js +8 -13
- package/lib/lazyload/vue-lazyload/lazy-container.js +8 -13
- package/lib/lazyload/vue-lazyload/lazy-image.js +8 -13
- package/lib/lazyload/vue-lazyload/lazy.js +9 -16
- package/lib/lazyload/vue-lazyload/listener.js +8 -13
- package/lib/lazyload/vue-lazyload/util.js +8 -13
- package/lib/list/List.js +8 -13
- package/lib/list/index.js +9 -16
- package/lib/list/types.js +7 -12
- package/lib/loading/Loading.js +11 -14
- package/lib/loading/index.js +9 -16
- package/lib/locale/index.js +9 -16
- package/lib/locale/lang/bn-BD.d.ts +0 -2
- package/lib/locale/lang/bn-BD.js +8 -15
- package/lib/locale/lang/da-DK.d.ts +64 -0
- package/lib/locale/lang/da-DK.js +85 -0
- package/lib/locale/lang/de-DE-formal.d.ts +0 -2
- package/lib/locale/lang/de-DE-formal.js +8 -15
- package/lib/locale/lang/de-DE.d.ts +0 -2
- package/lib/locale/lang/de-DE.js +8 -15
- package/lib/locale/lang/en-US.d.ts +0 -2
- package/lib/locale/lang/en-US.js +8 -15
- package/lib/locale/lang/es-ES.d.ts +0 -2
- package/lib/locale/lang/es-ES.js +8 -15
- package/lib/locale/lang/fr-FR.d.ts +0 -2
- package/lib/locale/lang/fr-FR.js +8 -15
- package/lib/locale/lang/hi-IN.d.ts +0 -2
- package/lib/locale/lang/hi-IN.js +8 -15
- package/lib/locale/lang/id-ID.d.ts +0 -2
- package/lib/locale/lang/id-ID.js +8 -15
- package/lib/locale/lang/is-IS.d.ts +62 -0
- package/lib/locale/lang/is-IS.js +91 -0
- package/lib/locale/lang/it-IT.d.ts +0 -2
- package/lib/locale/lang/it-IT.js +8 -15
- package/lib/locale/lang/ja-JP.d.ts +0 -2
- package/lib/locale/lang/ja-JP.js +8 -15
- package/lib/locale/lang/ko-KR.d.ts +0 -2
- package/lib/locale/lang/ko-KR.js +8 -15
- package/lib/locale/lang/la-LA.d.ts +62 -0
- package/lib/locale/lang/la-LA.js +83 -0
- package/lib/locale/lang/nb-NO.d.ts +0 -2
- package/lib/locale/lang/nb-NO.js +8 -15
- package/lib/locale/lang/pt-BR.d.ts +0 -2
- package/lib/locale/lang/pt-BR.js +8 -15
- package/lib/locale/lang/ro-RO.d.ts +0 -2
- package/lib/locale/lang/ro-RO.js +8 -15
- package/lib/locale/lang/ru-RU.d.ts +0 -2
- package/lib/locale/lang/ru-RU.js +8 -15
- package/lib/locale/lang/sv-SE.d.ts +62 -0
- package/lib/locale/lang/sv-SE.js +83 -0
- package/lib/locale/lang/th-TH.d.ts +0 -2
- package/lib/locale/lang/th-TH.js +8 -15
- package/lib/locale/lang/tr-TR.d.ts +0 -2
- package/lib/locale/lang/tr-TR.js +8 -15
- package/lib/locale/lang/uk-UA.d.ts +0 -2
- package/lib/locale/lang/uk-UA.js +8 -15
- package/lib/locale/lang/vi-VN.d.ts +0 -2
- package/lib/locale/lang/vi-VN.js +8 -15
- package/lib/locale/lang/zh-CN.d.ts +0 -2
- package/lib/locale/lang/zh-CN.js +8 -15
- package/lib/locale/lang/zh-HK.d.ts +0 -2
- package/lib/locale/lang/zh-HK.js +8 -15
- package/lib/locale/lang/zh-TW.d.ts +0 -2
- package/lib/locale/lang/zh-TW.js +8 -15
- package/lib/nav-bar/NavBar.d.ts +1 -1
- package/lib/nav-bar/NavBar.js +11 -16
- package/lib/nav-bar/index.d.ts +1 -1
- package/lib/nav-bar/index.js +9 -16
- package/lib/notice-bar/NoticeBar.js +8 -13
- package/lib/notice-bar/index.js +9 -16
- package/lib/notice-bar/types.js +7 -12
- package/lib/notify/Notify.js +8 -13
- package/lib/notify/function-call.js +9 -16
- package/lib/notify/index.js +8 -13
- package/lib/notify/types.d.ts +2 -1
- package/lib/notify/types.js +7 -12
- package/lib/number-keyboard/NumberKeyboard.js +19 -17
- package/lib/number-keyboard/NumberKeyboardKey.js +8 -13
- package/lib/number-keyboard/index.js +9 -16
- package/lib/overlay/Overlay.js +8 -13
- package/lib/overlay/index.js +9 -16
- package/lib/pagination/Pagination.js +8 -13
- package/lib/pagination/index.js +9 -16
- package/lib/password-input/PasswordInput.js +8 -13
- package/lib/password-input/index.js +9 -16
- package/lib/picker/Picker.d.ts +5 -4
- package/lib/picker/Picker.js +9 -16
- package/lib/picker/PickerColumn.js +8 -13
- package/lib/picker/index.css +1 -1
- package/lib/picker/index.d.ts +3 -3
- package/lib/picker/index.js +9 -16
- package/lib/picker/index.less +1 -0
- package/lib/picker/types.d.ts +4 -3
- package/lib/picker/types.js +7 -12
- package/lib/picker/utils.d.ts +4 -3
- package/lib/picker/utils.js +8 -13
- package/lib/popover/Popover.js +8 -13
- package/lib/popover/index.js +9 -16
- package/lib/popover/types.js +7 -12
- package/lib/popup/Popup.d.ts +4 -0
- package/lib/popup/Popup.js +11 -13
- package/lib/popup/index.css +1 -1
- package/lib/popup/index.d.ts +3 -0
- package/lib/popup/index.js +9 -16
- package/lib/popup/shared.js +8 -13
- package/lib/popup/types.js +7 -12
- package/lib/progress/Progress.d.ts +4 -3
- package/lib/progress/Progress.js +8 -13
- package/lib/progress/index.d.ts +2 -2
- package/lib/progress/index.js +9 -16
- package/lib/progress/types.js +7 -12
- package/lib/pull-refresh/PullRefresh.js +8 -13
- package/lib/pull-refresh/index.js +9 -16
- package/lib/radio/Radio.js +9 -16
- package/lib/radio/index.js +9 -16
- package/lib/radio-group/RadioGroup.js +8 -13
- package/lib/radio-group/index.js +9 -16
- package/lib/rate/Rate.js +39 -22
- package/lib/rate/index.js +9 -16
- package/lib/row/Row.js +8 -13
- package/lib/row/index.js +9 -16
- package/lib/search/Search.d.ts +3 -0
- package/lib/search/Search.js +8 -13
- package/lib/search/index.css +1 -1
- package/lib/search/index.d.ts +2 -0
- package/lib/search/index.js +9 -16
- package/lib/search/index.less +1 -1
- package/lib/search/types.js +7 -12
- package/lib/share-sheet/ShareSheet.js +33 -24
- package/lib/share-sheet/index.css +1 -1
- package/lib/share-sheet/index.js +9 -16
- package/lib/share-sheet/index.less +45 -1
- package/lib/sidebar/Sidebar.js +8 -13
- package/lib/sidebar/index.js +9 -16
- package/lib/sidebar-item/SidebarItem.js +8 -13
- package/lib/sidebar-item/index.js +9 -16
- package/lib/skeleton/Skeleton.d.ts +5 -4
- package/lib/skeleton/Skeleton.js +13 -16
- package/lib/skeleton/index.d.ts +3 -3
- package/lib/skeleton/index.js +9 -16
- package/lib/slider/Slider.js +8 -13
- package/lib/slider/index.css +1 -1
- package/lib/slider/index.js +9 -16
- package/lib/step/Step.js +8 -13
- package/lib/step/index.js +9 -16
- package/lib/stepper/Stepper.js +8 -13
- package/lib/stepper/index.js +9 -16
- package/lib/steps/Steps.js +8 -13
- package/lib/steps/index.js +9 -16
- package/lib/sticky/Sticky.js +8 -13
- package/lib/sticky/index.js +9 -16
- package/lib/style/animation.css +1 -1
- package/lib/style/base.css +1 -1
- package/lib/style/base.less +5 -0
- package/lib/submit-bar/SubmitBar.js +8 -13
- package/lib/submit-bar/index.js +9 -16
- package/lib/swipe/Swipe.js +8 -13
- package/lib/swipe/index.js +9 -16
- package/lib/swipe/types.js +7 -12
- package/lib/swipe-cell/SwipeCell.js +9 -14
- package/lib/swipe-cell/index.css +1 -1
- package/lib/swipe-cell/index.js +9 -16
- package/lib/swipe-cell/types.js +7 -12
- package/lib/swipe-item/SwipeItem.js +8 -13
- package/lib/swipe-item/index.js +9 -16
- package/lib/switch/Switch.js +8 -13
- package/lib/switch/index.js +9 -16
- package/lib/tab/Tab.js +8 -13
- package/lib/tab/index.js +9 -16
- package/lib/tabbar/Tabbar.d.ts +2 -2
- package/lib/tabbar/Tabbar.js +8 -13
- package/lib/tabbar/index.js +9 -16
- package/lib/tabbar-item/TabbarItem.js +8 -13
- package/lib/tabbar-item/index.js +9 -16
- package/lib/tabs/Tabs.d.ts +1 -1
- package/lib/tabs/Tabs.js +10 -16
- package/lib/tabs/TabsContent.js +8 -13
- package/lib/tabs/TabsTitle.js +8 -13
- package/lib/tabs/index.js +9 -16
- package/lib/tabs/types.d.ts +5 -4
- package/lib/tabs/types.js +7 -12
- package/lib/tabs/utils.js +8 -13
- package/lib/tag/Tag.js +8 -13
- package/lib/tag/index.js +9 -16
- package/lib/time-picker/TimePicker.js +8 -13
- package/lib/time-picker/index.js +9 -16
- package/lib/toast/Toast.js +9 -13
- package/lib/toast/function-call.js +9 -16
- package/lib/toast/index.js +8 -13
- package/lib/toast/lock-click.js +8 -13
- package/lib/toast/types.d.ts +3 -2
- package/lib/toast/types.js +7 -12
- package/lib/tree-select/TreeSelect.d.ts +7 -6
- package/lib/tree-select/TreeSelect.js +8 -13
- package/lib/tree-select/index.d.ts +3 -3
- package/lib/tree-select/index.js +9 -16
- package/lib/uploader/Uploader.d.ts +4 -4
- package/lib/uploader/Uploader.js +11 -18
- package/lib/uploader/UploaderPreviewItem.d.ts +3 -3
- package/lib/uploader/UploaderPreviewItem.js +17 -19
- package/lib/uploader/index.d.ts +2 -2
- package/lib/uploader/index.js +9 -16
- package/lib/uploader/types.d.ts +5 -5
- package/lib/uploader/types.js +7 -12
- package/lib/uploader/utils.d.ts +0 -1
- package/lib/uploader/utils.js +10 -17
- package/lib/utils/basic.d.ts +2 -0
- package/lib/utils/basic.js +11 -14
- package/lib/utils/constant.js +8 -13
- package/lib/utils/create.js +9 -16
- package/lib/utils/deep-assign.js +8 -13
- package/lib/utils/deep-clone.js +8 -13
- package/lib/utils/dom.js +8 -13
- package/lib/utils/format.d.ts +7 -6
- package/lib/utils/format.js +14 -13
- package/lib/utils/index.js +17 -21
- package/lib/utils/interceptor.js +8 -13
- package/lib/utils/mount-component.js +8 -13
- package/lib/utils/props.js +8 -13
- package/lib/utils/validate.d.ts +2 -1
- package/lib/utils/validate.js +8 -13
- package/lib/utils/with-install.js +8 -13
- package/lib/vant.cjs.js +538 -284
- package/lib/vant.cjs.min.js +1 -1
- package/lib/vant.es.js +538 -284
- package/lib/vant.es.min.js +538 -284
- package/lib/vant.js +538 -284
- package/lib/vant.min.js +1 -1
- package/package.json +4 -4
- package/vetur/attributes.json +388 -452
- package/vetur/tags.json +108 -106
- package/vetur/web-types.json +2027 -1172
- package/es/empty/Network.d.ts +0 -1
- package/es/empty/Network.js +0 -89
- package/lib/empty/Network.d.ts +0 -1
- package/lib/empty/Network.js +0 -113
package/lib/vant.cjs.js
CHANGED
@@ -26,6 +26,7 @@ function pick(obj, keys, ignoreUndefined) {
|
|
26
26
|
}, {});
|
27
27
|
}
|
28
28
|
const isSameValue = (newValue, oldValue) => JSON.stringify(newValue) === JSON.stringify(oldValue);
|
29
|
+
const toArray = (item) => Array.isArray(item) ? item : [item];
|
29
30
|
const unknownProp = null;
|
30
31
|
const numericProp = [Number, String];
|
31
32
|
const truthProp = {
|
@@ -122,6 +123,12 @@ function addUnit(value) {
|
|
122
123
|
}
|
123
124
|
function getSizeStyle(originSize) {
|
124
125
|
if (isDef(originSize)) {
|
126
|
+
if (Array.isArray(originSize)) {
|
127
|
+
return {
|
128
|
+
width: addUnit(originSize[0]),
|
129
|
+
height: addUnit(originSize[1])
|
130
|
+
};
|
131
|
+
}
|
125
132
|
const size = addUnit(originSize);
|
126
133
|
return {
|
127
134
|
width: size,
|
@@ -283,10 +290,8 @@ var stdin_default$1C = {
|
|
283
290
|
},
|
284
291
|
vanAddressEdit: {
|
285
292
|
area: "\u5730\u533A",
|
286
|
-
postal: "\u90AE\u653F\u7F16\u7801",
|
287
293
|
areaEmpty: "\u8BF7\u9009\u62E9\u5730\u533A",
|
288
294
|
addressEmpty: "\u8BF7\u586B\u5199\u8BE6\u7EC6\u5730\u5740",
|
289
|
-
postalEmpty: "\u90AE\u653F\u7F16\u7801\u4E0D\u6B63\u786E",
|
290
295
|
addressDetail: "\u8BE6\u7EC6\u5730\u5740",
|
291
296
|
defaultAddress: "\u8BBE\u4E3A\u9ED8\u8BA4\u6536\u8D27\u5730\u5740"
|
292
297
|
},
|
@@ -312,10 +317,10 @@ const Locale = {
|
|
312
317
|
};
|
313
318
|
var stdin_default$1B = Locale;
|
314
319
|
function createTranslate(name2) {
|
315
|
-
const
|
320
|
+
const prefix = camelize(name2) + ".";
|
316
321
|
return (path, ...args) => {
|
317
322
|
const messages2 = stdin_default$1B.messages();
|
318
|
-
const message = get(messages2,
|
323
|
+
const message = get(messages2, prefix + path) || get(messages2, path);
|
319
324
|
return isFunction(message) ? message(...args) : message;
|
320
325
|
};
|
321
326
|
}
|
@@ -563,6 +568,8 @@ var stdin_default$1y = vue.defineComponent({
|
|
563
568
|
vue.watch(() => props.theme, (newVal, oldVal) => {
|
564
569
|
document.body.classList.remove(`van-theme-${oldVal}`);
|
565
570
|
document.body.classList.add(`van-theme-${newVal}`);
|
571
|
+
}, {
|
572
|
+
immediate: true
|
566
573
|
});
|
567
574
|
}
|
568
575
|
vue.provide(CONFIG_PROVIDER_KEY, props);
|
@@ -679,7 +686,9 @@ var stdin_default$1w = vue.defineComponent({
|
|
679
686
|
return vue.createVNode("div", {
|
680
687
|
"class": bem$1l([type, {
|
681
688
|
vertical
|
682
|
-
}])
|
689
|
+
}]),
|
690
|
+
"aria-live": "polite",
|
691
|
+
"aria-busy": true
|
683
692
|
}, [vue.createVNode("span", {
|
684
693
|
"class": bem$1l("spinner", type),
|
685
694
|
"style": spinnerStyle.value
|
@@ -997,7 +1006,7 @@ function useTouch() {
|
|
997
1006
|
};
|
998
1007
|
const move = (event) => {
|
999
1008
|
const touch = event.touches[0];
|
1000
|
-
deltaX.value = touch.clientX < 0 ? 0 : touch.clientX - startX.value;
|
1009
|
+
deltaX.value = (touch.clientX < 0 ? 0 : touch.clientX) - startX.value;
|
1001
1010
|
deltaY.value = touch.clientY - startY.value;
|
1002
1011
|
offsetX.value = Math.abs(deltaX.value);
|
1003
1012
|
offsetY.value = Math.abs(deltaY.value);
|
@@ -1137,6 +1146,7 @@ const popupProps$2 = extend({}, popupSharedProps, {
|
|
1137
1146
|
iconPrefix: String,
|
1138
1147
|
closeOnPopstate: Boolean,
|
1139
1148
|
closeIconPosition: makeStringProp("top-right"),
|
1149
|
+
safeAreaInsetTop: Boolean,
|
1140
1150
|
safeAreaInsetBottom: Boolean
|
1141
1151
|
});
|
1142
1152
|
const [name$1k, bem$1g] = createNamespace("popup");
|
@@ -1231,6 +1241,7 @@ var stdin_default$1r = vue.defineComponent({
|
|
1231
1241
|
const {
|
1232
1242
|
round,
|
1233
1243
|
position,
|
1244
|
+
safeAreaInsetTop,
|
1234
1245
|
safeAreaInsetBottom
|
1235
1246
|
} = props;
|
1236
1247
|
return vue.withDirectives(vue.createVNode("div", vue.mergeProps({
|
@@ -1240,6 +1251,7 @@ var stdin_default$1r = vue.defineComponent({
|
|
1240
1251
|
round,
|
1241
1252
|
[position]: position
|
1242
1253
|
}), {
|
1254
|
+
"van-safe-area-top": safeAreaInsetTop,
|
1243
1255
|
"van-safe-area-bottom": safeAreaInsetBottom
|
1244
1256
|
}],
|
1245
1257
|
"onKeydown": onKeydown
|
@@ -2142,9 +2154,12 @@ const formProps = {
|
|
2142
2154
|
scrollToError: Boolean,
|
2143
2155
|
validateFirst: Boolean,
|
2144
2156
|
submitOnEnter: truthProp,
|
2145
|
-
validateTrigger: makeStringProp("onBlur"),
|
2146
2157
|
showErrorMessage: truthProp,
|
2147
|
-
errorMessageAlign: String
|
2158
|
+
errorMessageAlign: String,
|
2159
|
+
validateTrigger: {
|
2160
|
+
type: [String, Array],
|
2161
|
+
default: "onBlur"
|
2162
|
+
}
|
2148
2163
|
};
|
2149
2164
|
var stdin_default$1l = vue.defineComponent({
|
2150
2165
|
name: name$1e,
|
@@ -2259,6 +2274,7 @@ var stdin_default$1l = vue.defineComponent({
|
|
2259
2274
|
useExpose({
|
2260
2275
|
submit,
|
2261
2276
|
validate,
|
2277
|
+
getValues,
|
2262
2278
|
scrollToField,
|
2263
2279
|
resetValidation
|
2264
2280
|
});
|
@@ -2356,7 +2372,7 @@ function cutString(str, maxlength) {
|
|
2356
2372
|
return [...str].slice(0, maxlength).join("");
|
2357
2373
|
}
|
2358
2374
|
let current = 0;
|
2359
|
-
function useId() {
|
2375
|
+
function useId$1() {
|
2360
2376
|
const vm = vue.getCurrentInstance();
|
2361
2377
|
const { name: name2 = "unknown" } = (vm == null ? void 0 : vm.type) || {};
|
2362
2378
|
return `${name2}-${++current}`;
|
@@ -2377,6 +2393,7 @@ const fieldSharedProps = {
|
|
2377
2393
|
placeholder: String,
|
2378
2394
|
autocomplete: String,
|
2379
2395
|
errorMessage: String,
|
2396
|
+
enterkeyhint: String,
|
2380
2397
|
clearTrigger: makeStringProp("focus"),
|
2381
2398
|
formatTrigger: makeStringProp("onChange"),
|
2382
2399
|
error: {
|
@@ -2415,7 +2432,7 @@ var stdin_default$1k = vue.defineComponent({
|
|
2415
2432
|
emit,
|
2416
2433
|
slots
|
2417
2434
|
}) {
|
2418
|
-
const id = useId();
|
2435
|
+
const id = useId$1();
|
2419
2436
|
const state = vue.reactive({
|
2420
2437
|
focused: false,
|
2421
2438
|
validateFailed: false,
|
@@ -2505,10 +2522,13 @@ var stdin_default$1k = vue.defineComponent({
|
|
2505
2522
|
});
|
2506
2523
|
const validateWithTrigger = (trigger) => {
|
2507
2524
|
if (form && props.rules) {
|
2508
|
-
const
|
2525
|
+
const {
|
2526
|
+
validateTrigger
|
2527
|
+
} = form.props;
|
2528
|
+
const defaultTrigger = toArray(validateTrigger).includes(trigger);
|
2509
2529
|
const rules = props.rules.filter((rule) => {
|
2510
2530
|
if (rule.trigger) {
|
2511
|
-
return rule.trigger
|
2531
|
+
return toArray(rule.trigger).includes(trigger);
|
2512
2532
|
}
|
2513
2533
|
return defaultTrigger;
|
2514
2534
|
});
|
@@ -2646,6 +2666,7 @@ var stdin_default$1k = vue.defineComponent({
|
|
2646
2666
|
autofocus: props.autofocus,
|
2647
2667
|
placeholder: props.placeholder,
|
2648
2668
|
autocomplete: props.autocomplete,
|
2669
|
+
enterkeyhint: props.enterkeyhint,
|
2649
2670
|
"aria-labelledby": props.label ? `${id}-label` : void 0,
|
2650
2671
|
onBlur,
|
2651
2672
|
onFocus,
|
@@ -2909,6 +2930,7 @@ var stdin_default$1j = vue.defineComponent({
|
|
2909
2930
|
} = props;
|
2910
2931
|
if (isDef(message) && message !== "") {
|
2911
2932
|
return type === "html" ? vue.createVNode("div", {
|
2933
|
+
"key": 0,
|
2912
2934
|
"class": bem$18("text"),
|
2913
2935
|
"innerHTML": String(message)
|
2914
2936
|
}, null) : vue.createVNode("div", {
|
@@ -3223,10 +3245,8 @@ const DEFAULT_DATA = {
|
|
3223
3245
|
province: "",
|
3224
3246
|
areaCode: "",
|
3225
3247
|
isDefault: false,
|
3226
|
-
postalCode: "",
|
3227
3248
|
addressDetail: ""
|
3228
3249
|
};
|
3229
|
-
const isPostal = (value) => /^\d{6}$/.test(value);
|
3230
3250
|
const addressEditProps = {
|
3231
3251
|
areaList: Object,
|
3232
3252
|
isSaving: Boolean,
|
@@ -3235,7 +3255,6 @@ const addressEditProps = {
|
|
3235
3255
|
showArea: truthProp,
|
3236
3256
|
showDetail: truthProp,
|
3237
3257
|
showDelete: Boolean,
|
3238
|
-
showPostal: Boolean,
|
3239
3258
|
disableArea: Boolean,
|
3240
3259
|
searchResult: Array,
|
3241
3260
|
telMaxlength: numericProp,
|
@@ -3254,10 +3273,6 @@ const addressEditProps = {
|
|
3254
3273
|
telValidator: {
|
3255
3274
|
type: Function,
|
3256
3275
|
default: isMobile
|
3257
|
-
},
|
3258
|
-
postalValidator: {
|
3259
|
-
type: Function,
|
3260
|
-
default: isPostal
|
3261
3276
|
}
|
3262
3277
|
};
|
3263
3278
|
var stdin_default$1g = vue.defineComponent({
|
@@ -3300,8 +3315,7 @@ var stdin_default$1g = vue.defineComponent({
|
|
3300
3315
|
const rules = vue.computed(() => {
|
3301
3316
|
const {
|
3302
3317
|
validator,
|
3303
|
-
telValidator
|
3304
|
-
postalValidator
|
3318
|
+
telValidator
|
3305
3319
|
} = props;
|
3306
3320
|
const makeRule = (name2, emptyMessage) => ({
|
3307
3321
|
validator: (value) => {
|
@@ -3324,11 +3338,7 @@ var stdin_default$1g = vue.defineComponent({
|
|
3324
3338
|
message: t$h("telInvalid")
|
3325
3339
|
}],
|
3326
3340
|
areaCode: [makeRule("areaCode", t$h("areaEmpty"))],
|
3327
|
-
addressDetail: [makeRule("addressDetail", t$h("addressEmpty"))]
|
3328
|
-
postalCode: [makeRule("addressDetail", t$h("postalEmpty")), {
|
3329
|
-
validator: postalValidator,
|
3330
|
-
message: t$h("postalEmpty")
|
3331
|
-
}]
|
3341
|
+
addressDetail: [makeRule("addressDetail", t$h("addressEmpty"))]
|
3332
3342
|
};
|
3333
3343
|
});
|
3334
3344
|
const onSave = () => emit("save", data);
|
@@ -3453,16 +3463,7 @@ var stdin_default$1g = vue.defineComponent({
|
|
3453
3463
|
"onFocus": () => onFocus("addressDetail"),
|
3454
3464
|
"onInput": onChangeDetail,
|
3455
3465
|
"onSelectSearch": (event) => emit("selectSearch", event)
|
3456
|
-
}, null),
|
3457
|
-
"modelValue": data.postalCode,
|
3458
|
-
"onUpdate:modelValue": ($event) => data.postalCode = $event,
|
3459
|
-
"type": "tel",
|
3460
|
-
"rules": rules.value.postalCode,
|
3461
|
-
"label": t$h("postal"),
|
3462
|
-
"maxlength": "6",
|
3463
|
-
"placeholder": t$h("postal"),
|
3464
|
-
"onFocus": () => onFocus("postalCode")
|
3465
|
-
}, null), [[vue.vShow, !hideBottomFields.value]]), (_a = slots.default) == null ? void 0 : _a.call(slots)]), renderSetDefaultCell(), vue.withDirectives(vue.createVNode("div", {
|
3466
|
+
}, null), (_a = slots.default) == null ? void 0 : _a.call(slots)]), renderSetDefaultCell(), vue.withDirectives(vue.createVNode("div", {
|
3466
3467
|
"class": bem$15("buttons")
|
3467
3468
|
}, [vue.createVNode(Button, {
|
3468
3469
|
"block": true,
|
@@ -4021,6 +4022,7 @@ var stdin_default$19 = vue.defineComponent({
|
|
4021
4022
|
slots
|
4022
4023
|
}) {
|
4023
4024
|
const style = vue.computed(() => {
|
4025
|
+
var _a;
|
4024
4026
|
const {
|
4025
4027
|
item,
|
4026
4028
|
index,
|
@@ -4052,6 +4054,9 @@ var stdin_default$19 = vue.defineComponent({
|
|
4052
4054
|
break;
|
4053
4055
|
}
|
4054
4056
|
}
|
4057
|
+
if (offset + (((_a = item.date) == null ? void 0 : _a.getDate()) || 1) > 28) {
|
4058
|
+
style2.marginBottom = 0;
|
4059
|
+
}
|
4055
4060
|
return style2;
|
4056
4061
|
});
|
4057
4062
|
const onClick = () => {
|
@@ -4396,6 +4401,7 @@ const calendarProps = {
|
|
4396
4401
|
showRangePrompt: truthProp,
|
4397
4402
|
confirmDisabledText: String,
|
4398
4403
|
closeOnClickOverlay: truthProp,
|
4404
|
+
safeAreaInsetTop: Boolean,
|
4399
4405
|
safeAreaInsetBottom: truthProp,
|
4400
4406
|
minDate: {
|
4401
4407
|
type: Date,
|
@@ -4558,8 +4564,8 @@ var stdin_default$16 = vue.defineComponent({
|
|
4558
4564
|
}
|
4559
4565
|
use.raf(() => {
|
4560
4566
|
bodyHeight = Math.floor(use.useRect(bodyRef).height);
|
4561
|
-
scrollToCurrentDate();
|
4562
4567
|
});
|
4568
|
+
scrollToCurrentDate();
|
4563
4569
|
};
|
4564
4570
|
const reset = (date = getInitialDate()) => {
|
4565
4571
|
currentDate.value = date;
|
@@ -4744,6 +4750,7 @@ var stdin_default$16 = vue.defineComponent({
|
|
4744
4750
|
"closeable": props.showTitle || props.showSubtitle,
|
4745
4751
|
"teleport": props.teleport,
|
4746
4752
|
"closeOnPopstate": props.closeOnPopstate,
|
4753
|
+
"safeAreaInsetTop": props.safeAreaInsetTop,
|
4747
4754
|
"closeOnClickOverlay": props.closeOnClickOverlay,
|
4748
4755
|
"onUpdate:show": updateShow
|
4749
4756
|
}, {
|
@@ -5702,7 +5709,7 @@ var stdin_default$$ = vue.defineComponent({
|
|
5702
5709
|
const root = vue.ref();
|
5703
5710
|
const navRef = vue.ref();
|
5704
5711
|
const wrapRef = vue.ref();
|
5705
|
-
const id = useId();
|
5712
|
+
const id = useId$1();
|
5706
5713
|
const scroller = use.useScrollParent(root);
|
5707
5714
|
const [titleRefs, setTitleRefs] = useRefs();
|
5708
5715
|
const {
|
@@ -5869,6 +5876,7 @@ var stdin_default$$ = vue.defineComponent({
|
|
5869
5876
|
}
|
5870
5877
|
};
|
5871
5878
|
const renderNav = () => children.map((item, index) => vue.createVNode(stdin_default$12, vue.mergeProps({
|
5879
|
+
"key": item.id,
|
5872
5880
|
"id": `${id}-${index}`,
|
5873
5881
|
"ref": setTitleRefs(index),
|
5874
5882
|
"type": props.type,
|
@@ -6088,7 +6096,7 @@ var stdin_default$Z = vue.defineComponent({
|
|
6088
6096
|
setup(props, {
|
6089
6097
|
slots
|
6090
6098
|
}) {
|
6091
|
-
const id = useId();
|
6099
|
+
const id = useId$1();
|
6092
6100
|
const inited = vue.ref(false);
|
6093
6101
|
const {
|
6094
6102
|
parent,
|
@@ -7458,14 +7466,328 @@ var stdin_default$K = vue.defineComponent({
|
|
7458
7466
|
}
|
7459
7467
|
});
|
7460
7468
|
const CouponCell = withInstall(stdin_default$K);
|
7461
|
-
const
|
7462
|
-
const
|
7469
|
+
const getId = (num) => `van-empty-${num}`;
|
7470
|
+
const useId = (num) => `url(#${getId(num)})`;
|
7471
|
+
const renderStop = (color, offset, opacity) => vue.createVNode("stop", {
|
7472
|
+
"stop-color": color,
|
7473
|
+
"offset": `${offset}%`,
|
7474
|
+
"stop-opacity": opacity
|
7475
|
+
}, null);
|
7476
|
+
const renderStops = (fromColor, toColor) => [renderStop(fromColor, 0), renderStop(toColor, 100)];
|
7477
|
+
const renderShadow = (id) => [vue.createVNode("defs", null, [vue.createVNode("radialGradient", {
|
7478
|
+
"id": getId(id),
|
7479
|
+
"cx": "50%",
|
7480
|
+
"cy": "54%",
|
7481
|
+
"fx": "50%",
|
7482
|
+
"fy": "54%",
|
7483
|
+
"r": "297%",
|
7484
|
+
"gradientTransform": "matrix(-.16 0 0 -.33 .58 .72)"
|
7485
|
+
}, [renderStop("#EBEDF0", 0), renderStop("#F2F3F5", 100, 0.3)])]), vue.createVNode("ellipse", {
|
7486
|
+
"fill": useId(id),
|
7487
|
+
"opacity": ".8",
|
7488
|
+
"cx": "80",
|
7489
|
+
"cy": "140",
|
7490
|
+
"rx": "46",
|
7491
|
+
"ry": "8"
|
7492
|
+
}, null)];
|
7493
|
+
const renderBuilding = () => [vue.createVNode("defs", null, [vue.createVNode("linearGradient", {
|
7494
|
+
"id": getId("a"),
|
7495
|
+
"x1": "64%",
|
7496
|
+
"y1": "100%",
|
7497
|
+
"x2": "64%"
|
7498
|
+
}, [renderStop("#FFF", 0, 0.5), renderStop("#F2F3F5", 100)])]), vue.createVNode("g", {
|
7499
|
+
"opacity": ".8"
|
7500
|
+
}, [vue.createVNode("path", {
|
7501
|
+
"d": "M36 131V53H16v20H2v58h34z",
|
7502
|
+
"fill": useId("a")
|
7503
|
+
}, null), vue.createVNode("path", {
|
7504
|
+
"d": "M123 15h22v14h9v77h-31V15z",
|
7505
|
+
"fill": useId("a")
|
7506
|
+
}, null)])];
|
7507
|
+
const renderCloud = () => [vue.createVNode("defs", null, [vue.createVNode("linearGradient", {
|
7508
|
+
"id": getId("b"),
|
7509
|
+
"x1": "64%",
|
7510
|
+
"y1": "97%",
|
7511
|
+
"x2": "64%",
|
7512
|
+
"y2": "0%"
|
7513
|
+
}, [renderStop("#F2F3F5", 0, 0.3), renderStop("#F2F3F5", 100)])]), vue.createVNode("g", {
|
7514
|
+
"opacity": ".8"
|
7515
|
+
}, [vue.createVNode("path", {
|
7516
|
+
"d": "M87 6c3 0 7 3 8 6a8 8 0 1 1-1 16H80a7 7 0 0 1-8-6c0-4 3-7 6-7 0-5 4-9 9-9Z",
|
7517
|
+
"fill": useId("b")
|
7518
|
+
}, null), vue.createVNode("path", {
|
7519
|
+
"d": "M19 23c2 0 3 1 4 3 2 0 4 2 4 4a4 4 0 0 1-4 3v1h-7v-1l-1 1c-2 0-3-2-3-4 0-1 1-3 3-3 0-2 2-4 4-4Z",
|
7520
|
+
"fill": useId("b")
|
7521
|
+
}, null)])];
|
7522
|
+
const renderNetwork = () => vue.createVNode("svg", {
|
7523
|
+
"viewBox": "0 0 160 160"
|
7524
|
+
}, [vue.createVNode("defs", null, [vue.createVNode("linearGradient", {
|
7525
|
+
"id": getId(1),
|
7526
|
+
"x1": "64%",
|
7527
|
+
"y1": "100%",
|
7528
|
+
"x2": "64%"
|
7529
|
+
}, [renderStop("#FFF", 0, 0.5), renderStop("#F2F3F5", 100)]), vue.createVNode("linearGradient", {
|
7530
|
+
"id": getId(2),
|
7531
|
+
"x1": "50%",
|
7532
|
+
"x2": "50%",
|
7533
|
+
"y2": "84%"
|
7534
|
+
}, [renderStop("#EBEDF0", 0), renderStop("#DCDEE0", 100, 0)]), vue.createVNode("linearGradient", {
|
7535
|
+
"id": getId(3),
|
7536
|
+
"x1": "100%",
|
7537
|
+
"x2": "100%",
|
7538
|
+
"y2": "100%"
|
7539
|
+
}, [renderStops("#EAEDF0", "#DCDEE0")]), vue.createVNode("radialGradient", {
|
7540
|
+
"id": getId(4),
|
7541
|
+
"cx": "50%",
|
7542
|
+
"cy": "0%",
|
7543
|
+
"fx": "50%",
|
7544
|
+
"fy": "0%",
|
7545
|
+
"r": "100%",
|
7546
|
+
"gradientTransform": "matrix(0 1 -.54 0 .5 -.5)"
|
7547
|
+
}, [renderStop("#EBEDF0", 0), renderStop("#FFF", 100, 0)])]), vue.createVNode("g", {
|
7548
|
+
"fill": "none"
|
7549
|
+
}, [renderBuilding(), vue.createVNode("path", {
|
7550
|
+
"fill": useId(4),
|
7551
|
+
"d": "M0 139h160v21H0z"
|
7552
|
+
}, null), vue.createVNode("path", {
|
7553
|
+
"d": "M80 54a7 7 0 0 1 3 13v27l-2 2h-2a2 2 0 0 1-2-2V67a7 7 0 0 1 3-13z",
|
7554
|
+
"fill": useId(2)
|
7555
|
+
}, null), vue.createVNode("g", {
|
7556
|
+
"opacity": ".6",
|
7557
|
+
"stroke-linecap": "round",
|
7558
|
+
"stroke-width": "7"
|
7559
|
+
}, [vue.createVNode("path", {
|
7560
|
+
"d": "M64 47a19 19 0 0 0-5 13c0 5 2 10 5 13",
|
7561
|
+
"stroke": useId(3)
|
7562
|
+
}, null), vue.createVNode("path", {
|
7563
|
+
"d": "M53 36a34 34 0 0 0 0 48",
|
7564
|
+
"stroke": useId(3)
|
7565
|
+
}, null), vue.createVNode("path", {
|
7566
|
+
"d": "M95 73a19 19 0 0 0 6-13c0-5-2-9-6-13",
|
7567
|
+
"stroke": useId(3)
|
7568
|
+
}, null), vue.createVNode("path", {
|
7569
|
+
"d": "M106 84a34 34 0 0 0 0-48",
|
7570
|
+
"stroke": useId(3)
|
7571
|
+
}, null)]), vue.createVNode("g", {
|
7572
|
+
"transform": "translate(31 105)"
|
7573
|
+
}, [vue.createVNode("rect", {
|
7574
|
+
"fill": "#EBEDF0",
|
7575
|
+
"width": "98",
|
7576
|
+
"height": "34",
|
7577
|
+
"rx": "2"
|
7578
|
+
}, null), vue.createVNode("rect", {
|
7579
|
+
"fill": "#FFF",
|
7580
|
+
"x": "9",
|
7581
|
+
"y": "8",
|
7582
|
+
"width": "80",
|
7583
|
+
"height": "18",
|
7584
|
+
"rx": "1.1"
|
7585
|
+
}, null), vue.createVNode("rect", {
|
7586
|
+
"fill": "#EBEDF0",
|
7587
|
+
"x": "15",
|
7588
|
+
"y": "12",
|
7589
|
+
"width": "18",
|
7590
|
+
"height": "6",
|
7591
|
+
"rx": "1.1"
|
7592
|
+
}, null)])])]);
|
7593
|
+
const renderMaterial = () => vue.createVNode("svg", {
|
7594
|
+
"viewBox": "0 0 160 160"
|
7595
|
+
}, [vue.createVNode("defs", null, [vue.createVNode("linearGradient", {
|
7596
|
+
"x1": "50%",
|
7597
|
+
"x2": "50%",
|
7598
|
+
"y2": "100%",
|
7599
|
+
"id": getId(5)
|
7600
|
+
}, [renderStops("#F2F3F5", "#DCDEE0")]), vue.createVNode("linearGradient", {
|
7601
|
+
"x1": "95%",
|
7602
|
+
"y1": "48%",
|
7603
|
+
"x2": "5.5%",
|
7604
|
+
"y2": "51%",
|
7605
|
+
"id": getId(6)
|
7606
|
+
}, [renderStops("#EAEDF1", "#DCDEE0")]), vue.createVNode("linearGradient", {
|
7607
|
+
"y1": "45%",
|
7608
|
+
"x2": "100%",
|
7609
|
+
"y2": "54%",
|
7610
|
+
"id": getId(7)
|
7611
|
+
}, [renderStops("#EAEDF1", "#DCDEE0")])]), renderBuilding(), renderCloud(), vue.createVNode("g", {
|
7612
|
+
"transform": "translate(36 50)",
|
7613
|
+
"fill": "none"
|
7614
|
+
}, [vue.createVNode("g", {
|
7615
|
+
"transform": "translate(8)"
|
7616
|
+
}, [vue.createVNode("rect", {
|
7617
|
+
"fill": "#EBEDF0",
|
7618
|
+
"opacity": ".6",
|
7619
|
+
"x": "38",
|
7620
|
+
"y": "13",
|
7621
|
+
"width": "36",
|
7622
|
+
"height": "53",
|
7623
|
+
"rx": "2"
|
7624
|
+
}, null), vue.createVNode("rect", {
|
7625
|
+
"fill": useId(5),
|
7626
|
+
"width": "64",
|
7627
|
+
"height": "66",
|
7628
|
+
"rx": "2"
|
7629
|
+
}, null), vue.createVNode("rect", {
|
7630
|
+
"fill": "#FFF",
|
7631
|
+
"x": "6",
|
7632
|
+
"y": "6",
|
7633
|
+
"width": "52",
|
7634
|
+
"height": "55",
|
7635
|
+
"rx": "1"
|
7636
|
+
}, null), vue.createVNode("g", {
|
7637
|
+
"transform": "translate(15 17)",
|
7638
|
+
"fill": useId(6)
|
7639
|
+
}, [vue.createVNode("rect", {
|
7640
|
+
"width": "34",
|
7641
|
+
"height": "6",
|
7642
|
+
"rx": "1"
|
7643
|
+
}, null), vue.createVNode("path", {
|
7644
|
+
"d": "M0 14h34v6H0z"
|
7645
|
+
}, null), vue.createVNode("rect", {
|
7646
|
+
"y": "28",
|
7647
|
+
"width": "34",
|
7648
|
+
"height": "6",
|
7649
|
+
"rx": "1"
|
7650
|
+
}, null)])]), vue.createVNode("rect", {
|
7651
|
+
"fill": useId(7),
|
7652
|
+
"y": "61",
|
7653
|
+
"width": "88",
|
7654
|
+
"height": "28",
|
7655
|
+
"rx": "1"
|
7656
|
+
}, null), vue.createVNode("rect", {
|
7657
|
+
"fill": "#F7F8FA",
|
7658
|
+
"x": "29",
|
7659
|
+
"y": "72",
|
7660
|
+
"width": "30",
|
7661
|
+
"height": "6",
|
7662
|
+
"rx": "1"
|
7663
|
+
}, null)])]);
|
7664
|
+
const renderError = () => vue.createVNode("svg", {
|
7665
|
+
"viewBox": "0 0 160 160"
|
7666
|
+
}, [vue.createVNode("defs", null, [vue.createVNode("linearGradient", {
|
7667
|
+
"x1": "50%",
|
7668
|
+
"x2": "50%",
|
7669
|
+
"y2": "100%",
|
7670
|
+
"id": getId(8)
|
7671
|
+
}, [renderStops("#EAEDF1", "#DCDEE0")])]), renderBuilding(), renderCloud(), renderShadow("c"), vue.createVNode("path", {
|
7672
|
+
"d": "m59 60 21 21 21-21h3l9 9v3L92 93l21 21v3l-9 9h-3l-21-21-21 21h-3l-9-9v-3l21-21-21-21v-3l9-9h3Z",
|
7673
|
+
"fill": useId(8)
|
7674
|
+
}, null)]);
|
7675
|
+
const renderSearch = () => vue.createVNode("svg", {
|
7676
|
+
"viewBox": "0 0 160 160"
|
7677
|
+
}, [vue.createVNode("defs", null, [vue.createVNode("linearGradient", {
|
7678
|
+
"x1": "50%",
|
7679
|
+
"y1": "100%",
|
7680
|
+
"x2": "50%",
|
7681
|
+
"id": getId(9)
|
7682
|
+
}, [renderStops("#EEE", "#D8D8D8")]), vue.createVNode("linearGradient", {
|
7683
|
+
"x1": "100%",
|
7684
|
+
"y1": "50%",
|
7685
|
+
"y2": "50%",
|
7686
|
+
"id": getId(10)
|
7687
|
+
}, [renderStops("#F2F3F5", "#DCDEE0")]), vue.createVNode("linearGradient", {
|
7688
|
+
"x1": "50%",
|
7689
|
+
"x2": "50%",
|
7690
|
+
"y2": "100%",
|
7691
|
+
"id": getId(11)
|
7692
|
+
}, [renderStops("#F2F3F5", "#DCDEE0")]), vue.createVNode("linearGradient", {
|
7693
|
+
"x1": "50%",
|
7694
|
+
"x2": "50%",
|
7695
|
+
"y2": "100%",
|
7696
|
+
"id": getId(12)
|
7697
|
+
}, [renderStops("#FFF", "#F7F8FA")])]), renderBuilding(), renderCloud(), renderShadow("d"), vue.createVNode("g", {
|
7698
|
+
"transform": "rotate(-45 113 -4)",
|
7699
|
+
"fill": "none"
|
7700
|
+
}, [vue.createVNode("rect", {
|
7701
|
+
"fill": useId(9),
|
7702
|
+
"x": "24",
|
7703
|
+
"y": "52.8",
|
7704
|
+
"width": "5.8",
|
7705
|
+
"height": "19",
|
7706
|
+
"rx": "1"
|
7707
|
+
}, null), vue.createVNode("rect", {
|
7708
|
+
"fill": useId(10),
|
7709
|
+
"x": "22.1",
|
7710
|
+
"y": "67.3",
|
7711
|
+
"width": "9.9",
|
7712
|
+
"height": "28",
|
7713
|
+
"rx": "1"
|
7714
|
+
}, null), vue.createVNode("circle", {
|
7715
|
+
"stroke": useId(11),
|
7716
|
+
"stroke-width": "8",
|
7717
|
+
"cx": "27",
|
7718
|
+
"cy": "27",
|
7719
|
+
"r": "27"
|
7720
|
+
}, null), vue.createVNode("circle", {
|
7721
|
+
"fill": useId(12),
|
7722
|
+
"cx": "27",
|
7723
|
+
"cy": "27",
|
7724
|
+
"r": "16"
|
7725
|
+
}, null), vue.createVNode("path", {
|
7726
|
+
"d": "M37 7c-8 0-15 5-16 12",
|
7727
|
+
"stroke": useId(11),
|
7728
|
+
"stroke-width": "3",
|
7729
|
+
"opacity": ".5",
|
7730
|
+
"stroke-linecap": "round",
|
7731
|
+
"transform": "rotate(45 29 13)"
|
7732
|
+
}, null)])]);
|
7733
|
+
const [name$D, bem$C] = createNamespace("empty");
|
7734
|
+
const PRESET_IMAGES = {
|
7735
|
+
error: renderError,
|
7736
|
+
search: renderSearch,
|
7737
|
+
network: renderNetwork,
|
7738
|
+
default: renderMaterial
|
7739
|
+
};
|
7740
|
+
const emptyProps = {
|
7741
|
+
image: makeStringProp("default"),
|
7742
|
+
imageSize: [Number, String, Array],
|
7743
|
+
description: String
|
7744
|
+
};
|
7745
|
+
var stdin_default$J = vue.defineComponent({
|
7746
|
+
name: name$D,
|
7747
|
+
props: emptyProps,
|
7748
|
+
setup(props, {
|
7749
|
+
slots
|
7750
|
+
}) {
|
7751
|
+
const renderImage = () => {
|
7752
|
+
var _a;
|
7753
|
+
if (slots.image) {
|
7754
|
+
return slots.image();
|
7755
|
+
}
|
7756
|
+
return ((_a = PRESET_IMAGES[props.image]) == null ? void 0 : _a.call(PRESET_IMAGES)) || vue.createVNode("img", {
|
7757
|
+
"src": props.image
|
7758
|
+
}, null);
|
7759
|
+
};
|
7760
|
+
const renderDescription = () => {
|
7761
|
+
const description = slots.description ? slots.description() : props.description;
|
7762
|
+
if (description) {
|
7763
|
+
return vue.createVNode("p", {
|
7764
|
+
"class": bem$C("description")
|
7765
|
+
}, [description]);
|
7766
|
+
}
|
7767
|
+
};
|
7768
|
+
const renderBottom = () => {
|
7769
|
+
if (slots.default) {
|
7770
|
+
return vue.createVNode("div", {
|
7771
|
+
"class": bem$C("bottom")
|
7772
|
+
}, [slots.default()]);
|
7773
|
+
}
|
7774
|
+
};
|
7775
|
+
return () => vue.createVNode("div", {
|
7776
|
+
"class": bem$C()
|
7777
|
+
}, [vue.createVNode("div", {
|
7778
|
+
"class": bem$C("image"),
|
7779
|
+
"style": getSizeStyle(props.imageSize)
|
7780
|
+
}, [renderImage()]), renderDescription(), renderBottom()]);
|
7781
|
+
}
|
7782
|
+
});
|
7783
|
+
const Empty = withInstall(stdin_default$J);
|
7784
|
+
const [name$C, bem$B, t$8] = createNamespace("coupon-list");
|
7463
7785
|
const couponListProps = {
|
7464
7786
|
code: makeStringProp(""),
|
7465
7787
|
coupons: makeArrayProp(),
|
7466
7788
|
currency: makeStringProp("\xA5"),
|
7467
7789
|
showCount: truthProp,
|
7468
|
-
emptyImage:
|
7790
|
+
emptyImage: String,
|
7469
7791
|
chosenCoupon: makeNumberProp(-1),
|
7470
7792
|
enabledTitle: String,
|
7471
7793
|
disabledTitle: String,
|
@@ -7480,8 +7802,8 @@ const couponListProps = {
|
|
7480
7802
|
exchangeButtonLoading: Boolean,
|
7481
7803
|
exchangeButtonDisabled: Boolean
|
7482
7804
|
};
|
7483
|
-
var stdin_default$
|
7484
|
-
name: name$
|
7805
|
+
var stdin_default$I = vue.defineComponent({
|
7806
|
+
name: name$C,
|
7485
7807
|
props: couponListProps,
|
7486
7808
|
emits: ["change", "exchange", "update:code"],
|
7487
7809
|
setup(props, {
|
@@ -7513,28 +7835,30 @@ var stdin_default$J = vue.defineComponent({
|
|
7513
7835
|
return (_a = couponRefs.value[index]) == null ? void 0 : _a.scrollIntoView();
|
7514
7836
|
});
|
7515
7837
|
};
|
7516
|
-
const renderEmpty = () => vue.createVNode(
|
7517
|
-
"
|
7518
|
-
},
|
7519
|
-
"
|
7520
|
-
|
7838
|
+
const renderEmpty = () => vue.createVNode(Empty, {
|
7839
|
+
"image": props.emptyImage
|
7840
|
+
}, {
|
7841
|
+
default: () => [vue.createVNode("p", {
|
7842
|
+
"class": bem$B("empty-tip")
|
7843
|
+
}, [t$8("noCoupon")])]
|
7844
|
+
});
|
7521
7845
|
const renderExchangeBar = () => {
|
7522
7846
|
if (props.showExchangeBar) {
|
7523
7847
|
return vue.createVNode("div", {
|
7524
7848
|
"ref": barRef,
|
7525
|
-
"class": bem$
|
7849
|
+
"class": bem$B("exchange-bar")
|
7526
7850
|
}, [vue.createVNode(Field, {
|
7527
7851
|
"modelValue": currentCode.value,
|
7528
7852
|
"onUpdate:modelValue": ($event) => currentCode.value = $event,
|
7529
7853
|
"clearable": true,
|
7530
7854
|
"border": false,
|
7531
|
-
"class": bem$
|
7855
|
+
"class": bem$B("field"),
|
7532
7856
|
"placeholder": props.inputPlaceholder || t$8("placeholder"),
|
7533
7857
|
"maxlength": "20"
|
7534
7858
|
}, null), vue.createVNode(Button, {
|
7535
7859
|
"plain": true,
|
7536
7860
|
"type": "primary",
|
7537
|
-
"class": bem$
|
7861
|
+
"class": bem$B("exchange"),
|
7538
7862
|
"text": props.exchangeButtonText || t$8("exchange"),
|
7539
7863
|
"loading": props.exchangeButtonLoading,
|
7540
7864
|
"disabled": buttonDisabled.value,
|
@@ -7554,7 +7878,7 @@ var stdin_default$J = vue.defineComponent({
|
|
7554
7878
|
default: () => {
|
7555
7879
|
var _a;
|
7556
7880
|
return [vue.createVNode("div", {
|
7557
|
-
"class": bem$
|
7881
|
+
"class": bem$B("list", {
|
7558
7882
|
"with-bottom": props.showCloseButton
|
7559
7883
|
}),
|
7560
7884
|
"style": {
|
@@ -7583,7 +7907,7 @@ var stdin_default$J = vue.defineComponent({
|
|
7583
7907
|
default: () => {
|
7584
7908
|
var _a;
|
7585
7909
|
return [vue.createVNode("div", {
|
7586
|
-
"class": bem$
|
7910
|
+
"class": bem$B("list", {
|
7587
7911
|
"with-bottom": props.showCloseButton
|
7588
7912
|
}),
|
7589
7913
|
"style": {
|
@@ -7610,28 +7934,28 @@ var stdin_default$J = vue.defineComponent({
|
|
7610
7934
|
});
|
7611
7935
|
return () => vue.createVNode("div", {
|
7612
7936
|
"ref": root,
|
7613
|
-
"class": bem$
|
7937
|
+
"class": bem$B()
|
7614
7938
|
}, [renderExchangeBar(), vue.createVNode(Tabs, {
|
7615
7939
|
"active": activeTab.value,
|
7616
7940
|
"onUpdate:active": ($event) => activeTab.value = $event,
|
7617
|
-
"class": bem$
|
7941
|
+
"class": bem$B("tab")
|
7618
7942
|
}, {
|
7619
7943
|
default: () => [renderCouponTab(), renderDisabledTab()]
|
7620
7944
|
}), vue.createVNode("div", {
|
7621
|
-
"class": bem$
|
7945
|
+
"class": bem$B("bottom")
|
7622
7946
|
}, [vue.withDirectives(vue.createVNode(Button, {
|
7623
7947
|
"round": true,
|
7624
7948
|
"block": true,
|
7625
7949
|
"type": "primary",
|
7626
|
-
"class": bem$
|
7950
|
+
"class": bem$B("close"),
|
7627
7951
|
"text": props.closeButtonText || t$8("close"),
|
7628
7952
|
"onClick": () => emit("change", -1)
|
7629
7953
|
}, null), [[vue.vShow, props.showCloseButton]])])]);
|
7630
7954
|
}
|
7631
7955
|
});
|
7632
|
-
const CouponList = withInstall(stdin_default$
|
7956
|
+
const CouponList = withInstall(stdin_default$I);
|
7633
7957
|
const currentYear = new Date().getFullYear();
|
7634
|
-
const [name$
|
7958
|
+
const [name$B] = createNamespace("date-picker");
|
7635
7959
|
const datePickerProps = extend({}, sharedProps, {
|
7636
7960
|
columnsType: {
|
7637
7961
|
type: Array,
|
@@ -7648,8 +7972,8 @@ const datePickerProps = extend({}, sharedProps, {
|
|
7648
7972
|
validator: isDate
|
7649
7973
|
}
|
7650
7974
|
});
|
7651
|
-
var stdin_default$
|
7652
|
-
name: name$
|
7975
|
+
var stdin_default$H = vue.defineComponent({
|
7976
|
+
name: name$B,
|
7653
7977
|
props: datePickerProps,
|
7654
7978
|
emits: ["confirm", "cancel", "change", "update:modelValue"],
|
7655
7979
|
setup(props, {
|
@@ -7716,7 +8040,7 @@ var stdin_default$I = vue.defineComponent({
|
|
7716
8040
|
}
|
7717
8041
|
});
|
7718
8042
|
vue.watch(() => props.modelValue, (newValues) => {
|
7719
|
-
if (isSameValue(newValues, currentValues.value)) {
|
8043
|
+
if (!isSameValue(newValues, currentValues.value)) {
|
7720
8044
|
currentValues.value = newValues;
|
7721
8045
|
}
|
7722
8046
|
});
|
@@ -7733,8 +8057,8 @@ var stdin_default$I = vue.defineComponent({
|
|
7733
8057
|
}, pick(props, pickerInheritKeys)), slots);
|
7734
8058
|
}
|
7735
8059
|
});
|
7736
|
-
const DatePicker = withInstall(stdin_default$
|
7737
|
-
const [name$
|
8060
|
+
const DatePicker = withInstall(stdin_default$H);
|
8061
|
+
const [name$A, bem$A, t$7] = createNamespace("dialog");
|
7738
8062
|
const dialogProps = extend({}, popupSharedProps, {
|
7739
8063
|
title: String,
|
7740
8064
|
theme: String,
|
@@ -7755,8 +8079,8 @@ const dialogProps = extend({}, popupSharedProps, {
|
|
7755
8079
|
closeOnClickOverlay: Boolean
|
7756
8080
|
});
|
7757
8081
|
const popupInheritKeys$1 = [...popupSharedPropKeys, "transition", "closeOnPopstate"];
|
7758
|
-
var stdin_default$
|
7759
|
-
name: name$
|
8082
|
+
var stdin_default$G = vue.defineComponent({
|
8083
|
+
name: name$A,
|
7760
8084
|
props: dialogProps,
|
7761
8085
|
emits: ["confirm", "cancel", "keydown", "update:show"],
|
7762
8086
|
setup(props, {
|
@@ -7813,7 +8137,7 @@ var stdin_default$H = vue.defineComponent({
|
|
7813
8137
|
const title = slots.title ? slots.title() : props.title;
|
7814
8138
|
if (title) {
|
7815
8139
|
return vue.createVNode("div", {
|
7816
|
-
"class": bem$
|
8140
|
+
"class": bem$A("header", {
|
7817
8141
|
isolated: !props.message && !slots.default
|
7818
8142
|
})
|
7819
8143
|
}, [title]);
|
@@ -7825,7 +8149,7 @@ var stdin_default$H = vue.defineComponent({
|
|
7825
8149
|
allowHtml,
|
7826
8150
|
messageAlign
|
7827
8151
|
} = props;
|
7828
|
-
const classNames = bem$
|
8152
|
+
const classNames = bem$A("message", {
|
7829
8153
|
"has-title": hasTitle,
|
7830
8154
|
[messageAlign]: messageAlign
|
7831
8155
|
});
|
@@ -7843,7 +8167,7 @@ var stdin_default$H = vue.defineComponent({
|
|
7843
8167
|
const renderContent = () => {
|
7844
8168
|
if (slots.default) {
|
7845
8169
|
return vue.createVNode("div", {
|
7846
|
-
"class": bem$
|
8170
|
+
"class": bem$A("content")
|
7847
8171
|
}, [slots.default()]);
|
7848
8172
|
}
|
7849
8173
|
const {
|
@@ -7855,18 +8179,18 @@ var stdin_default$H = vue.defineComponent({
|
|
7855
8179
|
const hasTitle = !!(title || slots.title);
|
7856
8180
|
return vue.createVNode("div", {
|
7857
8181
|
"key": allowHtml ? 1 : 0,
|
7858
|
-
"class": bem$
|
8182
|
+
"class": bem$A("content", {
|
7859
8183
|
isolated: !hasTitle
|
7860
8184
|
})
|
7861
8185
|
}, [renderMessage(hasTitle)]);
|
7862
8186
|
}
|
7863
8187
|
};
|
7864
8188
|
const renderButtons = () => vue.createVNode("div", {
|
7865
|
-
"class": [BORDER_TOP, bem$
|
8189
|
+
"class": [BORDER_TOP, bem$A("footer")]
|
7866
8190
|
}, [props.showCancelButton && vue.createVNode(Button, {
|
7867
8191
|
"size": "large",
|
7868
8192
|
"text": props.cancelButtonText || t$7("cancel"),
|
7869
|
-
"class": bem$
|
8193
|
+
"class": bem$A("cancel"),
|
7870
8194
|
"style": {
|
7871
8195
|
color: props.cancelButtonColor
|
7872
8196
|
},
|
@@ -7875,7 +8199,7 @@ var stdin_default$H = vue.defineComponent({
|
|
7875
8199
|
}, null), props.showConfirmButton && vue.createVNode(Button, {
|
7876
8200
|
"size": "large",
|
7877
8201
|
"text": props.confirmButtonText || t$7("confirm"),
|
7878
|
-
"class": [bem$
|
8202
|
+
"class": [bem$A("confirm"), {
|
7879
8203
|
[BORDER_LEFT]: props.showCancelButton
|
7880
8204
|
}],
|
7881
8205
|
"style": {
|
@@ -7885,19 +8209,19 @@ var stdin_default$H = vue.defineComponent({
|
|
7885
8209
|
"onClick": onConfirm
|
7886
8210
|
}, null)]);
|
7887
8211
|
const renderRoundButtons = () => vue.createVNode(ActionBar, {
|
7888
|
-
"class": bem$
|
8212
|
+
"class": bem$A("footer")
|
7889
8213
|
}, {
|
7890
8214
|
default: () => [props.showCancelButton && vue.createVNode(ActionBarButton, {
|
7891
8215
|
"type": "warning",
|
7892
8216
|
"text": props.cancelButtonText || t$7("cancel"),
|
7893
|
-
"class": bem$
|
8217
|
+
"class": bem$A("cancel"),
|
7894
8218
|
"color": props.cancelButtonColor,
|
7895
8219
|
"loading": loading.cancel,
|
7896
8220
|
"onClick": onCancel
|
7897
8221
|
}, null), props.showConfirmButton && vue.createVNode(ActionBarButton, {
|
7898
8222
|
"type": "danger",
|
7899
8223
|
"text": props.confirmButtonText || t$7("confirm"),
|
7900
|
-
"class": bem$
|
8224
|
+
"class": bem$A("confirm"),
|
7901
8225
|
"color": props.confirmButtonColor,
|
7902
8226
|
"loading": loading.confirm,
|
7903
8227
|
"onClick": onConfirm
|
@@ -7920,7 +8244,7 @@ var stdin_default$H = vue.defineComponent({
|
|
7920
8244
|
return vue.createVNode(Popup, vue.mergeProps({
|
7921
8245
|
"ref": root,
|
7922
8246
|
"role": "dialog",
|
7923
|
-
"class": [bem$
|
8247
|
+
"class": [bem$A([theme]), className],
|
7924
8248
|
"style": {
|
7925
8249
|
width: addUnit(width)
|
7926
8250
|
},
|
@@ -7942,7 +8266,7 @@ function initInstance$2() {
|
|
7942
8266
|
state,
|
7943
8267
|
toggle
|
7944
8268
|
} = usePopupState();
|
7945
|
-
return () => vue.createVNode(stdin_default$
|
8269
|
+
return () => vue.createVNode(stdin_default$G, vue.mergeProps(state, {
|
7946
8270
|
"onUpdate:show": toggle
|
7947
8271
|
}), null);
|
7948
8272
|
}
|
@@ -8007,19 +8331,19 @@ Dialog.setDefaultOptions = (options) => {
|
|
8007
8331
|
Dialog.resetDefaultOptions = () => {
|
8008
8332
|
Dialog.currentOptions = extend({}, Dialog.defaultOptions);
|
8009
8333
|
};
|
8010
|
-
Dialog.Component = withInstall(stdin_default$
|
8334
|
+
Dialog.Component = withInstall(stdin_default$G);
|
8011
8335
|
Dialog.install = (app) => {
|
8012
8336
|
app.use(Dialog.Component);
|
8013
8337
|
app.config.globalProperties.$dialog = Dialog;
|
8014
8338
|
};
|
8015
|
-
const [name$
|
8339
|
+
const [name$z, bem$z] = createNamespace("divider");
|
8016
8340
|
const dividerProps = {
|
8017
8341
|
dashed: Boolean,
|
8018
8342
|
hairline: truthProp,
|
8019
8343
|
contentPosition: makeStringProp("center")
|
8020
8344
|
};
|
8021
|
-
var stdin_default$
|
8022
|
-
name: name$
|
8345
|
+
var stdin_default$F = vue.defineComponent({
|
8346
|
+
name: name$z,
|
8023
8347
|
props: dividerProps,
|
8024
8348
|
setup(props, {
|
8025
8349
|
slots
|
@@ -8028,7 +8352,7 @@ var stdin_default$G = vue.defineComponent({
|
|
8028
8352
|
var _a;
|
8029
8353
|
return vue.createVNode("div", {
|
8030
8354
|
"role": "separator",
|
8031
|
-
"class": bem$
|
8355
|
+
"class": bem$z({
|
8032
8356
|
dashed: props.dashed,
|
8033
8357
|
hairline: props.hairline,
|
8034
8358
|
[`content-${props.contentPosition}`]: !!slots.default
|
@@ -8037,8 +8361,8 @@ var stdin_default$G = vue.defineComponent({
|
|
8037
8361
|
};
|
8038
8362
|
}
|
8039
8363
|
});
|
8040
|
-
const Divider = withInstall(stdin_default$
|
8041
|
-
const [name$
|
8364
|
+
const Divider = withInstall(stdin_default$F);
|
8365
|
+
const [name$y, bem$y] = createNamespace("dropdown-menu");
|
8042
8366
|
const dropdownMenuProps = {
|
8043
8367
|
overlay: truthProp,
|
8044
8368
|
zIndex: numericProp,
|
@@ -8048,14 +8372,14 @@ const dropdownMenuProps = {
|
|
8048
8372
|
closeOnClickOutside: truthProp,
|
8049
8373
|
closeOnClickOverlay: truthProp
|
8050
8374
|
};
|
8051
|
-
const DROPDOWN_KEY = Symbol(name$
|
8052
|
-
var stdin_default$
|
8053
|
-
name: name$
|
8375
|
+
const DROPDOWN_KEY = Symbol(name$y);
|
8376
|
+
var stdin_default$E = vue.defineComponent({
|
8377
|
+
name: name$y,
|
8054
8378
|
props: dropdownMenuProps,
|
8055
8379
|
setup(props, {
|
8056
8380
|
slots
|
8057
8381
|
}) {
|
8058
|
-
const id = useId();
|
8382
|
+
const id = useId$1();
|
8059
8383
|
const root = vue.ref();
|
8060
8384
|
const barRef = vue.ref();
|
8061
8385
|
const offset = vue.ref(0);
|
@@ -8118,7 +8442,7 @@ var stdin_default$F = vue.defineComponent({
|
|
8118
8442
|
"id": `${id}-${index}`,
|
8119
8443
|
"role": "button",
|
8120
8444
|
"tabindex": disabled ? void 0 : 0,
|
8121
|
-
"class": [bem$
|
8445
|
+
"class": [bem$y("item", {
|
8122
8446
|
disabled
|
8123
8447
|
}), {
|
8124
8448
|
[HAPTICS_FEEDBACK]: !disabled
|
@@ -8129,7 +8453,7 @@ var stdin_default$F = vue.defineComponent({
|
|
8129
8453
|
}
|
8130
8454
|
}
|
8131
8455
|
}, [vue.createVNode("span", {
|
8132
|
-
"class": [bem$
|
8456
|
+
"class": [bem$y("title", {
|
8133
8457
|
down: showPopup === (props.direction === "down"),
|
8134
8458
|
active: showPopup
|
8135
8459
|
}), titleClass],
|
@@ -8153,18 +8477,18 @@ var stdin_default$F = vue.defineComponent({
|
|
8153
8477
|
var _a;
|
8154
8478
|
return vue.createVNode("div", {
|
8155
8479
|
"ref": root,
|
8156
|
-
"class": bem$
|
8480
|
+
"class": bem$y()
|
8157
8481
|
}, [vue.createVNode("div", {
|
8158
8482
|
"ref": barRef,
|
8159
8483
|
"style": barStyle.value,
|
8160
|
-
"class": bem$
|
8484
|
+
"class": bem$y("bar", {
|
8161
8485
|
opened: opened.value
|
8162
8486
|
})
|
8163
8487
|
}, [children.map(renderTitle)]), (_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
8164
8488
|
};
|
8165
8489
|
}
|
8166
8490
|
});
|
8167
|
-
const [name$
|
8491
|
+
const [name$x, bem$x] = createNamespace("dropdown-item");
|
8168
8492
|
const dropdownItemProps = {
|
8169
8493
|
title: String,
|
8170
8494
|
options: makeArrayProp(),
|
@@ -8174,8 +8498,8 @@ const dropdownItemProps = {
|
|
8174
8498
|
modelValue: unknownProp,
|
8175
8499
|
titleClass: unknownProp
|
8176
8500
|
};
|
8177
|
-
var stdin_default$
|
8178
|
-
name: name$
|
8501
|
+
var stdin_default$D = vue.defineComponent({
|
8502
|
+
name: name$x,
|
8179
8503
|
props: dropdownItemProps,
|
8180
8504
|
emits: ["open", "opened", "close", "closed", "change", "update:modelValue"],
|
8181
8505
|
setup(props, {
|
@@ -8242,7 +8566,7 @@ var stdin_default$E = vue.defineComponent({
|
|
8242
8566
|
const renderIcon = () => {
|
8243
8567
|
if (active) {
|
8244
8568
|
return vue.createVNode(Icon, {
|
8245
|
-
"class": bem$
|
8569
|
+
"class": bem$x("icon"),
|
8246
8570
|
"color": activeColor,
|
8247
8571
|
"name": "success"
|
8248
8572
|
}, null);
|
@@ -8253,7 +8577,7 @@ var stdin_default$E = vue.defineComponent({
|
|
8253
8577
|
"key": option.value,
|
8254
8578
|
"icon": option.icon,
|
8255
8579
|
"title": option.text,
|
8256
|
-
"class": bem$
|
8580
|
+
"class": bem$x("option", {
|
8257
8581
|
active
|
8258
8582
|
}),
|
8259
8583
|
"style": {
|
@@ -8285,13 +8609,13 @@ var stdin_default$E = vue.defineComponent({
|
|
8285
8609
|
}
|
8286
8610
|
return vue.withDirectives(vue.createVNode("div", {
|
8287
8611
|
"style": style,
|
8288
|
-
"class": bem$
|
8612
|
+
"class": bem$x([direction]),
|
8289
8613
|
"onClick": onClickWrapper
|
8290
8614
|
}, [vue.createVNode(Popup, {
|
8291
8615
|
"show": state.showPopup,
|
8292
8616
|
"onUpdate:show": ($event) => state.showPopup = $event,
|
8293
8617
|
"role": "menu",
|
8294
|
-
"class": bem$
|
8618
|
+
"class": bem$x("content"),
|
8295
8619
|
"overlay": overlay,
|
8296
8620
|
"position": direction === "down" ? "top" : "bottom",
|
8297
8621
|
"duration": state.transition ? duration : 0,
|
@@ -8329,147 +8653,8 @@ var stdin_default$E = vue.defineComponent({
|
|
8329
8653
|
};
|
8330
8654
|
}
|
8331
8655
|
});
|
8332
|
-
const DropdownItem = withInstall(stdin_default$
|
8333
|
-
const DropdownMenu = withInstall(stdin_default$
|
8334
|
-
const prefix = "van-empty-network-";
|
8335
|
-
const renderStop = (color, offset, opacity) => vue.createVNode("stop", {
|
8336
|
-
"stop-color": color,
|
8337
|
-
"offset": `${offset}%`,
|
8338
|
-
"stop-opacity": opacity
|
8339
|
-
}, null);
|
8340
|
-
const Network = vue.createVNode("svg", {
|
8341
|
-
"viewBox": "0 0 160 160"
|
8342
|
-
}, [vue.createVNode("defs", null, [vue.createVNode("linearGradient", {
|
8343
|
-
"id": `${prefix}1`,
|
8344
|
-
"x1": "64%",
|
8345
|
-
"y1": "100%",
|
8346
|
-
"x2": "64%"
|
8347
|
-
}, [renderStop("#FFF", 0, 0.5), renderStop("#F2F3F5", 100)]), vue.createVNode("linearGradient", {
|
8348
|
-
"id": `${prefix}2`,
|
8349
|
-
"x1": "50%",
|
8350
|
-
"x2": "50%",
|
8351
|
-
"y2": "84%"
|
8352
|
-
}, [renderStop("#EBEDF0", 0), renderStop("#DCDEE0", 100, 0)]), vue.createVNode("linearGradient", {
|
8353
|
-
"id": `${prefix}3`,
|
8354
|
-
"x1": "100%",
|
8355
|
-
"x2": "100%",
|
8356
|
-
"y2": "100%"
|
8357
|
-
}, [renderStop("#EAEDF0", 0), renderStop("#DCDEE0", 100)]), vue.createVNode("radialGradient", {
|
8358
|
-
"id": `${prefix}4`,
|
8359
|
-
"cx": "50%",
|
8360
|
-
"cy": "0%",
|
8361
|
-
"fx": "50%",
|
8362
|
-
"fy": "0%",
|
8363
|
-
"r": "100%",
|
8364
|
-
"gradientTransform": "matrix(0 1 -.54 0 .5 -.5)"
|
8365
|
-
}, [renderStop("#EBEDF0", 0), renderStop("#FFF", 100, 0)])]), vue.createVNode("g", {
|
8366
|
-
"fill": "none"
|
8367
|
-
}, [vue.createVNode("g", {
|
8368
|
-
"opacity": ".8"
|
8369
|
-
}, [vue.createVNode("path", {
|
8370
|
-
"d": "M36 131V53H16v20H2v58h34z",
|
8371
|
-
"fill": `url(#${prefix}1)`
|
8372
|
-
}, null), vue.createVNode("path", {
|
8373
|
-
"d": "M123 15h22v14h9v77h-31V15z",
|
8374
|
-
"fill": `url(#${prefix}1)`
|
8375
|
-
}, null)]), vue.createVNode("path", {
|
8376
|
-
"fill": `url(#${prefix}4)`,
|
8377
|
-
"d": "M0 139h160v21H0z"
|
8378
|
-
}, null), vue.createVNode("path", {
|
8379
|
-
"d": "M80 54a7 7 0 0 1 3 13v27l-2 2h-2a2 2 0 0 1-2-2V67a7 7 0 0 1 3-13z",
|
8380
|
-
"fill": `url(#${prefix}2)`
|
8381
|
-
}, null), vue.createVNode("g", {
|
8382
|
-
"opacity": ".6",
|
8383
|
-
"stroke-linecap": "round",
|
8384
|
-
"stroke-width": "7"
|
8385
|
-
}, [vue.createVNode("path", {
|
8386
|
-
"d": "M64 47a19 19 0 0 0-5 13c0 5 2 10 5 13",
|
8387
|
-
"stroke": `url(#${prefix}3)`
|
8388
|
-
}, null), vue.createVNode("path", {
|
8389
|
-
"d": "M53 36a34 34 0 0 0 0 48",
|
8390
|
-
"stroke": `url(#${prefix}3)`
|
8391
|
-
}, null), vue.createVNode("path", {
|
8392
|
-
"d": "M95 73a19 19 0 0 0 6-13c0-5-2-9-6-13",
|
8393
|
-
"stroke": `url(#${prefix}3)`
|
8394
|
-
}, null), vue.createVNode("path", {
|
8395
|
-
"d": "M106 84a34 34 0 0 0 0-48",
|
8396
|
-
"stroke": `url(#${prefix}3)`
|
8397
|
-
}, null)]), vue.createVNode("g", {
|
8398
|
-
"transform": "translate(31 105)"
|
8399
|
-
}, [vue.createVNode("rect", {
|
8400
|
-
"fill": "#EBEDF0",
|
8401
|
-
"width": "98",
|
8402
|
-
"height": "34",
|
8403
|
-
"rx": "2"
|
8404
|
-
}, null), vue.createVNode("rect", {
|
8405
|
-
"fill": "#FFF",
|
8406
|
-
"x": "9",
|
8407
|
-
"y": "8",
|
8408
|
-
"width": "80",
|
8409
|
-
"height": "18",
|
8410
|
-
"rx": "1.1"
|
8411
|
-
}, null), vue.createVNode("rect", {
|
8412
|
-
"fill": "#EBEDF0",
|
8413
|
-
"x": "15",
|
8414
|
-
"y": "12",
|
8415
|
-
"width": "18",
|
8416
|
-
"height": "6",
|
8417
|
-
"rx": "1.1"
|
8418
|
-
}, null)])])]);
|
8419
|
-
const [name$x, bem$x] = createNamespace("empty");
|
8420
|
-
const PRESET_IMAGES = ["error", "search", "default"];
|
8421
|
-
const emptyProps = {
|
8422
|
-
image: makeStringProp("default"),
|
8423
|
-
imageSize: numericProp,
|
8424
|
-
description: String
|
8425
|
-
};
|
8426
|
-
var stdin_default$D = vue.defineComponent({
|
8427
|
-
name: name$x,
|
8428
|
-
props: emptyProps,
|
8429
|
-
setup(props, {
|
8430
|
-
slots
|
8431
|
-
}) {
|
8432
|
-
const renderImage = () => {
|
8433
|
-
if (slots.image) {
|
8434
|
-
return slots.image();
|
8435
|
-
}
|
8436
|
-
let {
|
8437
|
-
image
|
8438
|
-
} = props;
|
8439
|
-
if (image === "network") {
|
8440
|
-
return Network;
|
8441
|
-
}
|
8442
|
-
if (PRESET_IMAGES.includes(image)) {
|
8443
|
-
image = `https://img.yzcdn.cn/vant/empty-image-${image}.png`;
|
8444
|
-
}
|
8445
|
-
return vue.createVNode("img", {
|
8446
|
-
"src": image
|
8447
|
-
}, null);
|
8448
|
-
};
|
8449
|
-
const renderDescription = () => {
|
8450
|
-
const description = slots.description ? slots.description() : props.description;
|
8451
|
-
if (description) {
|
8452
|
-
return vue.createVNode("p", {
|
8453
|
-
"class": bem$x("description")
|
8454
|
-
}, [description]);
|
8455
|
-
}
|
8456
|
-
};
|
8457
|
-
const renderBottom = () => {
|
8458
|
-
if (slots.default) {
|
8459
|
-
return vue.createVNode("div", {
|
8460
|
-
"class": bem$x("bottom")
|
8461
|
-
}, [slots.default()]);
|
8462
|
-
}
|
8463
|
-
};
|
8464
|
-
return () => vue.createVNode("div", {
|
8465
|
-
"class": bem$x()
|
8466
|
-
}, [vue.createVNode("div", {
|
8467
|
-
"class": bem$x("image"),
|
8468
|
-
"style": getSizeStyle(props.imageSize)
|
8469
|
-
}, [renderImage()]), renderDescription(), renderBottom()]);
|
8470
|
-
}
|
8471
|
-
});
|
8472
|
-
const Empty = withInstall(stdin_default$D);
|
8656
|
+
const DropdownItem = withInstall(stdin_default$D);
|
8657
|
+
const DropdownMenu = withInstall(stdin_default$E);
|
8473
8658
|
const [name$w, bem$w] = createNamespace("grid");
|
8474
8659
|
const gridProps = {
|
8475
8660
|
square: Boolean,
|
@@ -9123,6 +9308,7 @@ var stdin_default$y = vue.defineComponent({
|
|
9123
9308
|
children,
|
9124
9309
|
linkChildren
|
9125
9310
|
} = use.useChildren(INDEX_BAR_KEY);
|
9311
|
+
let selectActiveIndex;
|
9126
9312
|
linkChildren({
|
9127
9313
|
props
|
9128
9314
|
});
|
@@ -9150,6 +9336,7 @@ var stdin_default$y = vue.defineComponent({
|
|
9150
9336
|
}
|
9151
9337
|
return -1;
|
9152
9338
|
};
|
9339
|
+
const getMatchAnchor = (index) => children.find((item) => String(item.index) === index);
|
9153
9340
|
const onScroll = () => {
|
9154
9341
|
if (isHidden(root)) {
|
9155
9342
|
return;
|
@@ -9161,7 +9348,16 @@ var stdin_default$y = vue.defineComponent({
|
|
9161
9348
|
const scrollTop = getScrollTop(scrollParent.value);
|
9162
9349
|
const scrollParentRect = use.useRect(scrollParent);
|
9163
9350
|
const rects = children.map((item) => item.getRect(scrollParent.value, scrollParentRect));
|
9164
|
-
|
9351
|
+
let active = -1;
|
9352
|
+
if (selectActiveIndex) {
|
9353
|
+
const match = getMatchAnchor(selectActiveIndex);
|
9354
|
+
if (match) {
|
9355
|
+
const rect = match.getRect(scrollParent.value, scrollParentRect);
|
9356
|
+
active = getActiveAnchor(rect.top, rects);
|
9357
|
+
}
|
9358
|
+
} else {
|
9359
|
+
active = getActiveAnchor(scrollTop, rects);
|
9360
|
+
}
|
9165
9361
|
activeAnchor.value = indexList[active];
|
9166
9362
|
if (sticky) {
|
9167
9363
|
children.forEach((item, index) => {
|
@@ -9180,7 +9376,7 @@ var stdin_default$y = vue.defineComponent({
|
|
9180
9376
|
if (index === active) {
|
9181
9377
|
state.active = true;
|
9182
9378
|
state.top = Math.max(props.stickyOffsetTop, rects[index].top - scrollTop) + scrollParentRect.top;
|
9183
|
-
} else if (index === active - 1) {
|
9379
|
+
} else if (index === active - 1 && selectActiveIndex === "") {
|
9184
9380
|
const activeItemTop = rects[active].top - scrollTop;
|
9185
9381
|
state.active = activeItemTop > 0;
|
9186
9382
|
state.top = activeItemTop + scrollParentRect.top - rects[index].height;
|
@@ -9189,6 +9385,7 @@ var stdin_default$y = vue.defineComponent({
|
|
9189
9385
|
}
|
9190
9386
|
});
|
9191
9387
|
}
|
9388
|
+
selectActiveIndex = "";
|
9192
9389
|
};
|
9193
9390
|
const init = () => {
|
9194
9391
|
vue.nextTick(onScroll);
|
@@ -9214,9 +9411,18 @@ var stdin_default$y = vue.defineComponent({
|
|
9214
9411
|
}, [index]);
|
9215
9412
|
});
|
9216
9413
|
const scrollTo = (index) => {
|
9217
|
-
|
9218
|
-
const match =
|
9414
|
+
selectActiveIndex = String(index);
|
9415
|
+
const match = getMatchAnchor(selectActiveIndex);
|
9219
9416
|
if (match) {
|
9417
|
+
const scrollTop = getScrollTop(scrollParent.value);
|
9418
|
+
const scrollParentRect = use.useRect(scrollParent);
|
9419
|
+
const {
|
9420
|
+
offsetHeight
|
9421
|
+
} = document.documentElement;
|
9422
|
+
if (scrollTop === offsetHeight - scrollParentRect.height) {
|
9423
|
+
onScroll();
|
9424
|
+
return;
|
9425
|
+
}
|
9220
9426
|
match.$el.scrollIntoView();
|
9221
9427
|
if (props.sticky && props.stickyOffsetTop) {
|
9222
9428
|
setRootScrollTop(getRootScrollTop() - props.stickyOffsetTop);
|
@@ -9550,10 +9756,10 @@ var stdin_default$v = vue.defineComponent({
|
|
9550
9756
|
"ref": navBarRef,
|
9551
9757
|
"style": style,
|
9552
9758
|
"class": [bem$p({
|
9553
|
-
fixed
|
9554
|
-
"safe-area-inset-top": props.safeAreaInsetTop
|
9759
|
+
fixed
|
9555
9760
|
}), {
|
9556
|
-
[BORDER_BOTTOM]: border
|
9761
|
+
[BORDER_BOTTOM]: border,
|
9762
|
+
"van-safe-area-top": props.safeAreaInsetTop
|
9557
9763
|
}]
|
9558
9764
|
}, [vue.createVNode("div", {
|
9559
9765
|
"class": bem$p("content")
|
@@ -9942,6 +10148,15 @@ const numberKeyboardProps = {
|
|
9942
10148
|
default: ""
|
9943
10149
|
}
|
9944
10150
|
};
|
10151
|
+
function shuffle(array) {
|
10152
|
+
for (let i = array.length - 1; i > 0; i--) {
|
10153
|
+
const j = Math.floor(Math.random() * (i + 1));
|
10154
|
+
const temp = array[i];
|
10155
|
+
array[i] = array[j];
|
10156
|
+
array[j] = temp;
|
10157
|
+
}
|
10158
|
+
return array;
|
10159
|
+
}
|
9945
10160
|
var stdin_default$r = vue.defineComponent({
|
9946
10161
|
name: name$m,
|
9947
10162
|
props: numberKeyboardProps,
|
@@ -9956,7 +10171,7 @@ var stdin_default$r = vue.defineComponent({
|
|
9956
10171
|
text: i + 1
|
9957
10172
|
}));
|
9958
10173
|
if (props.randomKeyOrder) {
|
9959
|
-
keys2
|
10174
|
+
shuffle(keys2);
|
9960
10175
|
}
|
9961
10176
|
return keys2;
|
9962
10177
|
};
|
@@ -10811,33 +11026,53 @@ var stdin_default$l = vue.defineComponent({
|
|
10811
11026
|
}) {
|
10812
11027
|
const touch = useTouch();
|
10813
11028
|
const [itemRefs, setItemRefs] = useRefs();
|
11029
|
+
const groupRef = vue.ref();
|
10814
11030
|
const untouchable = () => props.readonly || props.disabled || !props.touchable;
|
10815
11031
|
const list = vue.computed(() => Array(+props.count).fill("").map((_, i) => getRateStatus(props.modelValue, i + 1, props.allowHalf, props.readonly)));
|
10816
11032
|
let ranges;
|
11033
|
+
let groupRefRect;
|
11034
|
+
let minRectTop = Number.MAX_SAFE_INTEGER;
|
11035
|
+
let maxRectTop = Number.MIN_SAFE_INTEGER;
|
10817
11036
|
const updateRanges = () => {
|
11037
|
+
groupRefRect = use.useRect(groupRef);
|
10818
11038
|
const rects = itemRefs.value.map(use.useRect);
|
10819
11039
|
ranges = [];
|
10820
11040
|
rects.forEach((rect, index) => {
|
11041
|
+
minRectTop = Math.min(rect.top, minRectTop);
|
11042
|
+
maxRectTop = Math.max(rect.top, maxRectTop);
|
10821
11043
|
if (props.allowHalf) {
|
10822
11044
|
ranges.push({
|
10823
11045
|
score: index + 0.5,
|
10824
|
-
left: rect.left
|
11046
|
+
left: rect.left,
|
11047
|
+
top: rect.top,
|
11048
|
+
height: rect.height
|
10825
11049
|
}, {
|
10826
11050
|
score: index + 1,
|
10827
|
-
left: rect.left + rect.width / 2
|
11051
|
+
left: rect.left + rect.width / 2,
|
11052
|
+
top: rect.top,
|
11053
|
+
height: rect.height
|
10828
11054
|
});
|
10829
11055
|
} else {
|
10830
11056
|
ranges.push({
|
10831
11057
|
score: index + 1,
|
10832
|
-
left: rect.left
|
11058
|
+
left: rect.left,
|
11059
|
+
top: rect.top,
|
11060
|
+
height: rect.height
|
10833
11061
|
});
|
10834
11062
|
}
|
10835
11063
|
});
|
10836
11064
|
};
|
10837
|
-
const getScoreByPosition = (x) => {
|
11065
|
+
const getScoreByPosition = (x, y) => {
|
10838
11066
|
for (let i = ranges.length - 1; i > 0; i--) {
|
10839
|
-
if (
|
10840
|
-
|
11067
|
+
if (y >= groupRefRect.top && y <= groupRefRect.bottom) {
|
11068
|
+
if (x > ranges[i].left && y >= ranges[i].top && y <= ranges[i].top + ranges[i].height) {
|
11069
|
+
return ranges[i].score;
|
11070
|
+
}
|
11071
|
+
} else {
|
11072
|
+
const curTop = y < groupRefRect.top ? minRectTop : maxRectTop;
|
11073
|
+
if (x > ranges[i].left && ranges[i].top === curTop) {
|
11074
|
+
return ranges[i].score;
|
11075
|
+
}
|
10841
11076
|
}
|
10842
11077
|
}
|
10843
11078
|
return props.allowHalf ? 0.5 : 1;
|
@@ -10862,10 +11097,11 @@ var stdin_default$l = vue.defineComponent({
|
|
10862
11097
|
touch.move(event);
|
10863
11098
|
if (touch.isHorizontal()) {
|
10864
11099
|
const {
|
10865
|
-
clientX
|
11100
|
+
clientX,
|
11101
|
+
clientY
|
10866
11102
|
} = event.touches[0];
|
10867
11103
|
preventDefault(event);
|
10868
|
-
select(getScoreByPosition(clientX));
|
11104
|
+
select(getScoreByPosition(clientX, clientY));
|
10869
11105
|
}
|
10870
11106
|
};
|
10871
11107
|
const renderStar = (item, index) => {
|
@@ -10894,7 +11130,7 @@ var stdin_default$l = vue.defineComponent({
|
|
10894
11130
|
}
|
10895
11131
|
const onClickItem = (event) => {
|
10896
11132
|
updateRanges();
|
10897
|
-
select(allowHalf ? getScoreByPosition(event.clientX) : score);
|
11133
|
+
select(allowHalf ? getScoreByPosition(event.clientX, event.clientY) : score);
|
10898
11134
|
};
|
10899
11135
|
return vue.createVNode("div", {
|
10900
11136
|
"key": index,
|
@@ -10932,6 +11168,7 @@ var stdin_default$l = vue.defineComponent({
|
|
10932
11168
|
};
|
10933
11169
|
use.useCustomFieldValue(() => props.modelValue);
|
10934
11170
|
return () => vue.createVNode("div", {
|
11171
|
+
"ref": groupRef,
|
10935
11172
|
"role": "radiogroup",
|
10936
11173
|
"class": bem$f({
|
10937
11174
|
readonly: props.readonly,
|
@@ -10966,7 +11203,7 @@ var stdin_default$k = vue.defineComponent({
|
|
10966
11203
|
slots,
|
10967
11204
|
attrs
|
10968
11205
|
}) {
|
10969
|
-
const id = useId();
|
11206
|
+
const id = useId$1();
|
10970
11207
|
const filedRef = vue.ref();
|
10971
11208
|
const onCancel = () => {
|
10972
11209
|
if (!slots.action) {
|
@@ -11056,14 +11293,17 @@ var stdin_default$k = vue.defineComponent({
|
|
11056
11293
|
}
|
11057
11294
|
});
|
11058
11295
|
const Search = withInstall(stdin_default$k);
|
11059
|
-
const PRESET_ICONS = ["qq", "link", "weibo", "wechat", "poster", "qrcode", "weapp-qrcode", "wechat-moments"];
|
11060
11296
|
const popupInheritKeys = [...popupSharedPropKeys, "round", "closeOnPopstate", "safeAreaInsetBottom"];
|
11061
|
-
|
11062
|
-
|
11063
|
-
|
11064
|
-
|
11065
|
-
|
11066
|
-
|
11297
|
+
const iconMap = {
|
11298
|
+
qq: "qq",
|
11299
|
+
link: "link-o",
|
11300
|
+
weibo: "weibo",
|
11301
|
+
qrcode: "qr",
|
11302
|
+
poster: "photo-o",
|
11303
|
+
wechat: "wechat",
|
11304
|
+
"weapp-qrcode": "miniprogram-o",
|
11305
|
+
"wechat-moments": "wechat-moments"
|
11306
|
+
};
|
11067
11307
|
const [name$e, bem$d, t$2] = createNamespace("share-sheet");
|
11068
11308
|
const shareSheetProps = extend({}, popupSharedProps, {
|
11069
11309
|
title: String,
|
@@ -11101,6 +11341,19 @@ var stdin_default$j = vue.defineComponent({
|
|
11101
11341
|
}, [description])]);
|
11102
11342
|
}
|
11103
11343
|
};
|
11344
|
+
const renderIcon = (icon) => {
|
11345
|
+
if (iconMap[icon]) {
|
11346
|
+
return vue.createVNode("div", {
|
11347
|
+
"class": bem$d("icon", [icon])
|
11348
|
+
}, [vue.createVNode(Icon, {
|
11349
|
+
"name": iconMap[icon] || icon
|
11350
|
+
}, null)]);
|
11351
|
+
}
|
11352
|
+
return vue.createVNode("img", {
|
11353
|
+
"src": icon,
|
11354
|
+
"class": bem$d("image-icon")
|
11355
|
+
}, null);
|
11356
|
+
};
|
11104
11357
|
const renderOption = (option, index) => {
|
11105
11358
|
const {
|
11106
11359
|
name: name2,
|
@@ -11113,10 +11366,7 @@ var stdin_default$j = vue.defineComponent({
|
|
11113
11366
|
"tabindex": 0,
|
11114
11367
|
"class": [bem$d("option"), className, HAPTICS_FEEDBACK],
|
11115
11368
|
"onClick": () => onSelect(option, index)
|
11116
|
-
}, [vue.createVNode("
|
11117
|
-
"src": getIconURL(icon),
|
11118
|
-
"class": bem$d("icon")
|
11119
|
-
}, null), name2 && vue.createVNode("span", {
|
11369
|
+
}, [renderIcon(icon), name2 && vue.createVNode("span", {
|
11120
11370
|
"class": bem$d("name")
|
11121
11371
|
}, [name2]), description && vue.createVNode("span", {
|
11122
11372
|
"class": bem$d("option-description")
|
@@ -11274,9 +11524,11 @@ const skeletonProps = {
|
|
11274
11524
|
};
|
11275
11525
|
var stdin_default$g = vue.defineComponent({
|
11276
11526
|
name: name$b,
|
11527
|
+
inheritAttrs: false,
|
11277
11528
|
props: skeletonProps,
|
11278
11529
|
setup(props, {
|
11279
|
-
slots
|
11530
|
+
slots,
|
11531
|
+
attrs
|
11280
11532
|
}) {
|
11281
11533
|
const renderAvatar = () => {
|
11282
11534
|
if (props.avatar) {
|
@@ -11319,12 +11571,12 @@ var stdin_default$g = vue.defineComponent({
|
|
11319
11571
|
if (!props.loading) {
|
11320
11572
|
return (_a = slots.default) == null ? void 0 : _a.call(slots);
|
11321
11573
|
}
|
11322
|
-
return vue.createVNode("div", {
|
11574
|
+
return vue.createVNode("div", vue.mergeProps({
|
11323
11575
|
"class": bem$a({
|
11324
11576
|
animate: props.animate,
|
11325
11577
|
round: props.round
|
11326
11578
|
})
|
11327
|
-
}, [renderAvatar(), vue.createVNode("div", {
|
11579
|
+
}, attrs), [renderAvatar(), vue.createVNode("div", {
|
11328
11580
|
"class": bem$a("content")
|
11329
11581
|
}, [renderTitle(), renderRows()])]);
|
11330
11582
|
};
|
@@ -12214,7 +12466,7 @@ var stdin_default$a = vue.defineComponent({
|
|
12214
12466
|
return vue.createVNode("div", {
|
12215
12467
|
"ref": root,
|
12216
12468
|
"class": bem$4(),
|
12217
|
-
"onClick": getClickHandler("cell"),
|
12469
|
+
"onClick": getClickHandler("cell", lockClick2),
|
12218
12470
|
"onTouchstart": onTouchStart,
|
12219
12471
|
"onTouchmove": onTouchMove,
|
12220
12472
|
"onTouchend": onTouchEnd,
|
@@ -12569,7 +12821,6 @@ var stdin_default$6 = vue.defineComponent({
|
|
12569
12821
|
});
|
12570
12822
|
const TreeSelect = withInstall(stdin_default$6);
|
12571
12823
|
const [name, bem, t] = createNamespace("uploader");
|
12572
|
-
const toArray = (item) => Array.isArray(item) ? item : [item];
|
12573
12824
|
function readFileContent(file, resultType) {
|
12574
12825
|
return new Promise((resolve) => {
|
12575
12826
|
if (resultType === "file") {
|
@@ -12635,7 +12886,7 @@ var stdin_default$5 = vue.defineComponent({
|
|
12635
12886
|
imageFit: String,
|
12636
12887
|
lazyLoad: Boolean,
|
12637
12888
|
deletable: Boolean,
|
12638
|
-
previewSize:
|
12889
|
+
previewSize: [Number, String, Array],
|
12639
12890
|
beforeDelete: Function
|
12640
12891
|
},
|
12641
12892
|
emits: ["delete", "preview"],
|
@@ -12709,16 +12960,19 @@ var stdin_default$5 = vue.defineComponent({
|
|
12709
12960
|
};
|
12710
12961
|
const renderPreview = () => {
|
12711
12962
|
const {
|
12712
|
-
item
|
12963
|
+
item,
|
12964
|
+
lazyLoad,
|
12965
|
+
imageFit,
|
12966
|
+
previewSize
|
12713
12967
|
} = props;
|
12714
12968
|
if (isImageFile(item)) {
|
12715
12969
|
return vue.createVNode(Image$1, {
|
12716
|
-
"fit":
|
12970
|
+
"fit": imageFit,
|
12717
12971
|
"src": item.content || item.url,
|
12718
12972
|
"class": bem("preview-image"),
|
12719
|
-
"width":
|
12720
|
-
"height":
|
12721
|
-
"lazyLoad":
|
12973
|
+
"width": Array.isArray(previewSize) ? previewSize[0] : previewSize,
|
12974
|
+
"height": Array.isArray(previewSize) ? previewSize[1] : previewSize,
|
12975
|
+
"lazyLoad": lazyLoad,
|
12722
12976
|
"onClick": onPreview
|
12723
12977
|
}, {
|
12724
12978
|
default: renderCover
|
@@ -12758,7 +13012,7 @@ const uploaderProps = {
|
|
12758
13012
|
modelValue: makeArrayProp(),
|
12759
13013
|
beforeRead: Function,
|
12760
13014
|
beforeDelete: Function,
|
12761
|
-
previewSize:
|
13015
|
+
previewSize: [Number, String, Array],
|
12762
13016
|
previewImage: truthProp,
|
12763
13017
|
previewOptions: Object,
|
12764
13018
|
previewFullImage: truthProp,
|
@@ -13825,7 +14079,7 @@ const Lazyload = {
|
|
13825
14079
|
});
|
13826
14080
|
}
|
13827
14081
|
};
|
13828
|
-
const version = "4.0.0-alpha.
|
14082
|
+
const version = "4.0.0-alpha.3";
|
13829
14083
|
function install(app) {
|
13830
14084
|
const components = [
|
13831
14085
|
ActionBar,
|