vant 4.0.0-beta.0 → 4.0.0-rc.1
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 +13 -9
- package/changelog.generated.md +207 -163
- package/es/action-bar/ActionBar.d.ts +2 -2
- package/es/action-bar/ActionBar.mjs +1 -0
- package/es/action-bar/index.d.ts +2 -1
- package/es/action-bar/index.mjs +2 -0
- package/es/action-bar-button/ActionBarButton.d.ts +2 -2
- package/es/action-bar-button/ActionBarButton.mjs +1 -0
- package/es/action-bar-button/index.d.ts +2 -1
- package/es/action-bar-button/index.mjs +2 -0
- package/es/action-bar-icon/ActionBarIcon.d.ts +2 -2
- package/es/action-bar-icon/ActionBarIcon.mjs +1 -0
- package/es/action-bar-icon/index.d.ts +2 -1
- package/es/action-bar-icon/index.mjs +2 -0
- package/es/action-sheet/ActionSheet.d.ts +1 -1
- package/es/action-sheet/ActionSheet.mjs +1 -0
- package/es/action-sheet/index.d.ts +1 -0
- package/es/action-sheet/index.mjs +2 -0
- package/es/address-edit/AddressEdit.d.ts +1 -1
- package/es/address-edit/AddressEdit.mjs +1 -0
- package/es/address-edit/index.d.ts +1 -0
- package/es/address-edit/index.mjs +2 -0
- package/es/address-edit/style/index.mjs +7 -1
- package/es/address-list/AddressList.d.ts +1 -1
- package/es/address-list/AddressList.mjs +1 -0
- package/es/address-list/index.d.ts +1 -0
- package/es/address-list/index.mjs +2 -0
- package/es/area/Area.d.ts +7 -4
- package/es/area/Area.mjs +1 -0
- package/es/area/index.d.ts +5 -2
- package/es/area/index.mjs +2 -0
- package/es/area/style/index.mjs +7 -0
- package/es/area/utils.mjs +9 -2
- package/es/badge/Badge.d.ts +2 -2
- package/es/badge/Badge.mjs +2 -1
- package/es/badge/index.d.ts +2 -1
- package/es/badge/index.mjs +2 -0
- package/es/button/Button.d.ts +1 -1
- package/es/button/Button.mjs +1 -0
- package/es/button/index.d.ts +1 -0
- package/es/button/index.mjs +2 -0
- package/es/calendar/Calendar.d.ts +1 -1
- package/es/calendar/Calendar.mjs +8 -7
- package/es/calendar/index.d.ts +1 -0
- package/es/calendar/index.mjs +2 -0
- package/es/calendar/style/index.mjs +7 -1
- package/es/card/Card.d.ts +1 -1
- package/es/card/Card.mjs +1 -0
- package/es/card/index.d.ts +1 -0
- package/es/card/index.mjs +2 -0
- package/es/cascader/Cascader.d.ts +1 -1
- package/es/cascader/Cascader.mjs +1 -0
- package/es/cascader/index.d.ts +1 -0
- package/es/cascader/index.mjs +2 -0
- package/es/cell/Cell.d.ts +2 -2
- package/es/cell/Cell.mjs +1 -0
- package/es/cell/index.d.ts +2 -1
- package/es/cell/index.mjs +2 -0
- package/es/cell-group/CellGroup.d.ts +2 -2
- package/es/cell-group/CellGroup.mjs +1 -0
- package/es/cell-group/index.d.ts +2 -1
- package/es/cell-group/index.mjs +2 -0
- package/es/checkbox/Checkbox.d.ts +1 -1
- package/es/checkbox/Checkbox.mjs +1 -0
- package/es/checkbox/index.d.ts +1 -0
- package/es/checkbox/index.mjs +2 -0
- package/es/checkbox-group/CheckboxGroup.d.ts +1 -1
- package/es/checkbox-group/CheckboxGroup.mjs +1 -0
- package/es/checkbox-group/index.d.ts +1 -0
- package/es/checkbox-group/index.mjs +2 -0
- package/es/circle/Circle.d.ts +1 -1
- package/es/circle/Circle.mjs +1 -0
- package/es/circle/index.d.ts +1 -0
- package/es/circle/index.mjs +2 -0
- package/es/col/Col.d.ts +2 -2
- package/es/col/Col.mjs +1 -0
- package/es/col/index.d.ts +2 -1
- package/es/col/index.mjs +2 -0
- package/es/collapse/Collapse.d.ts +9 -2
- package/es/collapse/Collapse.mjs +29 -1
- package/es/collapse/index.d.ts +2 -1
- package/es/collapse/index.mjs +2 -0
- package/es/collapse-item/CollapseItem.d.ts +2 -2
- package/es/collapse-item/CollapseItem.mjs +4 -1
- package/es/collapse-item/index.d.ts +2 -1
- package/es/collapse-item/index.mjs +2 -0
- package/es/composables/use-global-z-index.d.ts +4 -0
- package/es/composables/use-global-z-index.mjs +9 -0
- package/es/composables/use-height.d.ts +1 -1
- package/es/composables/use-height.mjs +8 -2
- package/es/composables/use-lazy-render.mjs +9 -5
- package/es/composables/use-lock-scroll.mjs +7 -2
- package/es/composables/use-placeholder.mjs +1 -1
- package/es/composables/use-visibility-change.mjs +6 -3
- package/es/config-provider/ConfigProvider.d.ts +15 -5
- package/es/config-provider/ConfigProvider.mjs +26 -9
- package/es/config-provider/index.d.ts +10 -3
- package/es/config-provider/index.mjs +2 -0
- package/es/contact-card/ContactCard.d.ts +1 -1
- package/es/contact-card/ContactCard.mjs +1 -0
- package/es/contact-card/index.d.ts +1 -0
- package/es/contact-card/index.mjs +2 -0
- package/es/contact-edit/ContactEdit.d.ts +1 -1
- package/es/contact-edit/ContactEdit.mjs +1 -0
- package/es/contact-edit/index.d.ts +1 -0
- package/es/contact-edit/index.mjs +2 -0
- package/es/contact-list/ContactList.d.ts +1 -1
- package/es/contact-list/ContactList.mjs +1 -0
- package/es/contact-list/index.d.ts +1 -0
- package/es/contact-list/index.mjs +2 -0
- package/es/count-down/CountDown.d.ts +1 -1
- package/es/count-down/CountDown.mjs +1 -0
- package/es/count-down/index.d.ts +1 -0
- package/es/count-down/index.mjs +2 -0
- package/es/coupon/Coupon.d.ts +1 -1
- package/es/coupon/index.d.ts +1 -1
- package/es/coupon/utils.mjs +3 -1
- package/es/coupon-cell/CouponCell.d.ts +2 -2
- package/es/coupon-cell/CouponCell.mjs +1 -0
- package/es/coupon-cell/index.d.ts +2 -1
- package/es/coupon-cell/index.mjs +2 -0
- package/es/coupon-list/CouponList.d.ts +1 -1
- package/es/coupon-list/CouponList.mjs +1 -0
- package/es/coupon-list/index.d.ts +1 -0
- package/es/coupon-list/index.mjs +2 -0
- package/es/coupon-list/style/index.mjs +3 -3
- package/es/date-picker/DatePicker.d.ts +7 -4
- package/es/date-picker/DatePicker.mjs +11 -10
- package/es/date-picker/index.d.ts +5 -2
- package/es/date-picker/index.mjs +2 -0
- package/es/date-picker/style/index.mjs +7 -0
- package/es/date-picker/utils.d.ts +2 -1
- package/es/dialog/Dialog.d.ts +1 -1
- package/es/dialog/Dialog.mjs +2 -1
- package/es/dialog/index.css +1 -1
- package/es/dialog/index.d.ts +1 -0
- package/es/dialog/index.mjs +2 -0
- package/es/dialog/types.d.ts +1 -1
- package/es/divider/Divider.d.ts +2 -2
- package/es/divider/Divider.mjs +2 -1
- package/es/divider/index.d.ts +2 -1
- package/es/divider/index.mjs +3 -1
- package/es/dropdown-item/DropdownItem.d.ts +3 -3
- package/es/dropdown-item/DropdownItem.mjs +2 -1
- package/es/dropdown-item/index.d.ts +3 -2
- package/es/dropdown-item/index.mjs +3 -1
- package/es/dropdown-menu/DropdownMenu.d.ts +2 -2
- package/es/dropdown-menu/DropdownMenu.mjs +4 -2
- package/es/dropdown-menu/index.d.ts +2 -1
- package/es/dropdown-menu/index.mjs +3 -1
- package/es/empty/Empty.d.ts +3 -3
- package/es/empty/Empty.mjs +283 -17
- package/es/empty/index.d.ts +2 -1
- package/es/empty/index.mjs +3 -1
- package/es/field/Field.d.ts +1 -1
- package/es/field/Field.mjs +15 -4
- package/es/field/index.d.ts +1 -0
- package/es/field/index.mjs +3 -1
- package/es/field/types.d.ts +1 -0
- package/es/field/utils.d.ts +1 -0
- package/es/field/utils.mjs +8 -2
- package/es/form/Form.d.ts +1 -1
- package/es/form/Form.mjs +2 -1
- package/es/form/index.d.ts +1 -0
- package/es/form/index.mjs +3 -1
- package/es/grid/Grid.d.ts +2 -2
- package/es/grid/Grid.mjs +2 -1
- package/es/grid/index.d.ts +2 -1
- package/es/grid/index.mjs +3 -1
- package/es/grid-item/GridItem.d.ts +2 -2
- package/es/grid-item/GridItem.mjs +2 -1
- package/es/grid-item/index.d.ts +2 -1
- package/es/grid-item/index.mjs +3 -1
- package/es/icon/Icon.d.ts +2 -2
- package/es/icon/Icon.mjs +2 -1
- package/es/icon/index.d.ts +2 -1
- package/es/icon/index.mjs +3 -1
- package/es/image/Image.d.ts +5 -1
- package/es/image/Image.mjs +5 -2
- package/es/image/index.css +1 -1
- package/es/image/index.d.ts +4 -0
- package/es/image/index.mjs +3 -1
- package/es/image-preview/ImagePreview.d.ts +1 -1
- package/es/image-preview/ImagePreview.mjs +2 -1
- package/es/image-preview/ImagePreviewItem.mjs +11 -3
- package/es/image-preview/index.css +1 -1
- package/es/image-preview/index.d.ts +1 -0
- package/es/image-preview/index.mjs +2 -0
- package/es/index-anchor/IndexAnchor.d.ts +2 -2
- package/es/index-anchor/IndexAnchor.mjs +2 -1
- package/es/index-anchor/index.d.ts +2 -1
- package/es/index-anchor/index.mjs +3 -1
- package/es/index-bar/IndexBar.d.ts +1 -1
- package/es/index-bar/IndexBar.mjs +11 -5
- package/es/index-bar/index.d.ts +1 -0
- package/es/index-bar/index.mjs +3 -1
- package/es/index.d.ts +3 -1
- package/es/index.mjs +7 -1
- package/es/lazyload/vue-lazyload/lazy-component.mjs +4 -1
- package/es/lazyload/vue-lazyload/lazy-container.mjs +11 -7
- package/es/lazyload/vue-lazyload/lazy-image.mjs +24 -14
- package/es/lazyload/vue-lazyload/lazy.mjs +11 -3
- package/es/lazyload/vue-lazyload/listener.mjs +45 -33
- package/es/lazyload/vue-lazyload/util.mjs +4 -1
- package/es/list/List.d.ts +1 -1
- package/es/list/List.mjs +4 -2
- package/es/list/index.d.ts +1 -0
- package/es/list/index.mjs +3 -1
- package/es/loading/Loading.d.ts +2 -2
- package/es/loading/Loading.mjs +2 -1
- package/es/loading/index.d.ts +2 -1
- package/es/loading/index.mjs +3 -1
- package/es/nav-bar/NavBar.d.ts +1 -1
- package/es/nav-bar/NavBar.mjs +2 -1
- package/es/nav-bar/index.d.ts +1 -0
- package/es/nav-bar/index.mjs +3 -1
- package/es/notice-bar/NoticeBar.d.ts +1 -1
- package/es/notice-bar/NoticeBar.mjs +2 -1
- package/es/notice-bar/index.d.ts +1 -0
- package/es/notice-bar/index.mjs +3 -1
- package/es/notify/Notify.d.ts +1 -1
- package/es/notify/Notify.mjs +2 -1
- package/es/notify/index.d.ts +1 -0
- package/es/notify/index.mjs +2 -0
- package/es/number-keyboard/NumberKeyboard.d.ts +2 -2
- package/es/number-keyboard/NumberKeyboard.mjs +3 -3
- package/es/number-keyboard/NumberKeyboardKey.mjs +2 -2
- package/es/number-keyboard/index.d.ts +2 -1
- package/es/number-keyboard/index.mjs +3 -1
- package/es/overlay/Overlay.d.ts +2 -2
- package/es/overlay/Overlay.mjs +15 -7
- package/es/overlay/index.d.ts +2 -1
- package/es/overlay/index.mjs +3 -1
- package/es/pagination/Pagination.d.ts +1 -1
- package/es/pagination/Pagination.mjs +2 -1
- package/es/pagination/index.d.ts +1 -0
- package/es/pagination/index.mjs +3 -1
- package/es/password-input/PasswordInput.d.ts +1 -1
- package/es/password-input/PasswordInput.mjs +3 -2
- package/es/password-input/index.d.ts +1 -0
- package/es/password-input/index.mjs +3 -1
- package/es/picker/Picker.d.ts +11 -6
- package/es/picker/Picker.mjs +51 -65
- package/es/picker/PickerColumn.d.ts +2 -1
- package/es/picker/PickerColumn.mjs +11 -6
- package/es/picker/PickerToolbar.d.ts +21 -0
- package/es/picker/PickerToolbar.mjs +59 -0
- package/es/picker/index.d.ts +7 -3
- package/es/picker/index.mjs +3 -1
- package/es/picker/style/index.mjs +7 -0
- package/es/picker/utils.d.ts +2 -0
- package/es/picker/utils.mjs +14 -7
- package/es/picker-group/PickerGroup.d.ts +39 -0
- package/es/picker-group/PickerGroup.mjs +57 -0
- package/es/picker-group/index.css +1 -0
- package/es/picker-group/index.d.ts +33 -0
- package/es/picker-group/index.mjs +10 -0
- package/es/picker-group/style/index.d.ts +1 -0
- package/es/picker-group/style/index.mjs +9 -0
- package/es/popover/Popover.d.ts +1 -1
- package/es/popover/Popover.mjs +30 -28
- package/es/popover/index.d.ts +1 -0
- package/es/popover/index.mjs +3 -1
- package/es/popup/Popup.d.ts +3 -3
- package/es/popup/Popup.mjs +8 -6
- package/es/popup/index.css +1 -1
- package/es/popup/index.d.ts +3 -2
- package/es/popup/index.mjs +3 -1
- package/es/popup/shared.mjs +3 -1
- package/es/progress/Progress.d.ts +2 -2
- package/es/progress/Progress.mjs +2 -1
- package/es/progress/index.d.ts +2 -1
- package/es/progress/index.mjs +3 -1
- package/es/pull-refresh/PullRefresh.d.ts +1 -1
- package/es/pull-refresh/PullRefresh.mjs +9 -4
- package/es/pull-refresh/index.d.ts +1 -0
- package/es/pull-refresh/index.mjs +3 -1
- package/es/radio/Radio.d.ts +15 -2
- package/es/radio/Radio.mjs +3 -1
- package/es/radio/index.d.ts +1 -0
- package/es/radio/index.mjs +3 -1
- package/es/radio-group/RadioGroup.d.ts +1 -1
- package/es/radio-group/RadioGroup.mjs +2 -1
- package/es/radio-group/index.d.ts +1 -0
- package/es/radio-group/index.mjs +3 -1
- package/es/rate/Rate.d.ts +1 -1
- package/es/rate/Rate.mjs +7 -4
- package/es/rate/index.d.ts +1 -0
- package/es/rate/index.mjs +3 -1
- package/es/row/Row.d.ts +2 -2
- package/es/row/Row.mjs +2 -1
- package/es/row/index.d.ts +2 -1
- package/es/row/index.mjs +3 -1
- package/es/search/Search.d.ts +1 -1
- package/es/search/Search.mjs +2 -1
- package/es/search/index.css +1 -1
- package/es/search/index.d.ts +1 -0
- package/es/search/index.mjs +3 -1
- package/es/share-sheet/ShareSheet.d.ts +1 -1
- package/es/share-sheet/ShareSheet.mjs +2 -1
- package/es/share-sheet/index.d.ts +1 -0
- package/es/share-sheet/index.mjs +3 -1
- package/es/sidebar/Sidebar.d.ts +1 -1
- package/es/sidebar/Sidebar.mjs +2 -1
- package/es/sidebar/index.d.ts +1 -0
- package/es/sidebar/index.mjs +3 -1
- package/es/sidebar-item/SidebarItem.d.ts +1 -1
- package/es/sidebar-item/SidebarItem.mjs +2 -1
- package/es/sidebar-item/index.d.ts +1 -0
- package/es/sidebar-item/index.mjs +3 -1
- package/es/skeleton/Skeleton.d.ts +2 -2
- package/es/skeleton/Skeleton.mjs +2 -1
- package/es/skeleton/index.d.ts +2 -1
- package/es/skeleton/index.mjs +3 -1
- package/es/slider/Slider.d.ts +1 -1
- package/es/slider/Slider.mjs +9 -4
- package/es/slider/index.d.ts +1 -0
- package/es/slider/index.mjs +3 -1
- package/es/space/Space.d.ts +48 -0
- package/es/space/Space.mjs +88 -0
- package/es/space/index.css +1 -0
- package/es/space/index.d.ts +38 -0
- package/es/space/index.mjs +10 -0
- package/es/space/style/index.d.ts +1 -0
- package/es/space/style/index.mjs +2 -0
- package/es/step/Step.d.ts +1 -1
- package/es/step/index.d.ts +1 -1
- package/es/stepper/Stepper.d.ts +1 -1
- package/es/stepper/Stepper.mjs +3 -2
- package/es/stepper/index.d.ts +1 -0
- package/es/stepper/index.mjs +3 -1
- package/es/steps/Steps.d.ts +1 -1
- package/es/steps/Steps.mjs +2 -1
- package/es/steps/index.d.ts +1 -0
- package/es/steps/index.mjs +3 -1
- package/es/sticky/Sticky.d.ts +1 -1
- package/es/sticky/Sticky.mjs +4 -2
- package/es/sticky/index.d.ts +1 -0
- package/es/sticky/index.mjs +3 -1
- package/es/submit-bar/SubmitBar.d.ts +1 -1
- package/es/submit-bar/SubmitBar.mjs +2 -1
- package/es/submit-bar/index.d.ts +1 -0
- package/es/submit-bar/index.mjs +3 -1
- package/es/swipe/Swipe.d.ts +1 -1
- package/es/swipe/Swipe.mjs +16 -8
- package/es/swipe/index.d.ts +1 -0
- package/es/swipe/index.mjs +3 -1
- package/es/swipe-cell/SwipeCell.d.ts +3 -3
- package/es/swipe-cell/SwipeCell.mjs +7 -4
- package/es/swipe-cell/index.d.ts +3 -2
- package/es/swipe-cell/index.mjs +3 -1
- package/es/swipe-item/SwipeItem.d.ts +1 -1
- package/es/swipe-item/index.d.ts +1 -1
- package/es/switch/Switch.d.ts +1 -1
- package/es/switch/Switch.mjs +2 -1
- package/es/switch/index.d.ts +1 -0
- package/es/switch/index.mjs +3 -1
- package/es/tab/Tab.d.ts +2 -2
- package/es/tab/Tab.mjs +2 -1
- package/es/tab/index.d.ts +2 -1
- package/es/tab/index.mjs +3 -1
- package/es/tabbar/Tabbar.d.ts +1 -1
- package/es/tabbar/Tabbar.mjs +2 -1
- package/es/tabbar/index.d.ts +1 -0
- package/es/tabbar/index.mjs +3 -1
- package/es/tabbar-item/TabbarItem.d.ts +1 -1
- package/es/tabbar-item/TabbarItem.mjs +2 -1
- package/es/tabbar-item/index.d.ts +1 -0
- package/es/tabbar-item/index.mjs +3 -1
- package/es/tabs/Tabs.d.ts +1 -1
- package/es/tabs/Tabs.mjs +14 -3
- package/es/tabs/TabsContent.mjs +4 -0
- package/es/tabs/TabsTitle.d.ts +1 -1
- package/es/tabs/index.d.ts +1 -0
- package/es/tabs/index.mjs +3 -1
- package/es/tag/Tag.d.ts +1 -1
- package/es/tag/Tag.mjs +2 -1
- package/es/tag/index.d.ts +1 -0
- package/es/tag/index.mjs +3 -1
- package/es/time-picker/TimePicker.d.ts +7 -4
- package/es/time-picker/TimePicker.mjs +2 -1
- package/es/time-picker/index.d.ts +5 -2
- package/es/time-picker/index.mjs +3 -1
- package/es/time-picker/style/index.mjs +7 -0
- package/es/toast/Toast.d.ts +1 -1
- package/es/toast/Toast.mjs +9 -2
- package/es/toast/index.d.ts +1 -0
- package/es/toast/index.mjs +3 -1
- package/es/tree-select/TreeSelect.d.ts +1 -1
- package/es/tree-select/TreeSelect.mjs +2 -1
- package/es/tree-select/index.d.ts +1 -0
- package/es/tree-select/index.mjs +3 -1
- package/es/uploader/Uploader.d.ts +1 -1
- package/es/uploader/Uploader.mjs +2 -1
- package/es/uploader/index.d.ts +1 -0
- package/es/uploader/index.mjs +3 -1
- package/es/utils/basic.mjs +2 -1
- package/es/utils/create.mjs +8 -2
- package/es/utils/with-install.d.ts +2 -2
- package/es/utils/with-install.mjs +4 -2
- package/es/vue-tsx-shim.d.ts +7 -0
- package/lib/action-bar/ActionBar.d.ts +2 -2
- package/lib/action-bar/ActionBar.js +1 -0
- package/lib/action-bar/index.d.ts +2 -1
- package/lib/action-bar/index.js +6 -1
- package/lib/action-bar-button/ActionBarButton.d.ts +2 -2
- package/lib/action-bar-button/ActionBarButton.js +1 -0
- package/lib/action-bar-button/index.d.ts +2 -1
- package/lib/action-bar-button/index.js +6 -1
- package/lib/action-bar-icon/ActionBarIcon.d.ts +2 -2
- package/lib/action-bar-icon/ActionBarIcon.js +1 -0
- package/lib/action-bar-icon/index.d.ts +2 -1
- package/lib/action-bar-icon/index.js +6 -1
- package/lib/action-sheet/ActionSheet.d.ts +1 -1
- package/lib/action-sheet/ActionSheet.js +1 -0
- package/lib/action-sheet/index.d.ts +1 -0
- package/lib/action-sheet/index.js +6 -1
- package/lib/address-edit/AddressEdit.d.ts +1 -1
- package/lib/address-edit/AddressEdit.js +5 -1
- package/lib/address-edit/index.d.ts +1 -0
- package/lib/address-edit/index.js +6 -1
- package/lib/address-edit/style/index.js +7 -1
- package/lib/address-list/AddressList.d.ts +1 -1
- package/lib/address-list/AddressList.js +5 -1
- package/lib/address-list/index.d.ts +1 -0
- package/lib/address-list/index.js +6 -1
- package/lib/area/Area.d.ts +7 -4
- package/lib/area/Area.js +1 -0
- package/lib/area/index.d.ts +5 -2
- package/lib/area/index.js +6 -1
- package/lib/area/style/index.js +7 -0
- package/lib/area/utils.js +9 -2
- package/lib/badge/Badge.d.ts +2 -2
- package/lib/badge/Badge.js +2 -1
- package/lib/badge/index.d.ts +2 -1
- package/lib/badge/index.js +6 -1
- package/lib/button/Button.d.ts +1 -1
- package/lib/button/Button.js +1 -0
- package/lib/button/index.d.ts +1 -0
- package/lib/button/index.js +6 -1
- package/lib/calendar/Calendar.d.ts +1 -1
- package/lib/calendar/Calendar.js +12 -8
- package/lib/calendar/CalendarMonth.js +4 -1
- package/lib/calendar/index.d.ts +1 -0
- package/lib/calendar/index.js +6 -1
- package/lib/calendar/style/index.js +7 -1
- package/lib/card/Card.d.ts +1 -1
- package/lib/card/Card.js +1 -0
- package/lib/card/index.d.ts +1 -0
- package/lib/card/index.js +6 -1
- package/lib/cascader/Cascader.d.ts +1 -1
- package/lib/cascader/Cascader.js +1 -0
- package/lib/cascader/index.d.ts +1 -0
- package/lib/cascader/index.js +6 -1
- package/lib/cell/Cell.d.ts +2 -2
- package/lib/cell/Cell.js +1 -0
- package/lib/cell/index.d.ts +2 -1
- package/lib/cell/index.js +6 -1
- package/lib/cell-group/CellGroup.d.ts +2 -2
- package/lib/cell-group/CellGroup.js +1 -0
- package/lib/cell-group/index.d.ts +2 -1
- package/lib/cell-group/index.js +6 -1
- package/lib/checkbox/Checkbox.d.ts +1 -1
- package/lib/checkbox/Checkbox.js +5 -1
- package/lib/checkbox/index.d.ts +1 -0
- package/lib/checkbox/index.js +6 -1
- package/lib/checkbox-group/CheckboxGroup.d.ts +1 -1
- package/lib/checkbox-group/CheckboxGroup.js +1 -0
- package/lib/checkbox-group/index.d.ts +1 -0
- package/lib/checkbox-group/index.js +6 -1
- package/lib/circle/Circle.d.ts +1 -1
- package/lib/circle/Circle.js +1 -0
- package/lib/circle/index.d.ts +1 -0
- package/lib/circle/index.js +6 -1
- package/lib/col/Col.d.ts +2 -2
- package/lib/col/Col.js +1 -0
- package/lib/col/index.d.ts +2 -1
- package/lib/col/index.js +6 -1
- package/lib/collapse/Collapse.d.ts +9 -2
- package/lib/collapse/Collapse.js +29 -1
- package/lib/collapse/index.d.ts +2 -1
- package/lib/collapse/index.js +6 -1
- package/lib/collapse-item/CollapseItem.d.ts +2 -2
- package/lib/collapse-item/CollapseItem.js +4 -1
- package/lib/collapse-item/index.d.ts +2 -1
- package/lib/collapse-item/index.js +6 -1
- package/lib/composables/use-global-z-index.d.ts +4 -0
- package/lib/composables/use-global-z-index.js +28 -0
- package/lib/composables/use-height.d.ts +1 -1
- package/lib/composables/use-height.js +8 -2
- package/lib/composables/use-lazy-render.js +9 -5
- package/lib/composables/use-lock-scroll.js +7 -2
- package/lib/composables/use-placeholder.js +1 -1
- package/lib/composables/use-visibility-change.js +6 -3
- package/lib/config-provider/ConfigProvider.d.ts +15 -5
- package/lib/config-provider/ConfigProvider.js +24 -7
- package/lib/config-provider/index.d.ts +10 -3
- package/lib/config-provider/index.js +6 -1
- package/lib/contact-card/ContactCard.d.ts +1 -1
- package/lib/contact-card/ContactCard.js +1 -0
- package/lib/contact-card/index.d.ts +1 -0
- package/lib/contact-card/index.js +6 -1
- package/lib/contact-edit/ContactEdit.d.ts +1 -1
- package/lib/contact-edit/ContactEdit.js +1 -0
- package/lib/contact-edit/index.d.ts +1 -0
- package/lib/contact-edit/index.js +6 -1
- package/lib/contact-list/ContactList.d.ts +1 -1
- package/lib/contact-list/ContactList.js +1 -0
- package/lib/contact-list/index.d.ts +1 -0
- package/lib/contact-list/index.js +6 -1
- package/lib/count-down/CountDown.d.ts +1 -1
- package/lib/count-down/CountDown.js +1 -0
- package/lib/count-down/index.d.ts +1 -0
- package/lib/count-down/index.js +6 -1
- package/lib/coupon/Coupon.d.ts +1 -1
- package/lib/coupon/index.d.ts +1 -1
- package/lib/coupon/index.js +4 -1
- package/lib/coupon/utils.js +3 -1
- package/lib/coupon-cell/CouponCell.d.ts +2 -2
- package/lib/coupon-cell/CouponCell.js +1 -0
- package/lib/coupon-cell/index.d.ts +2 -1
- package/lib/coupon-cell/index.js +6 -1
- package/lib/coupon-list/CouponList.d.ts +1 -1
- package/lib/coupon-list/CouponList.js +1 -0
- package/lib/coupon-list/index.d.ts +1 -0
- package/lib/coupon-list/index.js +6 -1
- package/lib/coupon-list/style/index.js +3 -3
- package/lib/date-picker/DatePicker.d.ts +7 -4
- package/lib/date-picker/DatePicker.js +11 -10
- package/lib/date-picker/index.d.ts +5 -2
- package/lib/date-picker/index.js +6 -1
- package/lib/date-picker/style/index.js +7 -0
- package/lib/date-picker/utils.d.ts +2 -1
- package/lib/dialog/Dialog.d.ts +1 -1
- package/lib/dialog/Dialog.js +2 -1
- package/lib/dialog/function-call.js +4 -1
- package/lib/dialog/index.css +1 -1
- package/lib/dialog/index.d.ts +1 -0
- package/lib/dialog/index.js +6 -1
- package/lib/dialog/types.d.ts +1 -1
- package/lib/divider/Divider.d.ts +2 -2
- package/lib/divider/Divider.js +2 -1
- package/lib/divider/index.d.ts +2 -1
- package/lib/divider/index.js +7 -2
- package/lib/dropdown-item/DropdownItem.d.ts +3 -3
- package/lib/dropdown-item/DropdownItem.js +2 -1
- package/lib/dropdown-item/index.d.ts +3 -2
- package/lib/dropdown-item/index.js +7 -2
- package/lib/dropdown-menu/DropdownMenu.d.ts +2 -2
- package/lib/dropdown-menu/DropdownMenu.js +4 -2
- package/lib/dropdown-menu/index.d.ts +2 -1
- package/lib/dropdown-menu/index.js +7 -2
- package/lib/empty/Empty.d.ts +3 -3
- package/lib/empty/Empty.js +283 -17
- package/lib/empty/index.d.ts +2 -1
- package/lib/empty/index.js +7 -2
- package/lib/field/Field.d.ts +1 -1
- package/lib/field/Field.js +13 -2
- package/lib/field/index.d.ts +1 -0
- package/lib/field/index.js +7 -2
- package/lib/field/types.d.ts +1 -0
- package/lib/field/utils.d.ts +1 -0
- package/lib/field/utils.js +8 -2
- package/lib/form/Form.d.ts +1 -1
- package/lib/form/Form.js +2 -1
- package/lib/form/index.d.ts +1 -0
- package/lib/form/index.js +7 -2
- package/lib/grid/Grid.d.ts +2 -2
- package/lib/grid/Grid.js +2 -1
- package/lib/grid/index.d.ts +2 -1
- package/lib/grid/index.js +7 -2
- package/lib/grid-item/GridItem.d.ts +2 -2
- package/lib/grid-item/GridItem.js +2 -1
- package/lib/grid-item/index.d.ts +2 -1
- package/lib/grid-item/index.js +7 -2
- package/lib/icon/Icon.d.ts +2 -2
- package/lib/icon/Icon.js +2 -1
- package/lib/icon/index.d.ts +2 -1
- package/lib/icon/index.js +7 -2
- package/lib/image/Image.d.ts +5 -1
- package/lib/image/Image.js +5 -2
- package/lib/image/index.css +1 -1
- package/lib/image/index.d.ts +4 -0
- package/lib/image/index.js +7 -2
- package/lib/image-preview/ImagePreview.d.ts +1 -1
- package/lib/image-preview/ImagePreview.js +6 -2
- package/lib/image-preview/ImagePreviewItem.js +10 -2
- package/lib/image-preview/function-call.js +4 -1
- package/lib/image-preview/index.css +1 -1
- package/lib/image-preview/index.d.ts +1 -0
- package/lib/image-preview/index.js +6 -1
- package/lib/index-anchor/IndexAnchor.d.ts +2 -2
- package/lib/index-anchor/IndexAnchor.js +2 -1
- package/lib/index-anchor/index.d.ts +2 -1
- package/lib/index-anchor/index.js +7 -2
- package/lib/index-bar/IndexBar.d.ts +1 -1
- package/lib/index-bar/IndexBar.js +11 -5
- package/lib/index-bar/index.d.ts +1 -0
- package/lib/index-bar/index.js +7 -2
- package/lib/index.css +1 -1
- package/lib/index.d.ts +3 -1
- package/lib/index.js +7 -1
- package/lib/lazyload/vue-lazyload/index.js +4 -1
- package/lib/lazyload/vue-lazyload/lazy-component.js +4 -1
- package/lib/lazyload/vue-lazyload/lazy-container.js +11 -7
- package/lib/lazyload/vue-lazyload/lazy-image.js +24 -14
- package/lib/lazyload/vue-lazyload/lazy.js +15 -4
- package/lib/lazyload/vue-lazyload/listener.js +45 -33
- package/lib/lazyload/vue-lazyload/util.js +4 -1
- package/lib/list/List.d.ts +1 -1
- package/lib/list/List.js +4 -2
- package/lib/list/index.d.ts +1 -0
- package/lib/list/index.js +7 -2
- package/lib/loading/Loading.d.ts +2 -2
- package/lib/loading/Loading.js +2 -1
- package/lib/loading/index.d.ts +2 -1
- package/lib/loading/index.js +7 -2
- package/lib/locale/index.js +4 -1
- package/lib/nav-bar/NavBar.d.ts +1 -1
- package/lib/nav-bar/NavBar.js +2 -1
- package/lib/nav-bar/index.d.ts +1 -0
- package/lib/nav-bar/index.js +7 -2
- package/lib/notice-bar/NoticeBar.d.ts +1 -1
- package/lib/notice-bar/NoticeBar.js +2 -1
- package/lib/notice-bar/index.d.ts +1 -0
- package/lib/notice-bar/index.js +7 -2
- package/lib/notify/Notify.d.ts +1 -1
- package/lib/notify/Notify.js +2 -1
- package/lib/notify/function-call.js +4 -1
- package/lib/notify/index.d.ts +1 -0
- package/lib/notify/index.js +6 -1
- package/lib/number-keyboard/NumberKeyboard.d.ts +2 -2
- package/lib/number-keyboard/NumberKeyboard.js +7 -4
- package/lib/number-keyboard/NumberKeyboardKey.js +2 -2
- package/lib/number-keyboard/index.d.ts +2 -1
- package/lib/number-keyboard/index.js +7 -2
- package/lib/overlay/Overlay.d.ts +2 -2
- package/lib/overlay/Overlay.js +13 -5
- package/lib/overlay/index.d.ts +2 -1
- package/lib/overlay/index.js +7 -2
- package/lib/pagination/Pagination.d.ts +1 -1
- package/lib/pagination/Pagination.js +2 -1
- package/lib/pagination/index.d.ts +1 -0
- package/lib/pagination/index.js +7 -2
- package/lib/password-input/PasswordInput.d.ts +1 -1
- package/lib/password-input/PasswordInput.js +3 -2
- package/lib/password-input/index.d.ts +1 -0
- package/lib/password-input/index.js +7 -2
- package/lib/picker/Picker.d.ts +11 -6
- package/lib/picker/Picker.js +57 -68
- package/lib/picker/PickerColumn.d.ts +2 -1
- package/lib/picker/PickerColumn.js +10 -5
- package/lib/picker/PickerToolbar.d.ts +21 -0
- package/lib/picker/PickerToolbar.js +78 -0
- package/lib/picker/index.d.ts +7 -3
- package/lib/picker/index.js +7 -2
- package/lib/picker/style/index.js +7 -0
- package/lib/picker/utils.d.ts +2 -0
- package/lib/picker/utils.js +15 -8
- package/lib/picker-group/PickerGroup.d.ts +39 -0
- package/lib/picker-group/PickerGroup.js +82 -0
- package/lib/picker-group/index.css +1 -0
- package/lib/picker-group/index.d.ts +33 -0
- package/lib/picker-group/index.js +35 -0
- package/lib/picker-group/style/index.d.ts +1 -0
- package/lib/picker-group/style/index.js +9 -0
- package/lib/popover/Popover.d.ts +1 -1
- package/lib/popover/Popover.js +29 -27
- package/lib/popover/index.d.ts +1 -0
- package/lib/popover/index.js +7 -2
- package/lib/popup/Popup.d.ts +3 -3
- package/lib/popup/Popup.js +8 -6
- package/lib/popup/index.css +1 -1
- package/lib/popup/index.d.ts +3 -2
- package/lib/popup/index.js +7 -2
- package/lib/popup/shared.js +3 -1
- package/lib/progress/Progress.d.ts +2 -2
- package/lib/progress/Progress.js +2 -1
- package/lib/progress/index.d.ts +2 -1
- package/lib/progress/index.js +7 -2
- package/lib/pull-refresh/PullRefresh.d.ts +1 -1
- package/lib/pull-refresh/PullRefresh.js +8 -3
- package/lib/pull-refresh/index.d.ts +1 -0
- package/lib/pull-refresh/index.js +7 -2
- package/lib/radio/Radio.d.ts +15 -2
- package/lib/radio/Radio.js +7 -2
- package/lib/radio/index.d.ts +1 -0
- package/lib/radio/index.js +7 -2
- package/lib/radio-group/RadioGroup.d.ts +1 -1
- package/lib/radio-group/RadioGroup.js +2 -1
- package/lib/radio-group/index.d.ts +1 -0
- package/lib/radio-group/index.js +7 -2
- package/lib/rate/Rate.d.ts +1 -1
- package/lib/rate/Rate.js +6 -3
- package/lib/rate/index.d.ts +1 -0
- package/lib/rate/index.js +7 -2
- package/lib/row/Row.d.ts +2 -2
- package/lib/row/Row.js +2 -1
- package/lib/row/index.d.ts +2 -1
- package/lib/row/index.js +7 -2
- package/lib/search/Search.d.ts +1 -1
- package/lib/search/Search.js +2 -1
- package/lib/search/index.css +1 -1
- package/lib/search/index.d.ts +1 -0
- package/lib/search/index.js +7 -2
- package/lib/share-sheet/ShareSheet.d.ts +1 -1
- package/lib/share-sheet/ShareSheet.js +2 -1
- package/lib/share-sheet/index.d.ts +1 -0
- package/lib/share-sheet/index.js +7 -2
- package/lib/sidebar/Sidebar.d.ts +1 -1
- package/lib/sidebar/Sidebar.js +2 -1
- package/lib/sidebar/index.d.ts +1 -0
- package/lib/sidebar/index.js +7 -2
- package/lib/sidebar-item/SidebarItem.d.ts +1 -1
- package/lib/sidebar-item/SidebarItem.js +2 -1
- package/lib/sidebar-item/index.d.ts +1 -0
- package/lib/sidebar-item/index.js +7 -2
- package/lib/skeleton/Skeleton.d.ts +2 -2
- package/lib/skeleton/Skeleton.js +2 -1
- package/lib/skeleton/index.d.ts +2 -1
- package/lib/skeleton/index.js +7 -2
- package/lib/slider/Slider.d.ts +1 -1
- package/lib/slider/Slider.js +8 -3
- package/lib/slider/index.d.ts +1 -0
- package/lib/slider/index.js +7 -2
- package/lib/space/Space.d.ts +48 -0
- package/lib/space/Space.js +107 -0
- package/lib/space/index.css +1 -0
- package/lib/space/index.d.ts +38 -0
- package/lib/space/index.js +35 -0
- package/lib/space/style/index.d.ts +1 -0
- package/lib/space/style/index.js +2 -0
- package/lib/step/Step.d.ts +1 -1
- package/lib/step/index.d.ts +1 -1
- package/lib/step/index.js +4 -1
- package/lib/stepper/Stepper.d.ts +1 -1
- package/lib/stepper/Stepper.js +3 -2
- package/lib/stepper/index.d.ts +1 -0
- package/lib/stepper/index.js +7 -2
- package/lib/steps/Steps.d.ts +1 -1
- package/lib/steps/Steps.js +2 -1
- package/lib/steps/index.d.ts +1 -0
- package/lib/steps/index.js +7 -2
- package/lib/sticky/Sticky.d.ts +1 -1
- package/lib/sticky/Sticky.js +4 -2
- package/lib/sticky/index.d.ts +1 -0
- package/lib/sticky/index.js +7 -2
- package/lib/submit-bar/SubmitBar.d.ts +1 -1
- package/lib/submit-bar/SubmitBar.js +2 -1
- package/lib/submit-bar/index.d.ts +1 -0
- package/lib/submit-bar/index.js +7 -2
- package/lib/swipe/Swipe.d.ts +1 -1
- package/lib/swipe/Swipe.js +15 -7
- package/lib/swipe/index.d.ts +1 -0
- package/lib/swipe/index.js +7 -2
- package/lib/swipe-cell/SwipeCell.d.ts +3 -3
- package/lib/swipe-cell/SwipeCell.js +6 -3
- package/lib/swipe-cell/index.d.ts +3 -2
- package/lib/swipe-cell/index.js +7 -2
- package/lib/swipe-item/SwipeItem.d.ts +1 -1
- package/lib/swipe-item/index.d.ts +1 -1
- package/lib/swipe-item/index.js +4 -1
- package/lib/switch/Switch.d.ts +1 -1
- package/lib/switch/Switch.js +2 -1
- package/lib/switch/index.d.ts +1 -0
- package/lib/switch/index.js +7 -2
- package/lib/tab/Tab.d.ts +2 -2
- package/lib/tab/Tab.js +2 -1
- package/lib/tab/index.d.ts +2 -1
- package/lib/tab/index.js +7 -2
- package/lib/tabbar/Tabbar.d.ts +1 -1
- package/lib/tabbar/Tabbar.js +2 -1
- package/lib/tabbar/index.d.ts +1 -0
- package/lib/tabbar/index.js +7 -2
- package/lib/tabbar-item/TabbarItem.d.ts +1 -1
- package/lib/tabbar-item/TabbarItem.js +2 -1
- package/lib/tabbar-item/index.d.ts +1 -0
- package/lib/tabbar-item/index.js +7 -2
- package/lib/tabs/Tabs.d.ts +1 -1
- package/lib/tabs/Tabs.js +18 -4
- package/lib/tabs/TabsContent.js +4 -0
- package/lib/tabs/TabsTitle.d.ts +1 -1
- package/lib/tabs/index.d.ts +1 -0
- package/lib/tabs/index.js +7 -2
- package/lib/tag/Tag.d.ts +1 -1
- package/lib/tag/Tag.js +2 -1
- package/lib/tag/index.d.ts +1 -0
- package/lib/tag/index.js +7 -2
- package/lib/time-picker/TimePicker.d.ts +7 -4
- package/lib/time-picker/TimePicker.js +2 -1
- package/lib/time-picker/index.d.ts +5 -2
- package/lib/time-picker/index.js +7 -2
- package/lib/time-picker/style/index.js +7 -0
- package/lib/toast/Toast.d.ts +1 -1
- package/lib/toast/Toast.js +9 -2
- package/lib/toast/function-call.js +4 -1
- package/lib/toast/index.d.ts +1 -0
- package/lib/toast/index.js +7 -2
- package/lib/tree-select/TreeSelect.d.ts +1 -1
- package/lib/tree-select/TreeSelect.js +2 -1
- package/lib/tree-select/index.d.ts +1 -0
- package/lib/tree-select/index.js +7 -2
- package/lib/uploader/Uploader.d.ts +1 -1
- package/lib/uploader/Uploader.js +6 -2
- package/lib/uploader/index.d.ts +1 -0
- package/lib/uploader/index.js +7 -2
- package/lib/utils/basic.js +2 -1
- package/lib/utils/create.js +12 -3
- package/lib/utils/with-install.d.ts +2 -2
- package/lib/utils/with-install.js +4 -2
- package/lib/vant.cjs.js +5416 -4902
- package/lib/vant.es.js +5547 -4924
- package/lib/vant.js +5431 -4948
- package/lib/vant.min.js +1 -1
- package/lib/vue-tsx-shim.d.ts +7 -0
- package/{vetur → lib}/web-types.json +1237 -1061
- package/package.json +14 -19
- package/es/empty/Images.d.ts +0 -4
- package/es/empty/Images.mjs +0 -271
- package/lib/empty/Images.d.ts +0 -4
- package/lib/empty/Images.js +0 -290
- package/vetur/attributes.json +0 -3530
- package/vetur/tags.json +0 -1212
package/es/field/Field.mjs
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
import { createTextVNode as _createTextVNode, mergeProps as _mergeProps, createVNode as _createVNode } from "vue";
|
2
2
|
import { ref, watch, provide, computed, nextTick, reactive, onMounted, defineComponent } from "vue";
|
3
3
|
import { isDef, extend, addUnit, toArray, FORM_KEY, numericProp, unknownProp, resetScroll, formatNumber, preventDefault, makeStringProp, makeNumericProp, createNamespace } from "../utils/index.mjs";
|
4
|
-
import { cutString, runSyncRule, endComposing, mapInputType, startComposing, getRuleMessage, resizeTextarea, getStringLength, runRuleValidator } from "./utils.mjs";
|
4
|
+
import { cutString, runSyncRule, endComposing, mapInputType, isEmptyValue, startComposing, getRuleMessage, resizeTextarea, getStringLength, runRuleValidator } from "./utils.mjs";
|
5
5
|
import { cellSharedProps } from "../cell/Cell.mjs";
|
6
|
-
import {
|
6
|
+
import { useParent, useEventListener, CUSTOM_FIELD_INJECTION_KEY } from "@vant/use";
|
7
7
|
import { useId } from "../composables/use-id.mjs";
|
8
8
|
import { useExpose } from "../composables/use-expose.mjs";
|
9
9
|
import { Icon } from "../icon/index.mjs";
|
@@ -70,6 +70,7 @@ var stdin_default = defineComponent({
|
|
70
70
|
validateMessage: ""
|
71
71
|
});
|
72
72
|
const inputRef = ref();
|
73
|
+
const clearIconRef = ref();
|
73
74
|
const customValue = ref();
|
74
75
|
const {
|
75
76
|
parent: form
|
@@ -117,6 +118,9 @@ var stdin_default = defineComponent({
|
|
117
118
|
return;
|
118
119
|
}
|
119
120
|
if (rule.validator) {
|
121
|
+
if (isEmptyValue(value) && rule.validateEmpty === false) {
|
122
|
+
return;
|
123
|
+
}
|
120
124
|
return runRuleValidator(value, rule).then((result) => {
|
121
125
|
if (result && typeof result === "string") {
|
122
126
|
state.status = "failed";
|
@@ -382,9 +386,9 @@ var stdin_default = defineComponent({
|
|
382
386
|
const renderFieldBody = () => [_createVNode("div", {
|
383
387
|
"class": bem("body")
|
384
388
|
}, [renderInput(), showClear.value && _createVNode(Icon, {
|
389
|
+
"ref": clearIconRef,
|
385
390
|
"name": props.clearIcon,
|
386
|
-
"class": bem("clear")
|
387
|
-
"onTouchstart": onClear
|
391
|
+
"class": bem("clear")
|
388
392
|
}, null), renderRightIcon(), slots.button && _createVNode("div", {
|
389
393
|
"class": bem("button")
|
390
394
|
}, [slots.button()])]), renderWordLimit(), renderMessage()];
|
@@ -411,6 +415,12 @@ var stdin_default = defineComponent({
|
|
411
415
|
updateValue(getModelValue(), props.formatTrigger);
|
412
416
|
nextTick(adjustTextareaSize);
|
413
417
|
});
|
418
|
+
useEventListener("touchstart", onClear, {
|
419
|
+
target: computed(() => {
|
420
|
+
var _a;
|
421
|
+
return (_a = clearIconRef.value) == null ? void 0 : _a.$el;
|
422
|
+
})
|
423
|
+
});
|
414
424
|
return () => {
|
415
425
|
const disabled = getProp("disabled");
|
416
426
|
const labelAlign = getProp("labelAlign");
|
@@ -445,5 +455,6 @@ var stdin_default = defineComponent({
|
|
445
455
|
});
|
446
456
|
export {
|
447
457
|
stdin_default as default,
|
458
|
+
fieldProps,
|
448
459
|
fieldSharedProps
|
449
460
|
};
|
package/es/field/index.d.ts
CHANGED
@@ -194,6 +194,7 @@ export declare const Field: import("../utils").WithInstall<import("vue").DefineC
|
|
194
194
|
colon: boolean;
|
195
195
|
}>>;
|
196
196
|
export default Field;
|
197
|
+
export { fieldProps } from './Field';
|
197
198
|
export type { FieldProps };
|
198
199
|
export type { FieldType, FieldRule, FieldInstance, FieldTextAlign, FieldRuleMessage, FieldClearTrigger, FieldFormatTrigger, FieldRuleValidator, FiledRuleFormatter, FieldValidateError, FieldAutosizeConfig, FieldValidateTrigger, FieldValidationStatus, } from './types';
|
199
200
|
declare module 'vue' {
|
package/es/field/index.mjs
CHANGED
@@ -2,7 +2,9 @@ import { withInstall } from "../utils/index.mjs";
|
|
2
2
|
import _Field from "./Field.mjs";
|
3
3
|
const Field = withInstall(_Field);
|
4
4
|
var stdin_default = Field;
|
5
|
+
import { fieldProps } from "./Field.mjs";
|
5
6
|
export {
|
6
7
|
Field,
|
7
|
-
stdin_default as default
|
8
|
+
stdin_default as default,
|
9
|
+
fieldProps
|
8
10
|
};
|
package/es/field/types.d.ts
CHANGED
@@ -23,6 +23,7 @@ export declare type FieldRule = {
|
|
23
23
|
required?: boolean;
|
24
24
|
validator?: FieldRuleValidator;
|
25
25
|
formatter?: FiledRuleFormatter;
|
26
|
+
validateEmpty?: boolean;
|
26
27
|
};
|
27
28
|
export declare type FieldValidationStatus = 'passed' | 'failed' | 'unvalidated';
|
28
29
|
export declare type FieldFormSharedProps = 'colon' | 'disabled' | 'readonly' | 'labelWidth' | 'labelAlign' | 'inputAlign' | 'errorMessageAlign';
|
package/es/field/utils.d.ts
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
import { HTMLAttributes, InputHTMLAttributes } from 'vue';
|
2
2
|
import type { FieldRule, FieldType, FieldAutosizeConfig } from './types';
|
3
|
+
export declare function isEmptyValue(value: unknown): boolean;
|
3
4
|
export declare function runSyncRule(value: unknown, rule: FieldRule): boolean;
|
4
5
|
export declare function runRuleValidator(value: unknown, rule: FieldRule): Promise<unknown>;
|
5
6
|
export declare function getRuleMessage(value: unknown, rule: FieldRule): string;
|
package/es/field/utils.mjs
CHANGED
@@ -15,8 +15,13 @@ function isEmptyValue(value) {
|
|
15
15
|
return !value;
|
16
16
|
}
|
17
17
|
function runSyncRule(value, rule) {
|
18
|
-
if (
|
19
|
-
|
18
|
+
if (isEmptyValue(value)) {
|
19
|
+
if (rule.required) {
|
20
|
+
return false;
|
21
|
+
}
|
22
|
+
if (rule.validateEmpty === false) {
|
23
|
+
return true;
|
24
|
+
}
|
20
25
|
}
|
21
26
|
if (rule.pattern && !rule.pattern.test(String(value))) {
|
22
27
|
return false;
|
@@ -93,6 +98,7 @@ export {
|
|
93
98
|
endComposing,
|
94
99
|
getRuleMessage,
|
95
100
|
getStringLength,
|
101
|
+
isEmptyValue,
|
96
102
|
mapInputType,
|
97
103
|
resizeTextarea,
|
98
104
|
runRuleValidator,
|
package/es/form/Form.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { type PropType, type ExtractPropTypes } from 'vue';
|
2
2
|
import type { FieldTextAlign, FieldValidateTrigger } from '../field/types';
|
3
|
-
declare const formProps: {
|
3
|
+
export declare const formProps: {
|
4
4
|
colon: BooleanConstructor;
|
5
5
|
disabled: BooleanConstructor;
|
6
6
|
readonly: BooleanConstructor;
|
package/es/form/Form.mjs
CHANGED
package/es/form/index.d.ts
CHANGED
@@ -60,6 +60,7 @@ export declare const Form: import("../utils").WithInstall<import("vue").DefineCo
|
|
60
60
|
validateTrigger: import("..").FieldValidateTrigger | import("..").FieldValidateTrigger[];
|
61
61
|
}>>;
|
62
62
|
export default Form;
|
63
|
+
export { formProps } from './Form';
|
63
64
|
export type { FormProps };
|
64
65
|
export type { FormInstance } from './types';
|
65
66
|
declare module 'vue' {
|
package/es/form/index.mjs
CHANGED
@@ -2,7 +2,9 @@ import { withInstall } from "../utils/index.mjs";
|
|
2
2
|
import _Form from "./Form.mjs";
|
3
3
|
const Form = withInstall(_Form);
|
4
4
|
var stdin_default = Form;
|
5
|
+
import { formProps } from "./Form.mjs";
|
5
6
|
export {
|
6
7
|
Form,
|
7
|
-
stdin_default as default
|
8
|
+
stdin_default as default,
|
9
|
+
formProps
|
8
10
|
};
|
package/es/grid/Grid.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { type PropType, type InjectionKey, type ExtractPropTypes } from 'vue';
|
2
2
|
export declare type GridDirection = 'horizontal' | 'vertical';
|
3
|
-
declare const gridProps: {
|
3
|
+
export declare const gridProps: {
|
4
4
|
square: BooleanConstructor;
|
5
5
|
center: {
|
6
6
|
type: BooleanConstructor;
|
@@ -44,7 +44,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
44
44
|
type: (NumberConstructor | StringConstructor)[];
|
45
45
|
default: number;
|
46
46
|
};
|
47
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
47
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
48
48
|
square: BooleanConstructor;
|
49
49
|
center: {
|
50
50
|
type: BooleanConstructor;
|
package/es/grid/Grid.mjs
CHANGED
package/es/grid/index.d.ts
CHANGED
@@ -17,7 +17,7 @@ export declare const Grid: import("../utils").WithInstall<import("vue").DefineCo
|
|
17
17
|
type: (NumberConstructor | StringConstructor)[];
|
18
18
|
default: number;
|
19
19
|
};
|
20
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
20
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
21
21
|
square: BooleanConstructor;
|
22
22
|
center: {
|
23
23
|
type: BooleanConstructor;
|
@@ -45,6 +45,7 @@ export declare const Grid: import("../utils").WithInstall<import("vue").DefineCo
|
|
45
45
|
columnNum: string | number;
|
46
46
|
}>>;
|
47
47
|
export default Grid;
|
48
|
+
export { gridProps } from './Grid';
|
48
49
|
export type { GridProps, GridDirection } from './Grid';
|
49
50
|
declare module 'vue' {
|
50
51
|
interface GlobalComponents {
|
package/es/grid/index.mjs
CHANGED
@@ -2,7 +2,9 @@ import { withInstall } from "../utils/index.mjs";
|
|
2
2
|
import _Grid from "./Grid.mjs";
|
3
3
|
const Grid = withInstall(_Grid);
|
4
4
|
var stdin_default = Grid;
|
5
|
+
import { gridProps } from "./Grid.mjs";
|
5
6
|
export {
|
6
7
|
Grid,
|
7
|
-
stdin_default as default
|
8
|
+
stdin_default as default,
|
9
|
+
gridProps
|
8
10
|
};
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { type PropType, type ExtractPropTypes } from 'vue';
|
2
2
|
import { type BadgeProps } from '../badge';
|
3
|
-
declare const gridItemProps: {
|
3
|
+
export declare const gridItemProps: {
|
4
4
|
to: PropType<import("vue-router").RouteLocationRaw>;
|
5
5
|
url: StringConstructor;
|
6
6
|
replace: BooleanConstructor;
|
@@ -26,7 +26,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
26
26
|
iconColor: StringConstructor;
|
27
27
|
iconPrefix: StringConstructor;
|
28
28
|
badgeProps: PropType<Partial<BadgeProps>>;
|
29
|
-
}, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
29
|
+
}, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
30
30
|
to: PropType<import("vue-router").RouteLocationRaw>;
|
31
31
|
url: StringConstructor;
|
32
32
|
replace: BooleanConstructor;
|
package/es/grid-item/index.d.ts
CHANGED
@@ -10,7 +10,7 @@ export declare const GridItem: import("../utils").WithInstall<import("vue").Defi
|
|
10
10
|
iconColor: StringConstructor;
|
11
11
|
iconPrefix: StringConstructor;
|
12
12
|
badgeProps: import("vue").PropType<Partial<import("..").BadgeProps>>;
|
13
|
-
}, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
13
|
+
}, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
14
14
|
to: import("vue").PropType<import("vue-router").RouteLocationRaw>;
|
15
15
|
url: StringConstructor;
|
16
16
|
replace: BooleanConstructor;
|
@@ -27,6 +27,7 @@ export declare const GridItem: import("../utils").WithInstall<import("vue").Defi
|
|
27
27
|
dot: boolean;
|
28
28
|
}>>;
|
29
29
|
export default GridItem;
|
30
|
+
export { gridItemProps } from './GridItem';
|
30
31
|
export type { GridItemProps } from './GridItem';
|
31
32
|
declare module 'vue' {
|
32
33
|
interface GlobalComponents {
|
package/es/grid-item/index.mjs
CHANGED
@@ -2,7 +2,9 @@ import { withInstall } from "../utils/index.mjs";
|
|
2
2
|
import _GridItem from "./GridItem.mjs";
|
3
3
|
const GridItem = withInstall(_GridItem);
|
4
4
|
var stdin_default = GridItem;
|
5
|
+
import { gridItemProps } from "./GridItem.mjs";
|
5
6
|
export {
|
6
7
|
GridItem,
|
7
|
-
stdin_default as default
|
8
|
+
stdin_default as default,
|
9
|
+
gridItemProps
|
8
10
|
};
|
package/es/icon/Icon.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { type PropType, type ExtractPropTypes } from 'vue';
|
2
2
|
import { type BadgeProps } from '../badge';
|
3
|
-
declare const iconProps: {
|
3
|
+
export declare const iconProps: {
|
4
4
|
dot: BooleanConstructor;
|
5
5
|
tag: {
|
6
6
|
type: PropType<keyof HTMLElementTagNameMap>;
|
@@ -26,7 +26,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
26
26
|
color: StringConstructor;
|
27
27
|
badgeProps: PropType<Partial<BadgeProps>>;
|
28
28
|
classPrefix: StringConstructor;
|
29
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
29
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
30
30
|
dot: BooleanConstructor;
|
31
31
|
tag: {
|
32
32
|
type: PropType<keyof HTMLElementTagNameMap>;
|
package/es/icon/Icon.mjs
CHANGED
package/es/icon/index.d.ts
CHANGED
@@ -10,7 +10,7 @@ export declare const Icon: import("../utils").WithInstall<import("vue").DefineCo
|
|
10
10
|
color: StringConstructor;
|
11
11
|
badgeProps: import("vue").PropType<Partial<import("..").BadgeProps>>;
|
12
12
|
classPrefix: StringConstructor;
|
13
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
13
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
14
14
|
dot: BooleanConstructor;
|
15
15
|
tag: {
|
16
16
|
type: import("vue").PropType<keyof HTMLElementTagNameMap>;
|
@@ -27,6 +27,7 @@ export declare const Icon: import("../utils").WithInstall<import("vue").DefineCo
|
|
27
27
|
tag: keyof HTMLElementTagNameMap;
|
28
28
|
}>>;
|
29
29
|
export default Icon;
|
30
|
+
export { iconProps } from './Icon';
|
30
31
|
export type { IconProps } from './Icon';
|
31
32
|
declare module 'vue' {
|
32
33
|
interface GlobalComponents {
|
package/es/icon/index.mjs
CHANGED
@@ -2,7 +2,9 @@ import { withInstall } from "../utils/index.mjs";
|
|
2
2
|
import _Icon from "./Icon.mjs";
|
3
3
|
const Icon = withInstall(_Icon);
|
4
4
|
var stdin_default = Icon;
|
5
|
+
import { iconProps } from "./Icon.mjs";
|
5
6
|
export {
|
6
7
|
Icon,
|
7
|
-
stdin_default as default
|
8
|
+
stdin_default as default,
|
9
|
+
iconProps
|
8
10
|
};
|
package/es/image/Image.d.ts
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
import { type PropType, type ExtractPropTypes } from 'vue';
|
2
2
|
export declare type ImageFit = 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';
|
3
3
|
export declare type ImagePosition = 'center' | 'top' | 'right' | 'bottom' | 'left' | string;
|
4
|
-
declare const imageProps: {
|
4
|
+
export declare const imageProps: {
|
5
5
|
src: StringConstructor;
|
6
6
|
alt: StringConstructor;
|
7
7
|
fit: PropType<ImageFit>;
|
8
8
|
position: PropType<string>;
|
9
9
|
round: BooleanConstructor;
|
10
|
+
block: BooleanConstructor;
|
10
11
|
width: (NumberConstructor | StringConstructor)[];
|
11
12
|
height: (NumberConstructor | StringConstructor)[];
|
12
13
|
radius: (NumberConstructor | StringConstructor)[];
|
@@ -37,6 +38,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
37
38
|
fit: PropType<ImageFit>;
|
38
39
|
position: PropType<string>;
|
39
40
|
round: BooleanConstructor;
|
41
|
+
block: BooleanConstructor;
|
40
42
|
width: (NumberConstructor | StringConstructor)[];
|
41
43
|
height: (NumberConstructor | StringConstructor)[];
|
42
44
|
radius: (NumberConstructor | StringConstructor)[];
|
@@ -65,6 +67,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
65
67
|
fit: PropType<ImageFit>;
|
66
68
|
position: PropType<string>;
|
67
69
|
round: BooleanConstructor;
|
70
|
+
block: BooleanConstructor;
|
68
71
|
width: (NumberConstructor | StringConstructor)[];
|
69
72
|
height: (NumberConstructor | StringConstructor)[];
|
70
73
|
radius: (NumberConstructor | StringConstructor)[];
|
@@ -93,6 +96,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
93
96
|
}, {
|
94
97
|
round: boolean;
|
95
98
|
showError: boolean;
|
99
|
+
block: boolean;
|
96
100
|
lazyLoad: boolean;
|
97
101
|
errorIcon: string;
|
98
102
|
showLoading: boolean;
|
package/es/image/Image.mjs
CHANGED
@@ -9,6 +9,7 @@ const imageProps = {
|
|
9
9
|
fit: String,
|
10
10
|
position: String,
|
11
11
|
round: Boolean,
|
12
|
+
block: Boolean,
|
12
13
|
width: numericProp,
|
13
14
|
height: numericProp,
|
14
15
|
radius: numericProp,
|
@@ -137,7 +138,8 @@ var stdin_default = defineComponent({
|
|
137
138
|
var _a;
|
138
139
|
return _createVNode("div", {
|
139
140
|
"class": bem({
|
140
|
-
round: props.round
|
141
|
+
round: props.round,
|
142
|
+
block: props.block
|
141
143
|
}),
|
142
144
|
"style": style.value
|
143
145
|
}, [renderImage(), renderPlaceholder(), (_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
@@ -145,5 +147,6 @@ var stdin_default = defineComponent({
|
|
145
147
|
}
|
146
148
|
});
|
147
149
|
export {
|
148
|
-
stdin_default as default
|
150
|
+
stdin_default as default,
|
151
|
+
imageProps
|
149
152
|
};
|
package/es/image/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
body{--van-image-placeholder-text-color: var(--van-text-color-2);--van-image-placeholder-font-size: var(--van-font-size-md);--van-image-placeholder-background: var(--van-background);--van-image-loading-icon-size: 32px;--van-image-loading-icon-color: var(--van-gray-4);--van-image-error-icon-size: 32px;--van-image-error-icon-color: var(--van-gray-4)}.van-image{position:relative;display:inline-block}.van-image--round{overflow:hidden;border-radius:var(--van-radius-max)}.van-image--round .van-image__img{border-radius:inherit}.van-image__img,.van-image__error,.van-image__loading{display:block;width:100%;height:100%}.van-image__error,.van-image__loading{position:absolute;top:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--van-image-placeholder-text-color);font-size:var(--van-image-placeholder-font-size);background:var(--van-image-placeholder-background)}.van-image__loading-icon{color:var(--van-image-loading-icon-color);font-size:var(--van-image-loading-icon-size)}.van-image__error-icon{color:var(--van-image-error-icon-color);font-size:var(--van-image-error-icon-size)}
|
1
|
+
body{--van-image-placeholder-text-color: var(--van-text-color-2);--van-image-placeholder-font-size: var(--van-font-size-md);--van-image-placeholder-background: var(--van-background);--van-image-loading-icon-size: 32px;--van-image-loading-icon-color: var(--van-gray-4);--van-image-error-icon-size: 32px;--van-image-error-icon-color: var(--van-gray-4)}.van-image{position:relative;display:inline-block}.van-image--round{overflow:hidden;border-radius:var(--van-radius-max)}.van-image--round .van-image__img{border-radius:inherit}.van-image--block{display:block}.van-image__img,.van-image__error,.van-image__loading{display:block;width:100%;height:100%}.van-image__error,.van-image__loading{position:absolute;top:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--van-image-placeholder-text-color);font-size:var(--van-image-placeholder-font-size);background:var(--van-image-placeholder-background)}.van-image__loading-icon{color:var(--van-image-loading-icon-color);font-size:var(--van-image-loading-icon-size)}.van-image__error-icon{color:var(--van-image-error-icon-color);font-size:var(--van-image-error-icon-size)}
|
package/es/image/index.d.ts
CHANGED
@@ -4,6 +4,7 @@ export declare const Image: import("../utils").WithInstall<import("vue").DefineC
|
|
4
4
|
fit: import("vue").PropType<import("./Image").ImageFit>;
|
5
5
|
position: import("vue").PropType<string>;
|
6
6
|
round: BooleanConstructor;
|
7
|
+
block: BooleanConstructor;
|
7
8
|
width: (NumberConstructor | StringConstructor)[];
|
8
9
|
height: (NumberConstructor | StringConstructor)[];
|
9
10
|
radius: (NumberConstructor | StringConstructor)[];
|
@@ -32,6 +33,7 @@ export declare const Image: import("../utils").WithInstall<import("vue").DefineC
|
|
32
33
|
fit: import("vue").PropType<import("./Image").ImageFit>;
|
33
34
|
position: import("vue").PropType<string>;
|
34
35
|
round: BooleanConstructor;
|
36
|
+
block: BooleanConstructor;
|
35
37
|
width: (NumberConstructor | StringConstructor)[];
|
36
38
|
height: (NumberConstructor | StringConstructor)[];
|
37
39
|
radius: (NumberConstructor | StringConstructor)[];
|
@@ -60,12 +62,14 @@ export declare const Image: import("../utils").WithInstall<import("vue").DefineC
|
|
60
62
|
}, {
|
61
63
|
round: boolean;
|
62
64
|
showError: boolean;
|
65
|
+
block: boolean;
|
63
66
|
lazyLoad: boolean;
|
64
67
|
errorIcon: string;
|
65
68
|
showLoading: boolean;
|
66
69
|
loadingIcon: string;
|
67
70
|
}>>;
|
68
71
|
export default Image;
|
72
|
+
export { imageProps } from './Image';
|
69
73
|
export type { ImageFit, ImageProps } from './Image';
|
70
74
|
declare module 'vue' {
|
71
75
|
interface GlobalComponents {
|
package/es/image/index.mjs
CHANGED
@@ -2,7 +2,9 @@ import { withInstall } from "../utils/index.mjs";
|
|
2
2
|
import _Image from "./Image.mjs";
|
3
3
|
const Image = withInstall(_Image);
|
4
4
|
var stdin_default = Image;
|
5
|
+
import { imageProps } from "./Image.mjs";
|
5
6
|
export {
|
6
7
|
Image,
|
7
|
-
stdin_default as default
|
8
|
+
stdin_default as default,
|
9
|
+
imageProps
|
8
10
|
};
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { type PropType, type CSSProperties, type ExtractPropTypes } from 'vue';
|
2
2
|
import { Interceptor } from '../utils';
|
3
3
|
import { PopupCloseIconPosition } from '../popup';
|
4
|
-
declare const imagePreviewProps: {
|
4
|
+
export declare const imagePreviewProps: {
|
5
5
|
show: BooleanConstructor;
|
6
6
|
loop: {
|
7
7
|
type: BooleanConstructor;
|
@@ -1,7 +1,8 @@
|
|
1
1
|
import { createVNode as _createVNode } from "vue";
|
2
|
-
import { watch, computed, reactive, defineComponent } from "vue";
|
2
|
+
import { ref, watch, computed, reactive, defineComponent } from "vue";
|
3
3
|
import { clamp, numericProp, preventDefault, createNamespace, makeRequiredProp } from "../utils/index.mjs";
|
4
4
|
import { useTouch } from "../composables/use-touch.mjs";
|
5
|
+
import { useEventListener } from "@vant/use";
|
5
6
|
import { Image } from "../image/index.mjs";
|
6
7
|
import { Loading } from "../loading/index.mjs";
|
7
8
|
import { SwipeItem } from "../swipe-item/index.mjs";
|
@@ -32,6 +33,7 @@ var stdin_default = defineComponent({
|
|
32
33
|
displayHeight: 0
|
33
34
|
});
|
34
35
|
const touch = useTouch();
|
36
|
+
const swipeItem = ref();
|
35
37
|
const vertical = computed(() => {
|
36
38
|
const {
|
37
39
|
rootWidth,
|
@@ -217,6 +219,12 @@ var stdin_default = defineComponent({
|
|
217
219
|
resetScale();
|
218
220
|
}
|
219
221
|
});
|
222
|
+
useEventListener("touchmove", onTouchMove, {
|
223
|
+
target: computed(() => {
|
224
|
+
var _a;
|
225
|
+
return (_a = swipeItem.value) == null ? void 0 : _a.$el;
|
226
|
+
})
|
227
|
+
});
|
220
228
|
return () => {
|
221
229
|
const imageSlots = {
|
222
230
|
loading: () => _createVNode(Loading, {
|
@@ -224,9 +232,9 @@ var stdin_default = defineComponent({
|
|
224
232
|
}, null)
|
225
233
|
};
|
226
234
|
return _createVNode(SwipeItem, {
|
235
|
+
"ref": swipeItem,
|
227
236
|
"class": bem("swipe-item"),
|
228
|
-
"
|
229
|
-
"onTouchmove": onTouchMove,
|
237
|
+
"onTouchstartPassive": onTouchStart,
|
230
238
|
"onTouchend": onTouchEnd,
|
231
239
|
"onTouchcancel": onTouchEnd
|
232
240
|
}, {
|
@@ -1 +1 @@
|
|
1
|
-
body{--van-image-preview-index-text-color: var(--van-white);--van-image-preview-index-font-size: var(--van-font-size-md);--van-image-preview-index-line-height: var(--van-line-height-md);--van-image-preview-index-text-shadow: 0 1px 1px var(--van-gray-8);--van-image-preview-overlay-background: rgba(0, 0, 0, .9);--van-image-preview-close-icon-size: 22px;--van-image-preview-close-icon-color: var(--van-gray-5);--van-image-preview-close-icon-margin: var(--van-padding-md);--van-image-preview-close-icon-z-index: 1}.van-image-preview{position:fixed;top:0;left:0;width:100%;height:100%;background-color:transparent;transform:none}.van-image-preview__swipe{height:100%}.van-image-preview__swipe-item{display:flex;align-items:center;justify-content:center;overflow:hidden}.van-image-preview__cover{position:absolute;top:0;left:0}.van-image-preview__image{width:100%;transition-property:transform}.van-image-preview__image--vertical{width:auto;height:100%}.van-image-preview__image img{-webkit-user-drag:none}.van-image-preview__image .van-image__error{top:30%;height:40%}.van-image-preview__image .van-image__error-icon{font-size:36px}.van-image-preview__image .van-image__loading{background-color:transparent}.van-image-preview__index{position:absolute;top:var(--van-padding-md);left:50%;color:var(--van-image-preview-index-text-color);font-size:var(--van-image-preview-index-font-size);line-height:var(--van-image-preview-index-line-height);text-shadow:var(--van-image-preview-index-text-shadow);transform:translate(-50%)}.van-image-preview__overlay{background:var(--van-image-preview-overlay-background)}.van-image-preview__close-icon{position:absolute;z-index:var(--van-image-preview-close-icon-z-index);color:var(--van-image-preview-close-icon-color);font-size:var(--van-image-preview-close-icon-size)}.van-image-preview__close-icon--top-left{top:var(--van-image-preview-close-icon-margin);left:var(--van-image-preview-close-icon-margin)}.van-image-preview__close-icon--top-right{top:var(--van-image-preview-close-icon-margin);right:var(--van-image-preview-close-icon-margin)}.van-image-preview__close-icon--bottom-left{bottom:var(--van-image-preview-close-icon-margin);left:var(--van-image-preview-close-icon-margin)}.van-image-preview__close-icon--bottom-right{right:var(--van-image-preview-close-icon-margin);bottom:var(--van-image-preview-close-icon-margin)}
|
1
|
+
body{--van-image-preview-index-text-color: var(--van-white);--van-image-preview-index-font-size: var(--van-font-size-md);--van-image-preview-index-line-height: var(--van-line-height-md);--van-image-preview-index-text-shadow: 0 1px 1px var(--van-gray-8);--van-image-preview-overlay-background: rgba(0, 0, 0, .9);--van-image-preview-close-icon-size: 22px;--van-image-preview-close-icon-color: var(--van-gray-5);--van-image-preview-close-icon-margin: var(--van-padding-md);--van-image-preview-close-icon-z-index: 1}.van-image-preview{position:fixed;top:0;left:0;width:100%;height:100%;max-width:none;background-color:transparent;transform:none}.van-image-preview__swipe{height:100%}.van-image-preview__swipe-item{display:flex;align-items:center;justify-content:center;overflow:hidden}.van-image-preview__cover{position:absolute;top:0;left:0}.van-image-preview__image{width:100%;transition-property:transform}.van-image-preview__image--vertical{width:auto;height:100%}.van-image-preview__image img{-webkit-user-drag:none}.van-image-preview__image .van-image__error{top:30%;height:40%}.van-image-preview__image .van-image__error-icon{font-size:36px}.van-image-preview__image .van-image__loading{background-color:transparent}.van-image-preview__index{position:absolute;top:var(--van-padding-md);left:50%;color:var(--van-image-preview-index-text-color);font-size:var(--van-image-preview-index-font-size);line-height:var(--van-image-preview-index-line-height);text-shadow:var(--van-image-preview-index-text-shadow);transform:translate(-50%)}.van-image-preview__overlay{background:var(--van-image-preview-overlay-background)}.van-image-preview__close-icon{position:absolute;z-index:var(--van-image-preview-close-icon-z-index);color:var(--van-image-preview-close-icon-color);font-size:var(--van-image-preview-close-icon-size)}.van-image-preview__close-icon--top-left{top:var(--van-image-preview-close-icon-margin);left:var(--van-image-preview-close-icon-margin)}.van-image-preview__close-icon--top-right{top:var(--van-image-preview-close-icon-margin);right:var(--van-image-preview-close-icon-margin)}.van-image-preview__close-icon--bottom-left{bottom:var(--van-image-preview-close-icon-margin);left:var(--van-image-preview-close-icon-margin)}.van-image-preview__close-icon--bottom-right{right:var(--van-image-preview-close-icon-margin);bottom:var(--van-image-preview-close-icon-margin)}
|
@@ -128,6 +128,7 @@ export declare const ImagePreview: import("../utils").WithInstall<import("vue").
|
|
128
128
|
showIndex: boolean;
|
129
129
|
}>>;
|
130
130
|
export default ImagePreview;
|
131
|
+
export { imagePreviewProps } from './ImagePreview';
|
131
132
|
export { showImagePreview } from './function-call';
|
132
133
|
export type { ImagePreviewProps };
|
133
134
|
export type { ImagePreviewOptions, ImagePreviewInstance, ImagePreviewScaleEventParams, } from './types';
|
@@ -2,9 +2,11 @@ import { withInstall } from "../utils/index.mjs";
|
|
2
2
|
import _ImagePreview from "./ImagePreview.mjs";
|
3
3
|
const ImagePreview = withInstall(_ImagePreview);
|
4
4
|
var stdin_default = ImagePreview;
|
5
|
+
import { imagePreviewProps } from "./ImagePreview.mjs";
|
5
6
|
import { showImagePreview } from "./function-call.mjs";
|
6
7
|
export {
|
7
8
|
ImagePreview,
|
8
9
|
stdin_default as default,
|
10
|
+
imagePreviewProps,
|
9
11
|
showImagePreview
|
10
12
|
};
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import { type ExtractPropTypes } from 'vue';
|
2
|
-
declare const indexAnchorProps: {
|
2
|
+
export declare const indexAnchorProps: {
|
3
3
|
index: (NumberConstructor | StringConstructor)[];
|
4
4
|
};
|
5
5
|
export declare type IndexAnchorProps = ExtractPropTypes<typeof indexAnchorProps>;
|
6
6
|
declare const _default: import("vue").DefineComponent<{
|
7
7
|
index: (NumberConstructor | StringConstructor)[];
|
8
|
-
}, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
8
|
+
}, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
9
9
|
index: (NumberConstructor | StringConstructor)[];
|
10
10
|
}>>, {}>;
|
11
11
|
export default _default;
|
@@ -1,9 +1,10 @@
|
|
1
1
|
export declare const IndexAnchor: import("../utils").WithInstall<import("vue").DefineComponent<{
|
2
2
|
index: (NumberConstructor | StringConstructor)[];
|
3
|
-
}, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
3
|
+
}, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
4
4
|
index: (NumberConstructor | StringConstructor)[];
|
5
5
|
}>>, {}>>;
|
6
6
|
export default IndexAnchor;
|
7
|
+
export { indexAnchorProps } from './IndexAnchor';
|
7
8
|
export type { IndexAnchorProps } from './IndexAnchor';
|
8
9
|
declare module 'vue' {
|
9
10
|
interface GlobalComponents {
|
@@ -2,7 +2,9 @@ import { withInstall } from "../utils/index.mjs";
|
|
2
2
|
import _IndexAnchor from "./IndexAnchor.mjs";
|
3
3
|
const IndexAnchor = withInstall(_IndexAnchor);
|
4
4
|
var stdin_default = IndexAnchor;
|
5
|
+
import { indexAnchorProps } from "./IndexAnchor.mjs";
|
5
6
|
export {
|
6
7
|
IndexAnchor,
|
7
|
-
stdin_default as default
|
8
|
+
stdin_default as default,
|
9
|
+
indexAnchorProps
|
8
10
|
};
|
@@ -2,7 +2,7 @@ import { type PropType, type InjectionKey, type ExtractPropTypes } from 'vue';
|
|
2
2
|
import { type Numeric } from '../utils';
|
3
3
|
import { IndexBarProvide } from './types';
|
4
4
|
declare function genAlphabet(): string[];
|
5
|
-
declare const indexBarProps: {
|
5
|
+
export declare const indexBarProps: {
|
6
6
|
sticky: {
|
7
7
|
type: BooleanConstructor;
|
8
8
|
default: true;
|