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.js
CHANGED
@@ -473,6 +473,12 @@
|
|
473
473
|
}
|
474
474
|
function getSizeStyle(originSize) {
|
475
475
|
if (isDef(originSize)) {
|
476
|
+
if (Array.isArray(originSize)) {
|
477
|
+
return {
|
478
|
+
width: addUnit(originSize[0]),
|
479
|
+
height: addUnit(originSize[1])
|
480
|
+
};
|
481
|
+
}
|
476
482
|
const size = addUnit(originSize);
|
477
483
|
return {
|
478
484
|
width: size,
|
@@ -634,10 +640,8 @@
|
|
634
640
|
},
|
635
641
|
vanAddressEdit: {
|
636
642
|
area: "\u5730\u533A",
|
637
|
-
postal: "\u90AE\u653F\u7F16\u7801",
|
638
643
|
areaEmpty: "\u8BF7\u9009\u62E9\u5730\u533A",
|
639
644
|
addressEmpty: "\u8BF7\u586B\u5199\u8BE6\u7EC6\u5730\u5740",
|
640
|
-
postalEmpty: "\u90AE\u653F\u7F16\u7801\u4E0D\u6B63\u786E",
|
641
645
|
addressDetail: "\u8BE6\u7EC6\u5730\u5740",
|
642
646
|
defaultAddress: "\u8BBE\u4E3A\u9ED8\u8BA4\u6536\u8D27\u5730\u5740"
|
643
647
|
},
|
@@ -1350,7 +1354,7 @@
|
|
1350
1354
|
};
|
1351
1355
|
const move = (event) => {
|
1352
1356
|
const touch = event.touches[0];
|
1353
|
-
deltaX.value = touch.clientX < 0 ? 0 : touch.clientX - startX.value;
|
1357
|
+
deltaX.value = (touch.clientX < 0 ? 0 : touch.clientX) - startX.value;
|
1354
1358
|
deltaY.value = touch.clientY - startY.value;
|
1355
1359
|
offsetX.value = Math.abs(deltaX.value);
|
1356
1360
|
offsetY.value = Math.abs(deltaY.value);
|
@@ -2615,6 +2619,7 @@
|
|
2615
2619
|
useExpose({
|
2616
2620
|
submit,
|
2617
2621
|
validate,
|
2622
|
+
getValues,
|
2618
2623
|
scrollToField,
|
2619
2624
|
resetValidation
|
2620
2625
|
});
|
@@ -2733,6 +2738,7 @@
|
|
2733
2738
|
placeholder: String,
|
2734
2739
|
autocomplete: String,
|
2735
2740
|
errorMessage: String,
|
2741
|
+
enterkeyhint: String,
|
2736
2742
|
clearTrigger: makeStringProp("focus"),
|
2737
2743
|
formatTrigger: makeStringProp("onChange"),
|
2738
2744
|
error: {
|
@@ -3002,6 +3008,7 @@
|
|
3002
3008
|
autofocus: props.autofocus,
|
3003
3009
|
placeholder: props.placeholder,
|
3004
3010
|
autocomplete: props.autocomplete,
|
3011
|
+
enterkeyhint: props.enterkeyhint,
|
3005
3012
|
"aria-labelledby": props.label ? `${id}-label` : void 0,
|
3006
3013
|
onBlur,
|
3007
3014
|
onFocus,
|
@@ -3580,10 +3587,8 @@
|
|
3580
3587
|
province: "",
|
3581
3588
|
areaCode: "",
|
3582
3589
|
isDefault: false,
|
3583
|
-
postalCode: "",
|
3584
3590
|
addressDetail: ""
|
3585
3591
|
};
|
3586
|
-
const isPostal = (value) => /^\d{6}$/.test(value);
|
3587
3592
|
const addressEditProps = {
|
3588
3593
|
areaList: Object,
|
3589
3594
|
isSaving: Boolean,
|
@@ -3592,7 +3597,6 @@
|
|
3592
3597
|
showArea: truthProp,
|
3593
3598
|
showDetail: truthProp,
|
3594
3599
|
showDelete: Boolean,
|
3595
|
-
showPostal: Boolean,
|
3596
3600
|
disableArea: Boolean,
|
3597
3601
|
searchResult: Array,
|
3598
3602
|
telMaxlength: numericProp,
|
@@ -3611,10 +3615,6 @@
|
|
3611
3615
|
telValidator: {
|
3612
3616
|
type: Function,
|
3613
3617
|
default: isMobile
|
3614
|
-
},
|
3615
|
-
postalValidator: {
|
3616
|
-
type: Function,
|
3617
|
-
default: isPostal
|
3618
3618
|
}
|
3619
3619
|
};
|
3620
3620
|
var stdin_default$1g = vue.defineComponent({
|
@@ -3657,8 +3657,7 @@
|
|
3657
3657
|
const rules = vue.computed(() => {
|
3658
3658
|
const {
|
3659
3659
|
validator,
|
3660
|
-
telValidator
|
3661
|
-
postalValidator
|
3660
|
+
telValidator
|
3662
3661
|
} = props;
|
3663
3662
|
const makeRule = (name2, emptyMessage) => ({
|
3664
3663
|
validator: (value) => {
|
@@ -3681,11 +3680,7 @@
|
|
3681
3680
|
message: t$h("telInvalid")
|
3682
3681
|
}],
|
3683
3682
|
areaCode: [makeRule("areaCode", t$h("areaEmpty"))],
|
3684
|
-
addressDetail: [makeRule("addressDetail", t$h("addressEmpty"))]
|
3685
|
-
postalCode: [makeRule("addressDetail", t$h("postalEmpty")), {
|
3686
|
-
validator: postalValidator,
|
3687
|
-
message: t$h("postalEmpty")
|
3688
|
-
}]
|
3683
|
+
addressDetail: [makeRule("addressDetail", t$h("addressEmpty"))]
|
3689
3684
|
};
|
3690
3685
|
});
|
3691
3686
|
const onSave = () => emit("save", data);
|
@@ -3810,16 +3805,7 @@
|
|
3810
3805
|
"onFocus": () => onFocus("addressDetail"),
|
3811
3806
|
"onInput": onChangeDetail,
|
3812
3807
|
"onSelectSearch": (event) => emit("selectSearch", event)
|
3813
|
-
}, null),
|
3814
|
-
"modelValue": data.postalCode,
|
3815
|
-
"onUpdate:modelValue": ($event) => data.postalCode = $event,
|
3816
|
-
"type": "tel",
|
3817
|
-
"rules": rules.value.postalCode,
|
3818
|
-
"label": t$h("postal"),
|
3819
|
-
"maxlength": "6",
|
3820
|
-
"placeholder": t$h("postal"),
|
3821
|
-
"onFocus": () => onFocus("postalCode")
|
3822
|
-
}, null), [[vue.vShow, !hideBottomFields.value]]), (_a = slots.default) == null ? void 0 : _a.call(slots)]), renderSetDefaultCell(), vue.withDirectives(vue.createVNode("div", {
|
3808
|
+
}, null), (_a = slots.default) == null ? void 0 : _a.call(slots)]), renderSetDefaultCell(), vue.withDirectives(vue.createVNode("div", {
|
3823
3809
|
"class": bem$15("buttons")
|
3824
3810
|
}, [vue.createVNode(Button, {
|
3825
3811
|
"block": true,
|
@@ -4378,6 +4364,7 @@
|
|
4378
4364
|
slots
|
4379
4365
|
}) {
|
4380
4366
|
const style = vue.computed(() => {
|
4367
|
+
var _a;
|
4381
4368
|
const {
|
4382
4369
|
item,
|
4383
4370
|
index,
|
@@ -4409,6 +4396,9 @@
|
|
4409
4396
|
break;
|
4410
4397
|
}
|
4411
4398
|
}
|
4399
|
+
if (offset2 + (((_a = item.date) == null ? void 0 : _a.getDate()) || 1) > 28) {
|
4400
|
+
style2.marginBottom = 0;
|
4401
|
+
}
|
4412
4402
|
return style2;
|
4413
4403
|
});
|
4414
4404
|
const onClick = () => {
|
@@ -4916,8 +4906,8 @@
|
|
4916
4906
|
}
|
4917
4907
|
raf(() => {
|
4918
4908
|
bodyHeight = Math.floor(useRect(bodyRef).height);
|
4919
|
-
scrollToCurrentDate();
|
4920
4909
|
});
|
4910
|
+
scrollToCurrentDate();
|
4921
4911
|
};
|
4922
4912
|
const reset = (date = getInitialDate()) => {
|
4923
4913
|
currentDate.value = date;
|
@@ -6228,6 +6218,7 @@
|
|
6228
6218
|
}
|
6229
6219
|
};
|
6230
6220
|
const renderNav = () => children.map((item, index) => vue.createVNode(stdin_default$12, vue.mergeProps({
|
6221
|
+
"key": item.id,
|
6231
6222
|
"id": `${id}-${index}`,
|
6232
6223
|
"ref": setTitleRefs(index),
|
6233
6224
|
"type": props.type,
|
@@ -7817,14 +7808,152 @@
|
|
7817
7808
|
}
|
7818
7809
|
});
|
7819
7810
|
const CouponCell = withInstall(stdin_default$K);
|
7820
|
-
const
|
7821
|
-
const
|
7811
|
+
const prefix = "van-empty-network-";
|
7812
|
+
const renderStop = (color, offset2, opacity) => vue.createVNode("stop", {
|
7813
|
+
"stop-color": color,
|
7814
|
+
"offset": `${offset2}%`,
|
7815
|
+
"stop-opacity": opacity
|
7816
|
+
}, null);
|
7817
|
+
const Network = vue.createVNode("svg", {
|
7818
|
+
"viewBox": "0 0 160 160"
|
7819
|
+
}, [vue.createVNode("defs", null, [vue.createVNode("linearGradient", {
|
7820
|
+
"id": `${prefix}1`,
|
7821
|
+
"x1": "64%",
|
7822
|
+
"y1": "100%",
|
7823
|
+
"x2": "64%"
|
7824
|
+
}, [renderStop("#FFF", 0, 0.5), renderStop("#F2F3F5", 100)]), vue.createVNode("linearGradient", {
|
7825
|
+
"id": `${prefix}2`,
|
7826
|
+
"x1": "50%",
|
7827
|
+
"x2": "50%",
|
7828
|
+
"y2": "84%"
|
7829
|
+
}, [renderStop("#EBEDF0", 0), renderStop("#DCDEE0", 100, 0)]), vue.createVNode("linearGradient", {
|
7830
|
+
"id": `${prefix}3`,
|
7831
|
+
"x1": "100%",
|
7832
|
+
"x2": "100%",
|
7833
|
+
"y2": "100%"
|
7834
|
+
}, [renderStop("#EAEDF0", 0), renderStop("#DCDEE0", 100)]), vue.createVNode("radialGradient", {
|
7835
|
+
"id": `${prefix}4`,
|
7836
|
+
"cx": "50%",
|
7837
|
+
"cy": "0%",
|
7838
|
+
"fx": "50%",
|
7839
|
+
"fy": "0%",
|
7840
|
+
"r": "100%",
|
7841
|
+
"gradientTransform": "matrix(0 1 -.54 0 .5 -.5)"
|
7842
|
+
}, [renderStop("#EBEDF0", 0), renderStop("#FFF", 100, 0)])]), vue.createVNode("g", {
|
7843
|
+
"fill": "none"
|
7844
|
+
}, [vue.createVNode("g", {
|
7845
|
+
"opacity": ".8"
|
7846
|
+
}, [vue.createVNode("path", {
|
7847
|
+
"d": "M36 131V53H16v20H2v58h34z",
|
7848
|
+
"fill": `url(#${prefix}1)`
|
7849
|
+
}, null), vue.createVNode("path", {
|
7850
|
+
"d": "M123 15h22v14h9v77h-31V15z",
|
7851
|
+
"fill": `url(#${prefix}1)`
|
7852
|
+
}, null)]), vue.createVNode("path", {
|
7853
|
+
"fill": `url(#${prefix}4)`,
|
7854
|
+
"d": "M0 139h160v21H0z"
|
7855
|
+
}, null), vue.createVNode("path", {
|
7856
|
+
"d": "M80 54a7 7 0 0 1 3 13v27l-2 2h-2a2 2 0 0 1-2-2V67a7 7 0 0 1 3-13z",
|
7857
|
+
"fill": `url(#${prefix}2)`
|
7858
|
+
}, null), vue.createVNode("g", {
|
7859
|
+
"opacity": ".6",
|
7860
|
+
"stroke-linecap": "round",
|
7861
|
+
"stroke-width": "7"
|
7862
|
+
}, [vue.createVNode("path", {
|
7863
|
+
"d": "M64 47a19 19 0 0 0-5 13c0 5 2 10 5 13",
|
7864
|
+
"stroke": `url(#${prefix}3)`
|
7865
|
+
}, null), vue.createVNode("path", {
|
7866
|
+
"d": "M53 36a34 34 0 0 0 0 48",
|
7867
|
+
"stroke": `url(#${prefix}3)`
|
7868
|
+
}, null), vue.createVNode("path", {
|
7869
|
+
"d": "M95 73a19 19 0 0 0 6-13c0-5-2-9-6-13",
|
7870
|
+
"stroke": `url(#${prefix}3)`
|
7871
|
+
}, null), vue.createVNode("path", {
|
7872
|
+
"d": "M106 84a34 34 0 0 0 0-48",
|
7873
|
+
"stroke": `url(#${prefix}3)`
|
7874
|
+
}, null)]), vue.createVNode("g", {
|
7875
|
+
"transform": "translate(31 105)"
|
7876
|
+
}, [vue.createVNode("rect", {
|
7877
|
+
"fill": "#EBEDF0",
|
7878
|
+
"width": "98",
|
7879
|
+
"height": "34",
|
7880
|
+
"rx": "2"
|
7881
|
+
}, null), vue.createVNode("rect", {
|
7882
|
+
"fill": "#FFF",
|
7883
|
+
"x": "9",
|
7884
|
+
"y": "8",
|
7885
|
+
"width": "80",
|
7886
|
+
"height": "18",
|
7887
|
+
"rx": "1.1"
|
7888
|
+
}, null), vue.createVNode("rect", {
|
7889
|
+
"fill": "#EBEDF0",
|
7890
|
+
"x": "15",
|
7891
|
+
"y": "12",
|
7892
|
+
"width": "18",
|
7893
|
+
"height": "6",
|
7894
|
+
"rx": "1.1"
|
7895
|
+
}, null)])])]);
|
7896
|
+
const [name$D, bem$C] = createNamespace("empty");
|
7897
|
+
const PRESET_IMAGES = ["error", "search", "default"];
|
7898
|
+
const emptyProps = {
|
7899
|
+
image: makeStringProp("default"),
|
7900
|
+
imageSize: [Number, String, Array],
|
7901
|
+
description: String
|
7902
|
+
};
|
7903
|
+
var stdin_default$J = vue.defineComponent({
|
7904
|
+
name: name$D,
|
7905
|
+
props: emptyProps,
|
7906
|
+
setup(props, {
|
7907
|
+
slots
|
7908
|
+
}) {
|
7909
|
+
const renderImage = () => {
|
7910
|
+
if (slots.image) {
|
7911
|
+
return slots.image();
|
7912
|
+
}
|
7913
|
+
let {
|
7914
|
+
image
|
7915
|
+
} = props;
|
7916
|
+
if (image === "network") {
|
7917
|
+
return Network;
|
7918
|
+
}
|
7919
|
+
if (PRESET_IMAGES.includes(image)) {
|
7920
|
+
image = `https://img.yzcdn.cn/vant/empty-image-${image}.png`;
|
7921
|
+
}
|
7922
|
+
return vue.createVNode("img", {
|
7923
|
+
"src": image
|
7924
|
+
}, null);
|
7925
|
+
};
|
7926
|
+
const renderDescription = () => {
|
7927
|
+
const description = slots.description ? slots.description() : props.description;
|
7928
|
+
if (description) {
|
7929
|
+
return vue.createVNode("p", {
|
7930
|
+
"class": bem$C("description")
|
7931
|
+
}, [description]);
|
7932
|
+
}
|
7933
|
+
};
|
7934
|
+
const renderBottom = () => {
|
7935
|
+
if (slots.default) {
|
7936
|
+
return vue.createVNode("div", {
|
7937
|
+
"class": bem$C("bottom")
|
7938
|
+
}, [slots.default()]);
|
7939
|
+
}
|
7940
|
+
};
|
7941
|
+
return () => vue.createVNode("div", {
|
7942
|
+
"class": bem$C()
|
7943
|
+
}, [vue.createVNode("div", {
|
7944
|
+
"class": bem$C("image"),
|
7945
|
+
"style": getSizeStyle(props.imageSize)
|
7946
|
+
}, [renderImage()]), renderDescription(), renderBottom()]);
|
7947
|
+
}
|
7948
|
+
});
|
7949
|
+
const Empty = withInstall(stdin_default$J);
|
7950
|
+
const [name$C, bem$B, t$8] = createNamespace("coupon-list");
|
7822
7951
|
const couponListProps = {
|
7823
7952
|
code: makeStringProp(""),
|
7824
7953
|
coupons: makeArrayProp(),
|
7825
7954
|
currency: makeStringProp("\xA5"),
|
7826
7955
|
showCount: truthProp,
|
7827
|
-
emptyImage:
|
7956
|
+
emptyImage: String,
|
7828
7957
|
chosenCoupon: makeNumberProp(-1),
|
7829
7958
|
enabledTitle: String,
|
7830
7959
|
disabledTitle: String,
|
@@ -7839,8 +7968,8 @@
|
|
7839
7968
|
exchangeButtonLoading: Boolean,
|
7840
7969
|
exchangeButtonDisabled: Boolean
|
7841
7970
|
};
|
7842
|
-
var stdin_default$
|
7843
|
-
name: name$
|
7971
|
+
var stdin_default$I = vue.defineComponent({
|
7972
|
+
name: name$C,
|
7844
7973
|
props: couponListProps,
|
7845
7974
|
emits: ["change", "exchange", "update:code"],
|
7846
7975
|
setup(props, {
|
@@ -7872,28 +8001,30 @@
|
|
7872
8001
|
return (_a = couponRefs.value[index]) == null ? void 0 : _a.scrollIntoView();
|
7873
8002
|
});
|
7874
8003
|
};
|
7875
|
-
const renderEmpty = () => vue.createVNode(
|
7876
|
-
"
|
7877
|
-
},
|
7878
|
-
"
|
7879
|
-
|
8004
|
+
const renderEmpty = () => vue.createVNode(Empty, {
|
8005
|
+
"image": props.emptyImage
|
8006
|
+
}, {
|
8007
|
+
default: () => [vue.createVNode("p", {
|
8008
|
+
"class": bem$B("empty-tip")
|
8009
|
+
}, [t$8("noCoupon")])]
|
8010
|
+
});
|
7880
8011
|
const renderExchangeBar = () => {
|
7881
8012
|
if (props.showExchangeBar) {
|
7882
8013
|
return vue.createVNode("div", {
|
7883
8014
|
"ref": barRef,
|
7884
|
-
"class": bem$
|
8015
|
+
"class": bem$B("exchange-bar")
|
7885
8016
|
}, [vue.createVNode(Field, {
|
7886
8017
|
"modelValue": currentCode.value,
|
7887
8018
|
"onUpdate:modelValue": ($event) => currentCode.value = $event,
|
7888
8019
|
"clearable": true,
|
7889
8020
|
"border": false,
|
7890
|
-
"class": bem$
|
8021
|
+
"class": bem$B("field"),
|
7891
8022
|
"placeholder": props.inputPlaceholder || t$8("placeholder"),
|
7892
8023
|
"maxlength": "20"
|
7893
8024
|
}, null), vue.createVNode(Button, {
|
7894
8025
|
"plain": true,
|
7895
8026
|
"type": "primary",
|
7896
|
-
"class": bem$
|
8027
|
+
"class": bem$B("exchange"),
|
7897
8028
|
"text": props.exchangeButtonText || t$8("exchange"),
|
7898
8029
|
"loading": props.exchangeButtonLoading,
|
7899
8030
|
"disabled": buttonDisabled.value,
|
@@ -7913,7 +8044,7 @@
|
|
7913
8044
|
default: () => {
|
7914
8045
|
var _a;
|
7915
8046
|
return [vue.createVNode("div", {
|
7916
|
-
"class": bem$
|
8047
|
+
"class": bem$B("list", {
|
7917
8048
|
"with-bottom": props.showCloseButton
|
7918
8049
|
}),
|
7919
8050
|
"style": {
|
@@ -7942,7 +8073,7 @@
|
|
7942
8073
|
default: () => {
|
7943
8074
|
var _a;
|
7944
8075
|
return [vue.createVNode("div", {
|
7945
|
-
"class": bem$
|
8076
|
+
"class": bem$B("list", {
|
7946
8077
|
"with-bottom": props.showCloseButton
|
7947
8078
|
}),
|
7948
8079
|
"style": {
|
@@ -7969,28 +8100,28 @@
|
|
7969
8100
|
});
|
7970
8101
|
return () => vue.createVNode("div", {
|
7971
8102
|
"ref": root,
|
7972
|
-
"class": bem$
|
8103
|
+
"class": bem$B()
|
7973
8104
|
}, [renderExchangeBar(), vue.createVNode(Tabs, {
|
7974
8105
|
"active": activeTab.value,
|
7975
8106
|
"onUpdate:active": ($event) => activeTab.value = $event,
|
7976
|
-
"class": bem$
|
8107
|
+
"class": bem$B("tab")
|
7977
8108
|
}, {
|
7978
8109
|
default: () => [renderCouponTab(), renderDisabledTab()]
|
7979
8110
|
}), vue.createVNode("div", {
|
7980
|
-
"class": bem$
|
8111
|
+
"class": bem$B("bottom")
|
7981
8112
|
}, [vue.withDirectives(vue.createVNode(Button, {
|
7982
8113
|
"round": true,
|
7983
8114
|
"block": true,
|
7984
8115
|
"type": "primary",
|
7985
|
-
"class": bem$
|
8116
|
+
"class": bem$B("close"),
|
7986
8117
|
"text": props.closeButtonText || t$8("close"),
|
7987
8118
|
"onClick": () => emit("change", -1)
|
7988
8119
|
}, null), [[vue.vShow, props.showCloseButton]])])]);
|
7989
8120
|
}
|
7990
8121
|
});
|
7991
|
-
const CouponList = withInstall(stdin_default$
|
8122
|
+
const CouponList = withInstall(stdin_default$I);
|
7992
8123
|
const currentYear = new Date().getFullYear();
|
7993
|
-
const [name$
|
8124
|
+
const [name$B] = createNamespace("date-picker");
|
7994
8125
|
const datePickerProps = extend({}, sharedProps, {
|
7995
8126
|
columnsType: {
|
7996
8127
|
type: Array,
|
@@ -8007,8 +8138,8 @@
|
|
8007
8138
|
validator: isDate
|
8008
8139
|
}
|
8009
8140
|
});
|
8010
|
-
var stdin_default$
|
8011
|
-
name: name$
|
8141
|
+
var stdin_default$H = vue.defineComponent({
|
8142
|
+
name: name$B,
|
8012
8143
|
props: datePickerProps,
|
8013
8144
|
emits: ["confirm", "cancel", "change", "update:modelValue"],
|
8014
8145
|
setup(props, {
|
@@ -8092,8 +8223,8 @@
|
|
8092
8223
|
}, pick(props, pickerInheritKeys)), slots);
|
8093
8224
|
}
|
8094
8225
|
});
|
8095
|
-
const DatePicker = withInstall(stdin_default$
|
8096
|
-
const [name$
|
8226
|
+
const DatePicker = withInstall(stdin_default$H);
|
8227
|
+
const [name$A, bem$A, t$7] = createNamespace("dialog");
|
8097
8228
|
const dialogProps = extend({}, popupSharedProps, {
|
8098
8229
|
title: String,
|
8099
8230
|
theme: String,
|
@@ -8114,8 +8245,8 @@
|
|
8114
8245
|
closeOnClickOverlay: Boolean
|
8115
8246
|
});
|
8116
8247
|
const popupInheritKeys$1 = [...popupSharedPropKeys, "transition", "closeOnPopstate"];
|
8117
|
-
var stdin_default$
|
8118
|
-
name: name$
|
8248
|
+
var stdin_default$G = vue.defineComponent({
|
8249
|
+
name: name$A,
|
8119
8250
|
props: dialogProps,
|
8120
8251
|
emits: ["confirm", "cancel", "keydown", "update:show"],
|
8121
8252
|
setup(props, {
|
@@ -8172,7 +8303,7 @@
|
|
8172
8303
|
const title = slots.title ? slots.title() : props.title;
|
8173
8304
|
if (title) {
|
8174
8305
|
return vue.createVNode("div", {
|
8175
|
-
"class": bem$
|
8306
|
+
"class": bem$A("header", {
|
8176
8307
|
isolated: !props.message && !slots.default
|
8177
8308
|
})
|
8178
8309
|
}, [title]);
|
@@ -8184,7 +8315,7 @@
|
|
8184
8315
|
allowHtml,
|
8185
8316
|
messageAlign
|
8186
8317
|
} = props;
|
8187
|
-
const classNames = bem$
|
8318
|
+
const classNames = bem$A("message", {
|
8188
8319
|
"has-title": hasTitle,
|
8189
8320
|
[messageAlign]: messageAlign
|
8190
8321
|
});
|
@@ -8202,7 +8333,7 @@
|
|
8202
8333
|
const renderContent = () => {
|
8203
8334
|
if (slots.default) {
|
8204
8335
|
return vue.createVNode("div", {
|
8205
|
-
"class": bem$
|
8336
|
+
"class": bem$A("content")
|
8206
8337
|
}, [slots.default()]);
|
8207
8338
|
}
|
8208
8339
|
const {
|
@@ -8214,18 +8345,18 @@
|
|
8214
8345
|
const hasTitle = !!(title || slots.title);
|
8215
8346
|
return vue.createVNode("div", {
|
8216
8347
|
"key": allowHtml ? 1 : 0,
|
8217
|
-
"class": bem$
|
8348
|
+
"class": bem$A("content", {
|
8218
8349
|
isolated: !hasTitle
|
8219
8350
|
})
|
8220
8351
|
}, [renderMessage(hasTitle)]);
|
8221
8352
|
}
|
8222
8353
|
};
|
8223
8354
|
const renderButtons = () => vue.createVNode("div", {
|
8224
|
-
"class": [BORDER_TOP, bem$
|
8355
|
+
"class": [BORDER_TOP, bem$A("footer")]
|
8225
8356
|
}, [props.showCancelButton && vue.createVNode(Button, {
|
8226
8357
|
"size": "large",
|
8227
8358
|
"text": props.cancelButtonText || t$7("cancel"),
|
8228
|
-
"class": bem$
|
8359
|
+
"class": bem$A("cancel"),
|
8229
8360
|
"style": {
|
8230
8361
|
color: props.cancelButtonColor
|
8231
8362
|
},
|
@@ -8234,7 +8365,7 @@
|
|
8234
8365
|
}, null), props.showConfirmButton && vue.createVNode(Button, {
|
8235
8366
|
"size": "large",
|
8236
8367
|
"text": props.confirmButtonText || t$7("confirm"),
|
8237
|
-
"class": [bem$
|
8368
|
+
"class": [bem$A("confirm"), {
|
8238
8369
|
[BORDER_LEFT]: props.showCancelButton
|
8239
8370
|
}],
|
8240
8371
|
"style": {
|
@@ -8244,19 +8375,19 @@
|
|
8244
8375
|
"onClick": onConfirm
|
8245
8376
|
}, null)]);
|
8246
8377
|
const renderRoundButtons = () => vue.createVNode(ActionBar, {
|
8247
|
-
"class": bem$
|
8378
|
+
"class": bem$A("footer")
|
8248
8379
|
}, {
|
8249
8380
|
default: () => [props.showCancelButton && vue.createVNode(ActionBarButton, {
|
8250
8381
|
"type": "warning",
|
8251
8382
|
"text": props.cancelButtonText || t$7("cancel"),
|
8252
|
-
"class": bem$
|
8383
|
+
"class": bem$A("cancel"),
|
8253
8384
|
"color": props.cancelButtonColor,
|
8254
8385
|
"loading": loading.cancel,
|
8255
8386
|
"onClick": onCancel
|
8256
8387
|
}, null), props.showConfirmButton && vue.createVNode(ActionBarButton, {
|
8257
8388
|
"type": "danger",
|
8258
8389
|
"text": props.confirmButtonText || t$7("confirm"),
|
8259
|
-
"class": bem$
|
8390
|
+
"class": bem$A("confirm"),
|
8260
8391
|
"color": props.confirmButtonColor,
|
8261
8392
|
"loading": loading.confirm,
|
8262
8393
|
"onClick": onConfirm
|
@@ -8279,7 +8410,7 @@
|
|
8279
8410
|
return vue.createVNode(Popup, vue.mergeProps({
|
8280
8411
|
"ref": root,
|
8281
8412
|
"role": "dialog",
|
8282
|
-
"class": [bem$
|
8413
|
+
"class": [bem$A([theme]), className],
|
8283
8414
|
"style": {
|
8284
8415
|
width: addUnit(width2)
|
8285
8416
|
},
|
@@ -8301,7 +8432,7 @@
|
|
8301
8432
|
state,
|
8302
8433
|
toggle
|
8303
8434
|
} = usePopupState();
|
8304
|
-
return () => vue.createVNode(stdin_default$
|
8435
|
+
return () => vue.createVNode(stdin_default$G, vue.mergeProps(state, {
|
8305
8436
|
"onUpdate:show": toggle
|
8306
8437
|
}), null);
|
8307
8438
|
}
|
@@ -8366,19 +8497,19 @@
|
|
8366
8497
|
Dialog.resetDefaultOptions = () => {
|
8367
8498
|
Dialog.currentOptions = extend({}, Dialog.defaultOptions);
|
8368
8499
|
};
|
8369
|
-
Dialog.Component = withInstall(stdin_default$
|
8500
|
+
Dialog.Component = withInstall(stdin_default$G);
|
8370
8501
|
Dialog.install = (app) => {
|
8371
8502
|
app.use(Dialog.Component);
|
8372
8503
|
app.config.globalProperties.$dialog = Dialog;
|
8373
8504
|
};
|
8374
|
-
const [name$
|
8505
|
+
const [name$z, bem$z] = createNamespace("divider");
|
8375
8506
|
const dividerProps = {
|
8376
8507
|
dashed: Boolean,
|
8377
8508
|
hairline: truthProp,
|
8378
8509
|
contentPosition: makeStringProp("center")
|
8379
8510
|
};
|
8380
|
-
var stdin_default$
|
8381
|
-
name: name$
|
8511
|
+
var stdin_default$F = vue.defineComponent({
|
8512
|
+
name: name$z,
|
8382
8513
|
props: dividerProps,
|
8383
8514
|
setup(props, {
|
8384
8515
|
slots
|
@@ -8387,7 +8518,7 @@
|
|
8387
8518
|
var _a;
|
8388
8519
|
return vue.createVNode("div", {
|
8389
8520
|
"role": "separator",
|
8390
|
-
"class": bem$
|
8521
|
+
"class": bem$z({
|
8391
8522
|
dashed: props.dashed,
|
8392
8523
|
hairline: props.hairline,
|
8393
8524
|
[`content-${props.contentPosition}`]: !!slots.default
|
@@ -8396,8 +8527,8 @@
|
|
8396
8527
|
};
|
8397
8528
|
}
|
8398
8529
|
});
|
8399
|
-
const Divider = withInstall(stdin_default$
|
8400
|
-
const [name$
|
8530
|
+
const Divider = withInstall(stdin_default$F);
|
8531
|
+
const [name$y, bem$y] = createNamespace("dropdown-menu");
|
8401
8532
|
const dropdownMenuProps = {
|
8402
8533
|
overlay: truthProp,
|
8403
8534
|
zIndex: numericProp,
|
@@ -8407,9 +8538,9 @@
|
|
8407
8538
|
closeOnClickOutside: truthProp,
|
8408
8539
|
closeOnClickOverlay: truthProp
|
8409
8540
|
};
|
8410
|
-
const DROPDOWN_KEY = Symbol(name$
|
8411
|
-
var stdin_default$
|
8412
|
-
name: name$
|
8541
|
+
const DROPDOWN_KEY = Symbol(name$y);
|
8542
|
+
var stdin_default$E = vue.defineComponent({
|
8543
|
+
name: name$y,
|
8413
8544
|
props: dropdownMenuProps,
|
8414
8545
|
setup(props, {
|
8415
8546
|
slots
|
@@ -8477,7 +8608,7 @@
|
|
8477
8608
|
"id": `${id}-${index}`,
|
8478
8609
|
"role": "button",
|
8479
8610
|
"tabindex": disabled ? void 0 : 0,
|
8480
|
-
"class": [bem$
|
8611
|
+
"class": [bem$y("item", {
|
8481
8612
|
disabled
|
8482
8613
|
}), {
|
8483
8614
|
[HAPTICS_FEEDBACK]: !disabled
|
@@ -8488,7 +8619,7 @@
|
|
8488
8619
|
}
|
8489
8620
|
}
|
8490
8621
|
}, [vue.createVNode("span", {
|
8491
|
-
"class": [bem$
|
8622
|
+
"class": [bem$y("title", {
|
8492
8623
|
down: showPopup === (props.direction === "down"),
|
8493
8624
|
active: showPopup
|
8494
8625
|
}), titleClass],
|
@@ -8512,18 +8643,18 @@
|
|
8512
8643
|
var _a;
|
8513
8644
|
return vue.createVNode("div", {
|
8514
8645
|
"ref": root,
|
8515
|
-
"class": bem$
|
8646
|
+
"class": bem$y()
|
8516
8647
|
}, [vue.createVNode("div", {
|
8517
8648
|
"ref": barRef,
|
8518
8649
|
"style": barStyle.value,
|
8519
|
-
"class": bem$
|
8650
|
+
"class": bem$y("bar", {
|
8520
8651
|
opened: opened.value
|
8521
8652
|
})
|
8522
8653
|
}, [children.map(renderTitle)]), (_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
8523
8654
|
};
|
8524
8655
|
}
|
8525
8656
|
});
|
8526
|
-
const [name$
|
8657
|
+
const [name$x, bem$x] = createNamespace("dropdown-item");
|
8527
8658
|
const dropdownItemProps = {
|
8528
8659
|
title: String,
|
8529
8660
|
options: makeArrayProp(),
|
@@ -8533,8 +8664,8 @@
|
|
8533
8664
|
modelValue: unknownProp,
|
8534
8665
|
titleClass: unknownProp
|
8535
8666
|
};
|
8536
|
-
var stdin_default$
|
8537
|
-
name: name$
|
8667
|
+
var stdin_default$D = vue.defineComponent({
|
8668
|
+
name: name$x,
|
8538
8669
|
props: dropdownItemProps,
|
8539
8670
|
emits: ["open", "opened", "close", "closed", "change", "update:modelValue"],
|
8540
8671
|
setup(props, {
|
@@ -8601,7 +8732,7 @@
|
|
8601
8732
|
const renderIcon = () => {
|
8602
8733
|
if (active) {
|
8603
8734
|
return vue.createVNode(Icon, {
|
8604
|
-
"class": bem$
|
8735
|
+
"class": bem$x("icon"),
|
8605
8736
|
"color": activeColor,
|
8606
8737
|
"name": "success"
|
8607
8738
|
}, null);
|
@@ -8612,7 +8743,7 @@
|
|
8612
8743
|
"key": option.value,
|
8613
8744
|
"icon": option.icon,
|
8614
8745
|
"title": option.text,
|
8615
|
-
"class": bem$
|
8746
|
+
"class": bem$x("option", {
|
8616
8747
|
active
|
8617
8748
|
}),
|
8618
8749
|
"style": {
|
@@ -8644,13 +8775,13 @@
|
|
8644
8775
|
}
|
8645
8776
|
return vue.withDirectives(vue.createVNode("div", {
|
8646
8777
|
"style": style,
|
8647
|
-
"class": bem$
|
8778
|
+
"class": bem$x([direction]),
|
8648
8779
|
"onClick": onClickWrapper
|
8649
8780
|
}, [vue.createVNode(Popup, {
|
8650
8781
|
"show": state.showPopup,
|
8651
8782
|
"onUpdate:show": ($event) => state.showPopup = $event,
|
8652
8783
|
"role": "menu",
|
8653
|
-
"class": bem$
|
8784
|
+
"class": bem$x("content"),
|
8654
8785
|
"overlay": overlay,
|
8655
8786
|
"position": direction === "down" ? "top" : "bottom",
|
8656
8787
|
"duration": state.transition ? duration : 0,
|
@@ -8688,147 +8819,8 @@
|
|
8688
8819
|
};
|
8689
8820
|
}
|
8690
8821
|
});
|
8691
|
-
const DropdownItem = withInstall(stdin_default$
|
8692
|
-
const DropdownMenu = withInstall(stdin_default$
|
8693
|
-
const prefix = "van-empty-network-";
|
8694
|
-
const renderStop = (color, offset2, opacity) => vue.createVNode("stop", {
|
8695
|
-
"stop-color": color,
|
8696
|
-
"offset": `${offset2}%`,
|
8697
|
-
"stop-opacity": opacity
|
8698
|
-
}, null);
|
8699
|
-
const Network = vue.createVNode("svg", {
|
8700
|
-
"viewBox": "0 0 160 160"
|
8701
|
-
}, [vue.createVNode("defs", null, [vue.createVNode("linearGradient", {
|
8702
|
-
"id": `${prefix}1`,
|
8703
|
-
"x1": "64%",
|
8704
|
-
"y1": "100%",
|
8705
|
-
"x2": "64%"
|
8706
|
-
}, [renderStop("#FFF", 0, 0.5), renderStop("#F2F3F5", 100)]), vue.createVNode("linearGradient", {
|
8707
|
-
"id": `${prefix}2`,
|
8708
|
-
"x1": "50%",
|
8709
|
-
"x2": "50%",
|
8710
|
-
"y2": "84%"
|
8711
|
-
}, [renderStop("#EBEDF0", 0), renderStop("#DCDEE0", 100, 0)]), vue.createVNode("linearGradient", {
|
8712
|
-
"id": `${prefix}3`,
|
8713
|
-
"x1": "100%",
|
8714
|
-
"x2": "100%",
|
8715
|
-
"y2": "100%"
|
8716
|
-
}, [renderStop("#EAEDF0", 0), renderStop("#DCDEE0", 100)]), vue.createVNode("radialGradient", {
|
8717
|
-
"id": `${prefix}4`,
|
8718
|
-
"cx": "50%",
|
8719
|
-
"cy": "0%",
|
8720
|
-
"fx": "50%",
|
8721
|
-
"fy": "0%",
|
8722
|
-
"r": "100%",
|
8723
|
-
"gradientTransform": "matrix(0 1 -.54 0 .5 -.5)"
|
8724
|
-
}, [renderStop("#EBEDF0", 0), renderStop("#FFF", 100, 0)])]), vue.createVNode("g", {
|
8725
|
-
"fill": "none"
|
8726
|
-
}, [vue.createVNode("g", {
|
8727
|
-
"opacity": ".8"
|
8728
|
-
}, [vue.createVNode("path", {
|
8729
|
-
"d": "M36 131V53H16v20H2v58h34z",
|
8730
|
-
"fill": `url(#${prefix}1)`
|
8731
|
-
}, null), vue.createVNode("path", {
|
8732
|
-
"d": "M123 15h22v14h9v77h-31V15z",
|
8733
|
-
"fill": `url(#${prefix}1)`
|
8734
|
-
}, null)]), vue.createVNode("path", {
|
8735
|
-
"fill": `url(#${prefix}4)`,
|
8736
|
-
"d": "M0 139h160v21H0z"
|
8737
|
-
}, null), vue.createVNode("path", {
|
8738
|
-
"d": "M80 54a7 7 0 0 1 3 13v27l-2 2h-2a2 2 0 0 1-2-2V67a7 7 0 0 1 3-13z",
|
8739
|
-
"fill": `url(#${prefix}2)`
|
8740
|
-
}, null), vue.createVNode("g", {
|
8741
|
-
"opacity": ".6",
|
8742
|
-
"stroke-linecap": "round",
|
8743
|
-
"stroke-width": "7"
|
8744
|
-
}, [vue.createVNode("path", {
|
8745
|
-
"d": "M64 47a19 19 0 0 0-5 13c0 5 2 10 5 13",
|
8746
|
-
"stroke": `url(#${prefix}3)`
|
8747
|
-
}, null), vue.createVNode("path", {
|
8748
|
-
"d": "M53 36a34 34 0 0 0 0 48",
|
8749
|
-
"stroke": `url(#${prefix}3)`
|
8750
|
-
}, null), vue.createVNode("path", {
|
8751
|
-
"d": "M95 73a19 19 0 0 0 6-13c0-5-2-9-6-13",
|
8752
|
-
"stroke": `url(#${prefix}3)`
|
8753
|
-
}, null), vue.createVNode("path", {
|
8754
|
-
"d": "M106 84a34 34 0 0 0 0-48",
|
8755
|
-
"stroke": `url(#${prefix}3)`
|
8756
|
-
}, null)]), vue.createVNode("g", {
|
8757
|
-
"transform": "translate(31 105)"
|
8758
|
-
}, [vue.createVNode("rect", {
|
8759
|
-
"fill": "#EBEDF0",
|
8760
|
-
"width": "98",
|
8761
|
-
"height": "34",
|
8762
|
-
"rx": "2"
|
8763
|
-
}, null), vue.createVNode("rect", {
|
8764
|
-
"fill": "#FFF",
|
8765
|
-
"x": "9",
|
8766
|
-
"y": "8",
|
8767
|
-
"width": "80",
|
8768
|
-
"height": "18",
|
8769
|
-
"rx": "1.1"
|
8770
|
-
}, null), vue.createVNode("rect", {
|
8771
|
-
"fill": "#EBEDF0",
|
8772
|
-
"x": "15",
|
8773
|
-
"y": "12",
|
8774
|
-
"width": "18",
|
8775
|
-
"height": "6",
|
8776
|
-
"rx": "1.1"
|
8777
|
-
}, null)])])]);
|
8778
|
-
const [name$x, bem$x] = createNamespace("empty");
|
8779
|
-
const PRESET_IMAGES = ["error", "search", "default"];
|
8780
|
-
const emptyProps = {
|
8781
|
-
image: makeStringProp("default"),
|
8782
|
-
imageSize: numericProp,
|
8783
|
-
description: String
|
8784
|
-
};
|
8785
|
-
var stdin_default$D = vue.defineComponent({
|
8786
|
-
name: name$x,
|
8787
|
-
props: emptyProps,
|
8788
|
-
setup(props, {
|
8789
|
-
slots
|
8790
|
-
}) {
|
8791
|
-
const renderImage = () => {
|
8792
|
-
if (slots.image) {
|
8793
|
-
return slots.image();
|
8794
|
-
}
|
8795
|
-
let {
|
8796
|
-
image
|
8797
|
-
} = props;
|
8798
|
-
if (image === "network") {
|
8799
|
-
return Network;
|
8800
|
-
}
|
8801
|
-
if (PRESET_IMAGES.includes(image)) {
|
8802
|
-
image = `https://img.yzcdn.cn/vant/empty-image-${image}.png`;
|
8803
|
-
}
|
8804
|
-
return vue.createVNode("img", {
|
8805
|
-
"src": image
|
8806
|
-
}, null);
|
8807
|
-
};
|
8808
|
-
const renderDescription = () => {
|
8809
|
-
const description = slots.description ? slots.description() : props.description;
|
8810
|
-
if (description) {
|
8811
|
-
return vue.createVNode("p", {
|
8812
|
-
"class": bem$x("description")
|
8813
|
-
}, [description]);
|
8814
|
-
}
|
8815
|
-
};
|
8816
|
-
const renderBottom = () => {
|
8817
|
-
if (slots.default) {
|
8818
|
-
return vue.createVNode("div", {
|
8819
|
-
"class": bem$x("bottom")
|
8820
|
-
}, [slots.default()]);
|
8821
|
-
}
|
8822
|
-
};
|
8823
|
-
return () => vue.createVNode("div", {
|
8824
|
-
"class": bem$x()
|
8825
|
-
}, [vue.createVNode("div", {
|
8826
|
-
"class": bem$x("image"),
|
8827
|
-
"style": getSizeStyle(props.imageSize)
|
8828
|
-
}, [renderImage()]), renderDescription(), renderBottom()]);
|
8829
|
-
}
|
8830
|
-
});
|
8831
|
-
const Empty = withInstall(stdin_default$D);
|
8822
|
+
const DropdownItem = withInstall(stdin_default$D);
|
8823
|
+
const DropdownMenu = withInstall(stdin_default$E);
|
8832
8824
|
const [name$w, bem$w] = createNamespace("grid");
|
8833
8825
|
const gridProps = {
|
8834
8826
|
square: Boolean,
|
@@ -10322,6 +10314,15 @@
|
|
10322
10314
|
default: ""
|
10323
10315
|
}
|
10324
10316
|
};
|
10317
|
+
function shuffle(array) {
|
10318
|
+
for (let i = array.length - 1; i > 0; i--) {
|
10319
|
+
const j = Math.floor(Math.random() * (i + 1));
|
10320
|
+
const temp = array[i];
|
10321
|
+
array[i] = array[j];
|
10322
|
+
array[j] = temp;
|
10323
|
+
}
|
10324
|
+
return array;
|
10325
|
+
}
|
10325
10326
|
var stdin_default$r = vue.defineComponent({
|
10326
10327
|
name: name$m,
|
10327
10328
|
props: numberKeyboardProps,
|
@@ -10336,7 +10337,7 @@
|
|
10336
10337
|
text: i + 1
|
10337
10338
|
}));
|
10338
10339
|
if (props.randomKeyOrder) {
|
10339
|
-
keys2
|
10340
|
+
shuffle(keys2);
|
10340
10341
|
}
|
10341
10342
|
return keys2;
|
10342
10343
|
};
|
@@ -12048,33 +12049,53 @@
|
|
12048
12049
|
}) {
|
12049
12050
|
const touch = useTouch();
|
12050
12051
|
const [itemRefs, setItemRefs] = useRefs();
|
12052
|
+
const groupRef = vue.ref();
|
12051
12053
|
const untouchable = () => props.readonly || props.disabled || !props.touchable;
|
12052
12054
|
const list = vue.computed(() => Array(+props.count).fill("").map((_, i) => getRateStatus(props.modelValue, i + 1, props.allowHalf, props.readonly)));
|
12053
12055
|
let ranges;
|
12056
|
+
let groupRefRect;
|
12057
|
+
let minRectTop = Number.MAX_SAFE_INTEGER;
|
12058
|
+
let maxRectTop = Number.MIN_SAFE_INTEGER;
|
12054
12059
|
const updateRanges = () => {
|
12060
|
+
groupRefRect = useRect(groupRef);
|
12055
12061
|
const rects = itemRefs.value.map(useRect);
|
12056
12062
|
ranges = [];
|
12057
12063
|
rects.forEach((rect, index) => {
|
12064
|
+
minRectTop = Math.min(rect.top, minRectTop);
|
12065
|
+
maxRectTop = Math.max(rect.top, maxRectTop);
|
12058
12066
|
if (props.allowHalf) {
|
12059
12067
|
ranges.push({
|
12060
12068
|
score: index + 0.5,
|
12061
|
-
left: rect.left
|
12069
|
+
left: rect.left,
|
12070
|
+
top: rect.top,
|
12071
|
+
height: rect.height
|
12062
12072
|
}, {
|
12063
12073
|
score: index + 1,
|
12064
|
-
left: rect.left + rect.width / 2
|
12074
|
+
left: rect.left + rect.width / 2,
|
12075
|
+
top: rect.top,
|
12076
|
+
height: rect.height
|
12065
12077
|
});
|
12066
12078
|
} else {
|
12067
12079
|
ranges.push({
|
12068
12080
|
score: index + 1,
|
12069
|
-
left: rect.left
|
12081
|
+
left: rect.left,
|
12082
|
+
top: rect.top,
|
12083
|
+
height: rect.height
|
12070
12084
|
});
|
12071
12085
|
}
|
12072
12086
|
});
|
12073
12087
|
};
|
12074
|
-
const getScoreByPosition = (x) => {
|
12088
|
+
const getScoreByPosition = (x, y) => {
|
12075
12089
|
for (let i = ranges.length - 1; i > 0; i--) {
|
12076
|
-
if (
|
12077
|
-
|
12090
|
+
if (y >= groupRefRect.top && y <= groupRefRect.bottom) {
|
12091
|
+
if (x > ranges[i].left && y >= ranges[i].top && y <= ranges[i].top + ranges[i].height) {
|
12092
|
+
return ranges[i].score;
|
12093
|
+
}
|
12094
|
+
} else {
|
12095
|
+
const curTop = y < groupRefRect.top ? minRectTop : maxRectTop;
|
12096
|
+
if (x > ranges[i].left && ranges[i].top === curTop) {
|
12097
|
+
return ranges[i].score;
|
12098
|
+
}
|
12078
12099
|
}
|
12079
12100
|
}
|
12080
12101
|
return props.allowHalf ? 0.5 : 1;
|
@@ -12099,10 +12120,11 @@
|
|
12099
12120
|
touch.move(event);
|
12100
12121
|
if (touch.isHorizontal()) {
|
12101
12122
|
const {
|
12102
|
-
clientX
|
12123
|
+
clientX,
|
12124
|
+
clientY
|
12103
12125
|
} = event.touches[0];
|
12104
12126
|
preventDefault(event);
|
12105
|
-
select(getScoreByPosition(clientX));
|
12127
|
+
select(getScoreByPosition(clientX, clientY));
|
12106
12128
|
}
|
12107
12129
|
};
|
12108
12130
|
const renderStar = (item, index) => {
|
@@ -12131,7 +12153,7 @@
|
|
12131
12153
|
}
|
12132
12154
|
const onClickItem = (event) => {
|
12133
12155
|
updateRanges();
|
12134
|
-
select(allowHalf ? getScoreByPosition(event.clientX) : score);
|
12156
|
+
select(allowHalf ? getScoreByPosition(event.clientX, event.clientY) : score);
|
12135
12157
|
};
|
12136
12158
|
return vue.createVNode("div", {
|
12137
12159
|
"key": index,
|
@@ -12169,6 +12191,7 @@
|
|
12169
12191
|
};
|
12170
12192
|
useCustomFieldValue(() => props.modelValue);
|
12171
12193
|
return () => vue.createVNode("div", {
|
12194
|
+
"ref": groupRef,
|
12172
12195
|
"role": "radiogroup",
|
12173
12196
|
"class": bem$f({
|
12174
12197
|
readonly: props.readonly,
|
@@ -12293,14 +12316,17 @@
|
|
12293
12316
|
}
|
12294
12317
|
});
|
12295
12318
|
const Search = withInstall(stdin_default$k);
|
12296
|
-
const PRESET_ICONS = ["qq", "link", "weibo", "wechat", "poster", "qrcode", "weapp-qrcode", "wechat-moments"];
|
12297
12319
|
const popupInheritKeys = [...popupSharedPropKeys, "round", "closeOnPopstate", "safeAreaInsetBottom"];
|
12298
|
-
|
12299
|
-
|
12300
|
-
|
12301
|
-
|
12302
|
-
|
12303
|
-
|
12320
|
+
const iconMap = {
|
12321
|
+
qq: "qq",
|
12322
|
+
link: "link-o",
|
12323
|
+
weibo: "weibo",
|
12324
|
+
qrcode: "qr",
|
12325
|
+
poster: "photo-o",
|
12326
|
+
wechat: "wechat",
|
12327
|
+
"weapp-qrcode": "miniprogram-o",
|
12328
|
+
"wechat-moments": "wechat-moments"
|
12329
|
+
};
|
12304
12330
|
const [name$e, bem$d, t$2] = createNamespace("share-sheet");
|
12305
12331
|
const shareSheetProps = extend({}, popupSharedProps, {
|
12306
12332
|
title: String,
|
@@ -12338,6 +12364,19 @@
|
|
12338
12364
|
}, [description])]);
|
12339
12365
|
}
|
12340
12366
|
};
|
12367
|
+
const renderIcon = (icon) => {
|
12368
|
+
if (iconMap[icon]) {
|
12369
|
+
return vue.createVNode("div", {
|
12370
|
+
"class": bem$d("icon", [icon])
|
12371
|
+
}, [vue.createVNode(Icon, {
|
12372
|
+
"name": iconMap[icon] || icon
|
12373
|
+
}, null)]);
|
12374
|
+
}
|
12375
|
+
return vue.createVNode("img", {
|
12376
|
+
"src": icon,
|
12377
|
+
"class": bem$d("image-icon")
|
12378
|
+
}, null);
|
12379
|
+
};
|
12341
12380
|
const renderOption = (option, index) => {
|
12342
12381
|
const {
|
12343
12382
|
name: name2,
|
@@ -12350,10 +12389,7 @@
|
|
12350
12389
|
"tabindex": 0,
|
12351
12390
|
"class": [bem$d("option"), className, HAPTICS_FEEDBACK],
|
12352
12391
|
"onClick": () => onSelect(option, index)
|
12353
|
-
}, [vue.createVNode("
|
12354
|
-
"src": getIconURL(icon),
|
12355
|
-
"class": bem$d("icon")
|
12356
|
-
}, null), name2 && vue.createVNode("span", {
|
12392
|
+
}, [renderIcon(icon), name2 && vue.createVNode("span", {
|
12357
12393
|
"class": bem$d("name")
|
12358
12394
|
}, [name2]), description && vue.createVNode("span", {
|
12359
12395
|
"class": bem$d("option-description")
|
@@ -13874,7 +13910,7 @@
|
|
13874
13910
|
imageFit: String,
|
13875
13911
|
lazyLoad: Boolean,
|
13876
13912
|
deletable: Boolean,
|
13877
|
-
previewSize:
|
13913
|
+
previewSize: [Number, String, Array],
|
13878
13914
|
beforeDelete: Function
|
13879
13915
|
},
|
13880
13916
|
emits: ["delete", "preview"],
|
@@ -13948,16 +13984,19 @@
|
|
13948
13984
|
};
|
13949
13985
|
const renderPreview = () => {
|
13950
13986
|
const {
|
13951
|
-
item
|
13987
|
+
item,
|
13988
|
+
lazyLoad,
|
13989
|
+
imageFit,
|
13990
|
+
previewSize
|
13952
13991
|
} = props;
|
13953
13992
|
if (isImageFile(item)) {
|
13954
13993
|
return vue.createVNode(Image$1, {
|
13955
|
-
"fit":
|
13994
|
+
"fit": imageFit,
|
13956
13995
|
"src": item.content || item.url,
|
13957
13996
|
"class": bem("preview-image"),
|
13958
|
-
"width":
|
13959
|
-
"height":
|
13960
|
-
"lazyLoad":
|
13997
|
+
"width": Array.isArray(previewSize) ? previewSize[0] : previewSize,
|
13998
|
+
"height": Array.isArray(previewSize) ? previewSize[1] : previewSize,
|
13999
|
+
"lazyLoad": lazyLoad,
|
13961
14000
|
"onClick": onPreview
|
13962
14001
|
}, {
|
13963
14002
|
default: renderCover
|
@@ -13997,7 +14036,7 @@
|
|
13997
14036
|
modelValue: makeArrayProp(),
|
13998
14037
|
beforeRead: Function,
|
13999
14038
|
beforeDelete: Function,
|
14000
|
-
previewSize:
|
14039
|
+
previewSize: [Number, String, Array],
|
14001
14040
|
previewImage: truthProp,
|
14002
14041
|
previewOptions: Object,
|
14003
14042
|
previewFullImage: truthProp,
|
@@ -15064,7 +15103,7 @@
|
|
15064
15103
|
});
|
15065
15104
|
}
|
15066
15105
|
};
|
15067
|
-
const version = "4.0.0-alpha.
|
15106
|
+
const version = "4.0.0-alpha.2";
|
15068
15107
|
function install(app) {
|
15069
15108
|
const components = [
|
15070
15109
|
ActionBar,
|