diff --git a/packages/vant/src/action-bar-button/index.ts b/packages/vant/src/action-bar-button/index.ts index 28f2e20d0..228b44786 100644 --- a/packages/vant/src/action-bar-button/index.ts +++ b/packages/vant/src/action-bar-button/index.ts @@ -4,3 +4,9 @@ import _ActionBarButton from './ActionBarButton'; export const ActionBarButton = withInstall(_ActionBarButton); export default ActionBarButton; export type { ActionBarButtonProps } from './ActionBarButton'; + +declare module 'vue' { + export interface GlobalComponents { + VanActionBarButton: typeof ActionBarButton; + } +} diff --git a/packages/vant/src/action-bar-icon/index.ts b/packages/vant/src/action-bar-icon/index.ts index 72ffb791d..089e85062 100644 --- a/packages/vant/src/action-bar-icon/index.ts +++ b/packages/vant/src/action-bar-icon/index.ts @@ -4,3 +4,9 @@ import _ActionBarIcon from './ActionBarIcon'; export const ActionBarIcon = withInstall(_ActionBarIcon); export default ActionBarIcon; export type { ActionBarIconProps } from './ActionBarIcon'; + +declare module 'vue' { + export interface GlobalComponents { + VanActionBarIcon: typeof ActionBarIcon; + } +} diff --git a/packages/vant/src/action-bar/index.ts b/packages/vant/src/action-bar/index.ts index dd652d2f2..935d850fb 100644 --- a/packages/vant/src/action-bar/index.ts +++ b/packages/vant/src/action-bar/index.ts @@ -4,3 +4,9 @@ import _ActionBar from './ActionBar'; export const ActionBar = withInstall(_ActionBar); export default ActionBar; export type { ActionBarProps } from './ActionBar'; + +declare module 'vue' { + export interface GlobalComponents { + VanActionBar: typeof ActionBar; + } +} diff --git a/packages/vant/src/action-sheet/index.ts b/packages/vant/src/action-sheet/index.ts index b0c23fc69..475fe8b0d 100644 --- a/packages/vant/src/action-sheet/index.ts +++ b/packages/vant/src/action-sheet/index.ts @@ -4,3 +4,9 @@ import _ActionSheet from './ActionSheet'; export const ActionSheet = withInstall(_ActionSheet); export default ActionSheet; export type { ActionSheetProps, ActionSheetAction } from './ActionSheet'; + +declare module 'vue' { + export interface GlobalComponents { + VanActionSheet: typeof ActionSheet; + } +} diff --git a/packages/vant/src/address-edit/index.ts b/packages/vant/src/address-edit/index.ts index 506dfcbf7..b00f6dbd1 100644 --- a/packages/vant/src/address-edit/index.ts +++ b/packages/vant/src/address-edit/index.ts @@ -9,3 +9,9 @@ export type { AddressEditInstance, AddressEditSearchItem, } from './types'; + +declare module 'vue' { + export interface GlobalComponents { + VanAddressEdit: typeof AddressEdit; + } +} diff --git a/packages/vant/src/address-list/index.ts b/packages/vant/src/address-list/index.ts index a8b16aed4..5c5be05d7 100644 --- a/packages/vant/src/address-list/index.ts +++ b/packages/vant/src/address-list/index.ts @@ -5,3 +5,9 @@ export const AddressList = withInstall(_AddressList); export default AddressList; export type { AddressListProps } from './AddressList'; export type { AddressListAddress } from './AddressListItem'; + +declare module 'vue' { + export interface GlobalComponents { + VanAddressList: typeof AddressList; + } +} diff --git a/packages/vant/src/area/index.ts b/packages/vant/src/area/index.ts index a1d3f4cdb..43bba0dd7 100644 --- a/packages/vant/src/area/index.ts +++ b/packages/vant/src/area/index.ts @@ -5,3 +5,9 @@ export const Area = withInstall(_Area); export default Area; export type { AreaProps } from './Area'; export type { AreaList, AreaInstance, AreaColumnOption } from './types'; + +declare module 'vue' { + export interface GlobalComponents { + VanArea: typeof Area; + } +} diff --git a/packages/vant/src/badge/index.ts b/packages/vant/src/badge/index.ts index 3588b6e7d..23ac1d100 100644 --- a/packages/vant/src/badge/index.ts +++ b/packages/vant/src/badge/index.ts @@ -4,3 +4,9 @@ import _Badge from './Badge'; export const Badge = withInstall(_Badge); export default Badge; export type { BadgeProps, BadgePosition } from './Badge'; + +declare module 'vue' { + export interface GlobalComponents { + VanBadge: typeof Badge; + } +} diff --git a/packages/vant/src/button/index.ts b/packages/vant/src/button/index.ts index 9f9dbd5e0..94943a1bb 100644 --- a/packages/vant/src/button/index.ts +++ b/packages/vant/src/button/index.ts @@ -10,3 +10,9 @@ export type { ButtonNativeType, ButtonIconPosition, } from './types'; + +declare module 'vue' { + export interface GlobalComponents { + VanButton: typeof Button; + } +} diff --git a/packages/vant/src/calendar/index.ts b/packages/vant/src/calendar/index.ts index aa8d21784..711d58305 100644 --- a/packages/vant/src/calendar/index.ts +++ b/packages/vant/src/calendar/index.ts @@ -10,3 +10,9 @@ export type { CalendarDayType, CalendarInstance, } from './types'; + +declare module 'vue' { + export interface GlobalComponents { + VanCalendar: typeof Calendar; + } +} diff --git a/packages/vant/src/card/index.ts b/packages/vant/src/card/index.ts index 2fa3b1435..15f5a3ed7 100644 --- a/packages/vant/src/card/index.ts +++ b/packages/vant/src/card/index.ts @@ -4,3 +4,9 @@ import _Card from './Card'; export const Card = withInstall(_Card); export default Card; export type { CardProps } from './Card'; + +declare module 'vue' { + export interface GlobalComponents { + VanCard: typeof Card; + } +} diff --git a/packages/vant/src/cascader/index.ts b/packages/vant/src/cascader/index.ts index 96de75aeb..7457518b4 100644 --- a/packages/vant/src/cascader/index.ts +++ b/packages/vant/src/cascader/index.ts @@ -5,3 +5,9 @@ export const Cascader = withInstall(_Cascader); export default Cascader; export type { CascaderProps } from './Cascader'; export type { CascaderOption, CascaderFieldNames } from './types'; + +declare module 'vue' { + export interface GlobalComponents { + VanCascader: typeof Cascader; + } +} diff --git a/packages/vant/src/cell-group/index.ts b/packages/vant/src/cell-group/index.ts index 61b4751ca..111f7eccf 100644 --- a/packages/vant/src/cell-group/index.ts +++ b/packages/vant/src/cell-group/index.ts @@ -4,3 +4,9 @@ import _CellGroup from './CellGroup'; export const CellGroup = withInstall(_CellGroup); export default CellGroup; export type { CellGroupProps } from './CellGroup'; + +declare module 'vue' { + export interface GlobalComponents { + VanCellGroup: typeof CellGroup; + } +} diff --git a/packages/vant/src/cell/index.ts b/packages/vant/src/cell/index.ts index d81f4eaf7..aece575a9 100644 --- a/packages/vant/src/cell/index.ts +++ b/packages/vant/src/cell/index.ts @@ -4,3 +4,9 @@ import _Cell from './Cell'; export const Cell = withInstall(_Cell); export default Cell; export type { CellSize, CellProps, CellArrowDirection } from './Cell'; + +declare module 'vue' { + export interface GlobalComponents { + VanCell: typeof Cell; + } +} diff --git a/packages/vant/src/checkbox-group/index.ts b/packages/vant/src/checkbox-group/index.ts index 41d083cf9..1dda6118b 100644 --- a/packages/vant/src/checkbox-group/index.ts +++ b/packages/vant/src/checkbox-group/index.ts @@ -9,3 +9,9 @@ export type { CheckboxGroupDirection, CheckboxGroupToggleAllOptions, } from './types'; + +declare module 'vue' { + export interface GlobalComponents { + VanCheckboxGroup: typeof CheckboxGroup; + } +} diff --git a/packages/vant/src/checkbox/index.ts b/packages/vant/src/checkbox/index.ts index 960782234..18502eb9a 100644 --- a/packages/vant/src/checkbox/index.ts +++ b/packages/vant/src/checkbox/index.ts @@ -9,3 +9,9 @@ export type { CheckboxInstance, CheckboxLabelPosition, } from './types'; + +declare module 'vue' { + export interface GlobalComponents { + VanCheckbox: typeof Checkbox; + } +} diff --git a/packages/vant/src/circle/index.ts b/packages/vant/src/circle/index.ts index cd20f4561..b755f7a1d 100644 --- a/packages/vant/src/circle/index.ts +++ b/packages/vant/src/circle/index.ts @@ -4,3 +4,9 @@ import _Circle from './Circle'; export const Circle = withInstall(_Circle); export default Circle; export type { CircleProps, CircleStartPosition } from './Circle'; + +declare module 'vue' { + export interface GlobalComponents { + VanCircle: typeof Circle; + } +} diff --git a/packages/vant/src/col/index.ts b/packages/vant/src/col/index.ts index b5013cc59..adb1a0ae6 100644 --- a/packages/vant/src/col/index.ts +++ b/packages/vant/src/col/index.ts @@ -4,3 +4,9 @@ import _Col from './Col'; export const Col = withInstall(_Col); export default Col; export type { ColProps } from './Col'; + +declare module 'vue' { + export interface GlobalComponents { + VanCol: typeof Col; + } +} diff --git a/packages/vant/src/collapse-item/index.ts b/packages/vant/src/collapse-item/index.ts index c1dcc6c83..1cbbd9a9a 100644 --- a/packages/vant/src/collapse-item/index.ts +++ b/packages/vant/src/collapse-item/index.ts @@ -5,3 +5,9 @@ export const CollapseItem = withInstall(_CollapseItem); export default CollapseItem; export type { CollapseItemProps } from './CollapseItem'; export type { CollapseItemInstance } from './types'; + +declare module 'vue' { + export interface GlobalComponents { + VanCollapseItem: typeof CollapseItem; + } +} diff --git a/packages/vant/src/collapse/index.ts b/packages/vant/src/collapse/index.ts index 860da4b0d..25c43e014 100644 --- a/packages/vant/src/collapse/index.ts +++ b/packages/vant/src/collapse/index.ts @@ -4,3 +4,9 @@ import _Collapse from './Collapse'; export const Collapse = withInstall(_Collapse); export default Collapse; export type { CollapseProps } from './Collapse'; + +declare module 'vue' { + export interface GlobalComponents { + VanCollapse: typeof Collapse; + } +} diff --git a/packages/vant/src/config-provider/index.ts b/packages/vant/src/config-provider/index.ts index 1c1748748..14bc97c80 100644 --- a/packages/vant/src/config-provider/index.ts +++ b/packages/vant/src/config-provider/index.ts @@ -4,3 +4,9 @@ import _ConfigProvider from './ConfigProvider'; export const ConfigProvider = withInstall(_ConfigProvider); export default ConfigProvider; export type { ConfigProviderProps } from './ConfigProvider'; + +declare module 'vue' { + export interface GlobalComponents { + VanConfigProvider: typeof ConfigProvider; + } +} diff --git a/packages/vant/src/contact-card/index.ts b/packages/vant/src/contact-card/index.ts index 3487b04e2..0217172e4 100644 --- a/packages/vant/src/contact-card/index.ts +++ b/packages/vant/src/contact-card/index.ts @@ -4,3 +4,9 @@ import _ContactCard from './ContactCard'; export const ContactCard = withInstall(_ContactCard); export default ContactCard; export type { ContactCardType, ContactCardProps } from './ContactCard'; + +declare module 'vue' { + export interface GlobalComponents { + VanContactCard: typeof ContactCard; + } +} diff --git a/packages/vant/src/contact-edit/index.ts b/packages/vant/src/contact-edit/index.ts index 9a08a3cc9..e59c91b39 100644 --- a/packages/vant/src/contact-edit/index.ts +++ b/packages/vant/src/contact-edit/index.ts @@ -4,3 +4,9 @@ import _ContactEdit from './ContactEdit'; export const ContactEdit = withInstall(_ContactEdit); export default ContactEdit; export type { ContactEditInfo, ContactEditProps } from './ContactEdit'; + +declare module 'vue' { + export interface GlobalComponents { + VanContactEdit: typeof ContactEdit; + } +} diff --git a/packages/vant/src/contact-list/index.ts b/packages/vant/src/contact-list/index.ts index 520179e6d..8cb0d492a 100644 --- a/packages/vant/src/contact-list/index.ts +++ b/packages/vant/src/contact-list/index.ts @@ -4,3 +4,9 @@ import _ContactList from './ContactList'; export const ContactList = withInstall(_ContactList); export default ContactList; export type { ContactListItem, ContactListProps } from './ContactList'; + +declare module 'vue' { + export interface GlobalComponents { + VanContactList: typeof ContactList; + } +} diff --git a/packages/vant/src/count-down/index.ts b/packages/vant/src/count-down/index.ts index 073b2de50..f892a6312 100644 --- a/packages/vant/src/count-down/index.ts +++ b/packages/vant/src/count-down/index.ts @@ -5,3 +5,9 @@ export const CountDown = withInstall(_CountDown); export default CountDown; export type { CountDownProps } from './CountDown'; export type { CountDownInstance, CountDownCurrentTime } from './types'; + +declare module 'vue' { + export interface GlobalComponents { + VanCountDown: typeof CountDown; + } +} diff --git a/packages/vant/src/coupon-cell/index.ts b/packages/vant/src/coupon-cell/index.ts index e5a9b64f1..51b8d969c 100644 --- a/packages/vant/src/coupon-cell/index.ts +++ b/packages/vant/src/coupon-cell/index.ts @@ -4,3 +4,9 @@ import _CouponCell from './CouponCell'; export const CouponCell = withInstall(_CouponCell); export default CouponCell; export type { CouponCellProps } from './CouponCell'; + +declare module 'vue' { + export interface GlobalComponents { + VanCouponCell: typeof CouponCell; + } +} diff --git a/packages/vant/src/coupon-list/index.ts b/packages/vant/src/coupon-list/index.ts index 8c823d230..400aaefc0 100644 --- a/packages/vant/src/coupon-list/index.ts +++ b/packages/vant/src/coupon-list/index.ts @@ -4,3 +4,9 @@ import _CouponList from './CouponList'; export const CouponList = withInstall(_CouponList); export default CouponList; export type { CouponListProps } from './CouponList'; + +declare module 'vue' { + export interface GlobalComponents { + VanCouponList: typeof CouponList; + } +} diff --git a/packages/vant/src/coupon/index.ts b/packages/vant/src/coupon/index.ts index ceb407972..c0419401e 100644 --- a/packages/vant/src/coupon/index.ts +++ b/packages/vant/src/coupon/index.ts @@ -4,3 +4,9 @@ import _Coupon from './Coupon'; export const Coupon = withInstall(_Coupon); export default Coupon; export type { CouponInfo } from './Coupon'; + +declare module 'vue' { + export interface GlobalComponents { + VanCoupon: typeof Coupon; + } +} diff --git a/packages/vant/src/datetime-picker/index.ts b/packages/vant/src/datetime-picker/index.ts index 45756fd27..3263617aa 100644 --- a/packages/vant/src/datetime-picker/index.ts +++ b/packages/vant/src/datetime-picker/index.ts @@ -5,3 +5,9 @@ export const DatetimePicker = withInstall(_DatetimePicker); export default DatetimePicker; export type { DatetimePickerProps }; export type { DatetimePickerType, DatetimePickerInstance } from './types'; + +declare module 'vue' { + export interface GlobalComponents { + VanDatetimePicker: typeof DatetimePicker; + } +} diff --git a/packages/vant/src/dialog/index.ts b/packages/vant/src/dialog/index.ts index 669422675..b3f802a87 100644 --- a/packages/vant/src/dialog/index.ts +++ b/packages/vant/src/dialog/index.ts @@ -9,3 +9,9 @@ export type { DialogOptions, DialogMessageAlign, } from './types'; + +declare module 'vue' { + export interface GlobalComponents { + VanDialog: typeof Dialog.Component; + } +} diff --git a/packages/vant/src/divider/index.ts b/packages/vant/src/divider/index.ts index 5cf581005..fed2987f3 100644 --- a/packages/vant/src/divider/index.ts +++ b/packages/vant/src/divider/index.ts @@ -4,3 +4,9 @@ import _Divider from './Divider'; export const Divider = withInstall(_Divider); export default Divider; export type { DividerProps, DividerContentPosition } from './Divider'; + +declare module 'vue' { + export interface GlobalComponents { + VanDivider: typeof Divider; + } +} diff --git a/packages/vant/src/dropdown-item/index.ts b/packages/vant/src/dropdown-item/index.ts index 41973bb12..aa0e04e73 100644 --- a/packages/vant/src/dropdown-item/index.ts +++ b/packages/vant/src/dropdown-item/index.ts @@ -5,3 +5,9 @@ export const DropdownItem = withInstall(_DropdownItem); export default DropdownItem; export type { DropdownItemProps }; export type { DropdownItemInstance, DropdownItemOption } from './types'; + +declare module 'vue' { + export interface GlobalComponents { + VanDropdownItem: typeof DropdownItem; + } +} diff --git a/packages/vant/src/dropdown-menu/index.ts b/packages/vant/src/dropdown-menu/index.ts index fa60bd0af..eba4c8090 100644 --- a/packages/vant/src/dropdown-menu/index.ts +++ b/packages/vant/src/dropdown-menu/index.ts @@ -5,3 +5,9 @@ export const DropdownMenu = withInstall(_DropdownMenu); export default DropdownMenu; export type { DropdownMenuProps }; export type { DropdownMenuDirection } from './types'; + +declare module 'vue' { + export interface GlobalComponents { + VanDropdownMenu: typeof DropdownMenu; + } +} diff --git a/packages/vant/src/empty/index.ts b/packages/vant/src/empty/index.ts index bd5d4df92..1684d98b0 100644 --- a/packages/vant/src/empty/index.ts +++ b/packages/vant/src/empty/index.ts @@ -4,3 +4,9 @@ import _Empty from './Empty'; export const Empty = withInstall(_Empty); export default Empty; export type { EmptyProps } from './Empty'; + +declare module 'vue' { + export interface GlobalComponents { + VanEmpty: typeof Empty; + } +} diff --git a/packages/vant/src/field/index.ts b/packages/vant/src/field/index.ts index f1570c01e..d671c706b 100644 --- a/packages/vant/src/field/index.ts +++ b/packages/vant/src/field/index.ts @@ -18,3 +18,9 @@ export type { FieldAutosizeConfig, FieldValidateTrigger, } from './types'; + +declare module 'vue' { + export interface GlobalComponents { + VanField: typeof Field; + } +} diff --git a/packages/vant/src/form/index.ts b/packages/vant/src/form/index.ts index 496906bed..523d2e4c5 100644 --- a/packages/vant/src/form/index.ts +++ b/packages/vant/src/form/index.ts @@ -5,3 +5,9 @@ export const Form = withInstall(_Form); export default Form; export type { FormProps }; export type { FormInstance } from './types'; + +declare module 'vue' { + export interface GlobalComponents { + VanForm: typeof Form; + } +} diff --git a/packages/vant/src/grid-item/index.ts b/packages/vant/src/grid-item/index.ts index 31c96fc64..88aa9fc6a 100644 --- a/packages/vant/src/grid-item/index.ts +++ b/packages/vant/src/grid-item/index.ts @@ -4,3 +4,9 @@ import _GridItem from './GridItem'; export const GridItem = withInstall(_GridItem); export default GridItem; export type { GridItemProps } from './GridItem'; + +declare module 'vue' { + export interface GlobalComponents { + VanGridItem: typeof GridItem; + } +} diff --git a/packages/vant/src/grid/index.ts b/packages/vant/src/grid/index.ts index 768abcbe1..3bad39d61 100644 --- a/packages/vant/src/grid/index.ts +++ b/packages/vant/src/grid/index.ts @@ -4,3 +4,9 @@ import _Grid from './Grid'; export const Grid = withInstall(_Grid); export default Grid; export type { GridProps, GridDirection } from './Grid'; + +declare module 'vue' { + export interface GlobalComponents { + VanGrid: typeof Grid; + } +} diff --git a/packages/vant/src/icon/index.ts b/packages/vant/src/icon/index.ts index fd39a0726..b8308130e 100644 --- a/packages/vant/src/icon/index.ts +++ b/packages/vant/src/icon/index.ts @@ -4,3 +4,9 @@ import _Icon from './Icon'; export const Icon = withInstall(_Icon); export default Icon; export type { IconProps } from './Icon'; + +declare module 'vue' { + export interface GlobalComponents { + VanIcon: typeof Icon; + } +} diff --git a/packages/vant/src/image-preview/index.ts b/packages/vant/src/image-preview/index.ts index fec37ead1..8e7478818 100644 --- a/packages/vant/src/image-preview/index.ts +++ b/packages/vant/src/image-preview/index.ts @@ -9,3 +9,9 @@ export type { ImagePreviewInstance, ImagePreviewScaleEventParams, } from './types'; + +declare module 'vue' { + export interface GlobalComponents { + VanImagePreview: typeof ImagePreview.Component; + } +} diff --git a/packages/vant/src/image/index.ts b/packages/vant/src/image/index.ts index 05fa158ad..88189cec3 100644 --- a/packages/vant/src/image/index.ts +++ b/packages/vant/src/image/index.ts @@ -4,3 +4,9 @@ import _Image from './Image'; export const Image = withInstall(_Image); export default Image; export type { ImageFit, ImageProps } from './Image'; + +declare module 'vue' { + export interface GlobalComponents { + VanImage: typeof Image; + } +} diff --git a/packages/vant/src/index-anchor/index.ts b/packages/vant/src/index-anchor/index.ts index 045ab9123..64520860f 100644 --- a/packages/vant/src/index-anchor/index.ts +++ b/packages/vant/src/index-anchor/index.ts @@ -4,3 +4,9 @@ import _IndexAnchor from './IndexAnchor'; export const IndexAnchor = withInstall(_IndexAnchor); export default IndexAnchor; export type { IndexAnchorProps } from './IndexAnchor'; + +declare module 'vue' { + export interface GlobalComponents { + VanIndexAnchor: typeof IndexAnchor; + } +} diff --git a/packages/vant/src/index-bar/index.ts b/packages/vant/src/index-bar/index.ts index 1a56788da..dcec12634 100644 --- a/packages/vant/src/index-bar/index.ts +++ b/packages/vant/src/index-bar/index.ts @@ -5,3 +5,9 @@ export const IndexBar = withInstall(_IndexBar); export default IndexBar; export type { IndexBarProps }; export type { IndexBarInstance } from './types'; + +declare module 'vue' { + export interface GlobalComponents { + VanIndexBar: typeof IndexBar; + } +} diff --git a/packages/vant/src/list/index.ts b/packages/vant/src/list/index.ts index f0ea15342..223f9d1e5 100644 --- a/packages/vant/src/list/index.ts +++ b/packages/vant/src/list/index.ts @@ -5,3 +5,9 @@ export const List = withInstall(_List); export default List; export type { ListProps }; export type { ListInstance, ListDirection } from './types'; + +declare module 'vue' { + export interface GlobalComponents { + VanList: typeof List; + } +} diff --git a/packages/vant/src/loading/index.ts b/packages/vant/src/loading/index.ts index 684f65d7e..c0c289a36 100644 --- a/packages/vant/src/loading/index.ts +++ b/packages/vant/src/loading/index.ts @@ -4,3 +4,9 @@ import _Loading from './Loading'; export const Loading = withInstall(_Loading); export default Loading; export type { LoadingType, LoadingProps } from './Loading'; + +declare module 'vue' { + export interface GlobalComponents { + VanLoading: typeof Loading; + } +} diff --git a/packages/vant/src/nav-bar/index.ts b/packages/vant/src/nav-bar/index.ts index 7d35a92f6..a5f31bf8a 100644 --- a/packages/vant/src/nav-bar/index.ts +++ b/packages/vant/src/nav-bar/index.ts @@ -4,3 +4,9 @@ import _NavBar from './NavBar'; export const NavBar = withInstall(_NavBar); export default NavBar; export type { NavBarProps } from './NavBar'; + +declare module 'vue' { + export interface GlobalComponents { + VanNavBar: typeof NavBar; + } +} diff --git a/packages/vant/src/notice-bar/index.ts b/packages/vant/src/notice-bar/index.ts index ec0cbd1eb..eda7eb7ee 100644 --- a/packages/vant/src/notice-bar/index.ts +++ b/packages/vant/src/notice-bar/index.ts @@ -5,3 +5,9 @@ export const NoticeBar = withInstall(_NoticeBar); export default NoticeBar; export type { NoticeBarProps }; export type { NoticeBarMode, NoticeBarInstance } from './types'; + +declare module 'vue' { + export interface GlobalComponents { + VanNoticeBar: typeof NoticeBar; + } +} diff --git a/packages/vant/src/notify/index.ts b/packages/vant/src/notify/index.ts index 5215b36fc..973c8839f 100644 --- a/packages/vant/src/notify/index.ts +++ b/packages/vant/src/notify/index.ts @@ -4,3 +4,9 @@ export default Notify; export { Notify }; export type { NotifyProps } from './Notify'; export type { NotifyType, NotifyOptions } from './types'; + +declare module 'vue' { + export interface GlobalComponents { + VanNotify: typeof Notify.Component; + } +} diff --git a/packages/vant/src/number-keyboard/index.ts b/packages/vant/src/number-keyboard/index.ts index 902544e05..ca8f697d5 100644 --- a/packages/vant/src/number-keyboard/index.ts +++ b/packages/vant/src/number-keyboard/index.ts @@ -7,3 +7,9 @@ export type { NumberKeyboardProps, NumberKeyboardTheme, } from './NumberKeyboard'; + +declare module 'vue' { + export interface GlobalComponents { + VanNumberKeyboard: typeof NumberKeyboard; + } +} diff --git a/packages/vant/src/overlay/index.ts b/packages/vant/src/overlay/index.ts index f05212d49..c2a0f2cd9 100644 --- a/packages/vant/src/overlay/index.ts +++ b/packages/vant/src/overlay/index.ts @@ -4,3 +4,9 @@ import _Overlay from './Overlay'; export const Overlay = withInstall(_Overlay); export default Overlay; export type { OverlayProps } from './Overlay'; + +declare module 'vue' { + export interface GlobalComponents { + VanOverlay: typeof Overlay; + } +} diff --git a/packages/vant/src/pagination/index.ts b/packages/vant/src/pagination/index.ts index 8f1e1f7c2..c881d6dab 100644 --- a/packages/vant/src/pagination/index.ts +++ b/packages/vant/src/pagination/index.ts @@ -4,3 +4,9 @@ import _Pagination from './Pagination'; export const Pagination = withInstall(_Pagination); export default Pagination; export type { PaginationMode, PaginationProps } from './Pagination'; + +declare module 'vue' { + export interface GlobalComponents { + VanPagination: typeof Pagination; + } +} diff --git a/packages/vant/src/password-input/index.ts b/packages/vant/src/password-input/index.ts index 30d713add..8e914debb 100644 --- a/packages/vant/src/password-input/index.ts +++ b/packages/vant/src/password-input/index.ts @@ -4,3 +4,9 @@ import _PasswordInput from './PasswordInput'; export const PasswordInput = withInstall(_PasswordInput); export default PasswordInput; export type { PasswordInputProps } from './PasswordInput'; + +declare module 'vue' { + export interface GlobalComponents { + VanPasswordInput: typeof PasswordInput; + } +} diff --git a/packages/vant/src/picker/index.ts b/packages/vant/src/picker/index.ts index 4fc7c46ab..e171d8fe6 100644 --- a/packages/vant/src/picker/index.ts +++ b/packages/vant/src/picker/index.ts @@ -13,3 +13,9 @@ export type { PickerObjectOption, PickerToolbarPosition, } from './types'; + +declare module 'vue' { + export interface GlobalComponents { + VanPicker: typeof Picker; + } +} diff --git a/packages/vant/src/popover/index.ts b/packages/vant/src/popover/index.ts index 38dd2ce61..037f0e0c9 100644 --- a/packages/vant/src/popover/index.ts +++ b/packages/vant/src/popover/index.ts @@ -10,3 +10,9 @@ export type { PopoverTrigger, PopoverPlacement, } from './types'; + +declare module 'vue' { + export interface GlobalComponents { + VanPopover: typeof Popover; + } +} diff --git a/packages/vant/src/popup/index.ts b/packages/vant/src/popup/index.ts index b09f75098..ce804ec75 100644 --- a/packages/vant/src/popup/index.ts +++ b/packages/vant/src/popup/index.ts @@ -9,3 +9,9 @@ export type { PopupInstance, PopupCloseIconPosition, } from './types'; + +declare module 'vue' { + export interface GlobalComponents { + VanPopup: typeof Popup; + } +} diff --git a/packages/vant/src/progress/index.ts b/packages/vant/src/progress/index.ts index 322f77396..4e947d108 100644 --- a/packages/vant/src/progress/index.ts +++ b/packages/vant/src/progress/index.ts @@ -5,3 +5,9 @@ export const Progress = withInstall(_Progress); export default Progress; export type { ProgressProps }; export type { ProgressInstance } from './types'; + +declare module 'vue' { + export interface GlobalComponents { + VanProgress: typeof Progress; + } +} diff --git a/packages/vant/src/pull-refresh/index.ts b/packages/vant/src/pull-refresh/index.ts index 5d15eec0b..7f044f991 100644 --- a/packages/vant/src/pull-refresh/index.ts +++ b/packages/vant/src/pull-refresh/index.ts @@ -4,3 +4,9 @@ import _PullRefresh from './PullRefresh'; export const PullRefresh = withInstall(_PullRefresh); export default PullRefresh; export type { PullRefreshProps } from './PullRefresh'; + +declare module 'vue' { + export interface GlobalComponents { + VanPullRefresh: typeof PullRefresh; + } +} diff --git a/packages/vant/src/radio-group/index.ts b/packages/vant/src/radio-group/index.ts index d9a784c40..3c7eeb418 100644 --- a/packages/vant/src/radio-group/index.ts +++ b/packages/vant/src/radio-group/index.ts @@ -4,3 +4,9 @@ import _RadioGroup from './RadioGroup'; export const RadioGroup = withInstall(_RadioGroup); export default RadioGroup; export type { RadioGroupProps, RadioGroupDirection } from './RadioGroup'; + +declare module 'vue' { + export interface GlobalComponents { + VanRadioGroup: typeof RadioGroup; + } +} diff --git a/packages/vant/src/radio/index.ts b/packages/vant/src/radio/index.ts index f8c466708..9e6335e06 100644 --- a/packages/vant/src/radio/index.ts +++ b/packages/vant/src/radio/index.ts @@ -4,3 +4,9 @@ import _Radio from './Radio'; export const Radio = withInstall(_Radio); export default Radio; export type { RadioProps, RadioShape, RadioLabelPosition } from './Radio'; + +declare module 'vue' { + export interface GlobalComponents { + VanRadio: typeof Radio; + } +} diff --git a/packages/vant/src/rate/index.ts b/packages/vant/src/rate/index.ts index 2f4b82b3e..abcfd7cf3 100644 --- a/packages/vant/src/rate/index.ts +++ b/packages/vant/src/rate/index.ts @@ -4,3 +4,9 @@ import _Rate from './Rate'; export const Rate = withInstall(_Rate); export default Rate; export type { RateProps } from './Rate'; + +declare module 'vue' { + export interface GlobalComponents { + VanRate: typeof Rate; + } +} diff --git a/packages/vant/src/row/index.ts b/packages/vant/src/row/index.ts index 93208ec39..476f7e0f0 100644 --- a/packages/vant/src/row/index.ts +++ b/packages/vant/src/row/index.ts @@ -4,3 +4,9 @@ import _Row from './Row'; export const Row = withInstall(_Row); export default Row; export type { RowProps, RowAlign, RowJustify } from './Row'; + +declare module 'vue' { + export interface GlobalComponents { + VanRow: typeof Row; + } +} diff --git a/packages/vant/src/search/index.ts b/packages/vant/src/search/index.ts index 0296647ac..07e3b212d 100644 --- a/packages/vant/src/search/index.ts +++ b/packages/vant/src/search/index.ts @@ -5,3 +5,9 @@ export const Search = withInstall(_Search); export default Search; export type { SearchProps }; export type { SearchShape, SearchInstance } from './types'; + +declare module 'vue' { + export interface GlobalComponents { + VanSearch: typeof Search; + } +} diff --git a/packages/vant/src/share-sheet/index.ts b/packages/vant/src/share-sheet/index.ts index 4bc47ab45..4ff6b6750 100644 --- a/packages/vant/src/share-sheet/index.ts +++ b/packages/vant/src/share-sheet/index.ts @@ -8,3 +8,9 @@ export type { ShareSheetOption, ShareSheetOptions, } from './ShareSheet'; + +declare module 'vue' { + export interface GlobalComponents { + VanShareSheet: typeof ShareSheet; + } +} diff --git a/packages/vant/src/sidebar-item/index.ts b/packages/vant/src/sidebar-item/index.ts index cf9f40f5e..7151a4dbd 100644 --- a/packages/vant/src/sidebar-item/index.ts +++ b/packages/vant/src/sidebar-item/index.ts @@ -4,3 +4,9 @@ import _SidebarItem from './SidebarItem'; export const SidebarItem = withInstall(_SidebarItem); export default SidebarItem; export type { SidebarItemProps } from './SidebarItem'; + +declare module 'vue' { + export interface GlobalComponents { + VanSidebarItem: typeof SidebarItem; + } +} diff --git a/packages/vant/src/sidebar/index.ts b/packages/vant/src/sidebar/index.ts index 21e161f17..4161b95c0 100644 --- a/packages/vant/src/sidebar/index.ts +++ b/packages/vant/src/sidebar/index.ts @@ -4,3 +4,9 @@ import _Sidebar from './Sidebar'; export const Sidebar = withInstall(_Sidebar); export default Sidebar; export type { SidebarProps } from './Sidebar'; + +declare module 'vue' { + export interface GlobalComponents { + VanSidebar: typeof Sidebar; + } +} diff --git a/packages/vant/src/skeleton/index.ts b/packages/vant/src/skeleton/index.ts index c3669e045..611ec2a65 100644 --- a/packages/vant/src/skeleton/index.ts +++ b/packages/vant/src/skeleton/index.ts @@ -4,3 +4,9 @@ import _Skeleton from './Skeleton'; export const Skeleton = withInstall(_Skeleton); export default Skeleton; export type { SkeletonProps, SkeletonAvatarShape } from './Skeleton'; + +declare module 'vue' { + export interface GlobalComponents { + VanSkeleton: typeof Skeleton; + } +} diff --git a/packages/vant/src/slider/index.ts b/packages/vant/src/slider/index.ts index cf1e6d39d..bdc13eec8 100644 --- a/packages/vant/src/slider/index.ts +++ b/packages/vant/src/slider/index.ts @@ -4,3 +4,9 @@ import _Slider from './Slider'; export const Slider = withInstall(_Slider); export default Slider; export type { SliderProps } from './Slider'; + +declare module 'vue' { + export interface GlobalComponents { + VanSlider: typeof Slider; + } +} diff --git a/packages/vant/src/step/index.ts b/packages/vant/src/step/index.ts index e048d12cb..926bb2b23 100644 --- a/packages/vant/src/step/index.ts +++ b/packages/vant/src/step/index.ts @@ -3,3 +3,9 @@ import _Step from './Step'; export const Step = withInstall(_Step); export default Step; + +declare module 'vue' { + export interface GlobalComponents { + VanStep: typeof Step; + } +} diff --git a/packages/vant/src/stepper/index.ts b/packages/vant/src/stepper/index.ts index 69013f485..a87ea7470 100644 --- a/packages/vant/src/stepper/index.ts +++ b/packages/vant/src/stepper/index.ts @@ -4,3 +4,9 @@ import _Stepper from './Stepper'; export const Stepper = withInstall(_Stepper); export default Stepper; export type { StepperTheme, StepperProps } from './Stepper'; + +declare module 'vue' { + export interface GlobalComponents { + VanStepper: typeof Stepper; + } +} diff --git a/packages/vant/src/steps/index.ts b/packages/vant/src/steps/index.ts index 1ad29e80c..f61535dcc 100644 --- a/packages/vant/src/steps/index.ts +++ b/packages/vant/src/steps/index.ts @@ -4,3 +4,9 @@ import _Steps from './Steps'; export const Steps = withInstall(_Steps); export default Steps; export type { StepsProps, StepsDirection } from './Steps'; + +declare module 'vue' { + export interface GlobalComponents { + VanSteps: typeof Steps; + } +} diff --git a/packages/vant/src/sticky/index.ts b/packages/vant/src/sticky/index.ts index 8f18dd46e..83b7d5ee7 100644 --- a/packages/vant/src/sticky/index.ts +++ b/packages/vant/src/sticky/index.ts @@ -4,3 +4,9 @@ import _Sticky from './Sticky'; export const Sticky = withInstall(_Sticky); export default Sticky; export type { StickyProps, StickyPosition } from './Sticky'; + +declare module 'vue' { + export interface GlobalComponents { + VanSticky: typeof Sticky; + } +} diff --git a/packages/vant/src/submit-bar/index.ts b/packages/vant/src/submit-bar/index.ts index e0f5c3d49..2adede9f5 100644 --- a/packages/vant/src/submit-bar/index.ts +++ b/packages/vant/src/submit-bar/index.ts @@ -4,3 +4,9 @@ import _SubmitBar from './SubmitBar'; export const SubmitBar = withInstall(_SubmitBar); export default SubmitBar; export type { SubmitBarProps, SubmitBarTextAlign } from './SubmitBar'; + +declare module 'vue' { + export interface GlobalComponents { + VanSubmitBar: typeof SubmitBar; + } +} diff --git a/packages/vant/src/swipe-cell/index.ts b/packages/vant/src/swipe-cell/index.ts index ab5cb810e..b69b16ac7 100644 --- a/packages/vant/src/swipe-cell/index.ts +++ b/packages/vant/src/swipe-cell/index.ts @@ -9,3 +9,9 @@ export type { SwipeCellPosition, SwipeCellInstance, } from './types'; + +declare module 'vue' { + export interface GlobalComponents { + VanSwipeCell: typeof SwipeCell; + } +} diff --git a/packages/vant/src/swipe-item/index.ts b/packages/vant/src/swipe-item/index.ts index e859dbce7..55dd115d1 100644 --- a/packages/vant/src/swipe-item/index.ts +++ b/packages/vant/src/swipe-item/index.ts @@ -3,3 +3,9 @@ import _SwipeItem from './SwipeItem'; export const SwipeItem = withInstall(_SwipeItem); export default SwipeItem; + +declare module 'vue' { + export interface GlobalComponents { + VanSwipeItem: typeof SwipeItem; + } +} diff --git a/packages/vant/src/swipe/index.ts b/packages/vant/src/swipe/index.ts index 8b8bf881c..b603deabf 100644 --- a/packages/vant/src/swipe/index.ts +++ b/packages/vant/src/swipe/index.ts @@ -5,3 +5,9 @@ export const Swipe = withInstall(_Swipe); export default Swipe; export type { SwipeProps }; export type { SwipeInstance, SwipeToOptions } from './types'; + +declare module 'vue' { + export interface GlobalComponents { + VanSwipe: typeof Swipe; + } +} diff --git a/packages/vant/src/switch/index.ts b/packages/vant/src/switch/index.ts index 79ee15552..4483b6046 100644 --- a/packages/vant/src/switch/index.ts +++ b/packages/vant/src/switch/index.ts @@ -4,3 +4,9 @@ import _Switch from './Switch'; export const Switch = withInstall(_Switch); export default Switch; export type { SwitchProps } from './Switch'; + +declare module 'vue' { + export interface GlobalComponents { + VanSwitch: typeof Switch; + } +} diff --git a/packages/vant/src/tab/index.ts b/packages/vant/src/tab/index.ts index 1f122dfd3..a86309bd0 100644 --- a/packages/vant/src/tab/index.ts +++ b/packages/vant/src/tab/index.ts @@ -4,3 +4,9 @@ import _Tab from './Tab'; export const Tab = withInstall(_Tab); export default Tab; export type { TabProps } from './Tab'; + +declare module 'vue' { + export interface GlobalComponents { + VanTab: typeof Tab; + } +} diff --git a/packages/vant/src/tabbar-item/index.ts b/packages/vant/src/tabbar-item/index.ts index 5c3316093..812d56dec 100644 --- a/packages/vant/src/tabbar-item/index.ts +++ b/packages/vant/src/tabbar-item/index.ts @@ -4,3 +4,9 @@ import _TabbarItem from './TabbarItem'; export const TabbarItem = withInstall(_TabbarItem); export default TabbarItem; export type { TabbarItemProps } from './TabbarItem'; + +declare module 'vue' { + export interface GlobalComponents { + VanTabbarItem: typeof TabbarItem; + } +} diff --git a/packages/vant/src/tabbar/index.ts b/packages/vant/src/tabbar/index.ts index a1236a205..6383d4fd8 100644 --- a/packages/vant/src/tabbar/index.ts +++ b/packages/vant/src/tabbar/index.ts @@ -4,3 +4,9 @@ import _Tabbar from './Tabbar'; export const Tabbar = withInstall(_Tabbar); export default Tabbar; export type { TabbarProps } from './Tabbar'; + +declare module 'vue' { + export interface GlobalComponents { + VanTabbar: typeof Tabbar; + } +} diff --git a/packages/vant/src/tabs/index.ts b/packages/vant/src/tabs/index.ts index 5384a4e95..22bb8e1c4 100644 --- a/packages/vant/src/tabs/index.ts +++ b/packages/vant/src/tabs/index.ts @@ -5,3 +5,9 @@ export const Tabs = withInstall(_Tabs); export default Tabs; export type { TabsProps }; export type { TabsType, TabsInstance } from './types'; + +declare module 'vue' { + export interface GlobalComponents { + VanTabs: typeof Tabs; + } +} diff --git a/packages/vant/src/tag/index.ts b/packages/vant/src/tag/index.ts index ba7e615be..7d26a9000 100644 --- a/packages/vant/src/tag/index.ts +++ b/packages/vant/src/tag/index.ts @@ -4,3 +4,9 @@ import _Tag from './Tag'; export const Tag = withInstall(_Tag); export default Tag; export type { TagSize, TagType, TagProps } from './Tag'; + +declare module 'vue' { + export interface GlobalComponents { + VanTag: typeof Tag; + } +} diff --git a/packages/vant/src/tree-select/index.ts b/packages/vant/src/tree-select/index.ts index 6c8f9b859..04b244636 100644 --- a/packages/vant/src/tree-select/index.ts +++ b/packages/vant/src/tree-select/index.ts @@ -8,3 +8,9 @@ export type { TreeSelectChild, TreeSelectProps, } from './TreeSelect'; + +declare module 'vue' { + export interface GlobalComponents { + VanTreeSelect: typeof TreeSelect; + } +} diff --git a/packages/vant/src/uploader/index.ts b/packages/vant/src/uploader/index.ts index 1282553a9..56281f2dd 100644 --- a/packages/vant/src/uploader/index.ts +++ b/packages/vant/src/uploader/index.ts @@ -9,3 +9,9 @@ export type { UploaderResultType, UploaderFileListItem, } from './types'; + +declare module 'vue' { + export interface GlobalComponents { + VanUploader: typeof Uploader; + } +}