vant 4.0.0-alpha.1 → 4.0.0-alpha.2
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 +39 -42
- 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.js +1 -1
- package/es/calendar/CalendarDay.js +4 -0
- package/es/calendar/index.css +1 -1
- package/es/calendar/index.less +2 -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/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/dialog/index.css +1 -1
- 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 +2 -2
- package/es/empty/index.d.ts +2 -2
- package/es/field/Field.d.ts +4 -0
- package/es/field/Field.js +2 -0
- package/es/field/index.d.ts +2 -0
- package/es/form/Form.js +1 -0
- 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/index.d.ts +3 -3
- package/es/index-bar/types.d.ts +2 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/locale/lang/bn-BD.d.ts +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 +0 -2
- package/es/locale/lang/la-LA.js +0 -2
- 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/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.d.ts +3 -3
- package/es/picker/types.d.ts +4 -3
- package/es/picker/utils.d.ts +4 -3
- package/es/popup/index.css +1 -1
- 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.d.ts +2 -0
- 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/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/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/types.d.ts +3 -2
- package/es/tree-select/TreeSelect.d.ts +7 -6
- package/es/tree-select/index.d.ts +3 -3
- package/es/uploader/Uploader.d.ts +4 -4
- package/es/uploader/Uploader.js +2 -2
- package/es/uploader/UploaderPreviewItem.d.ts +3 -3
- package/es/uploader/UploaderPreviewItem.js +9 -6
- package/es/uploader/index.d.ts +2 -2
- package/es/uploader/types.d.ts +5 -5
- package/es/utils/basic.d.ts +1 -0
- package/es/utils/format.d.ts +7 -6
- package/es/utils/format.js +6 -0
- package/es/utils/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.js +10 -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.js +9 -16
- package/lib/calendar/index.less +2 -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 +8 -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 +8 -13
- 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/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 +9 -14
- package/lib/empty/Network.js +8 -13
- 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 +10 -13
- package/lib/field/index.d.ts +2 -0
- package/lib/field/index.js +9 -16
- package/lib/field/types.js +7 -12
- package/lib/field/utils.js +8 -13
- package/lib/form/Form.js +9 -13
- 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 +8 -13
- 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 +8 -13
- 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 +0 -2
- package/lib/locale/lang/la-LA.js +8 -15
- 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.js +8 -13
- 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.d.ts +3 -3
- package/lib/picker/index.js +9 -16
- 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.js +8 -13
- package/lib/popup/index.css +1 -1
- 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.d.ts +2 -0
- package/lib/search/index.js +9 -16
- 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 +8 -13
- 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/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 +8 -13
- 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 +8 -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 +10 -17
- 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.js +8 -13
- package/lib/utils/basic.d.ts +1 -0
- package/lib/utils/basic.js +8 -13
- 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 +297 -258
- package/lib/vant.cjs.min.js +1 -1
- package/lib/vant.es.js +297 -258
- package/lib/vant.es.min.js +297 -258
- package/lib/vant.js +297 -258
- package/lib/vant.min.js +1 -1
- package/package.json +3 -3
- package/vetur/attributes.json +564 -636
- package/vetur/tags.json +178 -178
- package/vetur/web-types.json +2595 -1760
package/lib/vant.es.min.js
CHANGED
@@ -119,6 +119,12 @@ function addUnit(value) {
|
|
119
119
|
}
|
120
120
|
function getSizeStyle(originSize) {
|
121
121
|
if (isDef(originSize)) {
|
122
|
+
if (Array.isArray(originSize)) {
|
123
|
+
return {
|
124
|
+
width: addUnit(originSize[0]),
|
125
|
+
height: addUnit(originSize[1])
|
126
|
+
};
|
127
|
+
}
|
122
128
|
const size = addUnit(originSize);
|
123
129
|
return {
|
124
130
|
width: size,
|
@@ -280,10 +286,8 @@ var stdin_default$1C = {
|
|
280
286
|
},
|
281
287
|
vanAddressEdit: {
|
282
288
|
area: "\u5730\u533A",
|
283
|
-
postal: "\u90AE\u653F\u7F16\u7801",
|
284
289
|
areaEmpty: "\u8BF7\u9009\u62E9\u5730\u533A",
|
285
290
|
addressEmpty: "\u8BF7\u586B\u5199\u8BE6\u7EC6\u5730\u5740",
|
286
|
-
postalEmpty: "\u90AE\u653F\u7F16\u7801\u4E0D\u6B63\u786E",
|
287
291
|
addressDetail: "\u8BE6\u7EC6\u5730\u5740",
|
288
292
|
defaultAddress: "\u8BBE\u4E3A\u9ED8\u8BA4\u6536\u8D27\u5730\u5740"
|
289
293
|
},
|
@@ -996,7 +1000,7 @@ function useTouch() {
|
|
996
1000
|
};
|
997
1001
|
const move = (event) => {
|
998
1002
|
const touch = event.touches[0];
|
999
|
-
deltaX.value = touch.clientX < 0 ? 0 : touch.clientX - startX.value;
|
1003
|
+
deltaX.value = (touch.clientX < 0 ? 0 : touch.clientX) - startX.value;
|
1000
1004
|
deltaY.value = touch.clientY - startY.value;
|
1001
1005
|
offsetX.value = Math.abs(deltaX.value);
|
1002
1006
|
offsetY.value = Math.abs(deltaY.value);
|
@@ -2261,6 +2265,7 @@ var stdin_default$1l = defineComponent({
|
|
2261
2265
|
useExpose({
|
2262
2266
|
submit,
|
2263
2267
|
validate,
|
2268
|
+
getValues,
|
2264
2269
|
scrollToField,
|
2265
2270
|
resetValidation
|
2266
2271
|
});
|
@@ -2379,6 +2384,7 @@ const fieldSharedProps = {
|
|
2379
2384
|
placeholder: String,
|
2380
2385
|
autocomplete: String,
|
2381
2386
|
errorMessage: String,
|
2387
|
+
enterkeyhint: String,
|
2382
2388
|
clearTrigger: makeStringProp("focus"),
|
2383
2389
|
formatTrigger: makeStringProp("onChange"),
|
2384
2390
|
error: {
|
@@ -2648,6 +2654,7 @@ var stdin_default$1k = defineComponent({
|
|
2648
2654
|
autofocus: props.autofocus,
|
2649
2655
|
placeholder: props.placeholder,
|
2650
2656
|
autocomplete: props.autocomplete,
|
2657
|
+
enterkeyhint: props.enterkeyhint,
|
2651
2658
|
"aria-labelledby": props.label ? `${id}-label` : void 0,
|
2652
2659
|
onBlur,
|
2653
2660
|
onFocus,
|
@@ -3226,10 +3233,8 @@ const DEFAULT_DATA = {
|
|
3226
3233
|
province: "",
|
3227
3234
|
areaCode: "",
|
3228
3235
|
isDefault: false,
|
3229
|
-
postalCode: "",
|
3230
3236
|
addressDetail: ""
|
3231
3237
|
};
|
3232
|
-
const isPostal = (value) => /^\d{6}$/.test(value);
|
3233
3238
|
const addressEditProps = {
|
3234
3239
|
areaList: Object,
|
3235
3240
|
isSaving: Boolean,
|
@@ -3238,7 +3243,6 @@ const addressEditProps = {
|
|
3238
3243
|
showArea: truthProp,
|
3239
3244
|
showDetail: truthProp,
|
3240
3245
|
showDelete: Boolean,
|
3241
|
-
showPostal: Boolean,
|
3242
3246
|
disableArea: Boolean,
|
3243
3247
|
searchResult: Array,
|
3244
3248
|
telMaxlength: numericProp,
|
@@ -3257,10 +3261,6 @@ const addressEditProps = {
|
|
3257
3261
|
telValidator: {
|
3258
3262
|
type: Function,
|
3259
3263
|
default: isMobile
|
3260
|
-
},
|
3261
|
-
postalValidator: {
|
3262
|
-
type: Function,
|
3263
|
-
default: isPostal
|
3264
3264
|
}
|
3265
3265
|
};
|
3266
3266
|
var stdin_default$1g = defineComponent({
|
@@ -3303,8 +3303,7 @@ var stdin_default$1g = defineComponent({
|
|
3303
3303
|
const rules = computed(() => {
|
3304
3304
|
const {
|
3305
3305
|
validator,
|
3306
|
-
telValidator
|
3307
|
-
postalValidator
|
3306
|
+
telValidator
|
3308
3307
|
} = props;
|
3309
3308
|
const makeRule = (name2, emptyMessage) => ({
|
3310
3309
|
validator: (value) => {
|
@@ -3327,11 +3326,7 @@ var stdin_default$1g = defineComponent({
|
|
3327
3326
|
message: t$h("telInvalid")
|
3328
3327
|
}],
|
3329
3328
|
areaCode: [makeRule("areaCode", t$h("areaEmpty"))],
|
3330
|
-
addressDetail: [makeRule("addressDetail", t$h("addressEmpty"))]
|
3331
|
-
postalCode: [makeRule("addressDetail", t$h("postalEmpty")), {
|
3332
|
-
validator: postalValidator,
|
3333
|
-
message: t$h("postalEmpty")
|
3334
|
-
}]
|
3329
|
+
addressDetail: [makeRule("addressDetail", t$h("addressEmpty"))]
|
3335
3330
|
};
|
3336
3331
|
});
|
3337
3332
|
const onSave = () => emit("save", data);
|
@@ -3456,16 +3451,7 @@ var stdin_default$1g = defineComponent({
|
|
3456
3451
|
"onFocus": () => onFocus("addressDetail"),
|
3457
3452
|
"onInput": onChangeDetail,
|
3458
3453
|
"onSelectSearch": (event) => emit("selectSearch", event)
|
3459
|
-
}, null),
|
3460
|
-
"modelValue": data.postalCode,
|
3461
|
-
"onUpdate:modelValue": ($event) => data.postalCode = $event,
|
3462
|
-
"type": "tel",
|
3463
|
-
"rules": rules.value.postalCode,
|
3464
|
-
"label": t$h("postal"),
|
3465
|
-
"maxlength": "6",
|
3466
|
-
"placeholder": t$h("postal"),
|
3467
|
-
"onFocus": () => onFocus("postalCode")
|
3468
|
-
}, null), [[vShow, !hideBottomFields.value]]), (_a = slots.default) == null ? void 0 : _a.call(slots)]), renderSetDefaultCell(), withDirectives(createVNode("div", {
|
3454
|
+
}, null), (_a = slots.default) == null ? void 0 : _a.call(slots)]), renderSetDefaultCell(), withDirectives(createVNode("div", {
|
3469
3455
|
"class": bem$15("buttons")
|
3470
3456
|
}, [createVNode(Button, {
|
3471
3457
|
"block": true,
|
@@ -4024,6 +4010,7 @@ var stdin_default$19 = defineComponent({
|
|
4024
4010
|
slots
|
4025
4011
|
}) {
|
4026
4012
|
const style = computed(() => {
|
4013
|
+
var _a;
|
4027
4014
|
const {
|
4028
4015
|
item,
|
4029
4016
|
index,
|
@@ -4055,6 +4042,9 @@ var stdin_default$19 = defineComponent({
|
|
4055
4042
|
break;
|
4056
4043
|
}
|
4057
4044
|
}
|
4045
|
+
if (offset + (((_a = item.date) == null ? void 0 : _a.getDate()) || 1) > 28) {
|
4046
|
+
style2.marginBottom = 0;
|
4047
|
+
}
|
4058
4048
|
return style2;
|
4059
4049
|
});
|
4060
4050
|
const onClick = () => {
|
@@ -4562,8 +4552,8 @@ var stdin_default$16 = defineComponent({
|
|
4562
4552
|
}
|
4563
4553
|
raf(() => {
|
4564
4554
|
bodyHeight = Math.floor(useRect(bodyRef).height);
|
4565
|
-
scrollToCurrentDate();
|
4566
4555
|
});
|
4556
|
+
scrollToCurrentDate();
|
4567
4557
|
};
|
4568
4558
|
const reset = (date = getInitialDate()) => {
|
4569
4559
|
currentDate.value = date;
|
@@ -5874,6 +5864,7 @@ var stdin_default$$ = defineComponent({
|
|
5874
5864
|
}
|
5875
5865
|
};
|
5876
5866
|
const renderNav = () => children.map((item, index) => createVNode(stdin_default$12, mergeProps({
|
5867
|
+
"key": item.id,
|
5877
5868
|
"id": `${id}-${index}`,
|
5878
5869
|
"ref": setTitleRefs(index),
|
5879
5870
|
"type": props.type,
|
@@ -7463,14 +7454,152 @@ var stdin_default$K = defineComponent({
|
|
7463
7454
|
}
|
7464
7455
|
});
|
7465
7456
|
const CouponCell = withInstall(stdin_default$K);
|
7466
|
-
const
|
7467
|
-
const
|
7457
|
+
const prefix = "van-empty-network-";
|
7458
|
+
const renderStop = (color, offset, opacity) => createVNode("stop", {
|
7459
|
+
"stop-color": color,
|
7460
|
+
"offset": `${offset}%`,
|
7461
|
+
"stop-opacity": opacity
|
7462
|
+
}, null);
|
7463
|
+
const Network = createVNode("svg", {
|
7464
|
+
"viewBox": "0 0 160 160"
|
7465
|
+
}, [createVNode("defs", null, [createVNode("linearGradient", {
|
7466
|
+
"id": `${prefix}1`,
|
7467
|
+
"x1": "64%",
|
7468
|
+
"y1": "100%",
|
7469
|
+
"x2": "64%"
|
7470
|
+
}, [renderStop("#FFF", 0, 0.5), renderStop("#F2F3F5", 100)]), createVNode("linearGradient", {
|
7471
|
+
"id": `${prefix}2`,
|
7472
|
+
"x1": "50%",
|
7473
|
+
"x2": "50%",
|
7474
|
+
"y2": "84%"
|
7475
|
+
}, [renderStop("#EBEDF0", 0), renderStop("#DCDEE0", 100, 0)]), createVNode("linearGradient", {
|
7476
|
+
"id": `${prefix}3`,
|
7477
|
+
"x1": "100%",
|
7478
|
+
"x2": "100%",
|
7479
|
+
"y2": "100%"
|
7480
|
+
}, [renderStop("#EAEDF0", 0), renderStop("#DCDEE0", 100)]), createVNode("radialGradient", {
|
7481
|
+
"id": `${prefix}4`,
|
7482
|
+
"cx": "50%",
|
7483
|
+
"cy": "0%",
|
7484
|
+
"fx": "50%",
|
7485
|
+
"fy": "0%",
|
7486
|
+
"r": "100%",
|
7487
|
+
"gradientTransform": "matrix(0 1 -.54 0 .5 -.5)"
|
7488
|
+
}, [renderStop("#EBEDF0", 0), renderStop("#FFF", 100, 0)])]), createVNode("g", {
|
7489
|
+
"fill": "none"
|
7490
|
+
}, [createVNode("g", {
|
7491
|
+
"opacity": ".8"
|
7492
|
+
}, [createVNode("path", {
|
7493
|
+
"d": "M36 131V53H16v20H2v58h34z",
|
7494
|
+
"fill": `url(#${prefix}1)`
|
7495
|
+
}, null), createVNode("path", {
|
7496
|
+
"d": "M123 15h22v14h9v77h-31V15z",
|
7497
|
+
"fill": `url(#${prefix}1)`
|
7498
|
+
}, null)]), createVNode("path", {
|
7499
|
+
"fill": `url(#${prefix}4)`,
|
7500
|
+
"d": "M0 139h160v21H0z"
|
7501
|
+
}, null), createVNode("path", {
|
7502
|
+
"d": "M80 54a7 7 0 0 1 3 13v27l-2 2h-2a2 2 0 0 1-2-2V67a7 7 0 0 1 3-13z",
|
7503
|
+
"fill": `url(#${prefix}2)`
|
7504
|
+
}, null), createVNode("g", {
|
7505
|
+
"opacity": ".6",
|
7506
|
+
"stroke-linecap": "round",
|
7507
|
+
"stroke-width": "7"
|
7508
|
+
}, [createVNode("path", {
|
7509
|
+
"d": "M64 47a19 19 0 0 0-5 13c0 5 2 10 5 13",
|
7510
|
+
"stroke": `url(#${prefix}3)`
|
7511
|
+
}, null), createVNode("path", {
|
7512
|
+
"d": "M53 36a34 34 0 0 0 0 48",
|
7513
|
+
"stroke": `url(#${prefix}3)`
|
7514
|
+
}, null), createVNode("path", {
|
7515
|
+
"d": "M95 73a19 19 0 0 0 6-13c0-5-2-9-6-13",
|
7516
|
+
"stroke": `url(#${prefix}3)`
|
7517
|
+
}, null), createVNode("path", {
|
7518
|
+
"d": "M106 84a34 34 0 0 0 0-48",
|
7519
|
+
"stroke": `url(#${prefix}3)`
|
7520
|
+
}, null)]), createVNode("g", {
|
7521
|
+
"transform": "translate(31 105)"
|
7522
|
+
}, [createVNode("rect", {
|
7523
|
+
"fill": "#EBEDF0",
|
7524
|
+
"width": "98",
|
7525
|
+
"height": "34",
|
7526
|
+
"rx": "2"
|
7527
|
+
}, null), createVNode("rect", {
|
7528
|
+
"fill": "#FFF",
|
7529
|
+
"x": "9",
|
7530
|
+
"y": "8",
|
7531
|
+
"width": "80",
|
7532
|
+
"height": "18",
|
7533
|
+
"rx": "1.1"
|
7534
|
+
}, null), createVNode("rect", {
|
7535
|
+
"fill": "#EBEDF0",
|
7536
|
+
"x": "15",
|
7537
|
+
"y": "12",
|
7538
|
+
"width": "18",
|
7539
|
+
"height": "6",
|
7540
|
+
"rx": "1.1"
|
7541
|
+
}, null)])])]);
|
7542
|
+
const [name$D, bem$C] = createNamespace("empty");
|
7543
|
+
const PRESET_IMAGES = ["error", "search", "default"];
|
7544
|
+
const emptyProps = {
|
7545
|
+
image: makeStringProp("default"),
|
7546
|
+
imageSize: [Number, String, Array],
|
7547
|
+
description: String
|
7548
|
+
};
|
7549
|
+
var stdin_default$J = defineComponent({
|
7550
|
+
name: name$D,
|
7551
|
+
props: emptyProps,
|
7552
|
+
setup(props, {
|
7553
|
+
slots
|
7554
|
+
}) {
|
7555
|
+
const renderImage = () => {
|
7556
|
+
if (slots.image) {
|
7557
|
+
return slots.image();
|
7558
|
+
}
|
7559
|
+
let {
|
7560
|
+
image
|
7561
|
+
} = props;
|
7562
|
+
if (image === "network") {
|
7563
|
+
return Network;
|
7564
|
+
}
|
7565
|
+
if (PRESET_IMAGES.includes(image)) {
|
7566
|
+
image = `https://img.yzcdn.cn/vant/empty-image-${image}.png`;
|
7567
|
+
}
|
7568
|
+
return createVNode("img", {
|
7569
|
+
"src": image
|
7570
|
+
}, null);
|
7571
|
+
};
|
7572
|
+
const renderDescription = () => {
|
7573
|
+
const description = slots.description ? slots.description() : props.description;
|
7574
|
+
if (description) {
|
7575
|
+
return createVNode("p", {
|
7576
|
+
"class": bem$C("description")
|
7577
|
+
}, [description]);
|
7578
|
+
}
|
7579
|
+
};
|
7580
|
+
const renderBottom = () => {
|
7581
|
+
if (slots.default) {
|
7582
|
+
return createVNode("div", {
|
7583
|
+
"class": bem$C("bottom")
|
7584
|
+
}, [slots.default()]);
|
7585
|
+
}
|
7586
|
+
};
|
7587
|
+
return () => createVNode("div", {
|
7588
|
+
"class": bem$C()
|
7589
|
+
}, [createVNode("div", {
|
7590
|
+
"class": bem$C("image"),
|
7591
|
+
"style": getSizeStyle(props.imageSize)
|
7592
|
+
}, [renderImage()]), renderDescription(), renderBottom()]);
|
7593
|
+
}
|
7594
|
+
});
|
7595
|
+
const Empty = withInstall(stdin_default$J);
|
7596
|
+
const [name$C, bem$B, t$8] = createNamespace("coupon-list");
|
7468
7597
|
const couponListProps = {
|
7469
7598
|
code: makeStringProp(""),
|
7470
7599
|
coupons: makeArrayProp(),
|
7471
7600
|
currency: makeStringProp("\xA5"),
|
7472
7601
|
showCount: truthProp,
|
7473
|
-
emptyImage:
|
7602
|
+
emptyImage: String,
|
7474
7603
|
chosenCoupon: makeNumberProp(-1),
|
7475
7604
|
enabledTitle: String,
|
7476
7605
|
disabledTitle: String,
|
@@ -7485,8 +7614,8 @@ const couponListProps = {
|
|
7485
7614
|
exchangeButtonLoading: Boolean,
|
7486
7615
|
exchangeButtonDisabled: Boolean
|
7487
7616
|
};
|
7488
|
-
var stdin_default$
|
7489
|
-
name: name$
|
7617
|
+
var stdin_default$I = defineComponent({
|
7618
|
+
name: name$C,
|
7490
7619
|
props: couponListProps,
|
7491
7620
|
emits: ["change", "exchange", "update:code"],
|
7492
7621
|
setup(props, {
|
@@ -7518,28 +7647,30 @@ var stdin_default$J = defineComponent({
|
|
7518
7647
|
return (_a = couponRefs.value[index]) == null ? void 0 : _a.scrollIntoView();
|
7519
7648
|
});
|
7520
7649
|
};
|
7521
|
-
const renderEmpty = () => createVNode(
|
7522
|
-
"
|
7523
|
-
},
|
7524
|
-
"
|
7525
|
-
|
7650
|
+
const renderEmpty = () => createVNode(Empty, {
|
7651
|
+
"image": props.emptyImage
|
7652
|
+
}, {
|
7653
|
+
default: () => [createVNode("p", {
|
7654
|
+
"class": bem$B("empty-tip")
|
7655
|
+
}, [t$8("noCoupon")])]
|
7656
|
+
});
|
7526
7657
|
const renderExchangeBar = () => {
|
7527
7658
|
if (props.showExchangeBar) {
|
7528
7659
|
return createVNode("div", {
|
7529
7660
|
"ref": barRef,
|
7530
|
-
"class": bem$
|
7661
|
+
"class": bem$B("exchange-bar")
|
7531
7662
|
}, [createVNode(Field, {
|
7532
7663
|
"modelValue": currentCode.value,
|
7533
7664
|
"onUpdate:modelValue": ($event) => currentCode.value = $event,
|
7534
7665
|
"clearable": true,
|
7535
7666
|
"border": false,
|
7536
|
-
"class": bem$
|
7667
|
+
"class": bem$B("field"),
|
7537
7668
|
"placeholder": props.inputPlaceholder || t$8("placeholder"),
|
7538
7669
|
"maxlength": "20"
|
7539
7670
|
}, null), createVNode(Button, {
|
7540
7671
|
"plain": true,
|
7541
7672
|
"type": "primary",
|
7542
|
-
"class": bem$
|
7673
|
+
"class": bem$B("exchange"),
|
7543
7674
|
"text": props.exchangeButtonText || t$8("exchange"),
|
7544
7675
|
"loading": props.exchangeButtonLoading,
|
7545
7676
|
"disabled": buttonDisabled.value,
|
@@ -7559,7 +7690,7 @@ var stdin_default$J = defineComponent({
|
|
7559
7690
|
default: () => {
|
7560
7691
|
var _a;
|
7561
7692
|
return [createVNode("div", {
|
7562
|
-
"class": bem$
|
7693
|
+
"class": bem$B("list", {
|
7563
7694
|
"with-bottom": props.showCloseButton
|
7564
7695
|
}),
|
7565
7696
|
"style": {
|
@@ -7588,7 +7719,7 @@ var stdin_default$J = defineComponent({
|
|
7588
7719
|
default: () => {
|
7589
7720
|
var _a;
|
7590
7721
|
return [createVNode("div", {
|
7591
|
-
"class": bem$
|
7722
|
+
"class": bem$B("list", {
|
7592
7723
|
"with-bottom": props.showCloseButton
|
7593
7724
|
}),
|
7594
7725
|
"style": {
|
@@ -7615,28 +7746,28 @@ var stdin_default$J = defineComponent({
|
|
7615
7746
|
});
|
7616
7747
|
return () => createVNode("div", {
|
7617
7748
|
"ref": root,
|
7618
|
-
"class": bem$
|
7749
|
+
"class": bem$B()
|
7619
7750
|
}, [renderExchangeBar(), createVNode(Tabs, {
|
7620
7751
|
"active": activeTab.value,
|
7621
7752
|
"onUpdate:active": ($event) => activeTab.value = $event,
|
7622
|
-
"class": bem$
|
7753
|
+
"class": bem$B("tab")
|
7623
7754
|
}, {
|
7624
7755
|
default: () => [renderCouponTab(), renderDisabledTab()]
|
7625
7756
|
}), createVNode("div", {
|
7626
|
-
"class": bem$
|
7757
|
+
"class": bem$B("bottom")
|
7627
7758
|
}, [withDirectives(createVNode(Button, {
|
7628
7759
|
"round": true,
|
7629
7760
|
"block": true,
|
7630
7761
|
"type": "primary",
|
7631
|
-
"class": bem$
|
7762
|
+
"class": bem$B("close"),
|
7632
7763
|
"text": props.closeButtonText || t$8("close"),
|
7633
7764
|
"onClick": () => emit("change", -1)
|
7634
7765
|
}, null), [[vShow, props.showCloseButton]])])]);
|
7635
7766
|
}
|
7636
7767
|
});
|
7637
|
-
const CouponList = withInstall(stdin_default$
|
7768
|
+
const CouponList = withInstall(stdin_default$I);
|
7638
7769
|
const currentYear = new Date().getFullYear();
|
7639
|
-
const [name$
|
7770
|
+
const [name$B] = createNamespace("date-picker");
|
7640
7771
|
const datePickerProps = extend({}, sharedProps, {
|
7641
7772
|
columnsType: {
|
7642
7773
|
type: Array,
|
@@ -7653,8 +7784,8 @@ const datePickerProps = extend({}, sharedProps, {
|
|
7653
7784
|
validator: isDate
|
7654
7785
|
}
|
7655
7786
|
});
|
7656
|
-
var stdin_default$
|
7657
|
-
name: name$
|
7787
|
+
var stdin_default$H = defineComponent({
|
7788
|
+
name: name$B,
|
7658
7789
|
props: datePickerProps,
|
7659
7790
|
emits: ["confirm", "cancel", "change", "update:modelValue"],
|
7660
7791
|
setup(props, {
|
@@ -7738,8 +7869,8 @@ var stdin_default$I = defineComponent({
|
|
7738
7869
|
}, pick(props, pickerInheritKeys)), slots);
|
7739
7870
|
}
|
7740
7871
|
});
|
7741
|
-
const DatePicker = withInstall(stdin_default$
|
7742
|
-
const [name$
|
7872
|
+
const DatePicker = withInstall(stdin_default$H);
|
7873
|
+
const [name$A, bem$A, t$7] = createNamespace("dialog");
|
7743
7874
|
const dialogProps = extend({}, popupSharedProps, {
|
7744
7875
|
title: String,
|
7745
7876
|
theme: String,
|
@@ -7760,8 +7891,8 @@ const dialogProps = extend({}, popupSharedProps, {
|
|
7760
7891
|
closeOnClickOverlay: Boolean
|
7761
7892
|
});
|
7762
7893
|
const popupInheritKeys$1 = [...popupSharedPropKeys, "transition", "closeOnPopstate"];
|
7763
|
-
var stdin_default$
|
7764
|
-
name: name$
|
7894
|
+
var stdin_default$G = defineComponent({
|
7895
|
+
name: name$A,
|
7765
7896
|
props: dialogProps,
|
7766
7897
|
emits: ["confirm", "cancel", "keydown", "update:show"],
|
7767
7898
|
setup(props, {
|
@@ -7818,7 +7949,7 @@ var stdin_default$H = defineComponent({
|
|
7818
7949
|
const title = slots.title ? slots.title() : props.title;
|
7819
7950
|
if (title) {
|
7820
7951
|
return createVNode("div", {
|
7821
|
-
"class": bem$
|
7952
|
+
"class": bem$A("header", {
|
7822
7953
|
isolated: !props.message && !slots.default
|
7823
7954
|
})
|
7824
7955
|
}, [title]);
|
@@ -7830,7 +7961,7 @@ var stdin_default$H = defineComponent({
|
|
7830
7961
|
allowHtml,
|
7831
7962
|
messageAlign
|
7832
7963
|
} = props;
|
7833
|
-
const classNames = bem$
|
7964
|
+
const classNames = bem$A("message", {
|
7834
7965
|
"has-title": hasTitle,
|
7835
7966
|
[messageAlign]: messageAlign
|
7836
7967
|
});
|
@@ -7848,7 +7979,7 @@ var stdin_default$H = defineComponent({
|
|
7848
7979
|
const renderContent = () => {
|
7849
7980
|
if (slots.default) {
|
7850
7981
|
return createVNode("div", {
|
7851
|
-
"class": bem$
|
7982
|
+
"class": bem$A("content")
|
7852
7983
|
}, [slots.default()]);
|
7853
7984
|
}
|
7854
7985
|
const {
|
@@ -7860,18 +7991,18 @@ var stdin_default$H = defineComponent({
|
|
7860
7991
|
const hasTitle = !!(title || slots.title);
|
7861
7992
|
return createVNode("div", {
|
7862
7993
|
"key": allowHtml ? 1 : 0,
|
7863
|
-
"class": bem$
|
7994
|
+
"class": bem$A("content", {
|
7864
7995
|
isolated: !hasTitle
|
7865
7996
|
})
|
7866
7997
|
}, [renderMessage(hasTitle)]);
|
7867
7998
|
}
|
7868
7999
|
};
|
7869
8000
|
const renderButtons = () => createVNode("div", {
|
7870
|
-
"class": [BORDER_TOP, bem$
|
8001
|
+
"class": [BORDER_TOP, bem$A("footer")]
|
7871
8002
|
}, [props.showCancelButton && createVNode(Button, {
|
7872
8003
|
"size": "large",
|
7873
8004
|
"text": props.cancelButtonText || t$7("cancel"),
|
7874
|
-
"class": bem$
|
8005
|
+
"class": bem$A("cancel"),
|
7875
8006
|
"style": {
|
7876
8007
|
color: props.cancelButtonColor
|
7877
8008
|
},
|
@@ -7880,7 +8011,7 @@ var stdin_default$H = defineComponent({
|
|
7880
8011
|
}, null), props.showConfirmButton && createVNode(Button, {
|
7881
8012
|
"size": "large",
|
7882
8013
|
"text": props.confirmButtonText || t$7("confirm"),
|
7883
|
-
"class": [bem$
|
8014
|
+
"class": [bem$A("confirm"), {
|
7884
8015
|
[BORDER_LEFT]: props.showCancelButton
|
7885
8016
|
}],
|
7886
8017
|
"style": {
|
@@ -7890,19 +8021,19 @@ var stdin_default$H = defineComponent({
|
|
7890
8021
|
"onClick": onConfirm
|
7891
8022
|
}, null)]);
|
7892
8023
|
const renderRoundButtons = () => createVNode(ActionBar, {
|
7893
|
-
"class": bem$
|
8024
|
+
"class": bem$A("footer")
|
7894
8025
|
}, {
|
7895
8026
|
default: () => [props.showCancelButton && createVNode(ActionBarButton, {
|
7896
8027
|
"type": "warning",
|
7897
8028
|
"text": props.cancelButtonText || t$7("cancel"),
|
7898
|
-
"class": bem$
|
8029
|
+
"class": bem$A("cancel"),
|
7899
8030
|
"color": props.cancelButtonColor,
|
7900
8031
|
"loading": loading.cancel,
|
7901
8032
|
"onClick": onCancel
|
7902
8033
|
}, null), props.showConfirmButton && createVNode(ActionBarButton, {
|
7903
8034
|
"type": "danger",
|
7904
8035
|
"text": props.confirmButtonText || t$7("confirm"),
|
7905
|
-
"class": bem$
|
8036
|
+
"class": bem$A("confirm"),
|
7906
8037
|
"color": props.confirmButtonColor,
|
7907
8038
|
"loading": loading.confirm,
|
7908
8039
|
"onClick": onConfirm
|
@@ -7925,7 +8056,7 @@ var stdin_default$H = defineComponent({
|
|
7925
8056
|
return createVNode(Popup, mergeProps({
|
7926
8057
|
"ref": root,
|
7927
8058
|
"role": "dialog",
|
7928
|
-
"class": [bem$
|
8059
|
+
"class": [bem$A([theme]), className],
|
7929
8060
|
"style": {
|
7930
8061
|
width: addUnit(width)
|
7931
8062
|
},
|
@@ -7947,7 +8078,7 @@ function initInstance$2() {
|
|
7947
8078
|
state,
|
7948
8079
|
toggle
|
7949
8080
|
} = usePopupState();
|
7950
|
-
return () => createVNode(stdin_default$
|
8081
|
+
return () => createVNode(stdin_default$G, mergeProps(state, {
|
7951
8082
|
"onUpdate:show": toggle
|
7952
8083
|
}), null);
|
7953
8084
|
}
|
@@ -8012,19 +8143,19 @@ Dialog.setDefaultOptions = (options) => {
|
|
8012
8143
|
Dialog.resetDefaultOptions = () => {
|
8013
8144
|
Dialog.currentOptions = extend({}, Dialog.defaultOptions);
|
8014
8145
|
};
|
8015
|
-
Dialog.Component = withInstall(stdin_default$
|
8146
|
+
Dialog.Component = withInstall(stdin_default$G);
|
8016
8147
|
Dialog.install = (app) => {
|
8017
8148
|
app.use(Dialog.Component);
|
8018
8149
|
app.config.globalProperties.$dialog = Dialog;
|
8019
8150
|
};
|
8020
|
-
const [name$
|
8151
|
+
const [name$z, bem$z] = createNamespace("divider");
|
8021
8152
|
const dividerProps = {
|
8022
8153
|
dashed: Boolean,
|
8023
8154
|
hairline: truthProp,
|
8024
8155
|
contentPosition: makeStringProp("center")
|
8025
8156
|
};
|
8026
|
-
var stdin_default$
|
8027
|
-
name: name$
|
8157
|
+
var stdin_default$F = defineComponent({
|
8158
|
+
name: name$z,
|
8028
8159
|
props: dividerProps,
|
8029
8160
|
setup(props, {
|
8030
8161
|
slots
|
@@ -8033,7 +8164,7 @@ var stdin_default$G = defineComponent({
|
|
8033
8164
|
var _a;
|
8034
8165
|
return createVNode("div", {
|
8035
8166
|
"role": "separator",
|
8036
|
-
"class": bem$
|
8167
|
+
"class": bem$z({
|
8037
8168
|
dashed: props.dashed,
|
8038
8169
|
hairline: props.hairline,
|
8039
8170
|
[`content-${props.contentPosition}`]: !!slots.default
|
@@ -8042,8 +8173,8 @@ var stdin_default$G = defineComponent({
|
|
8042
8173
|
};
|
8043
8174
|
}
|
8044
8175
|
});
|
8045
|
-
const Divider = withInstall(stdin_default$
|
8046
|
-
const [name$
|
8176
|
+
const Divider = withInstall(stdin_default$F);
|
8177
|
+
const [name$y, bem$y] = createNamespace("dropdown-menu");
|
8047
8178
|
const dropdownMenuProps = {
|
8048
8179
|
overlay: truthProp,
|
8049
8180
|
zIndex: numericProp,
|
@@ -8053,9 +8184,9 @@ const dropdownMenuProps = {
|
|
8053
8184
|
closeOnClickOutside: truthProp,
|
8054
8185
|
closeOnClickOverlay: truthProp
|
8055
8186
|
};
|
8056
|
-
const DROPDOWN_KEY = Symbol(name$
|
8057
|
-
var stdin_default$
|
8058
|
-
name: name$
|
8187
|
+
const DROPDOWN_KEY = Symbol(name$y);
|
8188
|
+
var stdin_default$E = defineComponent({
|
8189
|
+
name: name$y,
|
8059
8190
|
props: dropdownMenuProps,
|
8060
8191
|
setup(props, {
|
8061
8192
|
slots
|
@@ -8123,7 +8254,7 @@ var stdin_default$F = defineComponent({
|
|
8123
8254
|
"id": `${id}-${index}`,
|
8124
8255
|
"role": "button",
|
8125
8256
|
"tabindex": disabled ? void 0 : 0,
|
8126
|
-
"class": [bem$
|
8257
|
+
"class": [bem$y("item", {
|
8127
8258
|
disabled
|
8128
8259
|
}), {
|
8129
8260
|
[HAPTICS_FEEDBACK]: !disabled
|
@@ -8134,7 +8265,7 @@ var stdin_default$F = defineComponent({
|
|
8134
8265
|
}
|
8135
8266
|
}
|
8136
8267
|
}, [createVNode("span", {
|
8137
|
-
"class": [bem$
|
8268
|
+
"class": [bem$y("title", {
|
8138
8269
|
down: showPopup === (props.direction === "down"),
|
8139
8270
|
active: showPopup
|
8140
8271
|
}), titleClass],
|
@@ -8158,18 +8289,18 @@ var stdin_default$F = defineComponent({
|
|
8158
8289
|
var _a;
|
8159
8290
|
return createVNode("div", {
|
8160
8291
|
"ref": root,
|
8161
|
-
"class": bem$
|
8292
|
+
"class": bem$y()
|
8162
8293
|
}, [createVNode("div", {
|
8163
8294
|
"ref": barRef,
|
8164
8295
|
"style": barStyle.value,
|
8165
|
-
"class": bem$
|
8296
|
+
"class": bem$y("bar", {
|
8166
8297
|
opened: opened.value
|
8167
8298
|
})
|
8168
8299
|
}, [children.map(renderTitle)]), (_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
8169
8300
|
};
|
8170
8301
|
}
|
8171
8302
|
});
|
8172
|
-
const [name$
|
8303
|
+
const [name$x, bem$x] = createNamespace("dropdown-item");
|
8173
8304
|
const dropdownItemProps = {
|
8174
8305
|
title: String,
|
8175
8306
|
options: makeArrayProp(),
|
@@ -8179,8 +8310,8 @@ const dropdownItemProps = {
|
|
8179
8310
|
modelValue: unknownProp,
|
8180
8311
|
titleClass: unknownProp
|
8181
8312
|
};
|
8182
|
-
var stdin_default$
|
8183
|
-
name: name$
|
8313
|
+
var stdin_default$D = defineComponent({
|
8314
|
+
name: name$x,
|
8184
8315
|
props: dropdownItemProps,
|
8185
8316
|
emits: ["open", "opened", "close", "closed", "change", "update:modelValue"],
|
8186
8317
|
setup(props, {
|
@@ -8247,7 +8378,7 @@ var stdin_default$E = defineComponent({
|
|
8247
8378
|
const renderIcon = () => {
|
8248
8379
|
if (active) {
|
8249
8380
|
return createVNode(Icon, {
|
8250
|
-
"class": bem$
|
8381
|
+
"class": bem$x("icon"),
|
8251
8382
|
"color": activeColor,
|
8252
8383
|
"name": "success"
|
8253
8384
|
}, null);
|
@@ -8258,7 +8389,7 @@ var stdin_default$E = defineComponent({
|
|
8258
8389
|
"key": option.value,
|
8259
8390
|
"icon": option.icon,
|
8260
8391
|
"title": option.text,
|
8261
|
-
"class": bem$
|
8392
|
+
"class": bem$x("option", {
|
8262
8393
|
active
|
8263
8394
|
}),
|
8264
8395
|
"style": {
|
@@ -8290,13 +8421,13 @@ var stdin_default$E = defineComponent({
|
|
8290
8421
|
}
|
8291
8422
|
return withDirectives(createVNode("div", {
|
8292
8423
|
"style": style,
|
8293
|
-
"class": bem$
|
8424
|
+
"class": bem$x([direction]),
|
8294
8425
|
"onClick": onClickWrapper
|
8295
8426
|
}, [createVNode(Popup, {
|
8296
8427
|
"show": state.showPopup,
|
8297
8428
|
"onUpdate:show": ($event) => state.showPopup = $event,
|
8298
8429
|
"role": "menu",
|
8299
|
-
"class": bem$
|
8430
|
+
"class": bem$x("content"),
|
8300
8431
|
"overlay": overlay,
|
8301
8432
|
"position": direction === "down" ? "top" : "bottom",
|
8302
8433
|
"duration": state.transition ? duration : 0,
|
@@ -8334,147 +8465,8 @@ var stdin_default$E = defineComponent({
|
|
8334
8465
|
};
|
8335
8466
|
}
|
8336
8467
|
});
|
8337
|
-
const DropdownItem = withInstall(stdin_default$
|
8338
|
-
const DropdownMenu = withInstall(stdin_default$
|
8339
|
-
const prefix = "van-empty-network-";
|
8340
|
-
const renderStop = (color, offset, opacity) => createVNode("stop", {
|
8341
|
-
"stop-color": color,
|
8342
|
-
"offset": `${offset}%`,
|
8343
|
-
"stop-opacity": opacity
|
8344
|
-
}, null);
|
8345
|
-
const Network = createVNode("svg", {
|
8346
|
-
"viewBox": "0 0 160 160"
|
8347
|
-
}, [createVNode("defs", null, [createVNode("linearGradient", {
|
8348
|
-
"id": `${prefix}1`,
|
8349
|
-
"x1": "64%",
|
8350
|
-
"y1": "100%",
|
8351
|
-
"x2": "64%"
|
8352
|
-
}, [renderStop("#FFF", 0, 0.5), renderStop("#F2F3F5", 100)]), createVNode("linearGradient", {
|
8353
|
-
"id": `${prefix}2`,
|
8354
|
-
"x1": "50%",
|
8355
|
-
"x2": "50%",
|
8356
|
-
"y2": "84%"
|
8357
|
-
}, [renderStop("#EBEDF0", 0), renderStop("#DCDEE0", 100, 0)]), createVNode("linearGradient", {
|
8358
|
-
"id": `${prefix}3`,
|
8359
|
-
"x1": "100%",
|
8360
|
-
"x2": "100%",
|
8361
|
-
"y2": "100%"
|
8362
|
-
}, [renderStop("#EAEDF0", 0), renderStop("#DCDEE0", 100)]), createVNode("radialGradient", {
|
8363
|
-
"id": `${prefix}4`,
|
8364
|
-
"cx": "50%",
|
8365
|
-
"cy": "0%",
|
8366
|
-
"fx": "50%",
|
8367
|
-
"fy": "0%",
|
8368
|
-
"r": "100%",
|
8369
|
-
"gradientTransform": "matrix(0 1 -.54 0 .5 -.5)"
|
8370
|
-
}, [renderStop("#EBEDF0", 0), renderStop("#FFF", 100, 0)])]), createVNode("g", {
|
8371
|
-
"fill": "none"
|
8372
|
-
}, [createVNode("g", {
|
8373
|
-
"opacity": ".8"
|
8374
|
-
}, [createVNode("path", {
|
8375
|
-
"d": "M36 131V53H16v20H2v58h34z",
|
8376
|
-
"fill": `url(#${prefix}1)`
|
8377
|
-
}, null), createVNode("path", {
|
8378
|
-
"d": "M123 15h22v14h9v77h-31V15z",
|
8379
|
-
"fill": `url(#${prefix}1)`
|
8380
|
-
}, null)]), createVNode("path", {
|
8381
|
-
"fill": `url(#${prefix}4)`,
|
8382
|
-
"d": "M0 139h160v21H0z"
|
8383
|
-
}, null), createVNode("path", {
|
8384
|
-
"d": "M80 54a7 7 0 0 1 3 13v27l-2 2h-2a2 2 0 0 1-2-2V67a7 7 0 0 1 3-13z",
|
8385
|
-
"fill": `url(#${prefix}2)`
|
8386
|
-
}, null), createVNode("g", {
|
8387
|
-
"opacity": ".6",
|
8388
|
-
"stroke-linecap": "round",
|
8389
|
-
"stroke-width": "7"
|
8390
|
-
}, [createVNode("path", {
|
8391
|
-
"d": "M64 47a19 19 0 0 0-5 13c0 5 2 10 5 13",
|
8392
|
-
"stroke": `url(#${prefix}3)`
|
8393
|
-
}, null), createVNode("path", {
|
8394
|
-
"d": "M53 36a34 34 0 0 0 0 48",
|
8395
|
-
"stroke": `url(#${prefix}3)`
|
8396
|
-
}, null), createVNode("path", {
|
8397
|
-
"d": "M95 73a19 19 0 0 0 6-13c0-5-2-9-6-13",
|
8398
|
-
"stroke": `url(#${prefix}3)`
|
8399
|
-
}, null), createVNode("path", {
|
8400
|
-
"d": "M106 84a34 34 0 0 0 0-48",
|
8401
|
-
"stroke": `url(#${prefix}3)`
|
8402
|
-
}, null)]), createVNode("g", {
|
8403
|
-
"transform": "translate(31 105)"
|
8404
|
-
}, [createVNode("rect", {
|
8405
|
-
"fill": "#EBEDF0",
|
8406
|
-
"width": "98",
|
8407
|
-
"height": "34",
|
8408
|
-
"rx": "2"
|
8409
|
-
}, null), createVNode("rect", {
|
8410
|
-
"fill": "#FFF",
|
8411
|
-
"x": "9",
|
8412
|
-
"y": "8",
|
8413
|
-
"width": "80",
|
8414
|
-
"height": "18",
|
8415
|
-
"rx": "1.1"
|
8416
|
-
}, null), createVNode("rect", {
|
8417
|
-
"fill": "#EBEDF0",
|
8418
|
-
"x": "15",
|
8419
|
-
"y": "12",
|
8420
|
-
"width": "18",
|
8421
|
-
"height": "6",
|
8422
|
-
"rx": "1.1"
|
8423
|
-
}, null)])])]);
|
8424
|
-
const [name$x, bem$x] = createNamespace("empty");
|
8425
|
-
const PRESET_IMAGES = ["error", "search", "default"];
|
8426
|
-
const emptyProps = {
|
8427
|
-
image: makeStringProp("default"),
|
8428
|
-
imageSize: numericProp,
|
8429
|
-
description: String
|
8430
|
-
};
|
8431
|
-
var stdin_default$D = defineComponent({
|
8432
|
-
name: name$x,
|
8433
|
-
props: emptyProps,
|
8434
|
-
setup(props, {
|
8435
|
-
slots
|
8436
|
-
}) {
|
8437
|
-
const renderImage = () => {
|
8438
|
-
if (slots.image) {
|
8439
|
-
return slots.image();
|
8440
|
-
}
|
8441
|
-
let {
|
8442
|
-
image
|
8443
|
-
} = props;
|
8444
|
-
if (image === "network") {
|
8445
|
-
return Network;
|
8446
|
-
}
|
8447
|
-
if (PRESET_IMAGES.includes(image)) {
|
8448
|
-
image = `https://img.yzcdn.cn/vant/empty-image-${image}.png`;
|
8449
|
-
}
|
8450
|
-
return createVNode("img", {
|
8451
|
-
"src": image
|
8452
|
-
}, null);
|
8453
|
-
};
|
8454
|
-
const renderDescription = () => {
|
8455
|
-
const description = slots.description ? slots.description() : props.description;
|
8456
|
-
if (description) {
|
8457
|
-
return createVNode("p", {
|
8458
|
-
"class": bem$x("description")
|
8459
|
-
}, [description]);
|
8460
|
-
}
|
8461
|
-
};
|
8462
|
-
const renderBottom = () => {
|
8463
|
-
if (slots.default) {
|
8464
|
-
return createVNode("div", {
|
8465
|
-
"class": bem$x("bottom")
|
8466
|
-
}, [slots.default()]);
|
8467
|
-
}
|
8468
|
-
};
|
8469
|
-
return () => createVNode("div", {
|
8470
|
-
"class": bem$x()
|
8471
|
-
}, [createVNode("div", {
|
8472
|
-
"class": bem$x("image"),
|
8473
|
-
"style": getSizeStyle(props.imageSize)
|
8474
|
-
}, [renderImage()]), renderDescription(), renderBottom()]);
|
8475
|
-
}
|
8476
|
-
});
|
8477
|
-
const Empty = withInstall(stdin_default$D);
|
8468
|
+
const DropdownItem = withInstall(stdin_default$D);
|
8469
|
+
const DropdownMenu = withInstall(stdin_default$E);
|
8478
8470
|
const [name$w, bem$w] = createNamespace("grid");
|
8479
8471
|
const gridProps = {
|
8480
8472
|
square: Boolean,
|
@@ -9968,6 +9960,15 @@ const numberKeyboardProps = {
|
|
9968
9960
|
default: ""
|
9969
9961
|
}
|
9970
9962
|
};
|
9963
|
+
function shuffle(array) {
|
9964
|
+
for (let i = array.length - 1; i > 0; i--) {
|
9965
|
+
const j = Math.floor(Math.random() * (i + 1));
|
9966
|
+
const temp = array[i];
|
9967
|
+
array[i] = array[j];
|
9968
|
+
array[j] = temp;
|
9969
|
+
}
|
9970
|
+
return array;
|
9971
|
+
}
|
9971
9972
|
var stdin_default$r = defineComponent({
|
9972
9973
|
name: name$m,
|
9973
9974
|
props: numberKeyboardProps,
|
@@ -9982,7 +9983,7 @@ var stdin_default$r = defineComponent({
|
|
9982
9983
|
text: i + 1
|
9983
9984
|
}));
|
9984
9985
|
if (props.randomKeyOrder) {
|
9985
|
-
keys2
|
9986
|
+
shuffle(keys2);
|
9986
9987
|
}
|
9987
9988
|
return keys2;
|
9988
9989
|
};
|
@@ -10837,33 +10838,53 @@ var stdin_default$l = defineComponent({
|
|
10837
10838
|
}) {
|
10838
10839
|
const touch = useTouch();
|
10839
10840
|
const [itemRefs, setItemRefs] = useRefs();
|
10841
|
+
const groupRef = ref();
|
10840
10842
|
const untouchable = () => props.readonly || props.disabled || !props.touchable;
|
10841
10843
|
const list = computed(() => Array(+props.count).fill("").map((_, i) => getRateStatus(props.modelValue, i + 1, props.allowHalf, props.readonly)));
|
10842
10844
|
let ranges;
|
10845
|
+
let groupRefRect;
|
10846
|
+
let minRectTop = Number.MAX_SAFE_INTEGER;
|
10847
|
+
let maxRectTop = Number.MIN_SAFE_INTEGER;
|
10843
10848
|
const updateRanges = () => {
|
10849
|
+
groupRefRect = useRect(groupRef);
|
10844
10850
|
const rects = itemRefs.value.map(useRect);
|
10845
10851
|
ranges = [];
|
10846
10852
|
rects.forEach((rect, index) => {
|
10853
|
+
minRectTop = Math.min(rect.top, minRectTop);
|
10854
|
+
maxRectTop = Math.max(rect.top, maxRectTop);
|
10847
10855
|
if (props.allowHalf) {
|
10848
10856
|
ranges.push({
|
10849
10857
|
score: index + 0.5,
|
10850
|
-
left: rect.left
|
10858
|
+
left: rect.left,
|
10859
|
+
top: rect.top,
|
10860
|
+
height: rect.height
|
10851
10861
|
}, {
|
10852
10862
|
score: index + 1,
|
10853
|
-
left: rect.left + rect.width / 2
|
10863
|
+
left: rect.left + rect.width / 2,
|
10864
|
+
top: rect.top,
|
10865
|
+
height: rect.height
|
10854
10866
|
});
|
10855
10867
|
} else {
|
10856
10868
|
ranges.push({
|
10857
10869
|
score: index + 1,
|
10858
|
-
left: rect.left
|
10870
|
+
left: rect.left,
|
10871
|
+
top: rect.top,
|
10872
|
+
height: rect.height
|
10859
10873
|
});
|
10860
10874
|
}
|
10861
10875
|
});
|
10862
10876
|
};
|
10863
|
-
const getScoreByPosition = (x) => {
|
10877
|
+
const getScoreByPosition = (x, y) => {
|
10864
10878
|
for (let i = ranges.length - 1; i > 0; i--) {
|
10865
|
-
if (
|
10866
|
-
|
10879
|
+
if (y >= groupRefRect.top && y <= groupRefRect.bottom) {
|
10880
|
+
if (x > ranges[i].left && y >= ranges[i].top && y <= ranges[i].top + ranges[i].height) {
|
10881
|
+
return ranges[i].score;
|
10882
|
+
}
|
10883
|
+
} else {
|
10884
|
+
const curTop = y < groupRefRect.top ? minRectTop : maxRectTop;
|
10885
|
+
if (x > ranges[i].left && ranges[i].top === curTop) {
|
10886
|
+
return ranges[i].score;
|
10887
|
+
}
|
10867
10888
|
}
|
10868
10889
|
}
|
10869
10890
|
return props.allowHalf ? 0.5 : 1;
|
@@ -10888,10 +10909,11 @@ var stdin_default$l = defineComponent({
|
|
10888
10909
|
touch.move(event);
|
10889
10910
|
if (touch.isHorizontal()) {
|
10890
10911
|
const {
|
10891
|
-
clientX
|
10912
|
+
clientX,
|
10913
|
+
clientY
|
10892
10914
|
} = event.touches[0];
|
10893
10915
|
preventDefault(event);
|
10894
|
-
select(getScoreByPosition(clientX));
|
10916
|
+
select(getScoreByPosition(clientX, clientY));
|
10895
10917
|
}
|
10896
10918
|
};
|
10897
10919
|
const renderStar = (item, index) => {
|
@@ -10920,7 +10942,7 @@ var stdin_default$l = defineComponent({
|
|
10920
10942
|
}
|
10921
10943
|
const onClickItem = (event) => {
|
10922
10944
|
updateRanges();
|
10923
|
-
select(allowHalf ? getScoreByPosition(event.clientX) : score);
|
10945
|
+
select(allowHalf ? getScoreByPosition(event.clientX, event.clientY) : score);
|
10924
10946
|
};
|
10925
10947
|
return createVNode("div", {
|
10926
10948
|
"key": index,
|
@@ -10958,6 +10980,7 @@ var stdin_default$l = defineComponent({
|
|
10958
10980
|
};
|
10959
10981
|
useCustomFieldValue(() => props.modelValue);
|
10960
10982
|
return () => createVNode("div", {
|
10983
|
+
"ref": groupRef,
|
10961
10984
|
"role": "radiogroup",
|
10962
10985
|
"class": bem$f({
|
10963
10986
|
readonly: props.readonly,
|
@@ -11082,14 +11105,17 @@ var stdin_default$k = defineComponent({
|
|
11082
11105
|
}
|
11083
11106
|
});
|
11084
11107
|
const Search = withInstall(stdin_default$k);
|
11085
|
-
const PRESET_ICONS = ["qq", "link", "weibo", "wechat", "poster", "qrcode", "weapp-qrcode", "wechat-moments"];
|
11086
11108
|
const popupInheritKeys = [...popupSharedPropKeys, "round", "closeOnPopstate", "safeAreaInsetBottom"];
|
11087
|
-
|
11088
|
-
|
11089
|
-
|
11090
|
-
|
11091
|
-
|
11092
|
-
|
11109
|
+
const iconMap = {
|
11110
|
+
qq: "qq",
|
11111
|
+
link: "link-o",
|
11112
|
+
weibo: "weibo",
|
11113
|
+
qrcode: "qr",
|
11114
|
+
poster: "photo-o",
|
11115
|
+
wechat: "wechat",
|
11116
|
+
"weapp-qrcode": "miniprogram-o",
|
11117
|
+
"wechat-moments": "wechat-moments"
|
11118
|
+
};
|
11093
11119
|
const [name$e, bem$d, t$2] = createNamespace("share-sheet");
|
11094
11120
|
const shareSheetProps = extend({}, popupSharedProps, {
|
11095
11121
|
title: String,
|
@@ -11127,6 +11153,19 @@ var stdin_default$j = defineComponent({
|
|
11127
11153
|
}, [description])]);
|
11128
11154
|
}
|
11129
11155
|
};
|
11156
|
+
const renderIcon = (icon) => {
|
11157
|
+
if (iconMap[icon]) {
|
11158
|
+
return createVNode("div", {
|
11159
|
+
"class": bem$d("icon", [icon])
|
11160
|
+
}, [createVNode(Icon, {
|
11161
|
+
"name": iconMap[icon] || icon
|
11162
|
+
}, null)]);
|
11163
|
+
}
|
11164
|
+
return createVNode("img", {
|
11165
|
+
"src": icon,
|
11166
|
+
"class": bem$d("image-icon")
|
11167
|
+
}, null);
|
11168
|
+
};
|
11130
11169
|
const renderOption = (option, index) => {
|
11131
11170
|
const {
|
11132
11171
|
name: name2,
|
@@ -11139,10 +11178,7 @@ var stdin_default$j = defineComponent({
|
|
11139
11178
|
"tabindex": 0,
|
11140
11179
|
"class": [bem$d("option"), className, HAPTICS_FEEDBACK],
|
11141
11180
|
"onClick": () => onSelect(option, index)
|
11142
|
-
}, [createVNode("
|
11143
|
-
"src": getIconURL(icon),
|
11144
|
-
"class": bem$d("icon")
|
11145
|
-
}, null), name2 && createVNode("span", {
|
11181
|
+
}, [renderIcon(icon), name2 && createVNode("span", {
|
11146
11182
|
"class": bem$d("name")
|
11147
11183
|
}, [name2]), description && createVNode("span", {
|
11148
11184
|
"class": bem$d("option-description")
|
@@ -12663,7 +12699,7 @@ var stdin_default$5 = defineComponent({
|
|
12663
12699
|
imageFit: String,
|
12664
12700
|
lazyLoad: Boolean,
|
12665
12701
|
deletable: Boolean,
|
12666
|
-
previewSize:
|
12702
|
+
previewSize: [Number, String, Array],
|
12667
12703
|
beforeDelete: Function
|
12668
12704
|
},
|
12669
12705
|
emits: ["delete", "preview"],
|
@@ -12737,16 +12773,19 @@ var stdin_default$5 = defineComponent({
|
|
12737
12773
|
};
|
12738
12774
|
const renderPreview = () => {
|
12739
12775
|
const {
|
12740
|
-
item
|
12776
|
+
item,
|
12777
|
+
lazyLoad,
|
12778
|
+
imageFit,
|
12779
|
+
previewSize
|
12741
12780
|
} = props;
|
12742
12781
|
if (isImageFile(item)) {
|
12743
12782
|
return createVNode(Image$1, {
|
12744
|
-
"fit":
|
12783
|
+
"fit": imageFit,
|
12745
12784
|
"src": item.content || item.url,
|
12746
12785
|
"class": bem("preview-image"),
|
12747
|
-
"width":
|
12748
|
-
"height":
|
12749
|
-
"lazyLoad":
|
12786
|
+
"width": Array.isArray(previewSize) ? previewSize[0] : previewSize,
|
12787
|
+
"height": Array.isArray(previewSize) ? previewSize[1] : previewSize,
|
12788
|
+
"lazyLoad": lazyLoad,
|
12750
12789
|
"onClick": onPreview
|
12751
12790
|
}, {
|
12752
12791
|
default: renderCover
|
@@ -12786,7 +12825,7 @@ const uploaderProps = {
|
|
12786
12825
|
modelValue: makeArrayProp(),
|
12787
12826
|
beforeRead: Function,
|
12788
12827
|
beforeDelete: Function,
|
12789
|
-
previewSize:
|
12828
|
+
previewSize: [Number, String, Array],
|
12790
12829
|
previewImage: truthProp,
|
12791
12830
|
previewOptions: Object,
|
12792
12831
|
previewFullImage: truthProp,
|
@@ -13853,7 +13892,7 @@ const Lazyload = {
|
|
13853
13892
|
});
|
13854
13893
|
}
|
13855
13894
|
};
|
13856
|
-
const version = "4.0.0-alpha.
|
13895
|
+
const version = "4.0.0-alpha.2";
|
13857
13896
|
function install(app) {
|
13858
13897
|
const components = [
|
13859
13898
|
ActionBar,
|