vant 3.4.5 → 3.4.8
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 +79 -0
- package/es/address-list/AddressListItem.d.ts +3 -2
- package/es/address-list/AddressListItem.js +1 -1
- package/es/badge/Badge.d.ts +4 -3
- package/es/badge/index.d.ts +2 -2
- package/es/calendar/Calendar.d.ts +4 -0
- package/es/calendar/Calendar.js +3 -1
- package/es/calendar/CalendarDay.js +4 -0
- package/es/calendar/index.css +1 -1
- package/es/calendar/index.d.ts +3 -0
- package/es/calendar/index.less +2 -0
- package/es/calendar/types.d.ts +2 -1
- package/es/calendar/var.less +1 -0
- 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/coupon-list/var.less +0 -1
- package/es/datetime-picker/DatePicker.js +2 -2
- 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/IndexBar.js +25 -4
- package/es/index-bar/index.d.ts +3 -3
- package/es/index-bar/types.d.ts +2 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/locale/lang/da-DK.d.ts +64 -0
- package/es/locale/lang/da-DK.js +66 -0
- package/es/locale/lang/is-IS.d.ts +64 -0
- package/es/locale/lang/is-IS.js +74 -0
- package/es/locale/lang/la-LA.d.ts +64 -0
- package/es/locale/lang/la-LA.js +66 -0
- package/es/locale/lang/sv-SE.d.ts +64 -0
- package/es/locale/lang/sv-SE.js +66 -0
- package/es/nav-bar/NavBar.d.ts +1 -1
- package/es/nav-bar/NavBar.js +3 -3
- package/es/nav-bar/index.d.ts +1 -1
- package/es/notify/types.d.ts +2 -1
- package/es/number-keyboard/NumberKeyboard.js +10 -1
- package/es/picker/types.d.ts +3 -2
- package/es/popup/Popup.d.ts +4 -0
- package/es/popup/Popup.js +3 -0
- package/es/popup/index.css +1 -1
- package/es/popup/index.d.ts +3 -0
- package/es/progress/Progress.d.ts +4 -3
- package/es/progress/index.d.ts +2 -2
- package/es/rate/Rate.js +32 -10
- package/es/search/Search.d.ts +3 -0
- package/es/search/index.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/Skeleton.js +6 -4
- package/es/skeleton/index.d.ts +3 -3
- package/es/slider/index.css +1 -1
- package/es/style/animation.css +1 -1
- package/es/style/base.css +1 -1
- package/es/style/base.less +5 -0
- package/es/swipe-cell/SwipeCell.js +1 -1
- package/es/swipe-cell/index.css +1 -1
- package/es/tabbar/Tabbar.d.ts +2 -2
- package/es/tabs/Tabs.d.ts +1 -1
- package/es/tabs/Tabs.js +1 -0
- package/es/tabs/types.d.ts +5 -4
- package/es/toast/Toast.js +1 -0
- package/es/toast/types.d.ts +3 -2
- package/es/tree-select/TreeSelect.d.ts +7 -6
- package/es/tree-select/index.d.ts +3 -3
- package/es/uploader/Uploader.d.ts +4 -4
- package/es/uploader/Uploader.js +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.js +9 -16
- package/lib/address-edit/AddressEditDetail.js +8 -13
- package/lib/address-edit/index.js +9 -16
- 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/badge/Badge.d.ts +4 -3
- package/lib/badge/Badge.js +8 -13
- package/lib/badge/index.d.ts +2 -2
- package/lib/badge/index.js +9 -16
- package/lib/button/Button.js +8 -13
- package/lib/button/index.js +9 -16
- package/lib/button/types.js +7 -12
- package/lib/calendar/Calendar.d.ts +4 -0
- package/lib/calendar/Calendar.js +12 -17
- package/lib/calendar/CalendarDay.js +12 -13
- package/lib/calendar/CalendarHeader.js +8 -13
- package/lib/calendar/CalendarMonth.js +9 -16
- package/lib/calendar/index.css +1 -1
- package/lib/calendar/index.d.ts +3 -0
- package/lib/calendar/index.js +9 -16
- package/lib/calendar/index.less +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/calendar/var.less +1 -0
- 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/coupon-list/var.less +0 -1
- package/lib/datetime-picker/DatePicker.js +10 -15
- package/lib/datetime-picker/DatetimePicker.js +9 -16
- package/lib/datetime-picker/TimePicker.js +8 -13
- package/lib/datetime-picker/index.js +9 -16
- package/lib/datetime-picker/types.js +7 -12
- package/lib/datetime-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 +33 -17
- package/lib/index-bar/index.d.ts +3 -3
- package/lib/index-bar/index.js +9 -16
- package/lib/index-bar/types.d.ts +2 -1
- package/lib/index-bar/types.js +7 -12
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +96 -100
- 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.js +8 -13
- 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.js +8 -13
- package/lib/locale/lang/de-DE.js +8 -13
- package/lib/locale/lang/en-US.js +8 -13
- package/lib/locale/lang/es-ES.js +8 -13
- package/lib/locale/lang/fr-FR.js +8 -13
- package/lib/locale/lang/hi-IN.js +8 -13
- package/lib/locale/lang/id-ID.js +8 -13
- package/lib/locale/lang/is-IS.d.ts +64 -0
- package/lib/locale/lang/is-IS.js +93 -0
- package/lib/locale/lang/it-IT.js +8 -13
- package/lib/locale/lang/ja-JP.js +8 -13
- package/lib/locale/lang/ko-KR.js +8 -13
- package/lib/locale/lang/la-LA.d.ts +64 -0
- package/lib/locale/lang/la-LA.js +85 -0
- package/lib/locale/lang/nb-NO.js +8 -13
- package/lib/locale/lang/pt-BR.js +8 -13
- package/lib/locale/lang/ro-RO.js +8 -13
- package/lib/locale/lang/ru-RU.js +8 -13
- package/lib/locale/lang/sv-SE.d.ts +64 -0
- package/lib/locale/lang/sv-SE.js +85 -0
- package/lib/locale/lang/th-TH.js +8 -13
- package/lib/locale/lang/tr-TR.js +8 -13
- package/lib/locale/lang/uk-UA.js +8 -13
- package/lib/locale/lang/vi-VN.js +8 -13
- package/lib/locale/lang/zh-CN.js +8 -13
- package/lib/locale/lang/zh-HK.js +8 -13
- package/lib/locale/lang/zh-TW.js +8 -13
- package/lib/nav-bar/NavBar.d.ts +1 -1
- package/lib/nav-bar/NavBar.js +11 -16
- package/lib/nav-bar/index.d.ts +1 -1
- package/lib/nav-bar/index.js +9 -16
- package/lib/notice-bar/NoticeBar.js +8 -13
- package/lib/notice-bar/index.js +9 -16
- package/lib/notice-bar/types.js +7 -12
- package/lib/notify/Notify.js +8 -13
- package/lib/notify/function-call.js +9 -16
- package/lib/notify/index.js +8 -13
- package/lib/notify/types.d.ts +2 -1
- package/lib/notify/types.js +7 -12
- package/lib/number-keyboard/NumberKeyboard.js +19 -17
- package/lib/number-keyboard/NumberKeyboardKey.js +8 -13
- package/lib/number-keyboard/index.js +9 -16
- package/lib/overlay/Overlay.js +8 -13
- package/lib/overlay/index.js +9 -16
- package/lib/pagination/Pagination.js +8 -13
- package/lib/pagination/index.js +9 -16
- package/lib/password-input/PasswordInput.js +8 -13
- package/lib/password-input/index.js +9 -16
- package/lib/picker/Picker.js +9 -16
- package/lib/picker/PickerColumn.js +8 -13
- package/lib/picker/index.js +9 -16
- package/lib/picker/types.d.ts +3 -2
- package/lib/picker/types.js +7 -12
- package/lib/popover/Popover.js +8 -13
- package/lib/popover/index.js +9 -16
- package/lib/popover/types.js +7 -12
- package/lib/popup/Popup.d.ts +4 -0
- package/lib/popup/Popup.js +11 -13
- package/lib/popup/index.css +1 -1
- package/lib/popup/index.d.ts +3 -0
- package/lib/popup/index.js +9 -16
- package/lib/popup/shared.js +8 -13
- package/lib/popup/types.js +7 -12
- package/lib/progress/Progress.d.ts +4 -3
- package/lib/progress/Progress.js +8 -13
- package/lib/progress/index.d.ts +2 -2
- package/lib/progress/index.js +9 -16
- package/lib/progress/types.js +7 -12
- package/lib/pull-refresh/PullRefresh.js +8 -13
- package/lib/pull-refresh/index.js +9 -16
- package/lib/radio/Radio.js +9 -16
- package/lib/radio/index.js +9 -16
- package/lib/radio-group/RadioGroup.js +8 -13
- package/lib/radio-group/index.js +9 -16
- package/lib/rate/Rate.js +39 -22
- package/lib/rate/index.js +9 -16
- package/lib/row/Row.js +8 -13
- package/lib/row/index.js +9 -16
- package/lib/search/Search.d.ts +3 -0
- package/lib/search/Search.js +8 -13
- package/lib/search/index.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 +13 -16
- package/lib/skeleton/index.d.ts +3 -3
- package/lib/skeleton/index.js +9 -16
- package/lib/slider/Slider.js +8 -13
- package/lib/slider/index.css +1 -1
- package/lib/slider/index.js +9 -16
- package/lib/step/Step.js +8 -13
- package/lib/step/index.js +9 -16
- package/lib/stepper/Stepper.js +8 -13
- package/lib/stepper/index.js +9 -16
- package/lib/steps/Steps.js +8 -13
- package/lib/steps/index.js +9 -16
- package/lib/sticky/Sticky.js +8 -13
- package/lib/sticky/index.js +9 -16
- package/lib/style/animation.css +1 -1
- package/lib/style/base.css +1 -1
- package/lib/style/base.less +5 -0
- package/lib/submit-bar/SubmitBar.js +8 -13
- package/lib/submit-bar/index.js +9 -16
- package/lib/swipe/Swipe.js +8 -13
- package/lib/swipe/index.js +9 -16
- package/lib/swipe/types.js +7 -12
- package/lib/swipe-cell/SwipeCell.js +9 -14
- package/lib/swipe-cell/index.css +1 -1
- package/lib/swipe-cell/index.js +9 -16
- package/lib/swipe-cell/types.js +7 -12
- package/lib/swipe-item/SwipeItem.js +8 -13
- package/lib/swipe-item/index.js +9 -16
- package/lib/switch/Switch.js +8 -13
- package/lib/switch/index.js +9 -16
- package/lib/tab/Tab.js +8 -13
- package/lib/tab/index.js +9 -16
- package/lib/tabbar/Tabbar.d.ts +2 -2
- package/lib/tabbar/Tabbar.js +8 -13
- package/lib/tabbar/index.js +9 -16
- package/lib/tabbar-item/TabbarItem.js +8 -13
- package/lib/tabbar-item/index.js +9 -16
- package/lib/tabs/Tabs.d.ts +1 -1
- package/lib/tabs/Tabs.js +10 -16
- package/lib/tabs/TabsContent.js +8 -13
- package/lib/tabs/TabsTitle.js +8 -13
- package/lib/tabs/index.js +9 -16
- package/lib/tabs/types.d.ts +5 -4
- package/lib/tabs/types.js +7 -12
- package/lib/tabs/utils.js +8 -13
- package/lib/tag/Tag.js +8 -13
- package/lib/tag/index.js +9 -16
- package/lib/toast/Toast.js +9 -13
- package/lib/toast/function-call.js +9 -16
- package/lib/toast/index.js +8 -13
- package/lib/toast/lock-click.js +8 -13
- package/lib/toast/types.d.ts +3 -2
- package/lib/toast/types.js +7 -12
- package/lib/tree-select/TreeSelect.d.ts +7 -6
- package/lib/tree-select/TreeSelect.js +8 -13
- package/lib/tree-select/index.d.ts +3 -3
- package/lib/tree-select/index.js +9 -16
- package/lib/uploader/Uploader.d.ts +4 -4
- package/lib/uploader/Uploader.js +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 +347 -256
- package/lib/vant.cjs.min.js +1 -1
- package/lib/vant.es.js +347 -256
- package/lib/vant.es.min.js +347 -256
- package/lib/vant.js +347 -256
- package/lib/vant.min.js +1 -1
- package/package.json +4 -4
- package/vetur/attributes.json +223 -279
- package/vetur/tags.json +53 -49
- package/vetur/web-types.json +1628 -753
package/lib/vant.es.min.js
CHANGED
@@ -118,6 +118,12 @@ function addUnit(value) {
|
|
118
118
|
}
|
119
119
|
function getSizeStyle(originSize) {
|
120
120
|
if (isDef(originSize)) {
|
121
|
+
if (Array.isArray(originSize)) {
|
122
|
+
return {
|
123
|
+
width: addUnit(originSize[0]),
|
124
|
+
height: addUnit(originSize[1])
|
125
|
+
};
|
126
|
+
}
|
121
127
|
const size = addUnit(originSize);
|
122
128
|
return {
|
123
129
|
width: size,
|
@@ -986,7 +992,7 @@ function useTouch() {
|
|
986
992
|
};
|
987
993
|
const move = (event) => {
|
988
994
|
const touch = event.touches[0];
|
989
|
-
deltaX.value = touch.clientX < 0 ? 0 : touch.clientX - startX.value;
|
995
|
+
deltaX.value = (touch.clientX < 0 ? 0 : touch.clientX) - startX.value;
|
990
996
|
deltaY.value = touch.clientY - startY.value;
|
991
997
|
offsetX.value = Math.abs(deltaX.value);
|
992
998
|
offsetY.value = Math.abs(deltaY.value);
|
@@ -1126,6 +1132,7 @@ const popupProps$2 = extend({}, popupSharedProps, {
|
|
1126
1132
|
iconPrefix: String,
|
1127
1133
|
closeOnPopstate: Boolean,
|
1128
1134
|
closeIconPosition: makeStringProp("top-right"),
|
1135
|
+
safeAreaInsetTop: Boolean,
|
1129
1136
|
safeAreaInsetBottom: Boolean
|
1130
1137
|
});
|
1131
1138
|
const [name$1l, bem$1h] = createNamespace("popup");
|
@@ -1220,6 +1227,7 @@ var stdin_default$1s = defineComponent({
|
|
1220
1227
|
const {
|
1221
1228
|
round,
|
1222
1229
|
position,
|
1230
|
+
safeAreaInsetTop,
|
1223
1231
|
safeAreaInsetBottom
|
1224
1232
|
} = props;
|
1225
1233
|
return withDirectives(createVNode("div", mergeProps({
|
@@ -1229,6 +1237,7 @@ var stdin_default$1s = defineComponent({
|
|
1229
1237
|
round,
|
1230
1238
|
[position]: position
|
1231
1239
|
}), {
|
1240
|
+
"van-safe-area-top": safeAreaInsetTop,
|
1232
1241
|
"van-safe-area-bottom": safeAreaInsetBottom
|
1233
1242
|
}],
|
1234
1243
|
"onKeydown": onKeydown
|
@@ -2439,6 +2448,7 @@ var stdin_default$1m = defineComponent({
|
|
2439
2448
|
useExpose({
|
2440
2449
|
submit,
|
2441
2450
|
validate,
|
2451
|
+
getValues,
|
2442
2452
|
scrollToField,
|
2443
2453
|
resetValidation
|
2444
2454
|
});
|
@@ -2557,6 +2567,7 @@ const fieldSharedProps = {
|
|
2557
2567
|
placeholder: String,
|
2558
2568
|
autocomplete: String,
|
2559
2569
|
errorMessage: String,
|
2570
|
+
enterkeyhint: String,
|
2560
2571
|
clearTrigger: makeStringProp("focus"),
|
2561
2572
|
formatTrigger: makeStringProp("onChange"),
|
2562
2573
|
error: {
|
@@ -2826,6 +2837,7 @@ var stdin_default$1l = defineComponent({
|
|
2826
2837
|
autofocus: props.autofocus,
|
2827
2838
|
placeholder: props.placeholder,
|
2828
2839
|
autocomplete: props.autocomplete,
|
2840
|
+
enterkeyhint: props.enterkeyhint,
|
2829
2841
|
"aria-labelledby": props.label ? `${id}-label` : void 0,
|
2830
2842
|
onBlur,
|
2831
2843
|
onFocus,
|
@@ -3089,6 +3101,7 @@ var stdin_default$1k = defineComponent({
|
|
3089
3101
|
} = props;
|
3090
3102
|
if (isDef(message) && message !== "") {
|
3091
3103
|
return type === "html" ? createVNode("div", {
|
3104
|
+
"key": 0,
|
3092
3105
|
"class": bem$19("text"),
|
3093
3106
|
"innerHTML": String(message)
|
3094
3107
|
}, null) : createVNode("div", {
|
@@ -4237,6 +4250,7 @@ var stdin_default$1a = defineComponent({
|
|
4237
4250
|
slots
|
4238
4251
|
}) {
|
4239
4252
|
const style = computed(() => {
|
4253
|
+
var _a;
|
4240
4254
|
const {
|
4241
4255
|
item,
|
4242
4256
|
index,
|
@@ -4268,6 +4282,9 @@ var stdin_default$1a = defineComponent({
|
|
4268
4282
|
break;
|
4269
4283
|
}
|
4270
4284
|
}
|
4285
|
+
if (offset + (((_a = item.date) == null ? void 0 : _a.getDate()) || 1) > 28) {
|
4286
|
+
style2.marginBottom = 0;
|
4287
|
+
}
|
4271
4288
|
return style2;
|
4272
4289
|
});
|
4273
4290
|
const onClick = () => {
|
@@ -4612,6 +4629,7 @@ const calendarProps = {
|
|
4612
4629
|
showRangePrompt: truthProp,
|
4613
4630
|
confirmDisabledText: String,
|
4614
4631
|
closeOnClickOverlay: truthProp,
|
4632
|
+
safeAreaInsetTop: Boolean,
|
4615
4633
|
safeAreaInsetBottom: truthProp,
|
4616
4634
|
minDate: {
|
4617
4635
|
type: Date,
|
@@ -4774,8 +4792,8 @@ var stdin_default$17 = defineComponent({
|
|
4774
4792
|
}
|
4775
4793
|
raf(() => {
|
4776
4794
|
bodyHeight = Math.floor(useRect(bodyRef).height);
|
4777
|
-
scrollToCurrentDate();
|
4778
4795
|
});
|
4796
|
+
scrollToCurrentDate();
|
4779
4797
|
};
|
4780
4798
|
const reset = (date = getInitialDate()) => {
|
4781
4799
|
currentDate.value = date;
|
@@ -4960,6 +4978,7 @@ var stdin_default$17 = defineComponent({
|
|
4960
4978
|
"closeable": props.showTitle || props.showSubtitle,
|
4961
4979
|
"teleport": props.teleport,
|
4962
4980
|
"closeOnPopstate": props.closeOnPopstate,
|
4981
|
+
"safeAreaInsetTop": props.safeAreaInsetTop,
|
4963
4982
|
"closeOnClickOverlay": props.closeOnClickOverlay,
|
4964
4983
|
"onUpdate:show": updateShow
|
4965
4984
|
}, {
|
@@ -6088,6 +6107,7 @@ var stdin_default$10 = defineComponent({
|
|
6088
6107
|
}
|
6089
6108
|
};
|
6090
6109
|
const renderNav = () => children.map((item, index) => createVNode(stdin_default$13, mergeProps({
|
6110
|
+
"key": item.id,
|
6091
6111
|
"id": `${id}-${index}`,
|
6092
6112
|
"ref": setTitleRefs(index),
|
6093
6113
|
"type": props.type,
|
@@ -7678,14 +7698,152 @@ var stdin_default$L = defineComponent({
|
|
7678
7698
|
}
|
7679
7699
|
});
|
7680
7700
|
const CouponCell = withInstall(stdin_default$L);
|
7681
|
-
const
|
7682
|
-
const
|
7701
|
+
const prefix = "van-empty-network-";
|
7702
|
+
const renderStop = (color, offset, opacity) => createVNode("stop", {
|
7703
|
+
"stop-color": color,
|
7704
|
+
"offset": `${offset}%`,
|
7705
|
+
"stop-opacity": opacity
|
7706
|
+
}, null);
|
7707
|
+
const Network = createVNode("svg", {
|
7708
|
+
"viewBox": "0 0 160 160"
|
7709
|
+
}, [createVNode("defs", null, [createVNode("linearGradient", {
|
7710
|
+
"id": `${prefix}1`,
|
7711
|
+
"x1": "64%",
|
7712
|
+
"y1": "100%",
|
7713
|
+
"x2": "64%"
|
7714
|
+
}, [renderStop("#FFF", 0, 0.5), renderStop("#F2F3F5", 100)]), createVNode("linearGradient", {
|
7715
|
+
"id": `${prefix}2`,
|
7716
|
+
"x1": "50%",
|
7717
|
+
"x2": "50%",
|
7718
|
+
"y2": "84%"
|
7719
|
+
}, [renderStop("#EBEDF0", 0), renderStop("#DCDEE0", 100, 0)]), createVNode("linearGradient", {
|
7720
|
+
"id": `${prefix}3`,
|
7721
|
+
"x1": "100%",
|
7722
|
+
"x2": "100%",
|
7723
|
+
"y2": "100%"
|
7724
|
+
}, [renderStop("#EAEDF0", 0), renderStop("#DCDEE0", 100)]), createVNode("radialGradient", {
|
7725
|
+
"id": `${prefix}4`,
|
7726
|
+
"cx": "50%",
|
7727
|
+
"cy": "0%",
|
7728
|
+
"fx": "50%",
|
7729
|
+
"fy": "0%",
|
7730
|
+
"r": "100%",
|
7731
|
+
"gradientTransform": "matrix(0 1 -.54 0 .5 -.5)"
|
7732
|
+
}, [renderStop("#EBEDF0", 0), renderStop("#FFF", 100, 0)])]), createVNode("g", {
|
7733
|
+
"fill": "none"
|
7734
|
+
}, [createVNode("g", {
|
7735
|
+
"opacity": ".8"
|
7736
|
+
}, [createVNode("path", {
|
7737
|
+
"d": "M36 131V53H16v20H2v58h34z",
|
7738
|
+
"fill": `url(#${prefix}1)`
|
7739
|
+
}, null), createVNode("path", {
|
7740
|
+
"d": "M123 15h22v14h9v77h-31V15z",
|
7741
|
+
"fill": `url(#${prefix}1)`
|
7742
|
+
}, null)]), createVNode("path", {
|
7743
|
+
"fill": `url(#${prefix}4)`,
|
7744
|
+
"d": "M0 139h160v21H0z"
|
7745
|
+
}, null), createVNode("path", {
|
7746
|
+
"d": "M80 54a7 7 0 0 1 3 13v27l-2 2h-2a2 2 0 0 1-2-2V67a7 7 0 0 1 3-13z",
|
7747
|
+
"fill": `url(#${prefix}2)`
|
7748
|
+
}, null), createVNode("g", {
|
7749
|
+
"opacity": ".6",
|
7750
|
+
"stroke-linecap": "round",
|
7751
|
+
"stroke-width": "7"
|
7752
|
+
}, [createVNode("path", {
|
7753
|
+
"d": "M64 47a19 19 0 0 0-5 13c0 5 2 10 5 13",
|
7754
|
+
"stroke": `url(#${prefix}3)`
|
7755
|
+
}, null), createVNode("path", {
|
7756
|
+
"d": "M53 36a34 34 0 0 0 0 48",
|
7757
|
+
"stroke": `url(#${prefix}3)`
|
7758
|
+
}, null), createVNode("path", {
|
7759
|
+
"d": "M95 73a19 19 0 0 0 6-13c0-5-2-9-6-13",
|
7760
|
+
"stroke": `url(#${prefix}3)`
|
7761
|
+
}, null), createVNode("path", {
|
7762
|
+
"d": "M106 84a34 34 0 0 0 0-48",
|
7763
|
+
"stroke": `url(#${prefix}3)`
|
7764
|
+
}, null)]), createVNode("g", {
|
7765
|
+
"transform": "translate(31 105)"
|
7766
|
+
}, [createVNode("rect", {
|
7767
|
+
"fill": "#EBEDF0",
|
7768
|
+
"width": "98",
|
7769
|
+
"height": "34",
|
7770
|
+
"rx": "2"
|
7771
|
+
}, null), createVNode("rect", {
|
7772
|
+
"fill": "#FFF",
|
7773
|
+
"x": "9",
|
7774
|
+
"y": "8",
|
7775
|
+
"width": "80",
|
7776
|
+
"height": "18",
|
7777
|
+
"rx": "1.1"
|
7778
|
+
}, null), createVNode("rect", {
|
7779
|
+
"fill": "#EBEDF0",
|
7780
|
+
"x": "15",
|
7781
|
+
"y": "12",
|
7782
|
+
"width": "18",
|
7783
|
+
"height": "6",
|
7784
|
+
"rx": "1.1"
|
7785
|
+
}, null)])])]);
|
7786
|
+
const [name$E, bem$D] = createNamespace("empty");
|
7787
|
+
const PRESET_IMAGES = ["error", "search", "default"];
|
7788
|
+
const emptyProps = {
|
7789
|
+
image: makeStringProp("default"),
|
7790
|
+
imageSize: [Number, String, Array],
|
7791
|
+
description: String
|
7792
|
+
};
|
7793
|
+
var stdin_default$K = defineComponent({
|
7794
|
+
name: name$E,
|
7795
|
+
props: emptyProps,
|
7796
|
+
setup(props, {
|
7797
|
+
slots
|
7798
|
+
}) {
|
7799
|
+
const renderImage = () => {
|
7800
|
+
if (slots.image) {
|
7801
|
+
return slots.image();
|
7802
|
+
}
|
7803
|
+
let {
|
7804
|
+
image
|
7805
|
+
} = props;
|
7806
|
+
if (image === "network") {
|
7807
|
+
return Network;
|
7808
|
+
}
|
7809
|
+
if (PRESET_IMAGES.includes(image)) {
|
7810
|
+
image = `https://img.yzcdn.cn/vant/empty-image-${image}.png`;
|
7811
|
+
}
|
7812
|
+
return createVNode("img", {
|
7813
|
+
"src": image
|
7814
|
+
}, null);
|
7815
|
+
};
|
7816
|
+
const renderDescription = () => {
|
7817
|
+
const description = slots.description ? slots.description() : props.description;
|
7818
|
+
if (description) {
|
7819
|
+
return createVNode("p", {
|
7820
|
+
"class": bem$D("description")
|
7821
|
+
}, [description]);
|
7822
|
+
}
|
7823
|
+
};
|
7824
|
+
const renderBottom = () => {
|
7825
|
+
if (slots.default) {
|
7826
|
+
return createVNode("div", {
|
7827
|
+
"class": bem$D("bottom")
|
7828
|
+
}, [slots.default()]);
|
7829
|
+
}
|
7830
|
+
};
|
7831
|
+
return () => createVNode("div", {
|
7832
|
+
"class": bem$D()
|
7833
|
+
}, [createVNode("div", {
|
7834
|
+
"class": bem$D("image"),
|
7835
|
+
"style": getSizeStyle(props.imageSize)
|
7836
|
+
}, [renderImage()]), renderDescription(), renderBottom()]);
|
7837
|
+
}
|
7838
|
+
});
|
7839
|
+
const Empty = withInstall(stdin_default$K);
|
7840
|
+
const [name$D, bem$C, t$8] = createNamespace("coupon-list");
|
7683
7841
|
const couponListProps = {
|
7684
7842
|
code: makeStringProp(""),
|
7685
7843
|
coupons: makeArrayProp(),
|
7686
7844
|
currency: makeStringProp("\xA5"),
|
7687
7845
|
showCount: truthProp,
|
7688
|
-
emptyImage:
|
7846
|
+
emptyImage: String,
|
7689
7847
|
chosenCoupon: makeNumberProp(-1),
|
7690
7848
|
enabledTitle: String,
|
7691
7849
|
disabledTitle: String,
|
@@ -7700,8 +7858,8 @@ const couponListProps = {
|
|
7700
7858
|
exchangeButtonLoading: Boolean,
|
7701
7859
|
exchangeButtonDisabled: Boolean
|
7702
7860
|
};
|
7703
|
-
var stdin_default$
|
7704
|
-
name: name$
|
7861
|
+
var stdin_default$J = defineComponent({
|
7862
|
+
name: name$D,
|
7705
7863
|
props: couponListProps,
|
7706
7864
|
emits: ["change", "exchange", "update:code"],
|
7707
7865
|
setup(props, {
|
@@ -7733,28 +7891,30 @@ var stdin_default$K = defineComponent({
|
|
7733
7891
|
return (_a = couponRefs.value[index]) == null ? void 0 : _a.scrollIntoView();
|
7734
7892
|
});
|
7735
7893
|
};
|
7736
|
-
const renderEmpty = () => createVNode(
|
7737
|
-
"
|
7738
|
-
},
|
7739
|
-
"
|
7740
|
-
|
7894
|
+
const renderEmpty = () => createVNode(Empty, {
|
7895
|
+
"image": props.emptyImage
|
7896
|
+
}, {
|
7897
|
+
default: () => [createVNode("p", {
|
7898
|
+
"class": bem$C("empty-tip")
|
7899
|
+
}, [t$8("noCoupon")])]
|
7900
|
+
});
|
7741
7901
|
const renderExchangeBar = () => {
|
7742
7902
|
if (props.showExchangeBar) {
|
7743
7903
|
return createVNode("div", {
|
7744
7904
|
"ref": barRef,
|
7745
|
-
"class": bem$
|
7905
|
+
"class": bem$C("exchange-bar")
|
7746
7906
|
}, [createVNode(Field, {
|
7747
7907
|
"modelValue": currentCode.value,
|
7748
7908
|
"onUpdate:modelValue": ($event) => currentCode.value = $event,
|
7749
7909
|
"clearable": true,
|
7750
7910
|
"border": false,
|
7751
|
-
"class": bem$
|
7911
|
+
"class": bem$C("field"),
|
7752
7912
|
"placeholder": props.inputPlaceholder || t$8("placeholder"),
|
7753
7913
|
"maxlength": "20"
|
7754
7914
|
}, null), createVNode(Button, {
|
7755
7915
|
"plain": true,
|
7756
7916
|
"type": "danger",
|
7757
|
-
"class": bem$
|
7917
|
+
"class": bem$C("exchange"),
|
7758
7918
|
"text": props.exchangeButtonText || t$8("exchange"),
|
7759
7919
|
"loading": props.exchangeButtonLoading,
|
7760
7920
|
"disabled": buttonDisabled.value,
|
@@ -7774,7 +7934,7 @@ var stdin_default$K = defineComponent({
|
|
7774
7934
|
default: () => {
|
7775
7935
|
var _a;
|
7776
7936
|
return [createVNode("div", {
|
7777
|
-
"class": bem$
|
7937
|
+
"class": bem$C("list", {
|
7778
7938
|
"with-bottom": props.showCloseButton
|
7779
7939
|
}),
|
7780
7940
|
"style": {
|
@@ -7803,7 +7963,7 @@ var stdin_default$K = defineComponent({
|
|
7803
7963
|
default: () => {
|
7804
7964
|
var _a;
|
7805
7965
|
return [createVNode("div", {
|
7806
|
-
"class": bem$
|
7966
|
+
"class": bem$C("list", {
|
7807
7967
|
"with-bottom": props.showCloseButton
|
7808
7968
|
}),
|
7809
7969
|
"style": {
|
@@ -7830,29 +7990,29 @@ var stdin_default$K = defineComponent({
|
|
7830
7990
|
});
|
7831
7991
|
return () => createVNode("div", {
|
7832
7992
|
"ref": root,
|
7833
|
-
"class": bem$
|
7993
|
+
"class": bem$C()
|
7834
7994
|
}, [renderExchangeBar(), createVNode(Tabs, {
|
7835
7995
|
"active": activeTab.value,
|
7836
7996
|
"onUpdate:active": ($event) => activeTab.value = $event,
|
7837
|
-
"class": bem$
|
7997
|
+
"class": bem$C("tab")
|
7838
7998
|
}, {
|
7839
7999
|
default: () => [renderCouponTab(), renderDisabledTab()]
|
7840
8000
|
}), createVNode("div", {
|
7841
|
-
"class": bem$
|
8001
|
+
"class": bem$C("bottom")
|
7842
8002
|
}, [withDirectives(createVNode(Button, {
|
7843
8003
|
"round": true,
|
7844
8004
|
"block": true,
|
7845
8005
|
"type": "danger",
|
7846
|
-
"class": bem$
|
8006
|
+
"class": bem$C("close"),
|
7847
8007
|
"text": props.closeButtonText || t$8("close"),
|
7848
8008
|
"onClick": () => emit("change", -1)
|
7849
8009
|
}, null), [[vShow, props.showCloseButton]])])]);
|
7850
8010
|
}
|
7851
8011
|
});
|
7852
|
-
const CouponList = withInstall(stdin_default$
|
7853
|
-
const [name$
|
7854
|
-
var stdin_default$
|
7855
|
-
name: name$
|
8012
|
+
const CouponList = withInstall(stdin_default$J);
|
8013
|
+
const [name$C] = createNamespace("time-picker");
|
8014
|
+
var stdin_default$I = defineComponent({
|
8015
|
+
name: name$C,
|
7856
8016
|
props: extend({}, sharedProps, {
|
7857
8017
|
minHour: makeNumericProp(0),
|
7858
8018
|
maxHour: makeNumericProp(23),
|
@@ -7959,9 +8119,9 @@ var stdin_default$J = defineComponent({
|
|
7959
8119
|
}
|
7960
8120
|
});
|
7961
8121
|
const currentYear = new Date().getFullYear();
|
7962
|
-
const [name$
|
7963
|
-
var stdin_default$
|
7964
|
-
name: name$
|
8122
|
+
const [name$B] = createNamespace("date-picker");
|
8123
|
+
var stdin_default$H = defineComponent({
|
8124
|
+
name: name$B,
|
7965
8125
|
props: extend({}, sharedProps, {
|
7966
8126
|
type: makeStringProp("datetime"),
|
7967
8127
|
modelValue: Date,
|
@@ -8167,6 +8327,7 @@ var stdin_default$I = defineComponent({
|
|
8167
8327
|
const onChange = () => {
|
8168
8328
|
updateInnerValue();
|
8169
8329
|
nextTick(() => {
|
8330
|
+
updateInnerValue();
|
8170
8331
|
nextTick(() => emit("change", currentDate.value));
|
8171
8332
|
});
|
8172
8333
|
};
|
@@ -8176,8 +8337,7 @@ var stdin_default$I = defineComponent({
|
|
8176
8337
|
});
|
8177
8338
|
watch(columns, updateColumnValue);
|
8178
8339
|
watch(currentDate, (value, oldValue) => emit("update:modelValue", oldValue ? value : null));
|
8179
|
-
watch(() => [props.filter, props.maxDate],
|
8180
|
-
watch(() => props.minDate, () => {
|
8340
|
+
watch(() => [props.filter, props.minDate, props.maxDate], () => {
|
8181
8341
|
nextTick(updateInnerValue);
|
8182
8342
|
});
|
8183
8343
|
watch(() => props.modelValue, (value) => {
|
@@ -8199,14 +8359,14 @@ var stdin_default$I = defineComponent({
|
|
8199
8359
|
}, pick(props, pickerInheritKeys)), slots);
|
8200
8360
|
}
|
8201
8361
|
});
|
8202
|
-
const [name$
|
8203
|
-
const timePickerPropKeys = Object.keys(stdin_default$
|
8204
|
-
const datePickerPropKeys = Object.keys(stdin_default$
|
8205
|
-
const datetimePickerProps = extend({}, stdin_default$
|
8362
|
+
const [name$A, bem$B] = createNamespace("datetime-picker");
|
8363
|
+
const timePickerPropKeys = Object.keys(stdin_default$I.props);
|
8364
|
+
const datePickerPropKeys = Object.keys(stdin_default$H.props);
|
8365
|
+
const datetimePickerProps = extend({}, stdin_default$I.props, stdin_default$H.props, {
|
8206
8366
|
modelValue: [String, Date]
|
8207
8367
|
});
|
8208
|
-
var stdin_default$
|
8209
|
-
name: name$
|
8368
|
+
var stdin_default$G = defineComponent({
|
8369
|
+
name: name$A,
|
8210
8370
|
props: datetimePickerProps,
|
8211
8371
|
setup(props, {
|
8212
8372
|
attrs,
|
@@ -8221,17 +8381,17 @@ var stdin_default$H = defineComponent({
|
|
8221
8381
|
});
|
8222
8382
|
return () => {
|
8223
8383
|
const isTimePicker = props.type === "time";
|
8224
|
-
const Component = isTimePicker ? stdin_default$
|
8384
|
+
const Component = isTimePicker ? stdin_default$I : stdin_default$H;
|
8225
8385
|
const inheritProps = pick(props, isTimePicker ? timePickerPropKeys : datePickerPropKeys);
|
8226
8386
|
return createVNode(Component, mergeProps({
|
8227
8387
|
"ref": root,
|
8228
|
-
"class": bem$
|
8388
|
+
"class": bem$B()
|
8229
8389
|
}, inheritProps, attrs), slots);
|
8230
8390
|
};
|
8231
8391
|
}
|
8232
8392
|
});
|
8233
|
-
const DatetimePicker = withInstall(stdin_default$
|
8234
|
-
const [name$
|
8393
|
+
const DatetimePicker = withInstall(stdin_default$G);
|
8394
|
+
const [name$z, bem$A, t$7] = createNamespace("dialog");
|
8235
8395
|
const dialogProps = extend({}, popupSharedProps, {
|
8236
8396
|
title: String,
|
8237
8397
|
theme: String,
|
@@ -8252,8 +8412,8 @@ const dialogProps = extend({}, popupSharedProps, {
|
|
8252
8412
|
closeOnClickOverlay: Boolean
|
8253
8413
|
});
|
8254
8414
|
const popupInheritKeys$1 = [...popupSharedPropKeys, "transition", "closeOnPopstate"];
|
8255
|
-
var stdin_default$
|
8256
|
-
name: name$
|
8415
|
+
var stdin_default$F = defineComponent({
|
8416
|
+
name: name$z,
|
8257
8417
|
props: dialogProps,
|
8258
8418
|
emits: ["confirm", "cancel", "keydown", "update:show"],
|
8259
8419
|
setup(props, {
|
@@ -8310,7 +8470,7 @@ var stdin_default$G = defineComponent({
|
|
8310
8470
|
const title = slots.title ? slots.title() : props.title;
|
8311
8471
|
if (title) {
|
8312
8472
|
return createVNode("div", {
|
8313
|
-
"class": bem$
|
8473
|
+
"class": bem$A("header", {
|
8314
8474
|
isolated: !props.message && !slots.default
|
8315
8475
|
})
|
8316
8476
|
}, [title]);
|
@@ -8322,7 +8482,7 @@ var stdin_default$G = defineComponent({
|
|
8322
8482
|
allowHtml,
|
8323
8483
|
messageAlign
|
8324
8484
|
} = props;
|
8325
|
-
const classNames = bem$
|
8485
|
+
const classNames = bem$A("message", {
|
8326
8486
|
"has-title": hasTitle,
|
8327
8487
|
[messageAlign]: messageAlign
|
8328
8488
|
});
|
@@ -8340,7 +8500,7 @@ var stdin_default$G = defineComponent({
|
|
8340
8500
|
const renderContent = () => {
|
8341
8501
|
if (slots.default) {
|
8342
8502
|
return createVNode("div", {
|
8343
|
-
"class": bem$
|
8503
|
+
"class": bem$A("content")
|
8344
8504
|
}, [slots.default()]);
|
8345
8505
|
}
|
8346
8506
|
const {
|
@@ -8352,18 +8512,18 @@ var stdin_default$G = defineComponent({
|
|
8352
8512
|
const hasTitle = !!(title || slots.title);
|
8353
8513
|
return createVNode("div", {
|
8354
8514
|
"key": allowHtml ? 1 : 0,
|
8355
|
-
"class": bem$
|
8515
|
+
"class": bem$A("content", {
|
8356
8516
|
isolated: !hasTitle
|
8357
8517
|
})
|
8358
8518
|
}, [renderMessage(hasTitle)]);
|
8359
8519
|
}
|
8360
8520
|
};
|
8361
8521
|
const renderButtons = () => createVNode("div", {
|
8362
|
-
"class": [BORDER_TOP, bem$
|
8522
|
+
"class": [BORDER_TOP, bem$A("footer")]
|
8363
8523
|
}, [props.showCancelButton && createVNode(Button, {
|
8364
8524
|
"size": "large",
|
8365
8525
|
"text": props.cancelButtonText || t$7("cancel"),
|
8366
|
-
"class": bem$
|
8526
|
+
"class": bem$A("cancel"),
|
8367
8527
|
"style": {
|
8368
8528
|
color: props.cancelButtonColor
|
8369
8529
|
},
|
@@ -8372,7 +8532,7 @@ var stdin_default$G = defineComponent({
|
|
8372
8532
|
}, null), props.showConfirmButton && createVNode(Button, {
|
8373
8533
|
"size": "large",
|
8374
8534
|
"text": props.confirmButtonText || t$7("confirm"),
|
8375
|
-
"class": [bem$
|
8535
|
+
"class": [bem$A("confirm"), {
|
8376
8536
|
[BORDER_LEFT]: props.showCancelButton
|
8377
8537
|
}],
|
8378
8538
|
"style": {
|
@@ -8382,19 +8542,19 @@ var stdin_default$G = defineComponent({
|
|
8382
8542
|
"onClick": onConfirm
|
8383
8543
|
}, null)]);
|
8384
8544
|
const renderRoundButtons = () => createVNode(ActionBar, {
|
8385
|
-
"class": bem$
|
8545
|
+
"class": bem$A("footer")
|
8386
8546
|
}, {
|
8387
8547
|
default: () => [props.showCancelButton && createVNode(ActionBarButton, {
|
8388
8548
|
"type": "warning",
|
8389
8549
|
"text": props.cancelButtonText || t$7("cancel"),
|
8390
|
-
"class": bem$
|
8550
|
+
"class": bem$A("cancel"),
|
8391
8551
|
"color": props.cancelButtonColor,
|
8392
8552
|
"loading": loading.cancel,
|
8393
8553
|
"onClick": onCancel
|
8394
8554
|
}, null), props.showConfirmButton && createVNode(ActionBarButton, {
|
8395
8555
|
"type": "danger",
|
8396
8556
|
"text": props.confirmButtonText || t$7("confirm"),
|
8397
|
-
"class": bem$
|
8557
|
+
"class": bem$A("confirm"),
|
8398
8558
|
"color": props.confirmButtonColor,
|
8399
8559
|
"loading": loading.confirm,
|
8400
8560
|
"onClick": onConfirm
|
@@ -8417,7 +8577,7 @@ var stdin_default$G = defineComponent({
|
|
8417
8577
|
return createVNode(Popup, mergeProps({
|
8418
8578
|
"ref": root,
|
8419
8579
|
"role": "dialog",
|
8420
|
-
"class": [bem$
|
8580
|
+
"class": [bem$A([theme]), className],
|
8421
8581
|
"style": {
|
8422
8582
|
width: addUnit(width)
|
8423
8583
|
},
|
@@ -8439,7 +8599,7 @@ function initInstance$2() {
|
|
8439
8599
|
state,
|
8440
8600
|
toggle
|
8441
8601
|
} = usePopupState();
|
8442
|
-
return () => createVNode(stdin_default$
|
8602
|
+
return () => createVNode(stdin_default$F, mergeProps(state, {
|
8443
8603
|
"onUpdate:show": toggle
|
8444
8604
|
}), null);
|
8445
8605
|
}
|
@@ -8504,19 +8664,19 @@ Dialog.setDefaultOptions = (options) => {
|
|
8504
8664
|
Dialog.resetDefaultOptions = () => {
|
8505
8665
|
Dialog.currentOptions = extend({}, Dialog.defaultOptions);
|
8506
8666
|
};
|
8507
|
-
Dialog.Component = withInstall(stdin_default$
|
8667
|
+
Dialog.Component = withInstall(stdin_default$F);
|
8508
8668
|
Dialog.install = (app) => {
|
8509
8669
|
app.use(Dialog.Component);
|
8510
8670
|
app.config.globalProperties.$dialog = Dialog;
|
8511
8671
|
};
|
8512
|
-
const [name$
|
8672
|
+
const [name$y, bem$z] = createNamespace("divider");
|
8513
8673
|
const dividerProps = {
|
8514
8674
|
dashed: Boolean,
|
8515
8675
|
hairline: truthProp,
|
8516
8676
|
contentPosition: makeStringProp("center")
|
8517
8677
|
};
|
8518
|
-
var stdin_default$
|
8519
|
-
name: name$
|
8678
|
+
var stdin_default$E = defineComponent({
|
8679
|
+
name: name$y,
|
8520
8680
|
props: dividerProps,
|
8521
8681
|
setup(props, {
|
8522
8682
|
slots
|
@@ -8525,7 +8685,7 @@ var stdin_default$F = defineComponent({
|
|
8525
8685
|
var _a;
|
8526
8686
|
return createVNode("div", {
|
8527
8687
|
"role": "separator",
|
8528
|
-
"class": bem$
|
8688
|
+
"class": bem$z({
|
8529
8689
|
dashed: props.dashed,
|
8530
8690
|
hairline: props.hairline,
|
8531
8691
|
[`content-${props.contentPosition}`]: !!slots.default
|
@@ -8534,8 +8694,8 @@ var stdin_default$F = defineComponent({
|
|
8534
8694
|
};
|
8535
8695
|
}
|
8536
8696
|
});
|
8537
|
-
const Divider = withInstall(stdin_default$
|
8538
|
-
const [name$
|
8697
|
+
const Divider = withInstall(stdin_default$E);
|
8698
|
+
const [name$x, bem$y] = createNamespace("dropdown-menu");
|
8539
8699
|
const dropdownMenuProps = {
|
8540
8700
|
overlay: truthProp,
|
8541
8701
|
zIndex: numericProp,
|
@@ -8545,9 +8705,9 @@ const dropdownMenuProps = {
|
|
8545
8705
|
closeOnClickOutside: truthProp,
|
8546
8706
|
closeOnClickOverlay: truthProp
|
8547
8707
|
};
|
8548
|
-
const DROPDOWN_KEY = Symbol(name$
|
8549
|
-
var stdin_default$
|
8550
|
-
name: name$
|
8708
|
+
const DROPDOWN_KEY = Symbol(name$x);
|
8709
|
+
var stdin_default$D = defineComponent({
|
8710
|
+
name: name$x,
|
8551
8711
|
props: dropdownMenuProps,
|
8552
8712
|
setup(props, {
|
8553
8713
|
slots
|
@@ -8615,7 +8775,7 @@ var stdin_default$E = defineComponent({
|
|
8615
8775
|
"id": `${id}-${index}`,
|
8616
8776
|
"role": "button",
|
8617
8777
|
"tabindex": disabled ? void 0 : 0,
|
8618
|
-
"class": [bem$
|
8778
|
+
"class": [bem$y("item", {
|
8619
8779
|
disabled
|
8620
8780
|
}), {
|
8621
8781
|
[HAPTICS_FEEDBACK]: !disabled
|
@@ -8626,7 +8786,7 @@ var stdin_default$E = defineComponent({
|
|
8626
8786
|
}
|
8627
8787
|
}
|
8628
8788
|
}, [createVNode("span", {
|
8629
|
-
"class": [bem$
|
8789
|
+
"class": [bem$y("title", {
|
8630
8790
|
down: showPopup === (props.direction === "down"),
|
8631
8791
|
active: showPopup
|
8632
8792
|
}), titleClass],
|
@@ -8650,18 +8810,18 @@ var stdin_default$E = defineComponent({
|
|
8650
8810
|
var _a;
|
8651
8811
|
return createVNode("div", {
|
8652
8812
|
"ref": root,
|
8653
|
-
"class": bem$
|
8813
|
+
"class": bem$y()
|
8654
8814
|
}, [createVNode("div", {
|
8655
8815
|
"ref": barRef,
|
8656
8816
|
"style": barStyle.value,
|
8657
|
-
"class": bem$
|
8817
|
+
"class": bem$y("bar", {
|
8658
8818
|
opened: opened.value
|
8659
8819
|
})
|
8660
8820
|
}, [children.map(renderTitle)]), (_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
8661
8821
|
};
|
8662
8822
|
}
|
8663
8823
|
});
|
8664
|
-
const [name$
|
8824
|
+
const [name$w, bem$x] = createNamespace("dropdown-item");
|
8665
8825
|
const dropdownItemProps = {
|
8666
8826
|
title: String,
|
8667
8827
|
options: makeArrayProp(),
|
@@ -8671,8 +8831,8 @@ const dropdownItemProps = {
|
|
8671
8831
|
modelValue: unknownProp,
|
8672
8832
|
titleClass: unknownProp
|
8673
8833
|
};
|
8674
|
-
var stdin_default$
|
8675
|
-
name: name$
|
8834
|
+
var stdin_default$C = defineComponent({
|
8835
|
+
name: name$w,
|
8676
8836
|
props: dropdownItemProps,
|
8677
8837
|
emits: ["open", "opened", "close", "closed", "change", "update:modelValue"],
|
8678
8838
|
setup(props, {
|
@@ -8739,7 +8899,7 @@ var stdin_default$D = defineComponent({
|
|
8739
8899
|
const renderIcon = () => {
|
8740
8900
|
if (active) {
|
8741
8901
|
return createVNode(Icon, {
|
8742
|
-
"class": bem$
|
8902
|
+
"class": bem$x("icon"),
|
8743
8903
|
"color": activeColor,
|
8744
8904
|
"name": "success"
|
8745
8905
|
}, null);
|
@@ -8750,7 +8910,7 @@ var stdin_default$D = defineComponent({
|
|
8750
8910
|
"key": option.value,
|
8751
8911
|
"icon": option.icon,
|
8752
8912
|
"title": option.text,
|
8753
|
-
"class": bem$
|
8913
|
+
"class": bem$x("option", {
|
8754
8914
|
active
|
8755
8915
|
}),
|
8756
8916
|
"style": {
|
@@ -8782,13 +8942,13 @@ var stdin_default$D = defineComponent({
|
|
8782
8942
|
}
|
8783
8943
|
return withDirectives(createVNode("div", {
|
8784
8944
|
"style": style,
|
8785
|
-
"class": bem$
|
8945
|
+
"class": bem$x([direction]),
|
8786
8946
|
"onClick": onClickWrapper
|
8787
8947
|
}, [createVNode(Popup, {
|
8788
8948
|
"show": state.showPopup,
|
8789
8949
|
"onUpdate:show": ($event) => state.showPopup = $event,
|
8790
8950
|
"role": "menu",
|
8791
|
-
"class": bem$
|
8951
|
+
"class": bem$x("content"),
|
8792
8952
|
"overlay": overlay,
|
8793
8953
|
"position": direction === "down" ? "top" : "bottom",
|
8794
8954
|
"duration": state.transition ? duration : 0,
|
@@ -8826,147 +8986,8 @@ var stdin_default$D = defineComponent({
|
|
8826
8986
|
};
|
8827
8987
|
}
|
8828
8988
|
});
|
8829
|
-
const DropdownItem = withInstall(stdin_default$
|
8830
|
-
const DropdownMenu = withInstall(stdin_default$
|
8831
|
-
const prefix = "van-empty-network-";
|
8832
|
-
const renderStop = (color, offset, opacity) => createVNode("stop", {
|
8833
|
-
"stop-color": color,
|
8834
|
-
"offset": `${offset}%`,
|
8835
|
-
"stop-opacity": opacity
|
8836
|
-
}, null);
|
8837
|
-
const Network = createVNode("svg", {
|
8838
|
-
"viewBox": "0 0 160 160"
|
8839
|
-
}, [createVNode("defs", null, [createVNode("linearGradient", {
|
8840
|
-
"id": `${prefix}1`,
|
8841
|
-
"x1": "64%",
|
8842
|
-
"y1": "100%",
|
8843
|
-
"x2": "64%"
|
8844
|
-
}, [renderStop("#FFF", 0, 0.5), renderStop("#F2F3F5", 100)]), createVNode("linearGradient", {
|
8845
|
-
"id": `${prefix}2`,
|
8846
|
-
"x1": "50%",
|
8847
|
-
"x2": "50%",
|
8848
|
-
"y2": "84%"
|
8849
|
-
}, [renderStop("#EBEDF0", 0), renderStop("#DCDEE0", 100, 0)]), createVNode("linearGradient", {
|
8850
|
-
"id": `${prefix}3`,
|
8851
|
-
"x1": "100%",
|
8852
|
-
"x2": "100%",
|
8853
|
-
"y2": "100%"
|
8854
|
-
}, [renderStop("#EAEDF0", 0), renderStop("#DCDEE0", 100)]), createVNode("radialGradient", {
|
8855
|
-
"id": `${prefix}4`,
|
8856
|
-
"cx": "50%",
|
8857
|
-
"cy": "0%",
|
8858
|
-
"fx": "50%",
|
8859
|
-
"fy": "0%",
|
8860
|
-
"r": "100%",
|
8861
|
-
"gradientTransform": "matrix(0 1 -.54 0 .5 -.5)"
|
8862
|
-
}, [renderStop("#EBEDF0", 0), renderStop("#FFF", 100, 0)])]), createVNode("g", {
|
8863
|
-
"fill": "none"
|
8864
|
-
}, [createVNode("g", {
|
8865
|
-
"opacity": ".8"
|
8866
|
-
}, [createVNode("path", {
|
8867
|
-
"d": "M36 131V53H16v20H2v58h34z",
|
8868
|
-
"fill": `url(#${prefix}1)`
|
8869
|
-
}, null), createVNode("path", {
|
8870
|
-
"d": "M123 15h22v14h9v77h-31V15z",
|
8871
|
-
"fill": `url(#${prefix}1)`
|
8872
|
-
}, null)]), createVNode("path", {
|
8873
|
-
"fill": `url(#${prefix}4)`,
|
8874
|
-
"d": "M0 139h160v21H0z"
|
8875
|
-
}, null), createVNode("path", {
|
8876
|
-
"d": "M80 54a7 7 0 0 1 3 13v27l-2 2h-2a2 2 0 0 1-2-2V67a7 7 0 0 1 3-13z",
|
8877
|
-
"fill": `url(#${prefix}2)`
|
8878
|
-
}, null), createVNode("g", {
|
8879
|
-
"opacity": ".6",
|
8880
|
-
"stroke-linecap": "round",
|
8881
|
-
"stroke-width": "7"
|
8882
|
-
}, [createVNode("path", {
|
8883
|
-
"d": "M64 47a19 19 0 0 0-5 13c0 5 2 10 5 13",
|
8884
|
-
"stroke": `url(#${prefix}3)`
|
8885
|
-
}, null), createVNode("path", {
|
8886
|
-
"d": "M53 36a34 34 0 0 0 0 48",
|
8887
|
-
"stroke": `url(#${prefix}3)`
|
8888
|
-
}, null), createVNode("path", {
|
8889
|
-
"d": "M95 73a19 19 0 0 0 6-13c0-5-2-9-6-13",
|
8890
|
-
"stroke": `url(#${prefix}3)`
|
8891
|
-
}, null), createVNode("path", {
|
8892
|
-
"d": "M106 84a34 34 0 0 0 0-48",
|
8893
|
-
"stroke": `url(#${prefix}3)`
|
8894
|
-
}, null)]), createVNode("g", {
|
8895
|
-
"transform": "translate(31 105)"
|
8896
|
-
}, [createVNode("rect", {
|
8897
|
-
"fill": "#EBEDF0",
|
8898
|
-
"width": "98",
|
8899
|
-
"height": "34",
|
8900
|
-
"rx": "2"
|
8901
|
-
}, null), createVNode("rect", {
|
8902
|
-
"fill": "#FFF",
|
8903
|
-
"x": "9",
|
8904
|
-
"y": "8",
|
8905
|
-
"width": "80",
|
8906
|
-
"height": "18",
|
8907
|
-
"rx": "1.1"
|
8908
|
-
}, null), createVNode("rect", {
|
8909
|
-
"fill": "#EBEDF0",
|
8910
|
-
"x": "15",
|
8911
|
-
"y": "12",
|
8912
|
-
"width": "18",
|
8913
|
-
"height": "6",
|
8914
|
-
"rx": "1.1"
|
8915
|
-
}, null)])])]);
|
8916
|
-
const [name$w, bem$x] = createNamespace("empty");
|
8917
|
-
const PRESET_IMAGES = ["error", "search", "default"];
|
8918
|
-
const emptyProps = {
|
8919
|
-
image: makeStringProp("default"),
|
8920
|
-
imageSize: numericProp,
|
8921
|
-
description: String
|
8922
|
-
};
|
8923
|
-
var stdin_default$C = defineComponent({
|
8924
|
-
name: name$w,
|
8925
|
-
props: emptyProps,
|
8926
|
-
setup(props, {
|
8927
|
-
slots
|
8928
|
-
}) {
|
8929
|
-
const renderImage = () => {
|
8930
|
-
if (slots.image) {
|
8931
|
-
return slots.image();
|
8932
|
-
}
|
8933
|
-
let {
|
8934
|
-
image
|
8935
|
-
} = props;
|
8936
|
-
if (image === "network") {
|
8937
|
-
return Network;
|
8938
|
-
}
|
8939
|
-
if (PRESET_IMAGES.includes(image)) {
|
8940
|
-
image = `https://img.yzcdn.cn/vant/empty-image-${image}.png`;
|
8941
|
-
}
|
8942
|
-
return createVNode("img", {
|
8943
|
-
"src": image
|
8944
|
-
}, null);
|
8945
|
-
};
|
8946
|
-
const renderDescription = () => {
|
8947
|
-
const description = slots.description ? slots.description() : props.description;
|
8948
|
-
if (description) {
|
8949
|
-
return createVNode("p", {
|
8950
|
-
"class": bem$x("description")
|
8951
|
-
}, [description]);
|
8952
|
-
}
|
8953
|
-
};
|
8954
|
-
const renderBottom = () => {
|
8955
|
-
if (slots.default) {
|
8956
|
-
return createVNode("div", {
|
8957
|
-
"class": bem$x("bottom")
|
8958
|
-
}, [slots.default()]);
|
8959
|
-
}
|
8960
|
-
};
|
8961
|
-
return () => createVNode("div", {
|
8962
|
-
"class": bem$x()
|
8963
|
-
}, [createVNode("div", {
|
8964
|
-
"class": bem$x("image"),
|
8965
|
-
"style": getSizeStyle(props.imageSize)
|
8966
|
-
}, [renderImage()]), renderDescription(), renderBottom()]);
|
8967
|
-
}
|
8968
|
-
});
|
8969
|
-
const Empty = withInstall(stdin_default$C);
|
8989
|
+
const DropdownItem = withInstall(stdin_default$C);
|
8990
|
+
const DropdownMenu = withInstall(stdin_default$D);
|
8970
8991
|
const [name$v, bem$w] = createNamespace("grid");
|
8971
8992
|
const gridProps = {
|
8972
8993
|
square: Boolean,
|
@@ -9620,6 +9641,7 @@ var stdin_default$x = defineComponent({
|
|
9620
9641
|
children,
|
9621
9642
|
linkChildren
|
9622
9643
|
} = useChildren(INDEX_BAR_KEY);
|
9644
|
+
let selectActiveIndex;
|
9623
9645
|
linkChildren({
|
9624
9646
|
props
|
9625
9647
|
});
|
@@ -9647,6 +9669,7 @@ var stdin_default$x = defineComponent({
|
|
9647
9669
|
}
|
9648
9670
|
return -1;
|
9649
9671
|
};
|
9672
|
+
const getMatchAnchor = (index) => children.find((item) => String(item.index) === index);
|
9650
9673
|
const onScroll = () => {
|
9651
9674
|
if (isHidden(root)) {
|
9652
9675
|
return;
|
@@ -9658,7 +9681,16 @@ var stdin_default$x = defineComponent({
|
|
9658
9681
|
const scrollTop = getScrollTop(scrollParent.value);
|
9659
9682
|
const scrollParentRect = useRect(scrollParent);
|
9660
9683
|
const rects = children.map((item) => item.getRect(scrollParent.value, scrollParentRect));
|
9661
|
-
|
9684
|
+
let active = -1;
|
9685
|
+
if (selectActiveIndex) {
|
9686
|
+
const match = getMatchAnchor(selectActiveIndex);
|
9687
|
+
if (match) {
|
9688
|
+
const rect = match.getRect(scrollParent.value, scrollParentRect);
|
9689
|
+
active = getActiveAnchor(rect.top, rects);
|
9690
|
+
}
|
9691
|
+
} else {
|
9692
|
+
active = getActiveAnchor(scrollTop, rects);
|
9693
|
+
}
|
9662
9694
|
activeAnchor.value = indexList[active];
|
9663
9695
|
if (sticky) {
|
9664
9696
|
children.forEach((item, index) => {
|
@@ -9677,7 +9709,7 @@ var stdin_default$x = defineComponent({
|
|
9677
9709
|
if (index === active) {
|
9678
9710
|
state.active = true;
|
9679
9711
|
state.top = Math.max(props.stickyOffsetTop, rects[index].top - scrollTop) + scrollParentRect.top;
|
9680
|
-
} else if (index === active - 1) {
|
9712
|
+
} else if (index === active - 1 && selectActiveIndex === "") {
|
9681
9713
|
const activeItemTop = rects[active].top - scrollTop;
|
9682
9714
|
state.active = activeItemTop > 0;
|
9683
9715
|
state.top = activeItemTop + scrollParentRect.top - rects[index].height;
|
@@ -9686,6 +9718,7 @@ var stdin_default$x = defineComponent({
|
|
9686
9718
|
}
|
9687
9719
|
});
|
9688
9720
|
}
|
9721
|
+
selectActiveIndex = "";
|
9689
9722
|
};
|
9690
9723
|
const init = () => {
|
9691
9724
|
nextTick(onScroll);
|
@@ -9711,9 +9744,18 @@ var stdin_default$x = defineComponent({
|
|
9711
9744
|
}, [index]);
|
9712
9745
|
});
|
9713
9746
|
const scrollTo = (index) => {
|
9714
|
-
|
9715
|
-
const match =
|
9747
|
+
selectActiveIndex = String(index);
|
9748
|
+
const match = getMatchAnchor(selectActiveIndex);
|
9716
9749
|
if (match) {
|
9750
|
+
const scrollTop = getScrollTop(scrollParent.value);
|
9751
|
+
const scrollParentRect = useRect(scrollParent);
|
9752
|
+
const {
|
9753
|
+
offsetHeight
|
9754
|
+
} = document.documentElement;
|
9755
|
+
if (scrollTop === offsetHeight - scrollParentRect.height) {
|
9756
|
+
onScroll();
|
9757
|
+
return;
|
9758
|
+
}
|
9717
9759
|
match.$el.scrollIntoView();
|
9718
9760
|
if (props.sticky && props.stickyOffsetTop) {
|
9719
9761
|
setRootScrollTop(getRootScrollTop() - props.stickyOffsetTop);
|
@@ -10047,10 +10089,10 @@ var stdin_default$u = defineComponent({
|
|
10047
10089
|
"ref": navBarRef,
|
10048
10090
|
"style": style,
|
10049
10091
|
"class": [bem$p({
|
10050
|
-
fixed
|
10051
|
-
"safe-area-inset-top": props.safeAreaInsetTop
|
10092
|
+
fixed
|
10052
10093
|
}), {
|
10053
|
-
[BORDER_BOTTOM]: border
|
10094
|
+
[BORDER_BOTTOM]: border,
|
10095
|
+
"van-safe-area-top": props.safeAreaInsetTop
|
10054
10096
|
}]
|
10055
10097
|
}, [createVNode("div", {
|
10056
10098
|
"class": bem$p("content")
|
@@ -10439,6 +10481,15 @@ const numberKeyboardProps = {
|
|
10439
10481
|
default: ""
|
10440
10482
|
}
|
10441
10483
|
};
|
10484
|
+
function shuffle(array) {
|
10485
|
+
for (let i = array.length - 1; i > 0; i--) {
|
10486
|
+
const j = Math.floor(Math.random() * (i + 1));
|
10487
|
+
const temp = array[i];
|
10488
|
+
array[i] = array[j];
|
10489
|
+
array[j] = temp;
|
10490
|
+
}
|
10491
|
+
return array;
|
10492
|
+
}
|
10442
10493
|
var stdin_default$q = defineComponent({
|
10443
10494
|
name: name$l,
|
10444
10495
|
props: numberKeyboardProps,
|
@@ -10453,7 +10504,7 @@ var stdin_default$q = defineComponent({
|
|
10453
10504
|
text: i + 1
|
10454
10505
|
}));
|
10455
10506
|
if (props.randomKeyOrder) {
|
10456
|
-
keys2
|
10507
|
+
shuffle(keys2);
|
10457
10508
|
}
|
10458
10509
|
return keys2;
|
10459
10510
|
};
|
@@ -11308,33 +11359,53 @@ var stdin_default$k = defineComponent({
|
|
11308
11359
|
}) {
|
11309
11360
|
const touch = useTouch();
|
11310
11361
|
const [itemRefs, setItemRefs] = useRefs();
|
11362
|
+
const groupRef = ref();
|
11311
11363
|
const untouchable = () => props.readonly || props.disabled || !props.touchable;
|
11312
11364
|
const list = computed(() => Array(+props.count).fill("").map((_, i) => getRateStatus(props.modelValue, i + 1, props.allowHalf, props.readonly)));
|
11313
11365
|
let ranges;
|
11366
|
+
let groupRefRect;
|
11367
|
+
let minRectTop = Number.MAX_SAFE_INTEGER;
|
11368
|
+
let maxRectTop = Number.MIN_SAFE_INTEGER;
|
11314
11369
|
const updateRanges = () => {
|
11370
|
+
groupRefRect = useRect(groupRef);
|
11315
11371
|
const rects = itemRefs.value.map(useRect);
|
11316
11372
|
ranges = [];
|
11317
11373
|
rects.forEach((rect, index) => {
|
11374
|
+
minRectTop = Math.min(rect.top, minRectTop);
|
11375
|
+
maxRectTop = Math.max(rect.top, maxRectTop);
|
11318
11376
|
if (props.allowHalf) {
|
11319
11377
|
ranges.push({
|
11320
11378
|
score: index + 0.5,
|
11321
|
-
left: rect.left
|
11379
|
+
left: rect.left,
|
11380
|
+
top: rect.top,
|
11381
|
+
height: rect.height
|
11322
11382
|
}, {
|
11323
11383
|
score: index + 1,
|
11324
|
-
left: rect.left + rect.width / 2
|
11384
|
+
left: rect.left + rect.width / 2,
|
11385
|
+
top: rect.top,
|
11386
|
+
height: rect.height
|
11325
11387
|
});
|
11326
11388
|
} else {
|
11327
11389
|
ranges.push({
|
11328
11390
|
score: index + 1,
|
11329
|
-
left: rect.left
|
11391
|
+
left: rect.left,
|
11392
|
+
top: rect.top,
|
11393
|
+
height: rect.height
|
11330
11394
|
});
|
11331
11395
|
}
|
11332
11396
|
});
|
11333
11397
|
};
|
11334
|
-
const getScoreByPosition = (x) => {
|
11398
|
+
const getScoreByPosition = (x, y) => {
|
11335
11399
|
for (let i = ranges.length - 1; i > 0; i--) {
|
11336
|
-
if (
|
11337
|
-
|
11400
|
+
if (y >= groupRefRect.top && y <= groupRefRect.bottom) {
|
11401
|
+
if (x > ranges[i].left && y >= ranges[i].top && y <= ranges[i].top + ranges[i].height) {
|
11402
|
+
return ranges[i].score;
|
11403
|
+
}
|
11404
|
+
} else {
|
11405
|
+
const curTop = y < groupRefRect.top ? minRectTop : maxRectTop;
|
11406
|
+
if (x > ranges[i].left && ranges[i].top === curTop) {
|
11407
|
+
return ranges[i].score;
|
11408
|
+
}
|
11338
11409
|
}
|
11339
11410
|
}
|
11340
11411
|
return props.allowHalf ? 0.5 : 1;
|
@@ -11359,10 +11430,11 @@ var stdin_default$k = defineComponent({
|
|
11359
11430
|
touch.move(event);
|
11360
11431
|
if (touch.isHorizontal()) {
|
11361
11432
|
const {
|
11362
|
-
clientX
|
11433
|
+
clientX,
|
11434
|
+
clientY
|
11363
11435
|
} = event.touches[0];
|
11364
11436
|
preventDefault(event);
|
11365
|
-
select(getScoreByPosition(clientX));
|
11437
|
+
select(getScoreByPosition(clientX, clientY));
|
11366
11438
|
}
|
11367
11439
|
};
|
11368
11440
|
const renderStar = (item, index) => {
|
@@ -11391,7 +11463,7 @@ var stdin_default$k = defineComponent({
|
|
11391
11463
|
}
|
11392
11464
|
const onClickItem = (event) => {
|
11393
11465
|
updateRanges();
|
11394
|
-
select(allowHalf ? getScoreByPosition(event.clientX) : score);
|
11466
|
+
select(allowHalf ? getScoreByPosition(event.clientX, event.clientY) : score);
|
11395
11467
|
};
|
11396
11468
|
return createVNode("div", {
|
11397
11469
|
"key": index,
|
@@ -11429,6 +11501,7 @@ var stdin_default$k = defineComponent({
|
|
11429
11501
|
};
|
11430
11502
|
useCustomFieldValue(() => props.modelValue);
|
11431
11503
|
return () => createVNode("div", {
|
11504
|
+
"ref": groupRef,
|
11432
11505
|
"role": "radiogroup",
|
11433
11506
|
"class": bem$f({
|
11434
11507
|
readonly: props.readonly,
|
@@ -11553,14 +11626,17 @@ var stdin_default$j = defineComponent({
|
|
11553
11626
|
}
|
11554
11627
|
});
|
11555
11628
|
const Search = withInstall(stdin_default$j);
|
11556
|
-
const PRESET_ICONS = ["qq", "link", "weibo", "wechat", "poster", "qrcode", "weapp-qrcode", "wechat-moments"];
|
11557
11629
|
const popupInheritKeys = [...popupSharedPropKeys, "round", "closeOnPopstate", "safeAreaInsetBottom"];
|
11558
|
-
|
11559
|
-
|
11560
|
-
|
11561
|
-
|
11562
|
-
|
11563
|
-
|
11630
|
+
const iconMap = {
|
11631
|
+
qq: "qq",
|
11632
|
+
link: "link-o",
|
11633
|
+
weibo: "weibo",
|
11634
|
+
qrcode: "qr",
|
11635
|
+
poster: "photo-o",
|
11636
|
+
wechat: "wechat",
|
11637
|
+
"weapp-qrcode": "miniprogram-o",
|
11638
|
+
"wechat-moments": "wechat-moments"
|
11639
|
+
};
|
11564
11640
|
const [name$d, bem$d, t$2] = createNamespace("share-sheet");
|
11565
11641
|
const shareSheetProps = extend({}, popupSharedProps, {
|
11566
11642
|
title: String,
|
@@ -11598,6 +11674,19 @@ var stdin_default$i = defineComponent({
|
|
11598
11674
|
}, [description])]);
|
11599
11675
|
}
|
11600
11676
|
};
|
11677
|
+
const renderIcon = (icon) => {
|
11678
|
+
if (iconMap[icon]) {
|
11679
|
+
return createVNode("div", {
|
11680
|
+
"class": bem$d("icon", [icon])
|
11681
|
+
}, [createVNode(Icon, {
|
11682
|
+
"name": iconMap[icon] || icon
|
11683
|
+
}, null)]);
|
11684
|
+
}
|
11685
|
+
return createVNode("img", {
|
11686
|
+
"src": icon,
|
11687
|
+
"class": bem$d("image-icon")
|
11688
|
+
}, null);
|
11689
|
+
};
|
11601
11690
|
const renderOption = (option, index) => {
|
11602
11691
|
const {
|
11603
11692
|
name: name2,
|
@@ -11610,10 +11699,7 @@ var stdin_default$i = defineComponent({
|
|
11610
11699
|
"tabindex": 0,
|
11611
11700
|
"class": [bem$d("option"), className, HAPTICS_FEEDBACK],
|
11612
11701
|
"onClick": () => onSelect(option, index)
|
11613
|
-
}, [createVNode("
|
11614
|
-
"src": getIconURL(icon),
|
11615
|
-
"class": bem$d("icon")
|
11616
|
-
}, null), name2 && createVNode("span", {
|
11702
|
+
}, [renderIcon(icon), name2 && createVNode("span", {
|
11617
11703
|
"class": bem$d("name")
|
11618
11704
|
}, [name2]), description && createVNode("span", {
|
11619
11705
|
"class": bem$d("option-description")
|
@@ -11771,9 +11857,11 @@ const skeletonProps = {
|
|
11771
11857
|
};
|
11772
11858
|
var stdin_default$f = defineComponent({
|
11773
11859
|
name: name$a,
|
11860
|
+
inheritAttrs: false,
|
11774
11861
|
props: skeletonProps,
|
11775
11862
|
setup(props, {
|
11776
|
-
slots
|
11863
|
+
slots,
|
11864
|
+
attrs
|
11777
11865
|
}) {
|
11778
11866
|
const renderAvatar = () => {
|
11779
11867
|
if (props.avatar) {
|
@@ -11816,12 +11904,12 @@ var stdin_default$f = defineComponent({
|
|
11816
11904
|
if (!props.loading) {
|
11817
11905
|
return (_a = slots.default) == null ? void 0 : _a.call(slots);
|
11818
11906
|
}
|
11819
|
-
return createVNode("div", {
|
11907
|
+
return createVNode("div", mergeProps({
|
11820
11908
|
"class": bem$a({
|
11821
11909
|
animate: props.animate,
|
11822
11910
|
round: props.round
|
11823
11911
|
})
|
11824
|
-
}, [renderAvatar(), createVNode("div", {
|
11912
|
+
}, attrs), [renderAvatar(), createVNode("div", {
|
11825
11913
|
"class": bem$a("content")
|
11826
11914
|
}, [renderTitle(), renderRows()])]);
|
11827
11915
|
};
|
@@ -12712,7 +12800,7 @@ var stdin_default$9 = defineComponent({
|
|
12712
12800
|
return createVNode("div", {
|
12713
12801
|
"ref": root,
|
12714
12802
|
"class": bem$4(),
|
12715
|
-
"onClick": getClickHandler("cell"),
|
12803
|
+
"onClick": getClickHandler("cell", lockClick2),
|
12716
12804
|
"onTouchstart": onTouchStart,
|
12717
12805
|
"onTouchmove": onTouchMove,
|
12718
12806
|
"onTouchend": onTouchEnd,
|
@@ -13069,7 +13157,7 @@ var stdin_default$5 = defineComponent({
|
|
13069
13157
|
imageFit: String,
|
13070
13158
|
lazyLoad: Boolean,
|
13071
13159
|
deletable: Boolean,
|
13072
|
-
previewSize:
|
13160
|
+
previewSize: [Number, String, Array],
|
13073
13161
|
beforeDelete: Function
|
13074
13162
|
},
|
13075
13163
|
emits: ["delete", "preview"],
|
@@ -13143,16 +13231,19 @@ var stdin_default$5 = defineComponent({
|
|
13143
13231
|
};
|
13144
13232
|
const renderPreview = () => {
|
13145
13233
|
const {
|
13146
|
-
item
|
13234
|
+
item,
|
13235
|
+
lazyLoad,
|
13236
|
+
imageFit,
|
13237
|
+
previewSize
|
13147
13238
|
} = props;
|
13148
13239
|
if (isImageFile(item)) {
|
13149
13240
|
return createVNode(Image$1, {
|
13150
|
-
"fit":
|
13241
|
+
"fit": imageFit,
|
13151
13242
|
"src": item.content || item.url,
|
13152
13243
|
"class": bem("preview-image"),
|
13153
|
-
"width":
|
13154
|
-
"height":
|
13155
|
-
"lazyLoad":
|
13244
|
+
"width": Array.isArray(previewSize) ? previewSize[0] : previewSize,
|
13245
|
+
"height": Array.isArray(previewSize) ? previewSize[1] : previewSize,
|
13246
|
+
"lazyLoad": lazyLoad,
|
13156
13247
|
"onClick": onPreview
|
13157
13248
|
}, {
|
13158
13249
|
default: renderCover
|
@@ -13192,7 +13283,7 @@ const uploaderProps = {
|
|
13192
13283
|
modelValue: makeArrayProp(),
|
13193
13284
|
beforeRead: Function,
|
13194
13285
|
beforeDelete: Function,
|
13195
|
-
previewSize:
|
13286
|
+
previewSize: [Number, String, Array],
|
13196
13287
|
previewImage: truthProp,
|
13197
13288
|
previewOptions: Object,
|
13198
13289
|
previewFullImage: truthProp,
|
@@ -14259,7 +14350,7 @@ const Lazyload = {
|
|
14259
14350
|
});
|
14260
14351
|
}
|
14261
14352
|
};
|
14262
|
-
const version = "3.4.
|
14353
|
+
const version = "3.4.8";
|
14263
14354
|
function install(app) {
|
14264
14355
|
const components = [
|
14265
14356
|
ActionBar,
|