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.es.min.js
CHANGED
@@ -23,6 +23,7 @@ function pick(obj, keys, ignoreUndefined) {
|
|
23
23
|
}, {});
|
24
24
|
}
|
25
25
|
const isSameValue = (newValue, oldValue) => JSON.stringify(newValue) === JSON.stringify(oldValue);
|
26
|
+
const toArray = (item) => Array.isArray(item) ? item : [item];
|
26
27
|
const unknownProp = null;
|
27
28
|
const numericProp = [Number, String];
|
28
29
|
const truthProp = {
|
@@ -119,6 +120,12 @@ function addUnit(value) {
|
|
119
120
|
}
|
120
121
|
function getSizeStyle(originSize) {
|
121
122
|
if (isDef(originSize)) {
|
123
|
+
if (Array.isArray(originSize)) {
|
124
|
+
return {
|
125
|
+
width: addUnit(originSize[0]),
|
126
|
+
height: addUnit(originSize[1])
|
127
|
+
};
|
128
|
+
}
|
122
129
|
const size = addUnit(originSize);
|
123
130
|
return {
|
124
131
|
width: size,
|
@@ -280,10 +287,8 @@ var stdin_default$1C = {
|
|
280
287
|
},
|
281
288
|
vanAddressEdit: {
|
282
289
|
area: "\u5730\u533A",
|
283
|
-
postal: "\u90AE\u653F\u7F16\u7801",
|
284
290
|
areaEmpty: "\u8BF7\u9009\u62E9\u5730\u533A",
|
285
291
|
addressEmpty: "\u8BF7\u586B\u5199\u8BE6\u7EC6\u5730\u5740",
|
286
|
-
postalEmpty: "\u90AE\u653F\u7F16\u7801\u4E0D\u6B63\u786E",
|
287
292
|
addressDetail: "\u8BE6\u7EC6\u5730\u5740",
|
288
293
|
defaultAddress: "\u8BBE\u4E3A\u9ED8\u8BA4\u6536\u8D27\u5730\u5740"
|
289
294
|
},
|
@@ -309,10 +314,10 @@ const Locale = {
|
|
309
314
|
};
|
310
315
|
var stdin_default$1B = Locale;
|
311
316
|
function createTranslate(name2) {
|
312
|
-
const
|
317
|
+
const prefix = camelize(name2) + ".";
|
313
318
|
return (path, ...args) => {
|
314
319
|
const messages2 = stdin_default$1B.messages();
|
315
|
-
const message = get(messages2,
|
320
|
+
const message = get(messages2, prefix + path) || get(messages2, path);
|
316
321
|
return isFunction(message) ? message(...args) : message;
|
317
322
|
};
|
318
323
|
}
|
@@ -560,6 +565,8 @@ var stdin_default$1y = defineComponent({
|
|
560
565
|
watch(() => props.theme, (newVal, oldVal) => {
|
561
566
|
document.body.classList.remove(`van-theme-${oldVal}`);
|
562
567
|
document.body.classList.add(`van-theme-${newVal}`);
|
568
|
+
}, {
|
569
|
+
immediate: true
|
563
570
|
});
|
564
571
|
}
|
565
572
|
provide(CONFIG_PROVIDER_KEY, props);
|
@@ -676,7 +683,9 @@ var stdin_default$1w = defineComponent({
|
|
676
683
|
return createVNode("div", {
|
677
684
|
"class": bem$1l([type, {
|
678
685
|
vertical
|
679
|
-
}])
|
686
|
+
}]),
|
687
|
+
"aria-live": "polite",
|
688
|
+
"aria-busy": true
|
680
689
|
}, [createVNode("span", {
|
681
690
|
"class": bem$1l("spinner", type),
|
682
691
|
"style": spinnerStyle.value
|
@@ -994,7 +1003,7 @@ function useTouch() {
|
|
994
1003
|
};
|
995
1004
|
const move = (event) => {
|
996
1005
|
const touch = event.touches[0];
|
997
|
-
deltaX.value = touch.clientX < 0 ? 0 : touch.clientX - startX.value;
|
1006
|
+
deltaX.value = (touch.clientX < 0 ? 0 : touch.clientX) - startX.value;
|
998
1007
|
deltaY.value = touch.clientY - startY.value;
|
999
1008
|
offsetX.value = Math.abs(deltaX.value);
|
1000
1009
|
offsetY.value = Math.abs(deltaY.value);
|
@@ -1134,6 +1143,7 @@ const popupProps$2 = extend({}, popupSharedProps, {
|
|
1134
1143
|
iconPrefix: String,
|
1135
1144
|
closeOnPopstate: Boolean,
|
1136
1145
|
closeIconPosition: makeStringProp("top-right"),
|
1146
|
+
safeAreaInsetTop: Boolean,
|
1137
1147
|
safeAreaInsetBottom: Boolean
|
1138
1148
|
});
|
1139
1149
|
const [name$1k, bem$1g] = createNamespace("popup");
|
@@ -1228,6 +1238,7 @@ var stdin_default$1r = defineComponent({
|
|
1228
1238
|
const {
|
1229
1239
|
round,
|
1230
1240
|
position,
|
1241
|
+
safeAreaInsetTop,
|
1231
1242
|
safeAreaInsetBottom
|
1232
1243
|
} = props;
|
1233
1244
|
return withDirectives(createVNode("div", mergeProps({
|
@@ -1237,6 +1248,7 @@ var stdin_default$1r = defineComponent({
|
|
1237
1248
|
round,
|
1238
1249
|
[position]: position
|
1239
1250
|
}), {
|
1251
|
+
"van-safe-area-top": safeAreaInsetTop,
|
1240
1252
|
"van-safe-area-bottom": safeAreaInsetBottom
|
1241
1253
|
}],
|
1242
1254
|
"onKeydown": onKeydown
|
@@ -2139,9 +2151,12 @@ const formProps = {
|
|
2139
2151
|
scrollToError: Boolean,
|
2140
2152
|
validateFirst: Boolean,
|
2141
2153
|
submitOnEnter: truthProp,
|
2142
|
-
validateTrigger: makeStringProp("onBlur"),
|
2143
2154
|
showErrorMessage: truthProp,
|
2144
|
-
errorMessageAlign: String
|
2155
|
+
errorMessageAlign: String,
|
2156
|
+
validateTrigger: {
|
2157
|
+
type: [String, Array],
|
2158
|
+
default: "onBlur"
|
2159
|
+
}
|
2145
2160
|
};
|
2146
2161
|
var stdin_default$1l = defineComponent({
|
2147
2162
|
name: name$1e,
|
@@ -2256,6 +2271,7 @@ var stdin_default$1l = defineComponent({
|
|
2256
2271
|
useExpose({
|
2257
2272
|
submit,
|
2258
2273
|
validate,
|
2274
|
+
getValues,
|
2259
2275
|
scrollToField,
|
2260
2276
|
resetValidation
|
2261
2277
|
});
|
@@ -2353,7 +2369,7 @@ function cutString(str, maxlength) {
|
|
2353
2369
|
return [...str].slice(0, maxlength).join("");
|
2354
2370
|
}
|
2355
2371
|
let current = 0;
|
2356
|
-
function useId() {
|
2372
|
+
function useId$1() {
|
2357
2373
|
const vm = getCurrentInstance();
|
2358
2374
|
const { name: name2 = "unknown" } = (vm == null ? void 0 : vm.type) || {};
|
2359
2375
|
return `${name2}-${++current}`;
|
@@ -2374,6 +2390,7 @@ const fieldSharedProps = {
|
|
2374
2390
|
placeholder: String,
|
2375
2391
|
autocomplete: String,
|
2376
2392
|
errorMessage: String,
|
2393
|
+
enterkeyhint: String,
|
2377
2394
|
clearTrigger: makeStringProp("focus"),
|
2378
2395
|
formatTrigger: makeStringProp("onChange"),
|
2379
2396
|
error: {
|
@@ -2412,7 +2429,7 @@ var stdin_default$1k = defineComponent({
|
|
2412
2429
|
emit,
|
2413
2430
|
slots
|
2414
2431
|
}) {
|
2415
|
-
const id = useId();
|
2432
|
+
const id = useId$1();
|
2416
2433
|
const state = reactive({
|
2417
2434
|
focused: false,
|
2418
2435
|
validateFailed: false,
|
@@ -2502,10 +2519,13 @@ var stdin_default$1k = defineComponent({
|
|
2502
2519
|
});
|
2503
2520
|
const validateWithTrigger = (trigger) => {
|
2504
2521
|
if (form && props.rules) {
|
2505
|
-
const
|
2522
|
+
const {
|
2523
|
+
validateTrigger
|
2524
|
+
} = form.props;
|
2525
|
+
const defaultTrigger = toArray(validateTrigger).includes(trigger);
|
2506
2526
|
const rules = props.rules.filter((rule) => {
|
2507
2527
|
if (rule.trigger) {
|
2508
|
-
return rule.trigger
|
2528
|
+
return toArray(rule.trigger).includes(trigger);
|
2509
2529
|
}
|
2510
2530
|
return defaultTrigger;
|
2511
2531
|
});
|
@@ -2643,6 +2663,7 @@ var stdin_default$1k = defineComponent({
|
|
2643
2663
|
autofocus: props.autofocus,
|
2644
2664
|
placeholder: props.placeholder,
|
2645
2665
|
autocomplete: props.autocomplete,
|
2666
|
+
enterkeyhint: props.enterkeyhint,
|
2646
2667
|
"aria-labelledby": props.label ? `${id}-label` : void 0,
|
2647
2668
|
onBlur,
|
2648
2669
|
onFocus,
|
@@ -2906,6 +2927,7 @@ var stdin_default$1j = defineComponent({
|
|
2906
2927
|
} = props;
|
2907
2928
|
if (isDef(message) && message !== "") {
|
2908
2929
|
return type === "html" ? createVNode("div", {
|
2930
|
+
"key": 0,
|
2909
2931
|
"class": bem$18("text"),
|
2910
2932
|
"innerHTML": String(message)
|
2911
2933
|
}, null) : createVNode("div", {
|
@@ -3220,10 +3242,8 @@ const DEFAULT_DATA = {
|
|
3220
3242
|
province: "",
|
3221
3243
|
areaCode: "",
|
3222
3244
|
isDefault: false,
|
3223
|
-
postalCode: "",
|
3224
3245
|
addressDetail: ""
|
3225
3246
|
};
|
3226
|
-
const isPostal = (value) => /^\d{6}$/.test(value);
|
3227
3247
|
const addressEditProps = {
|
3228
3248
|
areaList: Object,
|
3229
3249
|
isSaving: Boolean,
|
@@ -3232,7 +3252,6 @@ const addressEditProps = {
|
|
3232
3252
|
showArea: truthProp,
|
3233
3253
|
showDetail: truthProp,
|
3234
3254
|
showDelete: Boolean,
|
3235
|
-
showPostal: Boolean,
|
3236
3255
|
disableArea: Boolean,
|
3237
3256
|
searchResult: Array,
|
3238
3257
|
telMaxlength: numericProp,
|
@@ -3251,10 +3270,6 @@ const addressEditProps = {
|
|
3251
3270
|
telValidator: {
|
3252
3271
|
type: Function,
|
3253
3272
|
default: isMobile
|
3254
|
-
},
|
3255
|
-
postalValidator: {
|
3256
|
-
type: Function,
|
3257
|
-
default: isPostal
|
3258
3273
|
}
|
3259
3274
|
};
|
3260
3275
|
var stdin_default$1g = defineComponent({
|
@@ -3297,8 +3312,7 @@ var stdin_default$1g = defineComponent({
|
|
3297
3312
|
const rules = computed(() => {
|
3298
3313
|
const {
|
3299
3314
|
validator,
|
3300
|
-
telValidator
|
3301
|
-
postalValidator
|
3315
|
+
telValidator
|
3302
3316
|
} = props;
|
3303
3317
|
const makeRule = (name2, emptyMessage) => ({
|
3304
3318
|
validator: (value) => {
|
@@ -3321,11 +3335,7 @@ var stdin_default$1g = defineComponent({
|
|
3321
3335
|
message: t$h("telInvalid")
|
3322
3336
|
}],
|
3323
3337
|
areaCode: [makeRule("areaCode", t$h("areaEmpty"))],
|
3324
|
-
addressDetail: [makeRule("addressDetail", t$h("addressEmpty"))]
|
3325
|
-
postalCode: [makeRule("addressDetail", t$h("postalEmpty")), {
|
3326
|
-
validator: postalValidator,
|
3327
|
-
message: t$h("postalEmpty")
|
3328
|
-
}]
|
3338
|
+
addressDetail: [makeRule("addressDetail", t$h("addressEmpty"))]
|
3329
3339
|
};
|
3330
3340
|
});
|
3331
3341
|
const onSave = () => emit("save", data);
|
@@ -3450,16 +3460,7 @@ var stdin_default$1g = defineComponent({
|
|
3450
3460
|
"onFocus": () => onFocus("addressDetail"),
|
3451
3461
|
"onInput": onChangeDetail,
|
3452
3462
|
"onSelectSearch": (event) => emit("selectSearch", event)
|
3453
|
-
}, null),
|
3454
|
-
"modelValue": data.postalCode,
|
3455
|
-
"onUpdate:modelValue": ($event) => data.postalCode = $event,
|
3456
|
-
"type": "tel",
|
3457
|
-
"rules": rules.value.postalCode,
|
3458
|
-
"label": t$h("postal"),
|
3459
|
-
"maxlength": "6",
|
3460
|
-
"placeholder": t$h("postal"),
|
3461
|
-
"onFocus": () => onFocus("postalCode")
|
3462
|
-
}, null), [[vShow, !hideBottomFields.value]]), (_a = slots.default) == null ? void 0 : _a.call(slots)]), renderSetDefaultCell(), withDirectives(createVNode("div", {
|
3463
|
+
}, null), (_a = slots.default) == null ? void 0 : _a.call(slots)]), renderSetDefaultCell(), withDirectives(createVNode("div", {
|
3463
3464
|
"class": bem$15("buttons")
|
3464
3465
|
}, [createVNode(Button, {
|
3465
3466
|
"block": true,
|
@@ -4018,6 +4019,7 @@ var stdin_default$19 = defineComponent({
|
|
4018
4019
|
slots
|
4019
4020
|
}) {
|
4020
4021
|
const style = computed(() => {
|
4022
|
+
var _a;
|
4021
4023
|
const {
|
4022
4024
|
item,
|
4023
4025
|
index,
|
@@ -4049,6 +4051,9 @@ var stdin_default$19 = defineComponent({
|
|
4049
4051
|
break;
|
4050
4052
|
}
|
4051
4053
|
}
|
4054
|
+
if (offset + (((_a = item.date) == null ? void 0 : _a.getDate()) || 1) > 28) {
|
4055
|
+
style2.marginBottom = 0;
|
4056
|
+
}
|
4052
4057
|
return style2;
|
4053
4058
|
});
|
4054
4059
|
const onClick = () => {
|
@@ -4393,6 +4398,7 @@ const calendarProps = {
|
|
4393
4398
|
showRangePrompt: truthProp,
|
4394
4399
|
confirmDisabledText: String,
|
4395
4400
|
closeOnClickOverlay: truthProp,
|
4401
|
+
safeAreaInsetTop: Boolean,
|
4396
4402
|
safeAreaInsetBottom: truthProp,
|
4397
4403
|
minDate: {
|
4398
4404
|
type: Date,
|
@@ -4555,8 +4561,8 @@ var stdin_default$16 = defineComponent({
|
|
4555
4561
|
}
|
4556
4562
|
raf(() => {
|
4557
4563
|
bodyHeight = Math.floor(useRect(bodyRef).height);
|
4558
|
-
scrollToCurrentDate();
|
4559
4564
|
});
|
4565
|
+
scrollToCurrentDate();
|
4560
4566
|
};
|
4561
4567
|
const reset = (date = getInitialDate()) => {
|
4562
4568
|
currentDate.value = date;
|
@@ -4741,6 +4747,7 @@ var stdin_default$16 = defineComponent({
|
|
4741
4747
|
"closeable": props.showTitle || props.showSubtitle,
|
4742
4748
|
"teleport": props.teleport,
|
4743
4749
|
"closeOnPopstate": props.closeOnPopstate,
|
4750
|
+
"safeAreaInsetTop": props.safeAreaInsetTop,
|
4744
4751
|
"closeOnClickOverlay": props.closeOnClickOverlay,
|
4745
4752
|
"onUpdate:show": updateShow
|
4746
4753
|
}, {
|
@@ -5699,7 +5706,7 @@ var stdin_default$$ = defineComponent({
|
|
5699
5706
|
const root = ref();
|
5700
5707
|
const navRef = ref();
|
5701
5708
|
const wrapRef = ref();
|
5702
|
-
const id = useId();
|
5709
|
+
const id = useId$1();
|
5703
5710
|
const scroller = useScrollParent(root);
|
5704
5711
|
const [titleRefs, setTitleRefs] = useRefs();
|
5705
5712
|
const {
|
@@ -5866,6 +5873,7 @@ var stdin_default$$ = defineComponent({
|
|
5866
5873
|
}
|
5867
5874
|
};
|
5868
5875
|
const renderNav = () => children.map((item, index) => createVNode(stdin_default$12, mergeProps({
|
5876
|
+
"key": item.id,
|
5869
5877
|
"id": `${id}-${index}`,
|
5870
5878
|
"ref": setTitleRefs(index),
|
5871
5879
|
"type": props.type,
|
@@ -6085,7 +6093,7 @@ var stdin_default$Z = defineComponent({
|
|
6085
6093
|
setup(props, {
|
6086
6094
|
slots
|
6087
6095
|
}) {
|
6088
|
-
const id = useId();
|
6096
|
+
const id = useId$1();
|
6089
6097
|
const inited = ref(false);
|
6090
6098
|
const {
|
6091
6099
|
parent,
|
@@ -7455,14 +7463,328 @@ var stdin_default$K = defineComponent({
|
|
7455
7463
|
}
|
7456
7464
|
});
|
7457
7465
|
const CouponCell = withInstall(stdin_default$K);
|
7458
|
-
const
|
7459
|
-
const
|
7466
|
+
const getId = (num) => `van-empty-${num}`;
|
7467
|
+
const useId = (num) => `url(#${getId(num)})`;
|
7468
|
+
const renderStop = (color, offset, opacity) => createVNode("stop", {
|
7469
|
+
"stop-color": color,
|
7470
|
+
"offset": `${offset}%`,
|
7471
|
+
"stop-opacity": opacity
|
7472
|
+
}, null);
|
7473
|
+
const renderStops = (fromColor, toColor) => [renderStop(fromColor, 0), renderStop(toColor, 100)];
|
7474
|
+
const renderShadow = (id) => [createVNode("defs", null, [createVNode("radialGradient", {
|
7475
|
+
"id": getId(id),
|
7476
|
+
"cx": "50%",
|
7477
|
+
"cy": "54%",
|
7478
|
+
"fx": "50%",
|
7479
|
+
"fy": "54%",
|
7480
|
+
"r": "297%",
|
7481
|
+
"gradientTransform": "matrix(-.16 0 0 -.33 .58 .72)"
|
7482
|
+
}, [renderStop("#EBEDF0", 0), renderStop("#F2F3F5", 100, 0.3)])]), createVNode("ellipse", {
|
7483
|
+
"fill": useId(id),
|
7484
|
+
"opacity": ".8",
|
7485
|
+
"cx": "80",
|
7486
|
+
"cy": "140",
|
7487
|
+
"rx": "46",
|
7488
|
+
"ry": "8"
|
7489
|
+
}, null)];
|
7490
|
+
const renderBuilding = () => [createVNode("defs", null, [createVNode("linearGradient", {
|
7491
|
+
"id": getId("a"),
|
7492
|
+
"x1": "64%",
|
7493
|
+
"y1": "100%",
|
7494
|
+
"x2": "64%"
|
7495
|
+
}, [renderStop("#FFF", 0, 0.5), renderStop("#F2F3F5", 100)])]), createVNode("g", {
|
7496
|
+
"opacity": ".8"
|
7497
|
+
}, [createVNode("path", {
|
7498
|
+
"d": "M36 131V53H16v20H2v58h34z",
|
7499
|
+
"fill": useId("a")
|
7500
|
+
}, null), createVNode("path", {
|
7501
|
+
"d": "M123 15h22v14h9v77h-31V15z",
|
7502
|
+
"fill": useId("a")
|
7503
|
+
}, null)])];
|
7504
|
+
const renderCloud = () => [createVNode("defs", null, [createVNode("linearGradient", {
|
7505
|
+
"id": getId("b"),
|
7506
|
+
"x1": "64%",
|
7507
|
+
"y1": "97%",
|
7508
|
+
"x2": "64%",
|
7509
|
+
"y2": "0%"
|
7510
|
+
}, [renderStop("#F2F3F5", 0, 0.3), renderStop("#F2F3F5", 100)])]), createVNode("g", {
|
7511
|
+
"opacity": ".8"
|
7512
|
+
}, [createVNode("path", {
|
7513
|
+
"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",
|
7514
|
+
"fill": useId("b")
|
7515
|
+
}, null), createVNode("path", {
|
7516
|
+
"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",
|
7517
|
+
"fill": useId("b")
|
7518
|
+
}, null)])];
|
7519
|
+
const renderNetwork = () => createVNode("svg", {
|
7520
|
+
"viewBox": "0 0 160 160"
|
7521
|
+
}, [createVNode("defs", null, [createVNode("linearGradient", {
|
7522
|
+
"id": getId(1),
|
7523
|
+
"x1": "64%",
|
7524
|
+
"y1": "100%",
|
7525
|
+
"x2": "64%"
|
7526
|
+
}, [renderStop("#FFF", 0, 0.5), renderStop("#F2F3F5", 100)]), createVNode("linearGradient", {
|
7527
|
+
"id": getId(2),
|
7528
|
+
"x1": "50%",
|
7529
|
+
"x2": "50%",
|
7530
|
+
"y2": "84%"
|
7531
|
+
}, [renderStop("#EBEDF0", 0), renderStop("#DCDEE0", 100, 0)]), createVNode("linearGradient", {
|
7532
|
+
"id": getId(3),
|
7533
|
+
"x1": "100%",
|
7534
|
+
"x2": "100%",
|
7535
|
+
"y2": "100%"
|
7536
|
+
}, [renderStops("#EAEDF0", "#DCDEE0")]), createVNode("radialGradient", {
|
7537
|
+
"id": getId(4),
|
7538
|
+
"cx": "50%",
|
7539
|
+
"cy": "0%",
|
7540
|
+
"fx": "50%",
|
7541
|
+
"fy": "0%",
|
7542
|
+
"r": "100%",
|
7543
|
+
"gradientTransform": "matrix(0 1 -.54 0 .5 -.5)"
|
7544
|
+
}, [renderStop("#EBEDF0", 0), renderStop("#FFF", 100, 0)])]), createVNode("g", {
|
7545
|
+
"fill": "none"
|
7546
|
+
}, [renderBuilding(), createVNode("path", {
|
7547
|
+
"fill": useId(4),
|
7548
|
+
"d": "M0 139h160v21H0z"
|
7549
|
+
}, null), createVNode("path", {
|
7550
|
+
"d": "M80 54a7 7 0 0 1 3 13v27l-2 2h-2a2 2 0 0 1-2-2V67a7 7 0 0 1 3-13z",
|
7551
|
+
"fill": useId(2)
|
7552
|
+
}, null), createVNode("g", {
|
7553
|
+
"opacity": ".6",
|
7554
|
+
"stroke-linecap": "round",
|
7555
|
+
"stroke-width": "7"
|
7556
|
+
}, [createVNode("path", {
|
7557
|
+
"d": "M64 47a19 19 0 0 0-5 13c0 5 2 10 5 13",
|
7558
|
+
"stroke": useId(3)
|
7559
|
+
}, null), createVNode("path", {
|
7560
|
+
"d": "M53 36a34 34 0 0 0 0 48",
|
7561
|
+
"stroke": useId(3)
|
7562
|
+
}, null), createVNode("path", {
|
7563
|
+
"d": "M95 73a19 19 0 0 0 6-13c0-5-2-9-6-13",
|
7564
|
+
"stroke": useId(3)
|
7565
|
+
}, null), createVNode("path", {
|
7566
|
+
"d": "M106 84a34 34 0 0 0 0-48",
|
7567
|
+
"stroke": useId(3)
|
7568
|
+
}, null)]), createVNode("g", {
|
7569
|
+
"transform": "translate(31 105)"
|
7570
|
+
}, [createVNode("rect", {
|
7571
|
+
"fill": "#EBEDF0",
|
7572
|
+
"width": "98",
|
7573
|
+
"height": "34",
|
7574
|
+
"rx": "2"
|
7575
|
+
}, null), createVNode("rect", {
|
7576
|
+
"fill": "#FFF",
|
7577
|
+
"x": "9",
|
7578
|
+
"y": "8",
|
7579
|
+
"width": "80",
|
7580
|
+
"height": "18",
|
7581
|
+
"rx": "1.1"
|
7582
|
+
}, null), createVNode("rect", {
|
7583
|
+
"fill": "#EBEDF0",
|
7584
|
+
"x": "15",
|
7585
|
+
"y": "12",
|
7586
|
+
"width": "18",
|
7587
|
+
"height": "6",
|
7588
|
+
"rx": "1.1"
|
7589
|
+
}, null)])])]);
|
7590
|
+
const renderMaterial = () => createVNode("svg", {
|
7591
|
+
"viewBox": "0 0 160 160"
|
7592
|
+
}, [createVNode("defs", null, [createVNode("linearGradient", {
|
7593
|
+
"x1": "50%",
|
7594
|
+
"x2": "50%",
|
7595
|
+
"y2": "100%",
|
7596
|
+
"id": getId(5)
|
7597
|
+
}, [renderStops("#F2F3F5", "#DCDEE0")]), createVNode("linearGradient", {
|
7598
|
+
"x1": "95%",
|
7599
|
+
"y1": "48%",
|
7600
|
+
"x2": "5.5%",
|
7601
|
+
"y2": "51%",
|
7602
|
+
"id": getId(6)
|
7603
|
+
}, [renderStops("#EAEDF1", "#DCDEE0")]), createVNode("linearGradient", {
|
7604
|
+
"y1": "45%",
|
7605
|
+
"x2": "100%",
|
7606
|
+
"y2": "54%",
|
7607
|
+
"id": getId(7)
|
7608
|
+
}, [renderStops("#EAEDF1", "#DCDEE0")])]), renderBuilding(), renderCloud(), createVNode("g", {
|
7609
|
+
"transform": "translate(36 50)",
|
7610
|
+
"fill": "none"
|
7611
|
+
}, [createVNode("g", {
|
7612
|
+
"transform": "translate(8)"
|
7613
|
+
}, [createVNode("rect", {
|
7614
|
+
"fill": "#EBEDF0",
|
7615
|
+
"opacity": ".6",
|
7616
|
+
"x": "38",
|
7617
|
+
"y": "13",
|
7618
|
+
"width": "36",
|
7619
|
+
"height": "53",
|
7620
|
+
"rx": "2"
|
7621
|
+
}, null), createVNode("rect", {
|
7622
|
+
"fill": useId(5),
|
7623
|
+
"width": "64",
|
7624
|
+
"height": "66",
|
7625
|
+
"rx": "2"
|
7626
|
+
}, null), createVNode("rect", {
|
7627
|
+
"fill": "#FFF",
|
7628
|
+
"x": "6",
|
7629
|
+
"y": "6",
|
7630
|
+
"width": "52",
|
7631
|
+
"height": "55",
|
7632
|
+
"rx": "1"
|
7633
|
+
}, null), createVNode("g", {
|
7634
|
+
"transform": "translate(15 17)",
|
7635
|
+
"fill": useId(6)
|
7636
|
+
}, [createVNode("rect", {
|
7637
|
+
"width": "34",
|
7638
|
+
"height": "6",
|
7639
|
+
"rx": "1"
|
7640
|
+
}, null), createVNode("path", {
|
7641
|
+
"d": "M0 14h34v6H0z"
|
7642
|
+
}, null), createVNode("rect", {
|
7643
|
+
"y": "28",
|
7644
|
+
"width": "34",
|
7645
|
+
"height": "6",
|
7646
|
+
"rx": "1"
|
7647
|
+
}, null)])]), createVNode("rect", {
|
7648
|
+
"fill": useId(7),
|
7649
|
+
"y": "61",
|
7650
|
+
"width": "88",
|
7651
|
+
"height": "28",
|
7652
|
+
"rx": "1"
|
7653
|
+
}, null), createVNode("rect", {
|
7654
|
+
"fill": "#F7F8FA",
|
7655
|
+
"x": "29",
|
7656
|
+
"y": "72",
|
7657
|
+
"width": "30",
|
7658
|
+
"height": "6",
|
7659
|
+
"rx": "1"
|
7660
|
+
}, null)])]);
|
7661
|
+
const renderError = () => createVNode("svg", {
|
7662
|
+
"viewBox": "0 0 160 160"
|
7663
|
+
}, [createVNode("defs", null, [createVNode("linearGradient", {
|
7664
|
+
"x1": "50%",
|
7665
|
+
"x2": "50%",
|
7666
|
+
"y2": "100%",
|
7667
|
+
"id": getId(8)
|
7668
|
+
}, [renderStops("#EAEDF1", "#DCDEE0")])]), renderBuilding(), renderCloud(), renderShadow("c"), createVNode("path", {
|
7669
|
+
"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",
|
7670
|
+
"fill": useId(8)
|
7671
|
+
}, null)]);
|
7672
|
+
const renderSearch = () => createVNode("svg", {
|
7673
|
+
"viewBox": "0 0 160 160"
|
7674
|
+
}, [createVNode("defs", null, [createVNode("linearGradient", {
|
7675
|
+
"x1": "50%",
|
7676
|
+
"y1": "100%",
|
7677
|
+
"x2": "50%",
|
7678
|
+
"id": getId(9)
|
7679
|
+
}, [renderStops("#EEE", "#D8D8D8")]), createVNode("linearGradient", {
|
7680
|
+
"x1": "100%",
|
7681
|
+
"y1": "50%",
|
7682
|
+
"y2": "50%",
|
7683
|
+
"id": getId(10)
|
7684
|
+
}, [renderStops("#F2F3F5", "#DCDEE0")]), createVNode("linearGradient", {
|
7685
|
+
"x1": "50%",
|
7686
|
+
"x2": "50%",
|
7687
|
+
"y2": "100%",
|
7688
|
+
"id": getId(11)
|
7689
|
+
}, [renderStops("#F2F3F5", "#DCDEE0")]), createVNode("linearGradient", {
|
7690
|
+
"x1": "50%",
|
7691
|
+
"x2": "50%",
|
7692
|
+
"y2": "100%",
|
7693
|
+
"id": getId(12)
|
7694
|
+
}, [renderStops("#FFF", "#F7F8FA")])]), renderBuilding(), renderCloud(), renderShadow("d"), createVNode("g", {
|
7695
|
+
"transform": "rotate(-45 113 -4)",
|
7696
|
+
"fill": "none"
|
7697
|
+
}, [createVNode("rect", {
|
7698
|
+
"fill": useId(9),
|
7699
|
+
"x": "24",
|
7700
|
+
"y": "52.8",
|
7701
|
+
"width": "5.8",
|
7702
|
+
"height": "19",
|
7703
|
+
"rx": "1"
|
7704
|
+
}, null), createVNode("rect", {
|
7705
|
+
"fill": useId(10),
|
7706
|
+
"x": "22.1",
|
7707
|
+
"y": "67.3",
|
7708
|
+
"width": "9.9",
|
7709
|
+
"height": "28",
|
7710
|
+
"rx": "1"
|
7711
|
+
}, null), createVNode("circle", {
|
7712
|
+
"stroke": useId(11),
|
7713
|
+
"stroke-width": "8",
|
7714
|
+
"cx": "27",
|
7715
|
+
"cy": "27",
|
7716
|
+
"r": "27"
|
7717
|
+
}, null), createVNode("circle", {
|
7718
|
+
"fill": useId(12),
|
7719
|
+
"cx": "27",
|
7720
|
+
"cy": "27",
|
7721
|
+
"r": "16"
|
7722
|
+
}, null), createVNode("path", {
|
7723
|
+
"d": "M37 7c-8 0-15 5-16 12",
|
7724
|
+
"stroke": useId(11),
|
7725
|
+
"stroke-width": "3",
|
7726
|
+
"opacity": ".5",
|
7727
|
+
"stroke-linecap": "round",
|
7728
|
+
"transform": "rotate(45 29 13)"
|
7729
|
+
}, null)])]);
|
7730
|
+
const [name$D, bem$C] = createNamespace("empty");
|
7731
|
+
const PRESET_IMAGES = {
|
7732
|
+
error: renderError,
|
7733
|
+
search: renderSearch,
|
7734
|
+
network: renderNetwork,
|
7735
|
+
default: renderMaterial
|
7736
|
+
};
|
7737
|
+
const emptyProps = {
|
7738
|
+
image: makeStringProp("default"),
|
7739
|
+
imageSize: [Number, String, Array],
|
7740
|
+
description: String
|
7741
|
+
};
|
7742
|
+
var stdin_default$J = defineComponent({
|
7743
|
+
name: name$D,
|
7744
|
+
props: emptyProps,
|
7745
|
+
setup(props, {
|
7746
|
+
slots
|
7747
|
+
}) {
|
7748
|
+
const renderImage = () => {
|
7749
|
+
var _a;
|
7750
|
+
if (slots.image) {
|
7751
|
+
return slots.image();
|
7752
|
+
}
|
7753
|
+
return ((_a = PRESET_IMAGES[props.image]) == null ? void 0 : _a.call(PRESET_IMAGES)) || createVNode("img", {
|
7754
|
+
"src": props.image
|
7755
|
+
}, null);
|
7756
|
+
};
|
7757
|
+
const renderDescription = () => {
|
7758
|
+
const description = slots.description ? slots.description() : props.description;
|
7759
|
+
if (description) {
|
7760
|
+
return createVNode("p", {
|
7761
|
+
"class": bem$C("description")
|
7762
|
+
}, [description]);
|
7763
|
+
}
|
7764
|
+
};
|
7765
|
+
const renderBottom = () => {
|
7766
|
+
if (slots.default) {
|
7767
|
+
return createVNode("div", {
|
7768
|
+
"class": bem$C("bottom")
|
7769
|
+
}, [slots.default()]);
|
7770
|
+
}
|
7771
|
+
};
|
7772
|
+
return () => createVNode("div", {
|
7773
|
+
"class": bem$C()
|
7774
|
+
}, [createVNode("div", {
|
7775
|
+
"class": bem$C("image"),
|
7776
|
+
"style": getSizeStyle(props.imageSize)
|
7777
|
+
}, [renderImage()]), renderDescription(), renderBottom()]);
|
7778
|
+
}
|
7779
|
+
});
|
7780
|
+
const Empty = withInstall(stdin_default$J);
|
7781
|
+
const [name$C, bem$B, t$8] = createNamespace("coupon-list");
|
7460
7782
|
const couponListProps = {
|
7461
7783
|
code: makeStringProp(""),
|
7462
7784
|
coupons: makeArrayProp(),
|
7463
7785
|
currency: makeStringProp("\xA5"),
|
7464
7786
|
showCount: truthProp,
|
7465
|
-
emptyImage:
|
7787
|
+
emptyImage: String,
|
7466
7788
|
chosenCoupon: makeNumberProp(-1),
|
7467
7789
|
enabledTitle: String,
|
7468
7790
|
disabledTitle: String,
|
@@ -7477,8 +7799,8 @@ const couponListProps = {
|
|
7477
7799
|
exchangeButtonLoading: Boolean,
|
7478
7800
|
exchangeButtonDisabled: Boolean
|
7479
7801
|
};
|
7480
|
-
var stdin_default$
|
7481
|
-
name: name$
|
7802
|
+
var stdin_default$I = defineComponent({
|
7803
|
+
name: name$C,
|
7482
7804
|
props: couponListProps,
|
7483
7805
|
emits: ["change", "exchange", "update:code"],
|
7484
7806
|
setup(props, {
|
@@ -7510,28 +7832,30 @@ var stdin_default$J = defineComponent({
|
|
7510
7832
|
return (_a = couponRefs.value[index]) == null ? void 0 : _a.scrollIntoView();
|
7511
7833
|
});
|
7512
7834
|
};
|
7513
|
-
const renderEmpty = () => createVNode(
|
7514
|
-
"
|
7515
|
-
},
|
7516
|
-
"
|
7517
|
-
|
7835
|
+
const renderEmpty = () => createVNode(Empty, {
|
7836
|
+
"image": props.emptyImage
|
7837
|
+
}, {
|
7838
|
+
default: () => [createVNode("p", {
|
7839
|
+
"class": bem$B("empty-tip")
|
7840
|
+
}, [t$8("noCoupon")])]
|
7841
|
+
});
|
7518
7842
|
const renderExchangeBar = () => {
|
7519
7843
|
if (props.showExchangeBar) {
|
7520
7844
|
return createVNode("div", {
|
7521
7845
|
"ref": barRef,
|
7522
|
-
"class": bem$
|
7846
|
+
"class": bem$B("exchange-bar")
|
7523
7847
|
}, [createVNode(Field, {
|
7524
7848
|
"modelValue": currentCode.value,
|
7525
7849
|
"onUpdate:modelValue": ($event) => currentCode.value = $event,
|
7526
7850
|
"clearable": true,
|
7527
7851
|
"border": false,
|
7528
|
-
"class": bem$
|
7852
|
+
"class": bem$B("field"),
|
7529
7853
|
"placeholder": props.inputPlaceholder || t$8("placeholder"),
|
7530
7854
|
"maxlength": "20"
|
7531
7855
|
}, null), createVNode(Button, {
|
7532
7856
|
"plain": true,
|
7533
7857
|
"type": "primary",
|
7534
|
-
"class": bem$
|
7858
|
+
"class": bem$B("exchange"),
|
7535
7859
|
"text": props.exchangeButtonText || t$8("exchange"),
|
7536
7860
|
"loading": props.exchangeButtonLoading,
|
7537
7861
|
"disabled": buttonDisabled.value,
|
@@ -7551,7 +7875,7 @@ var stdin_default$J = defineComponent({
|
|
7551
7875
|
default: () => {
|
7552
7876
|
var _a;
|
7553
7877
|
return [createVNode("div", {
|
7554
|
-
"class": bem$
|
7878
|
+
"class": bem$B("list", {
|
7555
7879
|
"with-bottom": props.showCloseButton
|
7556
7880
|
}),
|
7557
7881
|
"style": {
|
@@ -7580,7 +7904,7 @@ var stdin_default$J = defineComponent({
|
|
7580
7904
|
default: () => {
|
7581
7905
|
var _a;
|
7582
7906
|
return [createVNode("div", {
|
7583
|
-
"class": bem$
|
7907
|
+
"class": bem$B("list", {
|
7584
7908
|
"with-bottom": props.showCloseButton
|
7585
7909
|
}),
|
7586
7910
|
"style": {
|
@@ -7607,28 +7931,28 @@ var stdin_default$J = defineComponent({
|
|
7607
7931
|
});
|
7608
7932
|
return () => createVNode("div", {
|
7609
7933
|
"ref": root,
|
7610
|
-
"class": bem$
|
7934
|
+
"class": bem$B()
|
7611
7935
|
}, [renderExchangeBar(), createVNode(Tabs, {
|
7612
7936
|
"active": activeTab.value,
|
7613
7937
|
"onUpdate:active": ($event) => activeTab.value = $event,
|
7614
|
-
"class": bem$
|
7938
|
+
"class": bem$B("tab")
|
7615
7939
|
}, {
|
7616
7940
|
default: () => [renderCouponTab(), renderDisabledTab()]
|
7617
7941
|
}), createVNode("div", {
|
7618
|
-
"class": bem$
|
7942
|
+
"class": bem$B("bottom")
|
7619
7943
|
}, [withDirectives(createVNode(Button, {
|
7620
7944
|
"round": true,
|
7621
7945
|
"block": true,
|
7622
7946
|
"type": "primary",
|
7623
|
-
"class": bem$
|
7947
|
+
"class": bem$B("close"),
|
7624
7948
|
"text": props.closeButtonText || t$8("close"),
|
7625
7949
|
"onClick": () => emit("change", -1)
|
7626
7950
|
}, null), [[vShow, props.showCloseButton]])])]);
|
7627
7951
|
}
|
7628
7952
|
});
|
7629
|
-
const CouponList = withInstall(stdin_default$
|
7953
|
+
const CouponList = withInstall(stdin_default$I);
|
7630
7954
|
const currentYear = new Date().getFullYear();
|
7631
|
-
const [name$
|
7955
|
+
const [name$B] = createNamespace("date-picker");
|
7632
7956
|
const datePickerProps = extend({}, sharedProps, {
|
7633
7957
|
columnsType: {
|
7634
7958
|
type: Array,
|
@@ -7645,8 +7969,8 @@ const datePickerProps = extend({}, sharedProps, {
|
|
7645
7969
|
validator: isDate
|
7646
7970
|
}
|
7647
7971
|
});
|
7648
|
-
var stdin_default$
|
7649
|
-
name: name$
|
7972
|
+
var stdin_default$H = defineComponent({
|
7973
|
+
name: name$B,
|
7650
7974
|
props: datePickerProps,
|
7651
7975
|
emits: ["confirm", "cancel", "change", "update:modelValue"],
|
7652
7976
|
setup(props, {
|
@@ -7713,7 +8037,7 @@ var stdin_default$I = defineComponent({
|
|
7713
8037
|
}
|
7714
8038
|
});
|
7715
8039
|
watch(() => props.modelValue, (newValues) => {
|
7716
|
-
if (isSameValue(newValues, currentValues.value)) {
|
8040
|
+
if (!isSameValue(newValues, currentValues.value)) {
|
7717
8041
|
currentValues.value = newValues;
|
7718
8042
|
}
|
7719
8043
|
});
|
@@ -7730,8 +8054,8 @@ var stdin_default$I = defineComponent({
|
|
7730
8054
|
}, pick(props, pickerInheritKeys)), slots);
|
7731
8055
|
}
|
7732
8056
|
});
|
7733
|
-
const DatePicker = withInstall(stdin_default$
|
7734
|
-
const [name$
|
8057
|
+
const DatePicker = withInstall(stdin_default$H);
|
8058
|
+
const [name$A, bem$A, t$7] = createNamespace("dialog");
|
7735
8059
|
const dialogProps = extend({}, popupSharedProps, {
|
7736
8060
|
title: String,
|
7737
8061
|
theme: String,
|
@@ -7752,8 +8076,8 @@ const dialogProps = extend({}, popupSharedProps, {
|
|
7752
8076
|
closeOnClickOverlay: Boolean
|
7753
8077
|
});
|
7754
8078
|
const popupInheritKeys$1 = [...popupSharedPropKeys, "transition", "closeOnPopstate"];
|
7755
|
-
var stdin_default$
|
7756
|
-
name: name$
|
8079
|
+
var stdin_default$G = defineComponent({
|
8080
|
+
name: name$A,
|
7757
8081
|
props: dialogProps,
|
7758
8082
|
emits: ["confirm", "cancel", "keydown", "update:show"],
|
7759
8083
|
setup(props, {
|
@@ -7810,7 +8134,7 @@ var stdin_default$H = defineComponent({
|
|
7810
8134
|
const title = slots.title ? slots.title() : props.title;
|
7811
8135
|
if (title) {
|
7812
8136
|
return createVNode("div", {
|
7813
|
-
"class": bem$
|
8137
|
+
"class": bem$A("header", {
|
7814
8138
|
isolated: !props.message && !slots.default
|
7815
8139
|
})
|
7816
8140
|
}, [title]);
|
@@ -7822,7 +8146,7 @@ var stdin_default$H = defineComponent({
|
|
7822
8146
|
allowHtml,
|
7823
8147
|
messageAlign
|
7824
8148
|
} = props;
|
7825
|
-
const classNames = bem$
|
8149
|
+
const classNames = bem$A("message", {
|
7826
8150
|
"has-title": hasTitle,
|
7827
8151
|
[messageAlign]: messageAlign
|
7828
8152
|
});
|
@@ -7840,7 +8164,7 @@ var stdin_default$H = defineComponent({
|
|
7840
8164
|
const renderContent = () => {
|
7841
8165
|
if (slots.default) {
|
7842
8166
|
return createVNode("div", {
|
7843
|
-
"class": bem$
|
8167
|
+
"class": bem$A("content")
|
7844
8168
|
}, [slots.default()]);
|
7845
8169
|
}
|
7846
8170
|
const {
|
@@ -7852,18 +8176,18 @@ var stdin_default$H = defineComponent({
|
|
7852
8176
|
const hasTitle = !!(title || slots.title);
|
7853
8177
|
return createVNode("div", {
|
7854
8178
|
"key": allowHtml ? 1 : 0,
|
7855
|
-
"class": bem$
|
8179
|
+
"class": bem$A("content", {
|
7856
8180
|
isolated: !hasTitle
|
7857
8181
|
})
|
7858
8182
|
}, [renderMessage(hasTitle)]);
|
7859
8183
|
}
|
7860
8184
|
};
|
7861
8185
|
const renderButtons = () => createVNode("div", {
|
7862
|
-
"class": [BORDER_TOP, bem$
|
8186
|
+
"class": [BORDER_TOP, bem$A("footer")]
|
7863
8187
|
}, [props.showCancelButton && createVNode(Button, {
|
7864
8188
|
"size": "large",
|
7865
8189
|
"text": props.cancelButtonText || t$7("cancel"),
|
7866
|
-
"class": bem$
|
8190
|
+
"class": bem$A("cancel"),
|
7867
8191
|
"style": {
|
7868
8192
|
color: props.cancelButtonColor
|
7869
8193
|
},
|
@@ -7872,7 +8196,7 @@ var stdin_default$H = defineComponent({
|
|
7872
8196
|
}, null), props.showConfirmButton && createVNode(Button, {
|
7873
8197
|
"size": "large",
|
7874
8198
|
"text": props.confirmButtonText || t$7("confirm"),
|
7875
|
-
"class": [bem$
|
8199
|
+
"class": [bem$A("confirm"), {
|
7876
8200
|
[BORDER_LEFT]: props.showCancelButton
|
7877
8201
|
}],
|
7878
8202
|
"style": {
|
@@ -7882,19 +8206,19 @@ var stdin_default$H = defineComponent({
|
|
7882
8206
|
"onClick": onConfirm
|
7883
8207
|
}, null)]);
|
7884
8208
|
const renderRoundButtons = () => createVNode(ActionBar, {
|
7885
|
-
"class": bem$
|
8209
|
+
"class": bem$A("footer")
|
7886
8210
|
}, {
|
7887
8211
|
default: () => [props.showCancelButton && createVNode(ActionBarButton, {
|
7888
8212
|
"type": "warning",
|
7889
8213
|
"text": props.cancelButtonText || t$7("cancel"),
|
7890
|
-
"class": bem$
|
8214
|
+
"class": bem$A("cancel"),
|
7891
8215
|
"color": props.cancelButtonColor,
|
7892
8216
|
"loading": loading.cancel,
|
7893
8217
|
"onClick": onCancel
|
7894
8218
|
}, null), props.showConfirmButton && createVNode(ActionBarButton, {
|
7895
8219
|
"type": "danger",
|
7896
8220
|
"text": props.confirmButtonText || t$7("confirm"),
|
7897
|
-
"class": bem$
|
8221
|
+
"class": bem$A("confirm"),
|
7898
8222
|
"color": props.confirmButtonColor,
|
7899
8223
|
"loading": loading.confirm,
|
7900
8224
|
"onClick": onConfirm
|
@@ -7917,7 +8241,7 @@ var stdin_default$H = defineComponent({
|
|
7917
8241
|
return createVNode(Popup, mergeProps({
|
7918
8242
|
"ref": root,
|
7919
8243
|
"role": "dialog",
|
7920
|
-
"class": [bem$
|
8244
|
+
"class": [bem$A([theme]), className],
|
7921
8245
|
"style": {
|
7922
8246
|
width: addUnit(width)
|
7923
8247
|
},
|
@@ -7939,7 +8263,7 @@ function initInstance$2() {
|
|
7939
8263
|
state,
|
7940
8264
|
toggle
|
7941
8265
|
} = usePopupState();
|
7942
|
-
return () => createVNode(stdin_default$
|
8266
|
+
return () => createVNode(stdin_default$G, mergeProps(state, {
|
7943
8267
|
"onUpdate:show": toggle
|
7944
8268
|
}), null);
|
7945
8269
|
}
|
@@ -8004,19 +8328,19 @@ Dialog.setDefaultOptions = (options) => {
|
|
8004
8328
|
Dialog.resetDefaultOptions = () => {
|
8005
8329
|
Dialog.currentOptions = extend({}, Dialog.defaultOptions);
|
8006
8330
|
};
|
8007
|
-
Dialog.Component = withInstall(stdin_default$
|
8331
|
+
Dialog.Component = withInstall(stdin_default$G);
|
8008
8332
|
Dialog.install = (app) => {
|
8009
8333
|
app.use(Dialog.Component);
|
8010
8334
|
app.config.globalProperties.$dialog = Dialog;
|
8011
8335
|
};
|
8012
|
-
const [name$
|
8336
|
+
const [name$z, bem$z] = createNamespace("divider");
|
8013
8337
|
const dividerProps = {
|
8014
8338
|
dashed: Boolean,
|
8015
8339
|
hairline: truthProp,
|
8016
8340
|
contentPosition: makeStringProp("center")
|
8017
8341
|
};
|
8018
|
-
var stdin_default$
|
8019
|
-
name: name$
|
8342
|
+
var stdin_default$F = defineComponent({
|
8343
|
+
name: name$z,
|
8020
8344
|
props: dividerProps,
|
8021
8345
|
setup(props, {
|
8022
8346
|
slots
|
@@ -8025,7 +8349,7 @@ var stdin_default$G = defineComponent({
|
|
8025
8349
|
var _a;
|
8026
8350
|
return createVNode("div", {
|
8027
8351
|
"role": "separator",
|
8028
|
-
"class": bem$
|
8352
|
+
"class": bem$z({
|
8029
8353
|
dashed: props.dashed,
|
8030
8354
|
hairline: props.hairline,
|
8031
8355
|
[`content-${props.contentPosition}`]: !!slots.default
|
@@ -8034,8 +8358,8 @@ var stdin_default$G = defineComponent({
|
|
8034
8358
|
};
|
8035
8359
|
}
|
8036
8360
|
});
|
8037
|
-
const Divider = withInstall(stdin_default$
|
8038
|
-
const [name$
|
8361
|
+
const Divider = withInstall(stdin_default$F);
|
8362
|
+
const [name$y, bem$y] = createNamespace("dropdown-menu");
|
8039
8363
|
const dropdownMenuProps = {
|
8040
8364
|
overlay: truthProp,
|
8041
8365
|
zIndex: numericProp,
|
@@ -8045,14 +8369,14 @@ const dropdownMenuProps = {
|
|
8045
8369
|
closeOnClickOutside: truthProp,
|
8046
8370
|
closeOnClickOverlay: truthProp
|
8047
8371
|
};
|
8048
|
-
const DROPDOWN_KEY = Symbol(name$
|
8049
|
-
var stdin_default$
|
8050
|
-
name: name$
|
8372
|
+
const DROPDOWN_KEY = Symbol(name$y);
|
8373
|
+
var stdin_default$E = defineComponent({
|
8374
|
+
name: name$y,
|
8051
8375
|
props: dropdownMenuProps,
|
8052
8376
|
setup(props, {
|
8053
8377
|
slots
|
8054
8378
|
}) {
|
8055
|
-
const id = useId();
|
8379
|
+
const id = useId$1();
|
8056
8380
|
const root = ref();
|
8057
8381
|
const barRef = ref();
|
8058
8382
|
const offset = ref(0);
|
@@ -8115,7 +8439,7 @@ var stdin_default$F = defineComponent({
|
|
8115
8439
|
"id": `${id}-${index}`,
|
8116
8440
|
"role": "button",
|
8117
8441
|
"tabindex": disabled ? void 0 : 0,
|
8118
|
-
"class": [bem$
|
8442
|
+
"class": [bem$y("item", {
|
8119
8443
|
disabled
|
8120
8444
|
}), {
|
8121
8445
|
[HAPTICS_FEEDBACK]: !disabled
|
@@ -8126,7 +8450,7 @@ var stdin_default$F = defineComponent({
|
|
8126
8450
|
}
|
8127
8451
|
}
|
8128
8452
|
}, [createVNode("span", {
|
8129
|
-
"class": [bem$
|
8453
|
+
"class": [bem$y("title", {
|
8130
8454
|
down: showPopup === (props.direction === "down"),
|
8131
8455
|
active: showPopup
|
8132
8456
|
}), titleClass],
|
@@ -8150,18 +8474,18 @@ var stdin_default$F = defineComponent({
|
|
8150
8474
|
var _a;
|
8151
8475
|
return createVNode("div", {
|
8152
8476
|
"ref": root,
|
8153
|
-
"class": bem$
|
8477
|
+
"class": bem$y()
|
8154
8478
|
}, [createVNode("div", {
|
8155
8479
|
"ref": barRef,
|
8156
8480
|
"style": barStyle.value,
|
8157
|
-
"class": bem$
|
8481
|
+
"class": bem$y("bar", {
|
8158
8482
|
opened: opened.value
|
8159
8483
|
})
|
8160
8484
|
}, [children.map(renderTitle)]), (_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
8161
8485
|
};
|
8162
8486
|
}
|
8163
8487
|
});
|
8164
|
-
const [name$
|
8488
|
+
const [name$x, bem$x] = createNamespace("dropdown-item");
|
8165
8489
|
const dropdownItemProps = {
|
8166
8490
|
title: String,
|
8167
8491
|
options: makeArrayProp(),
|
@@ -8171,8 +8495,8 @@ const dropdownItemProps = {
|
|
8171
8495
|
modelValue: unknownProp,
|
8172
8496
|
titleClass: unknownProp
|
8173
8497
|
};
|
8174
|
-
var stdin_default$
|
8175
|
-
name: name$
|
8498
|
+
var stdin_default$D = defineComponent({
|
8499
|
+
name: name$x,
|
8176
8500
|
props: dropdownItemProps,
|
8177
8501
|
emits: ["open", "opened", "close", "closed", "change", "update:modelValue"],
|
8178
8502
|
setup(props, {
|
@@ -8239,7 +8563,7 @@ var stdin_default$E = defineComponent({
|
|
8239
8563
|
const renderIcon = () => {
|
8240
8564
|
if (active) {
|
8241
8565
|
return createVNode(Icon, {
|
8242
|
-
"class": bem$
|
8566
|
+
"class": bem$x("icon"),
|
8243
8567
|
"color": activeColor,
|
8244
8568
|
"name": "success"
|
8245
8569
|
}, null);
|
@@ -8250,7 +8574,7 @@ var stdin_default$E = defineComponent({
|
|
8250
8574
|
"key": option.value,
|
8251
8575
|
"icon": option.icon,
|
8252
8576
|
"title": option.text,
|
8253
|
-
"class": bem$
|
8577
|
+
"class": bem$x("option", {
|
8254
8578
|
active
|
8255
8579
|
}),
|
8256
8580
|
"style": {
|
@@ -8282,13 +8606,13 @@ var stdin_default$E = defineComponent({
|
|
8282
8606
|
}
|
8283
8607
|
return withDirectives(createVNode("div", {
|
8284
8608
|
"style": style,
|
8285
|
-
"class": bem$
|
8609
|
+
"class": bem$x([direction]),
|
8286
8610
|
"onClick": onClickWrapper
|
8287
8611
|
}, [createVNode(Popup, {
|
8288
8612
|
"show": state.showPopup,
|
8289
8613
|
"onUpdate:show": ($event) => state.showPopup = $event,
|
8290
8614
|
"role": "menu",
|
8291
|
-
"class": bem$
|
8615
|
+
"class": bem$x("content"),
|
8292
8616
|
"overlay": overlay,
|
8293
8617
|
"position": direction === "down" ? "top" : "bottom",
|
8294
8618
|
"duration": state.transition ? duration : 0,
|
@@ -8326,147 +8650,8 @@ var stdin_default$E = defineComponent({
|
|
8326
8650
|
};
|
8327
8651
|
}
|
8328
8652
|
});
|
8329
|
-
const DropdownItem = withInstall(stdin_default$
|
8330
|
-
const DropdownMenu = withInstall(stdin_default$
|
8331
|
-
const prefix = "van-empty-network-";
|
8332
|
-
const renderStop = (color, offset, opacity) => createVNode("stop", {
|
8333
|
-
"stop-color": color,
|
8334
|
-
"offset": `${offset}%`,
|
8335
|
-
"stop-opacity": opacity
|
8336
|
-
}, null);
|
8337
|
-
const Network = createVNode("svg", {
|
8338
|
-
"viewBox": "0 0 160 160"
|
8339
|
-
}, [createVNode("defs", null, [createVNode("linearGradient", {
|
8340
|
-
"id": `${prefix}1`,
|
8341
|
-
"x1": "64%",
|
8342
|
-
"y1": "100%",
|
8343
|
-
"x2": "64%"
|
8344
|
-
}, [renderStop("#FFF", 0, 0.5), renderStop("#F2F3F5", 100)]), createVNode("linearGradient", {
|
8345
|
-
"id": `${prefix}2`,
|
8346
|
-
"x1": "50%",
|
8347
|
-
"x2": "50%",
|
8348
|
-
"y2": "84%"
|
8349
|
-
}, [renderStop("#EBEDF0", 0), renderStop("#DCDEE0", 100, 0)]), createVNode("linearGradient", {
|
8350
|
-
"id": `${prefix}3`,
|
8351
|
-
"x1": "100%",
|
8352
|
-
"x2": "100%",
|
8353
|
-
"y2": "100%"
|
8354
|
-
}, [renderStop("#EAEDF0", 0), renderStop("#DCDEE0", 100)]), createVNode("radialGradient", {
|
8355
|
-
"id": `${prefix}4`,
|
8356
|
-
"cx": "50%",
|
8357
|
-
"cy": "0%",
|
8358
|
-
"fx": "50%",
|
8359
|
-
"fy": "0%",
|
8360
|
-
"r": "100%",
|
8361
|
-
"gradientTransform": "matrix(0 1 -.54 0 .5 -.5)"
|
8362
|
-
}, [renderStop("#EBEDF0", 0), renderStop("#FFF", 100, 0)])]), createVNode("g", {
|
8363
|
-
"fill": "none"
|
8364
|
-
}, [createVNode("g", {
|
8365
|
-
"opacity": ".8"
|
8366
|
-
}, [createVNode("path", {
|
8367
|
-
"d": "M36 131V53H16v20H2v58h34z",
|
8368
|
-
"fill": `url(#${prefix}1)`
|
8369
|
-
}, null), createVNode("path", {
|
8370
|
-
"d": "M123 15h22v14h9v77h-31V15z",
|
8371
|
-
"fill": `url(#${prefix}1)`
|
8372
|
-
}, null)]), createVNode("path", {
|
8373
|
-
"fill": `url(#${prefix}4)`,
|
8374
|
-
"d": "M0 139h160v21H0z"
|
8375
|
-
}, null), createVNode("path", {
|
8376
|
-
"d": "M80 54a7 7 0 0 1 3 13v27l-2 2h-2a2 2 0 0 1-2-2V67a7 7 0 0 1 3-13z",
|
8377
|
-
"fill": `url(#${prefix}2)`
|
8378
|
-
}, null), createVNode("g", {
|
8379
|
-
"opacity": ".6",
|
8380
|
-
"stroke-linecap": "round",
|
8381
|
-
"stroke-width": "7"
|
8382
|
-
}, [createVNode("path", {
|
8383
|
-
"d": "M64 47a19 19 0 0 0-5 13c0 5 2 10 5 13",
|
8384
|
-
"stroke": `url(#${prefix}3)`
|
8385
|
-
}, null), createVNode("path", {
|
8386
|
-
"d": "M53 36a34 34 0 0 0 0 48",
|
8387
|
-
"stroke": `url(#${prefix}3)`
|
8388
|
-
}, null), createVNode("path", {
|
8389
|
-
"d": "M95 73a19 19 0 0 0 6-13c0-5-2-9-6-13",
|
8390
|
-
"stroke": `url(#${prefix}3)`
|
8391
|
-
}, null), createVNode("path", {
|
8392
|
-
"d": "M106 84a34 34 0 0 0 0-48",
|
8393
|
-
"stroke": `url(#${prefix}3)`
|
8394
|
-
}, null)]), createVNode("g", {
|
8395
|
-
"transform": "translate(31 105)"
|
8396
|
-
}, [createVNode("rect", {
|
8397
|
-
"fill": "#EBEDF0",
|
8398
|
-
"width": "98",
|
8399
|
-
"height": "34",
|
8400
|
-
"rx": "2"
|
8401
|
-
}, null), createVNode("rect", {
|
8402
|
-
"fill": "#FFF",
|
8403
|
-
"x": "9",
|
8404
|
-
"y": "8",
|
8405
|
-
"width": "80",
|
8406
|
-
"height": "18",
|
8407
|
-
"rx": "1.1"
|
8408
|
-
}, null), createVNode("rect", {
|
8409
|
-
"fill": "#EBEDF0",
|
8410
|
-
"x": "15",
|
8411
|
-
"y": "12",
|
8412
|
-
"width": "18",
|
8413
|
-
"height": "6",
|
8414
|
-
"rx": "1.1"
|
8415
|
-
}, null)])])]);
|
8416
|
-
const [name$x, bem$x] = createNamespace("empty");
|
8417
|
-
const PRESET_IMAGES = ["error", "search", "default"];
|
8418
|
-
const emptyProps = {
|
8419
|
-
image: makeStringProp("default"),
|
8420
|
-
imageSize: numericProp,
|
8421
|
-
description: String
|
8422
|
-
};
|
8423
|
-
var stdin_default$D = defineComponent({
|
8424
|
-
name: name$x,
|
8425
|
-
props: emptyProps,
|
8426
|
-
setup(props, {
|
8427
|
-
slots
|
8428
|
-
}) {
|
8429
|
-
const renderImage = () => {
|
8430
|
-
if (slots.image) {
|
8431
|
-
return slots.image();
|
8432
|
-
}
|
8433
|
-
let {
|
8434
|
-
image
|
8435
|
-
} = props;
|
8436
|
-
if (image === "network") {
|
8437
|
-
return Network;
|
8438
|
-
}
|
8439
|
-
if (PRESET_IMAGES.includes(image)) {
|
8440
|
-
image = `https://img.yzcdn.cn/vant/empty-image-${image}.png`;
|
8441
|
-
}
|
8442
|
-
return createVNode("img", {
|
8443
|
-
"src": image
|
8444
|
-
}, null);
|
8445
|
-
};
|
8446
|
-
const renderDescription = () => {
|
8447
|
-
const description = slots.description ? slots.description() : props.description;
|
8448
|
-
if (description) {
|
8449
|
-
return createVNode("p", {
|
8450
|
-
"class": bem$x("description")
|
8451
|
-
}, [description]);
|
8452
|
-
}
|
8453
|
-
};
|
8454
|
-
const renderBottom = () => {
|
8455
|
-
if (slots.default) {
|
8456
|
-
return createVNode("div", {
|
8457
|
-
"class": bem$x("bottom")
|
8458
|
-
}, [slots.default()]);
|
8459
|
-
}
|
8460
|
-
};
|
8461
|
-
return () => createVNode("div", {
|
8462
|
-
"class": bem$x()
|
8463
|
-
}, [createVNode("div", {
|
8464
|
-
"class": bem$x("image"),
|
8465
|
-
"style": getSizeStyle(props.imageSize)
|
8466
|
-
}, [renderImage()]), renderDescription(), renderBottom()]);
|
8467
|
-
}
|
8468
|
-
});
|
8469
|
-
const Empty = withInstall(stdin_default$D);
|
8653
|
+
const DropdownItem = withInstall(stdin_default$D);
|
8654
|
+
const DropdownMenu = withInstall(stdin_default$E);
|
8470
8655
|
const [name$w, bem$w] = createNamespace("grid");
|
8471
8656
|
const gridProps = {
|
8472
8657
|
square: Boolean,
|
@@ -9120,6 +9305,7 @@ var stdin_default$y = defineComponent({
|
|
9120
9305
|
children,
|
9121
9306
|
linkChildren
|
9122
9307
|
} = useChildren(INDEX_BAR_KEY);
|
9308
|
+
let selectActiveIndex;
|
9123
9309
|
linkChildren({
|
9124
9310
|
props
|
9125
9311
|
});
|
@@ -9147,6 +9333,7 @@ var stdin_default$y = defineComponent({
|
|
9147
9333
|
}
|
9148
9334
|
return -1;
|
9149
9335
|
};
|
9336
|
+
const getMatchAnchor = (index) => children.find((item) => String(item.index) === index);
|
9150
9337
|
const onScroll = () => {
|
9151
9338
|
if (isHidden(root)) {
|
9152
9339
|
return;
|
@@ -9158,7 +9345,16 @@ var stdin_default$y = defineComponent({
|
|
9158
9345
|
const scrollTop = getScrollTop(scrollParent.value);
|
9159
9346
|
const scrollParentRect = useRect(scrollParent);
|
9160
9347
|
const rects = children.map((item) => item.getRect(scrollParent.value, scrollParentRect));
|
9161
|
-
|
9348
|
+
let active = -1;
|
9349
|
+
if (selectActiveIndex) {
|
9350
|
+
const match = getMatchAnchor(selectActiveIndex);
|
9351
|
+
if (match) {
|
9352
|
+
const rect = match.getRect(scrollParent.value, scrollParentRect);
|
9353
|
+
active = getActiveAnchor(rect.top, rects);
|
9354
|
+
}
|
9355
|
+
} else {
|
9356
|
+
active = getActiveAnchor(scrollTop, rects);
|
9357
|
+
}
|
9162
9358
|
activeAnchor.value = indexList[active];
|
9163
9359
|
if (sticky) {
|
9164
9360
|
children.forEach((item, index) => {
|
@@ -9177,7 +9373,7 @@ var stdin_default$y = defineComponent({
|
|
9177
9373
|
if (index === active) {
|
9178
9374
|
state.active = true;
|
9179
9375
|
state.top = Math.max(props.stickyOffsetTop, rects[index].top - scrollTop) + scrollParentRect.top;
|
9180
|
-
} else if (index === active - 1) {
|
9376
|
+
} else if (index === active - 1 && selectActiveIndex === "") {
|
9181
9377
|
const activeItemTop = rects[active].top - scrollTop;
|
9182
9378
|
state.active = activeItemTop > 0;
|
9183
9379
|
state.top = activeItemTop + scrollParentRect.top - rects[index].height;
|
@@ -9186,6 +9382,7 @@ var stdin_default$y = defineComponent({
|
|
9186
9382
|
}
|
9187
9383
|
});
|
9188
9384
|
}
|
9385
|
+
selectActiveIndex = "";
|
9189
9386
|
};
|
9190
9387
|
const init = () => {
|
9191
9388
|
nextTick(onScroll);
|
@@ -9211,9 +9408,18 @@ var stdin_default$y = defineComponent({
|
|
9211
9408
|
}, [index]);
|
9212
9409
|
});
|
9213
9410
|
const scrollTo = (index) => {
|
9214
|
-
|
9215
|
-
const match =
|
9411
|
+
selectActiveIndex = String(index);
|
9412
|
+
const match = getMatchAnchor(selectActiveIndex);
|
9216
9413
|
if (match) {
|
9414
|
+
const scrollTop = getScrollTop(scrollParent.value);
|
9415
|
+
const scrollParentRect = useRect(scrollParent);
|
9416
|
+
const {
|
9417
|
+
offsetHeight
|
9418
|
+
} = document.documentElement;
|
9419
|
+
if (scrollTop === offsetHeight - scrollParentRect.height) {
|
9420
|
+
onScroll();
|
9421
|
+
return;
|
9422
|
+
}
|
9217
9423
|
match.$el.scrollIntoView();
|
9218
9424
|
if (props.sticky && props.stickyOffsetTop) {
|
9219
9425
|
setRootScrollTop(getRootScrollTop() - props.stickyOffsetTop);
|
@@ -9547,10 +9753,10 @@ var stdin_default$v = defineComponent({
|
|
9547
9753
|
"ref": navBarRef,
|
9548
9754
|
"style": style,
|
9549
9755
|
"class": [bem$p({
|
9550
|
-
fixed
|
9551
|
-
"safe-area-inset-top": props.safeAreaInsetTop
|
9756
|
+
fixed
|
9552
9757
|
}), {
|
9553
|
-
[BORDER_BOTTOM]: border
|
9758
|
+
[BORDER_BOTTOM]: border,
|
9759
|
+
"van-safe-area-top": props.safeAreaInsetTop
|
9554
9760
|
}]
|
9555
9761
|
}, [createVNode("div", {
|
9556
9762
|
"class": bem$p("content")
|
@@ -9939,6 +10145,15 @@ const numberKeyboardProps = {
|
|
9939
10145
|
default: ""
|
9940
10146
|
}
|
9941
10147
|
};
|
10148
|
+
function shuffle(array) {
|
10149
|
+
for (let i = array.length - 1; i > 0; i--) {
|
10150
|
+
const j = Math.floor(Math.random() * (i + 1));
|
10151
|
+
const temp = array[i];
|
10152
|
+
array[i] = array[j];
|
10153
|
+
array[j] = temp;
|
10154
|
+
}
|
10155
|
+
return array;
|
10156
|
+
}
|
9942
10157
|
var stdin_default$r = defineComponent({
|
9943
10158
|
name: name$m,
|
9944
10159
|
props: numberKeyboardProps,
|
@@ -9953,7 +10168,7 @@ var stdin_default$r = defineComponent({
|
|
9953
10168
|
text: i + 1
|
9954
10169
|
}));
|
9955
10170
|
if (props.randomKeyOrder) {
|
9956
|
-
keys2
|
10171
|
+
shuffle(keys2);
|
9957
10172
|
}
|
9958
10173
|
return keys2;
|
9959
10174
|
};
|
@@ -10808,33 +11023,53 @@ var stdin_default$l = defineComponent({
|
|
10808
11023
|
}) {
|
10809
11024
|
const touch = useTouch();
|
10810
11025
|
const [itemRefs, setItemRefs] = useRefs();
|
11026
|
+
const groupRef = ref();
|
10811
11027
|
const untouchable = () => props.readonly || props.disabled || !props.touchable;
|
10812
11028
|
const list = computed(() => Array(+props.count).fill("").map((_, i) => getRateStatus(props.modelValue, i + 1, props.allowHalf, props.readonly)));
|
10813
11029
|
let ranges;
|
11030
|
+
let groupRefRect;
|
11031
|
+
let minRectTop = Number.MAX_SAFE_INTEGER;
|
11032
|
+
let maxRectTop = Number.MIN_SAFE_INTEGER;
|
10814
11033
|
const updateRanges = () => {
|
11034
|
+
groupRefRect = useRect(groupRef);
|
10815
11035
|
const rects = itemRefs.value.map(useRect);
|
10816
11036
|
ranges = [];
|
10817
11037
|
rects.forEach((rect, index) => {
|
11038
|
+
minRectTop = Math.min(rect.top, minRectTop);
|
11039
|
+
maxRectTop = Math.max(rect.top, maxRectTop);
|
10818
11040
|
if (props.allowHalf) {
|
10819
11041
|
ranges.push({
|
10820
11042
|
score: index + 0.5,
|
10821
|
-
left: rect.left
|
11043
|
+
left: rect.left,
|
11044
|
+
top: rect.top,
|
11045
|
+
height: rect.height
|
10822
11046
|
}, {
|
10823
11047
|
score: index + 1,
|
10824
|
-
left: rect.left + rect.width / 2
|
11048
|
+
left: rect.left + rect.width / 2,
|
11049
|
+
top: rect.top,
|
11050
|
+
height: rect.height
|
10825
11051
|
});
|
10826
11052
|
} else {
|
10827
11053
|
ranges.push({
|
10828
11054
|
score: index + 1,
|
10829
|
-
left: rect.left
|
11055
|
+
left: rect.left,
|
11056
|
+
top: rect.top,
|
11057
|
+
height: rect.height
|
10830
11058
|
});
|
10831
11059
|
}
|
10832
11060
|
});
|
10833
11061
|
};
|
10834
|
-
const getScoreByPosition = (x) => {
|
11062
|
+
const getScoreByPosition = (x, y) => {
|
10835
11063
|
for (let i = ranges.length - 1; i > 0; i--) {
|
10836
|
-
if (
|
10837
|
-
|
11064
|
+
if (y >= groupRefRect.top && y <= groupRefRect.bottom) {
|
11065
|
+
if (x > ranges[i].left && y >= ranges[i].top && y <= ranges[i].top + ranges[i].height) {
|
11066
|
+
return ranges[i].score;
|
11067
|
+
}
|
11068
|
+
} else {
|
11069
|
+
const curTop = y < groupRefRect.top ? minRectTop : maxRectTop;
|
11070
|
+
if (x > ranges[i].left && ranges[i].top === curTop) {
|
11071
|
+
return ranges[i].score;
|
11072
|
+
}
|
10838
11073
|
}
|
10839
11074
|
}
|
10840
11075
|
return props.allowHalf ? 0.5 : 1;
|
@@ -10859,10 +11094,11 @@ var stdin_default$l = defineComponent({
|
|
10859
11094
|
touch.move(event);
|
10860
11095
|
if (touch.isHorizontal()) {
|
10861
11096
|
const {
|
10862
|
-
clientX
|
11097
|
+
clientX,
|
11098
|
+
clientY
|
10863
11099
|
} = event.touches[0];
|
10864
11100
|
preventDefault(event);
|
10865
|
-
select(getScoreByPosition(clientX));
|
11101
|
+
select(getScoreByPosition(clientX, clientY));
|
10866
11102
|
}
|
10867
11103
|
};
|
10868
11104
|
const renderStar = (item, index) => {
|
@@ -10891,7 +11127,7 @@ var stdin_default$l = defineComponent({
|
|
10891
11127
|
}
|
10892
11128
|
const onClickItem = (event) => {
|
10893
11129
|
updateRanges();
|
10894
|
-
select(allowHalf ? getScoreByPosition(event.clientX) : score);
|
11130
|
+
select(allowHalf ? getScoreByPosition(event.clientX, event.clientY) : score);
|
10895
11131
|
};
|
10896
11132
|
return createVNode("div", {
|
10897
11133
|
"key": index,
|
@@ -10929,6 +11165,7 @@ var stdin_default$l = defineComponent({
|
|
10929
11165
|
};
|
10930
11166
|
useCustomFieldValue(() => props.modelValue);
|
10931
11167
|
return () => createVNode("div", {
|
11168
|
+
"ref": groupRef,
|
10932
11169
|
"role": "radiogroup",
|
10933
11170
|
"class": bem$f({
|
10934
11171
|
readonly: props.readonly,
|
@@ -10963,7 +11200,7 @@ var stdin_default$k = defineComponent({
|
|
10963
11200
|
slots,
|
10964
11201
|
attrs
|
10965
11202
|
}) {
|
10966
|
-
const id = useId();
|
11203
|
+
const id = useId$1();
|
10967
11204
|
const filedRef = ref();
|
10968
11205
|
const onCancel = () => {
|
10969
11206
|
if (!slots.action) {
|
@@ -11053,14 +11290,17 @@ var stdin_default$k = defineComponent({
|
|
11053
11290
|
}
|
11054
11291
|
});
|
11055
11292
|
const Search = withInstall(stdin_default$k);
|
11056
|
-
const PRESET_ICONS = ["qq", "link", "weibo", "wechat", "poster", "qrcode", "weapp-qrcode", "wechat-moments"];
|
11057
11293
|
const popupInheritKeys = [...popupSharedPropKeys, "round", "closeOnPopstate", "safeAreaInsetBottom"];
|
11058
|
-
|
11059
|
-
|
11060
|
-
|
11061
|
-
|
11062
|
-
|
11063
|
-
|
11294
|
+
const iconMap = {
|
11295
|
+
qq: "qq",
|
11296
|
+
link: "link-o",
|
11297
|
+
weibo: "weibo",
|
11298
|
+
qrcode: "qr",
|
11299
|
+
poster: "photo-o",
|
11300
|
+
wechat: "wechat",
|
11301
|
+
"weapp-qrcode": "miniprogram-o",
|
11302
|
+
"wechat-moments": "wechat-moments"
|
11303
|
+
};
|
11064
11304
|
const [name$e, bem$d, t$2] = createNamespace("share-sheet");
|
11065
11305
|
const shareSheetProps = extend({}, popupSharedProps, {
|
11066
11306
|
title: String,
|
@@ -11098,6 +11338,19 @@ var stdin_default$j = defineComponent({
|
|
11098
11338
|
}, [description])]);
|
11099
11339
|
}
|
11100
11340
|
};
|
11341
|
+
const renderIcon = (icon) => {
|
11342
|
+
if (iconMap[icon]) {
|
11343
|
+
return createVNode("div", {
|
11344
|
+
"class": bem$d("icon", [icon])
|
11345
|
+
}, [createVNode(Icon, {
|
11346
|
+
"name": iconMap[icon] || icon
|
11347
|
+
}, null)]);
|
11348
|
+
}
|
11349
|
+
return createVNode("img", {
|
11350
|
+
"src": icon,
|
11351
|
+
"class": bem$d("image-icon")
|
11352
|
+
}, null);
|
11353
|
+
};
|
11101
11354
|
const renderOption = (option, index) => {
|
11102
11355
|
const {
|
11103
11356
|
name: name2,
|
@@ -11110,10 +11363,7 @@ var stdin_default$j = defineComponent({
|
|
11110
11363
|
"tabindex": 0,
|
11111
11364
|
"class": [bem$d("option"), className, HAPTICS_FEEDBACK],
|
11112
11365
|
"onClick": () => onSelect(option, index)
|
11113
|
-
}, [createVNode("
|
11114
|
-
"src": getIconURL(icon),
|
11115
|
-
"class": bem$d("icon")
|
11116
|
-
}, null), name2 && createVNode("span", {
|
11366
|
+
}, [renderIcon(icon), name2 && createVNode("span", {
|
11117
11367
|
"class": bem$d("name")
|
11118
11368
|
}, [name2]), description && createVNode("span", {
|
11119
11369
|
"class": bem$d("option-description")
|
@@ -11271,9 +11521,11 @@ const skeletonProps = {
|
|
11271
11521
|
};
|
11272
11522
|
var stdin_default$g = defineComponent({
|
11273
11523
|
name: name$b,
|
11524
|
+
inheritAttrs: false,
|
11274
11525
|
props: skeletonProps,
|
11275
11526
|
setup(props, {
|
11276
|
-
slots
|
11527
|
+
slots,
|
11528
|
+
attrs
|
11277
11529
|
}) {
|
11278
11530
|
const renderAvatar = () => {
|
11279
11531
|
if (props.avatar) {
|
@@ -11316,12 +11568,12 @@ var stdin_default$g = defineComponent({
|
|
11316
11568
|
if (!props.loading) {
|
11317
11569
|
return (_a = slots.default) == null ? void 0 : _a.call(slots);
|
11318
11570
|
}
|
11319
|
-
return createVNode("div", {
|
11571
|
+
return createVNode("div", mergeProps({
|
11320
11572
|
"class": bem$a({
|
11321
11573
|
animate: props.animate,
|
11322
11574
|
round: props.round
|
11323
11575
|
})
|
11324
|
-
}, [renderAvatar(), createVNode("div", {
|
11576
|
+
}, attrs), [renderAvatar(), createVNode("div", {
|
11325
11577
|
"class": bem$a("content")
|
11326
11578
|
}, [renderTitle(), renderRows()])]);
|
11327
11579
|
};
|
@@ -12211,7 +12463,7 @@ var stdin_default$a = defineComponent({
|
|
12211
12463
|
return createVNode("div", {
|
12212
12464
|
"ref": root,
|
12213
12465
|
"class": bem$4(),
|
12214
|
-
"onClick": getClickHandler("cell"),
|
12466
|
+
"onClick": getClickHandler("cell", lockClick2),
|
12215
12467
|
"onTouchstart": onTouchStart,
|
12216
12468
|
"onTouchmove": onTouchMove,
|
12217
12469
|
"onTouchend": onTouchEnd,
|
@@ -12566,7 +12818,6 @@ var stdin_default$6 = defineComponent({
|
|
12566
12818
|
});
|
12567
12819
|
const TreeSelect = withInstall(stdin_default$6);
|
12568
12820
|
const [name, bem, t] = createNamespace("uploader");
|
12569
|
-
const toArray = (item) => Array.isArray(item) ? item : [item];
|
12570
12821
|
function readFileContent(file, resultType) {
|
12571
12822
|
return new Promise((resolve) => {
|
12572
12823
|
if (resultType === "file") {
|
@@ -12632,7 +12883,7 @@ var stdin_default$5 = defineComponent({
|
|
12632
12883
|
imageFit: String,
|
12633
12884
|
lazyLoad: Boolean,
|
12634
12885
|
deletable: Boolean,
|
12635
|
-
previewSize:
|
12886
|
+
previewSize: [Number, String, Array],
|
12636
12887
|
beforeDelete: Function
|
12637
12888
|
},
|
12638
12889
|
emits: ["delete", "preview"],
|
@@ -12706,16 +12957,19 @@ var stdin_default$5 = defineComponent({
|
|
12706
12957
|
};
|
12707
12958
|
const renderPreview = () => {
|
12708
12959
|
const {
|
12709
|
-
item
|
12960
|
+
item,
|
12961
|
+
lazyLoad,
|
12962
|
+
imageFit,
|
12963
|
+
previewSize
|
12710
12964
|
} = props;
|
12711
12965
|
if (isImageFile(item)) {
|
12712
12966
|
return createVNode(Image$1, {
|
12713
|
-
"fit":
|
12967
|
+
"fit": imageFit,
|
12714
12968
|
"src": item.content || item.url,
|
12715
12969
|
"class": bem("preview-image"),
|
12716
|
-
"width":
|
12717
|
-
"height":
|
12718
|
-
"lazyLoad":
|
12970
|
+
"width": Array.isArray(previewSize) ? previewSize[0] : previewSize,
|
12971
|
+
"height": Array.isArray(previewSize) ? previewSize[1] : previewSize,
|
12972
|
+
"lazyLoad": lazyLoad,
|
12719
12973
|
"onClick": onPreview
|
12720
12974
|
}, {
|
12721
12975
|
default: renderCover
|
@@ -12755,7 +13009,7 @@ const uploaderProps = {
|
|
12755
13009
|
modelValue: makeArrayProp(),
|
12756
13010
|
beforeRead: Function,
|
12757
13011
|
beforeDelete: Function,
|
12758
|
-
previewSize:
|
13012
|
+
previewSize: [Number, String, Array],
|
12759
13013
|
previewImage: truthProp,
|
12760
13014
|
previewOptions: Object,
|
12761
13015
|
previewFullImage: truthProp,
|
@@ -13822,7 +14076,7 @@ const Lazyload = {
|
|
13822
14076
|
});
|
13823
14077
|
}
|
13824
14078
|
};
|
13825
|
-
const version = "4.0.0-alpha.
|
14079
|
+
const version = "4.0.0-alpha.3";
|
13826
14080
|
function install(app) {
|
13827
14081
|
const components = [
|
13828
14082
|
ActionBar,
|