From c378b388c282fa57c437f50a7d1a9d4121a76573 Mon Sep 17 00:00:00 2001 From: neverland Date: Mon, 20 Dec 2021 20:20:47 +0800 Subject: [PATCH] types: mark named import type (#10071) --- .../vant/src/action-bar-button/ActionBarButton.tsx | 7 ++++++- packages/vant/src/action-bar-icon/ActionBarIcon.tsx | 2 +- packages/vant/src/action-bar/ActionBar.tsx | 2 +- packages/vant/src/action-sheet/ActionSheet.tsx | 2 +- packages/vant/src/address-edit/AddressEdit.tsx | 4 ++-- packages/vant/src/address-edit/AddressEditDetail.tsx | 2 +- packages/vant/src/address-list/AddressList.tsx | 2 +- packages/vant/src/address-list/AddressListItem.tsx | 2 +- packages/vant/src/area/Area.tsx | 4 ++-- packages/vant/src/badge/Badge.tsx | 6 +++--- packages/vant/src/button/Button.tsx | 6 +++--- packages/vant/src/calendar/Calendar.tsx | 6 +++--- packages/vant/src/calendar/CalendarDay.tsx | 7 ++++++- packages/vant/src/calendar/CalendarMonth.tsx | 4 ++-- packages/vant/src/card/Card.tsx | 2 +- packages/vant/src/cascader/Cascader.tsx | 4 ++-- packages/vant/src/cell-group/CellGroup.tsx | 2 +- packages/vant/src/cell/Cell.tsx | 6 +++--- packages/vant/src/checkbox-group/CheckboxGroup.tsx | 6 +++--- packages/vant/src/checkbox/Checkbox.tsx | 2 +- packages/vant/src/checkbox/Checker.tsx | 2 +- packages/vant/src/circle/Circle.tsx | 6 +++--- packages/vant/src/col/Col.tsx | 2 +- packages/vant/src/collapse-item/CollapseItem.tsx | 2 +- packages/vant/src/collapse/Collapse.tsx | 7 ++++++- packages/vant/src/composables/use-route.ts | 6 +++--- packages/vant/src/config-provider/ConfigProvider.tsx | 8 ++++---- packages/vant/src/contact-card/ContactCard.tsx | 2 +- packages/vant/src/contact-edit/ContactEdit.tsx | 4 ++-- packages/vant/src/contact-list/ContactList.tsx | 2 +- packages/vant/src/count-down/CountDown.tsx | 2 +- packages/vant/src/coupon-cell/CouponCell.tsx | 2 +- packages/vant/src/coupon-list/CouponList.tsx | 2 +- packages/vant/src/coupon/Coupon.tsx | 2 +- packages/vant/src/datetime-picker/DatetimePicker.tsx | 2 +- packages/vant/src/datetime-picker/utils.ts | 2 +- packages/vant/src/dialog/Dialog.tsx | 7 ++++++- packages/vant/src/divider/Divider.tsx | 2 +- packages/vant/src/dropdown-item/DropdownItem.tsx | 8 ++++---- packages/vant/src/dropdown-menu/DropdownMenu.tsx | 8 ++++---- packages/vant/src/empty/Empty.tsx | 2 +- packages/vant/src/field/Field.tsx | 4 ++-- packages/vant/src/form/Form.tsx | 2 +- packages/vant/src/grid-item/GridItem.tsx | 4 ++-- packages/vant/src/grid/Grid.tsx | 7 ++++++- packages/vant/src/icon/Icon.tsx | 2 +- packages/vant/src/image-preview/ImagePreview.tsx | 6 +++--- packages/vant/src/image-preview/ImagePreviewItem.tsx | 8 +++++++- packages/vant/src/image/Image.tsx | 8 ++++---- packages/vant/src/index-anchor/IndexAnchor.tsx | 4 ++-- packages/vant/src/index-bar/IndexBar.tsx | 10 +++++----- packages/vant/src/list/List.tsx | 2 +- packages/vant/src/loading/Loading.tsx | 2 +- packages/vant/src/nav-bar/NavBar.tsx | 7 ++++++- packages/vant/src/notice-bar/NoticeBar.tsx | 4 ++-- packages/vant/src/notify/Notify.tsx | 2 +- packages/vant/src/notify/function-call.tsx | 2 +- packages/vant/src/number-keyboard/NumberKeyboard.tsx | 8 ++++---- .../vant/src/number-keyboard/NumberKeyboardKey.tsx | 2 +- packages/vant/src/overlay/Overlay.tsx | 6 +++--- packages/vant/src/pagination/Pagination.tsx | 7 ++++++- packages/vant/src/password-input/PasswordInput.tsx | 2 +- packages/vant/src/picker/Picker.tsx | 4 ++-- packages/vant/src/popover/Popover.tsx | 12 ++++++------ packages/vant/src/popup/Popup.tsx | 4 ++-- packages/vant/src/popup/shared.ts | 2 +- packages/vant/src/progress/Progress.tsx | 2 +- packages/vant/src/pull-refresh/PullRefresh.tsx | 2 +- packages/vant/src/radio-group/RadioGroup.tsx | 6 +++--- packages/vant/src/radio/Radio.tsx | 2 +- packages/vant/src/rate/Rate.tsx | 2 +- packages/vant/src/row/Row.tsx | 8 ++++---- packages/vant/src/search/Search.tsx | 2 +- packages/vant/src/share-sheet/ShareSheet.tsx | 2 +- packages/vant/src/sidebar-item/SidebarItem.tsx | 2 +- packages/vant/src/sidebar/Sidebar.tsx | 2 +- packages/vant/src/skeleton/Skeleton.tsx | 2 +- packages/vant/src/slider/Slider.tsx | 6 +++--- packages/vant/src/stepper/Stepper.tsx | 4 ++-- packages/vant/src/steps/Steps.tsx | 2 +- packages/vant/src/sticky/Sticky.tsx | 6 +++--- packages/vant/src/submit-bar/SubmitBar.tsx | 2 +- packages/vant/src/swipe-cell/SwipeCell.tsx | 4 ++-- packages/vant/src/swipe-item/SwipeItem.tsx | 2 +- packages/vant/src/swipe/Swipe.tsx | 6 +++--- packages/vant/src/switch/Switch.tsx | 2 +- packages/vant/src/tab/Tab.tsx | 6 +++--- packages/vant/src/tabbar-item/TabbarItem.tsx | 2 +- packages/vant/src/tabbar/Tabbar.tsx | 6 +++--- packages/vant/src/tabs/Tabs.tsx | 12 ++++++------ packages/vant/src/tabs/TabsTitle.tsx | 2 +- packages/vant/src/tag/Tag.tsx | 6 +++--- packages/vant/src/toast/Toast.tsx | 6 +++--- packages/vant/src/toast/function-call.tsx | 4 ++-- packages/vant/src/tree-select/TreeSelect.tsx | 2 +- packages/vant/src/uploader/Uploader.tsx | 8 ++++---- packages/vant/src/uploader/UploaderPreviewItem.tsx | 2 +- 97 files changed, 221 insertions(+), 180 deletions(-) diff --git a/packages/vant/src/action-bar-button/ActionBarButton.tsx b/packages/vant/src/action-bar-button/ActionBarButton.tsx index fdcff9c48..f2bda3871 100644 --- a/packages/vant/src/action-bar-button/ActionBarButton.tsx +++ b/packages/vant/src/action-bar-button/ActionBarButton.tsx @@ -1,4 +1,9 @@ -import { computed, PropType, defineComponent, ExtractPropTypes } from 'vue'; +import { + computed, + defineComponent, + type PropType, + type ExtractPropTypes, +} from 'vue'; import { extend, createNamespace } from '../utils'; import { ACTION_BAR_KEY } from '../action-bar/ActionBar'; diff --git a/packages/vant/src/action-bar-icon/ActionBarIcon.tsx b/packages/vant/src/action-bar-icon/ActionBarIcon.tsx index ebe77b3b0..2aa16fc3b 100644 --- a/packages/vant/src/action-bar-icon/ActionBarIcon.tsx +++ b/packages/vant/src/action-bar-icon/ActionBarIcon.tsx @@ -1,4 +1,4 @@ -import { defineComponent, ExtractPropTypes } from 'vue'; +import { defineComponent, type ExtractPropTypes } from 'vue'; import { extend, createNamespace, unknownProp, numericProp } from '../utils'; import { ACTION_BAR_KEY } from '../action-bar/ActionBar'; diff --git a/packages/vant/src/action-bar/ActionBar.tsx b/packages/vant/src/action-bar/ActionBar.tsx index 427ce168b..f1df59efb 100644 --- a/packages/vant/src/action-bar/ActionBar.tsx +++ b/packages/vant/src/action-bar/ActionBar.tsx @@ -1,4 +1,4 @@ -import { defineComponent, ExtractPropTypes } from 'vue'; +import { defineComponent, type ExtractPropTypes } from 'vue'; import { truthProp, createNamespace } from '../utils'; import { useChildren } from '@vant/use'; diff --git a/packages/vant/src/action-sheet/ActionSheet.tsx b/packages/vant/src/action-sheet/ActionSheet.tsx index a87ff0cce..02c831c29 100644 --- a/packages/vant/src/action-sheet/ActionSheet.tsx +++ b/packages/vant/src/action-sheet/ActionSheet.tsx @@ -1,4 +1,4 @@ -import { nextTick, defineComponent, ExtractPropTypes } from 'vue'; +import { nextTick, defineComponent, type ExtractPropTypes } from 'vue'; // Utils import { diff --git a/packages/vant/src/address-edit/AddressEdit.tsx b/packages/vant/src/address-edit/AddressEdit.tsx index 4842c4a01..f1681f999 100644 --- a/packages/vant/src/address-edit/AddressEdit.tsx +++ b/packages/vant/src/address-edit/AddressEdit.tsx @@ -4,9 +4,9 @@ import { computed, nextTick, reactive, - PropType, defineComponent, - ExtractPropTypes, + type PropType, + type ExtractPropTypes, } from 'vue'; // Utils diff --git a/packages/vant/src/address-edit/AddressEditDetail.tsx b/packages/vant/src/address-edit/AddressEditDetail.tsx index f048ed0b5..3d890aead 100644 --- a/packages/vant/src/address-edit/AddressEditDetail.tsx +++ b/packages/vant/src/address-edit/AddressEditDetail.tsx @@ -1,4 +1,4 @@ -import { PropType, ref, defineComponent } from 'vue'; +import { ref, defineComponent, type PropType } from 'vue'; // Utils import { createNamespace, numericProp } from '../utils'; diff --git a/packages/vant/src/address-list/AddressList.tsx b/packages/vant/src/address-list/AddressList.tsx index f061fdf2d..3b82d1099 100644 --- a/packages/vant/src/address-list/AddressList.tsx +++ b/packages/vant/src/address-list/AddressList.tsx @@ -1,4 +1,4 @@ -import { defineComponent, ExtractPropTypes } from 'vue'; +import { defineComponent, type ExtractPropTypes } from 'vue'; // Utils import { diff --git a/packages/vant/src/address-list/AddressListItem.tsx b/packages/vant/src/address-list/AddressListItem.tsx index 44ab0bc4a..babf7f602 100644 --- a/packages/vant/src/address-list/AddressListItem.tsx +++ b/packages/vant/src/address-list/AddressListItem.tsx @@ -1,4 +1,4 @@ -import { PropType, defineComponent } from 'vue'; +import { defineComponent, type PropType } from 'vue'; // Utils import { createNamespace, extend, makeRequiredProp } from '../utils'; diff --git a/packages/vant/src/area/Area.tsx b/packages/vant/src/area/Area.tsx index c603676f3..b059be877 100644 --- a/packages/vant/src/area/Area.tsx +++ b/packages/vant/src/area/Area.tsx @@ -4,10 +4,10 @@ import { computed, reactive, nextTick, - PropType, onMounted, defineComponent, - ExtractPropTypes, + type PropType, + type ExtractPropTypes, } from 'vue'; // Utils diff --git a/packages/vant/src/badge/Badge.tsx b/packages/vant/src/badge/Badge.tsx index 4057fa14a..ec03663e6 100644 --- a/packages/vant/src/badge/Badge.tsx +++ b/packages/vant/src/badge/Badge.tsx @@ -1,9 +1,9 @@ import { computed, - PropType, - CSSProperties, defineComponent, - ExtractPropTypes, + type PropType, + type CSSProperties, + type ExtractPropTypes, } from 'vue'; import { isDef, diff --git a/packages/vant/src/button/Button.tsx b/packages/vant/src/button/Button.tsx index 03a030459..ceeafb8d8 100644 --- a/packages/vant/src/button/Button.tsx +++ b/packages/vant/src/button/Button.tsx @@ -1,8 +1,8 @@ import { - PropType, - CSSProperties, defineComponent, - ExtractPropTypes, + type PropType, + type CSSProperties, + type ExtractPropTypes, } from 'vue'; // Utils diff --git a/packages/vant/src/calendar/Calendar.tsx b/packages/vant/src/calendar/Calendar.tsx index aa6219c30..13e8f854d 100644 --- a/packages/vant/src/calendar/Calendar.tsx +++ b/packages/vant/src/calendar/Calendar.tsx @@ -2,10 +2,10 @@ import { ref, watch, computed, - PropType, - TeleportProps, defineComponent, - ExtractPropTypes, + type PropType, + type TeleportProps, + type ExtractPropTypes, } from 'vue'; // Utils diff --git a/packages/vant/src/calendar/CalendarDay.tsx b/packages/vant/src/calendar/CalendarDay.tsx index b13edea06..99945a8ab 100644 --- a/packages/vant/src/calendar/CalendarDay.tsx +++ b/packages/vant/src/calendar/CalendarDay.tsx @@ -1,4 +1,9 @@ -import { computed, CSSProperties, PropType, defineComponent } from 'vue'; +import { + computed, + defineComponent, + type PropType, + type CSSProperties, +} from 'vue'; import { makeNumberProp, createNamespace, makeRequiredProp } from '../utils'; import { bem } from './utils'; import type { CalendarDayItem } from './types'; diff --git a/packages/vant/src/calendar/CalendarMonth.tsx b/packages/vant/src/calendar/CalendarMonth.tsx index 12b5fd84c..adef5d58b 100644 --- a/packages/vant/src/calendar/CalendarMonth.tsx +++ b/packages/vant/src/calendar/CalendarMonth.tsx @@ -1,9 +1,9 @@ import { ref, computed, - PropType, defineComponent, - ExtractPropTypes, + type PropType, + type ExtractPropTypes, } from 'vue'; // Utils diff --git a/packages/vant/src/card/Card.tsx b/packages/vant/src/card/Card.tsx index 3a62ec720..291683e55 100644 --- a/packages/vant/src/card/Card.tsx +++ b/packages/vant/src/card/Card.tsx @@ -1,4 +1,4 @@ -import { defineComponent, ExtractPropTypes } from 'vue'; +import { defineComponent, type ExtractPropTypes } from 'vue'; // Utils import { isDef, numericProp, makeStringProp, createNamespace } from '../utils'; diff --git a/packages/vant/src/cascader/Cascader.tsx b/packages/vant/src/cascader/Cascader.tsx index a6578ef69..0684c1f1c 100644 --- a/packages/vant/src/cascader/Cascader.tsx +++ b/packages/vant/src/cascader/Cascader.tsx @@ -2,9 +2,9 @@ import { ref, watch, nextTick, - PropType, defineComponent, - ExtractPropTypes, + type PropType, + type ExtractPropTypes, } from 'vue'; import { extend, diff --git a/packages/vant/src/cell-group/CellGroup.tsx b/packages/vant/src/cell-group/CellGroup.tsx index 5d1ca757e..a7215540f 100644 --- a/packages/vant/src/cell-group/CellGroup.tsx +++ b/packages/vant/src/cell-group/CellGroup.tsx @@ -1,4 +1,4 @@ -import { defineComponent, ExtractPropTypes } from 'vue'; +import { defineComponent, type ExtractPropTypes } from 'vue'; import { truthProp, createNamespace, BORDER_TOP_BOTTOM } from '../utils'; const [name, bem] = createNamespace('cell-group'); diff --git a/packages/vant/src/cell/Cell.tsx b/packages/vant/src/cell/Cell.tsx index 59a4850c1..df06603e3 100644 --- a/packages/vant/src/cell/Cell.tsx +++ b/packages/vant/src/cell/Cell.tsx @@ -1,8 +1,8 @@ import { - PropType, - CSSProperties, defineComponent, - ExtractPropTypes, + type PropType, + type CSSProperties, + type ExtractPropTypes, } from 'vue'; // Utils diff --git a/packages/vant/src/checkbox-group/CheckboxGroup.tsx b/packages/vant/src/checkbox-group/CheckboxGroup.tsx index 14f6a56c0..422cdc4be 100644 --- a/packages/vant/src/checkbox-group/CheckboxGroup.tsx +++ b/packages/vant/src/checkbox-group/CheckboxGroup.tsx @@ -1,9 +1,9 @@ import { watch, - PropType, - InjectionKey, defineComponent, - ExtractPropTypes, + type PropType, + type InjectionKey, + type ExtractPropTypes, } from 'vue'; // Utils diff --git a/packages/vant/src/checkbox/Checkbox.tsx b/packages/vant/src/checkbox/Checkbox.tsx index e65943709..3cb18df22 100644 --- a/packages/vant/src/checkbox/Checkbox.tsx +++ b/packages/vant/src/checkbox/Checkbox.tsx @@ -1,4 +1,4 @@ -import { watch, computed, defineComponent, ExtractPropTypes } from 'vue'; +import { watch, computed, defineComponent, type ExtractPropTypes } from 'vue'; // Utils import { createNamespace, extend, pick, truthProp } from '../utils'; diff --git a/packages/vant/src/checkbox/Checker.tsx b/packages/vant/src/checkbox/Checker.tsx index 927ff9136..b7ab81a72 100644 --- a/packages/vant/src/checkbox/Checker.tsx +++ b/packages/vant/src/checkbox/Checker.tsx @@ -1,4 +1,4 @@ -import { ref, computed, PropType, defineComponent } from 'vue'; +import { ref, computed, defineComponent, type PropType } from 'vue'; import { extend, addUnit, diff --git a/packages/vant/src/circle/Circle.tsx b/packages/vant/src/circle/Circle.tsx index dfcb6e1bb..019c3784c 100644 --- a/packages/vant/src/circle/Circle.tsx +++ b/packages/vant/src/circle/Circle.tsx @@ -1,10 +1,10 @@ import { watch, computed, - PropType, - CSSProperties, defineComponent, - ExtractPropTypes, + type PropType, + type CSSProperties, + type ExtractPropTypes, } from 'vue'; import { raf, cancelRaf } from '@vant/use'; import { diff --git a/packages/vant/src/col/Col.tsx b/packages/vant/src/col/Col.tsx index e4c300eba..3a53342c2 100644 --- a/packages/vant/src/col/Col.tsx +++ b/packages/vant/src/col/Col.tsx @@ -1,4 +1,4 @@ -import { computed, defineComponent, ExtractPropTypes } from 'vue'; +import { computed, defineComponent, type ExtractPropTypes } from 'vue'; import { numericProp, createNamespace, diff --git a/packages/vant/src/collapse-item/CollapseItem.tsx b/packages/vant/src/collapse-item/CollapseItem.tsx index eb74ebaec..d5211fb3e 100644 --- a/packages/vant/src/collapse-item/CollapseItem.tsx +++ b/packages/vant/src/collapse-item/CollapseItem.tsx @@ -4,7 +4,7 @@ import { computed, nextTick, defineComponent, - ExtractPropTypes, + type ExtractPropTypes, } from 'vue'; // Utils diff --git a/packages/vant/src/collapse/Collapse.tsx b/packages/vant/src/collapse/Collapse.tsx index e01d0cf35..667452be9 100644 --- a/packages/vant/src/collapse/Collapse.tsx +++ b/packages/vant/src/collapse/Collapse.tsx @@ -1,4 +1,9 @@ -import { PropType, defineComponent, InjectionKey, ExtractPropTypes } from 'vue'; +import { + defineComponent, + type PropType, + type InjectionKey, + type ExtractPropTypes, +} from 'vue'; import { truthProp, createNamespace, BORDER_TOP_BOTTOM } from '../utils'; import { useChildren } from '@vant/use'; diff --git a/packages/vant/src/composables/use-route.ts b/packages/vant/src/composables/use-route.ts index c37cbda14..37842c866 100644 --- a/packages/vant/src/composables/use-route.ts +++ b/packages/vant/src/composables/use-route.ts @@ -2,10 +2,10 @@ * Vue Router support */ import { - PropType, - ExtractPropTypes, getCurrentInstance, - ComponentPublicInstance, + type PropType, + type ExtractPropTypes, + type ComponentPublicInstance, } from 'vue'; import type { RouteLocationRaw } from 'vue-router'; diff --git a/packages/vant/src/config-provider/ConfigProvider.tsx b/packages/vant/src/config-provider/ConfigProvider.tsx index d8e31b590..16aeaafc1 100644 --- a/packages/vant/src/config-provider/ConfigProvider.tsx +++ b/packages/vant/src/config-provider/ConfigProvider.tsx @@ -1,11 +1,11 @@ import { provide, computed, - PropType, - InjectionKey, - CSSProperties, defineComponent, - ExtractPropTypes, + type PropType, + type InjectionKey, + type CSSProperties, + type ExtractPropTypes, } from 'vue'; import { kebabCase, makeStringProp, createNamespace } from '../utils'; diff --git a/packages/vant/src/contact-card/ContactCard.tsx b/packages/vant/src/contact-card/ContactCard.tsx index aab2e4028..56297914e 100644 --- a/packages/vant/src/contact-card/ContactCard.tsx +++ b/packages/vant/src/contact-card/ContactCard.tsx @@ -1,4 +1,4 @@ -import { defineComponent, ExtractPropTypes } from 'vue'; +import { defineComponent, type ExtractPropTypes } from 'vue'; import { truthProp, makeStringProp, createNamespace } from '../utils'; import { Cell } from '../cell'; diff --git a/packages/vant/src/contact-edit/ContactEdit.tsx b/packages/vant/src/contact-edit/ContactEdit.tsx index 8baa9fb72..83afcefb2 100644 --- a/packages/vant/src/contact-edit/ContactEdit.tsx +++ b/packages/vant/src/contact-edit/ContactEdit.tsx @@ -1,9 +1,9 @@ import { watch, reactive, - PropType, defineComponent, - ExtractPropTypes, + type PropType, + type ExtractPropTypes, } from 'vue'; // Utils diff --git a/packages/vant/src/contact-list/ContactList.tsx b/packages/vant/src/contact-list/ContactList.tsx index fa31fc289..da5782b9e 100644 --- a/packages/vant/src/contact-list/ContactList.tsx +++ b/packages/vant/src/contact-list/ContactList.tsx @@ -1,4 +1,4 @@ -import { PropType, defineComponent, ExtractPropTypes } from 'vue'; +import { defineComponent, type PropType, type ExtractPropTypes } from 'vue'; // Utils import { createNamespace, unknownProp } from '../utils'; diff --git a/packages/vant/src/count-down/CountDown.tsx b/packages/vant/src/count-down/CountDown.tsx index 7254d24fb..a1b7b1d80 100644 --- a/packages/vant/src/count-down/CountDown.tsx +++ b/packages/vant/src/count-down/CountDown.tsx @@ -1,4 +1,4 @@ -import { watch, computed, defineComponent, ExtractPropTypes } from 'vue'; +import { watch, computed, defineComponent, type ExtractPropTypes } from 'vue'; // Utils import { diff --git a/packages/vant/src/coupon-cell/CouponCell.tsx b/packages/vant/src/coupon-cell/CouponCell.tsx index 38f5bcbf2..5d5df649f 100644 --- a/packages/vant/src/coupon-cell/CouponCell.tsx +++ b/packages/vant/src/coupon-cell/CouponCell.tsx @@ -1,4 +1,4 @@ -import { defineComponent, ExtractPropTypes } from 'vue'; +import { defineComponent, type ExtractPropTypes } from 'vue'; // Utils import { diff --git a/packages/vant/src/coupon-list/CouponList.tsx b/packages/vant/src/coupon-list/CouponList.tsx index 18ae0ea07..ef1201891 100644 --- a/packages/vant/src/coupon-list/CouponList.tsx +++ b/packages/vant/src/coupon-list/CouponList.tsx @@ -5,7 +5,7 @@ import { nextTick, onMounted, defineComponent, - ExtractPropTypes, + type ExtractPropTypes, } from 'vue'; // Utils diff --git a/packages/vant/src/coupon/Coupon.tsx b/packages/vant/src/coupon/Coupon.tsx index ba2299a50..c148fb4e1 100644 --- a/packages/vant/src/coupon/Coupon.tsx +++ b/packages/vant/src/coupon/Coupon.tsx @@ -1,4 +1,4 @@ -import { computed, PropType, defineComponent } from 'vue'; +import { computed, defineComponent, type PropType } from 'vue'; import { makeStringProp, createNamespace, makeRequiredProp } from '../utils'; import { getDate, formatAmount, formatDiscount } from './utils'; import { Checkbox } from '../checkbox'; diff --git a/packages/vant/src/datetime-picker/DatetimePicker.tsx b/packages/vant/src/datetime-picker/DatetimePicker.tsx index 1e950a351..257454267 100644 --- a/packages/vant/src/datetime-picker/DatetimePicker.tsx +++ b/packages/vant/src/datetime-picker/DatetimePicker.tsx @@ -1,4 +1,4 @@ -import { ref, defineComponent, ExtractPropTypes } from 'vue'; +import { ref, defineComponent, type ExtractPropTypes } from 'vue'; import { pick, extend, createNamespace } from '../utils'; import { useExpose } from '../composables/use-expose'; import TimePicker from './TimePicker'; diff --git a/packages/vant/src/datetime-picker/utils.ts b/packages/vant/src/datetime-picker/utils.ts index f78e90d06..856bff591 100644 --- a/packages/vant/src/datetime-picker/utils.ts +++ b/packages/vant/src/datetime-picker/utils.ts @@ -1,6 +1,6 @@ -import { PropType } from 'vue'; import { extend } from '../utils'; import { pickerSharedProps } from '../picker/Picker'; +import type { PropType } from 'vue'; import type { PickerInstance } from '../picker'; import type { DatetimePickerColumnType } from './types'; diff --git a/packages/vant/src/dialog/Dialog.tsx b/packages/vant/src/dialog/Dialog.tsx index 5a5ff2277..92ca35343 100644 --- a/packages/vant/src/dialog/Dialog.tsx +++ b/packages/vant/src/dialog/Dialog.tsx @@ -1,4 +1,9 @@ -import { PropType, reactive, defineComponent, ExtractPropTypes } from 'vue'; +import { + reactive, + defineComponent, + type PropType, + type ExtractPropTypes, +} from 'vue'; // Utils import { diff --git a/packages/vant/src/divider/Divider.tsx b/packages/vant/src/divider/Divider.tsx index cd9e96b92..73a481481 100644 --- a/packages/vant/src/divider/Divider.tsx +++ b/packages/vant/src/divider/Divider.tsx @@ -1,4 +1,4 @@ -import { defineComponent, ExtractPropTypes } from 'vue'; +import { defineComponent, type ExtractPropTypes } from 'vue'; import { truthProp, makeStringProp, createNamespace } from '../utils'; const [name, bem] = createNamespace('divider'); diff --git a/packages/vant/src/dropdown-item/DropdownItem.tsx b/packages/vant/src/dropdown-item/DropdownItem.tsx index fd210535c..401720375 100644 --- a/packages/vant/src/dropdown-item/DropdownItem.tsx +++ b/packages/vant/src/dropdown-item/DropdownItem.tsx @@ -1,11 +1,11 @@ import { reactive, Teleport, - PropType, - TeleportProps, - CSSProperties, defineComponent, - ExtractPropTypes, + type PropType, + type TeleportProps, + type CSSProperties, + type ExtractPropTypes, } from 'vue'; // Utils diff --git a/packages/vant/src/dropdown-menu/DropdownMenu.tsx b/packages/vant/src/dropdown-menu/DropdownMenu.tsx index a671c82f3..8c3ac70a6 100644 --- a/packages/vant/src/dropdown-menu/DropdownMenu.tsx +++ b/packages/vant/src/dropdown-menu/DropdownMenu.tsx @@ -1,10 +1,10 @@ import { ref, computed, - InjectionKey, - CSSProperties, defineComponent, - ExtractPropTypes, + type InjectionKey, + type CSSProperties, + type ExtractPropTypes, } from 'vue'; // Utils @@ -17,7 +17,7 @@ import { makeNumericProp, createNamespace, HAPTICS_FEEDBACK, - ComponentInstance, + type ComponentInstance, } from '../utils'; // Composables diff --git a/packages/vant/src/empty/Empty.tsx b/packages/vant/src/empty/Empty.tsx index 31c600c7a..94e5bc18c 100644 --- a/packages/vant/src/empty/Empty.tsx +++ b/packages/vant/src/empty/Empty.tsx @@ -1,4 +1,4 @@ -import { defineComponent, ExtractPropTypes } from 'vue'; +import { defineComponent, type ExtractPropTypes } from 'vue'; import { numericProp, getSizeStyle, diff --git a/packages/vant/src/field/Field.tsx b/packages/vant/src/field/Field.tsx index 03957c292..69635daf1 100644 --- a/packages/vant/src/field/Field.tsx +++ b/packages/vant/src/field/Field.tsx @@ -5,10 +5,10 @@ import { computed, nextTick, reactive, - PropType, onMounted, defineComponent, - ExtractPropTypes, + type PropType, + type ExtractPropTypes, } from 'vue'; // Utils diff --git a/packages/vant/src/form/Form.tsx b/packages/vant/src/form/Form.tsx index 97ce45d2c..3483f2a4a 100644 --- a/packages/vant/src/form/Form.tsx +++ b/packages/vant/src/form/Form.tsx @@ -1,4 +1,4 @@ -import { PropType, defineComponent, ExtractPropTypes } from 'vue'; +import { defineComponent, type PropType, type ExtractPropTypes } from 'vue'; // Utils import { diff --git a/packages/vant/src/grid-item/GridItem.tsx b/packages/vant/src/grid-item/GridItem.tsx index 2ccfdd8a1..6d2d72f74 100644 --- a/packages/vant/src/grid-item/GridItem.tsx +++ b/packages/vant/src/grid-item/GridItem.tsx @@ -1,8 +1,8 @@ import { computed, - CSSProperties, defineComponent, - ExtractPropTypes, + type CSSProperties, + type ExtractPropTypes, } from 'vue'; // Utils diff --git a/packages/vant/src/grid/Grid.tsx b/packages/vant/src/grid/Grid.tsx index 34ed2300c..3933ea6ec 100644 --- a/packages/vant/src/grid/Grid.tsx +++ b/packages/vant/src/grid/Grid.tsx @@ -1,4 +1,9 @@ -import { PropType, defineComponent, ExtractPropTypes, InjectionKey } from 'vue'; +import { + defineComponent, + type PropType, + type InjectionKey, + type ExtractPropTypes, +} from 'vue'; import { createNamespace, addUnit, diff --git a/packages/vant/src/icon/Icon.tsx b/packages/vant/src/icon/Icon.tsx index 7eeb39b4e..9d05ea6c6 100644 --- a/packages/vant/src/icon/Icon.tsx +++ b/packages/vant/src/icon/Icon.tsx @@ -1,4 +1,4 @@ -import { defineComponent, inject, computed, ExtractPropTypes } from 'vue'; +import { inject, computed, defineComponent, type ExtractPropTypes } from 'vue'; import { addUnit, numericProp, diff --git a/packages/vant/src/image-preview/ImagePreview.tsx b/packages/vant/src/image-preview/ImagePreview.tsx index 7257a8b37..d17949d58 100644 --- a/packages/vant/src/image-preview/ImagePreview.tsx +++ b/packages/vant/src/image-preview/ImagePreview.tsx @@ -2,12 +2,12 @@ import { ref, watch, nextTick, - PropType, reactive, onMounted, - CSSProperties, defineComponent, - ExtractPropTypes, + type PropType, + type CSSProperties, + type ExtractPropTypes, } from 'vue'; // Utils diff --git a/packages/vant/src/image-preview/ImagePreviewItem.tsx b/packages/vant/src/image-preview/ImagePreviewItem.tsx index 1a80500a0..2e635c8a8 100644 --- a/packages/vant/src/image-preview/ImagePreviewItem.tsx +++ b/packages/vant/src/image-preview/ImagePreviewItem.tsx @@ -1,4 +1,10 @@ -import { watch, computed, reactive, CSSProperties, defineComponent } from 'vue'; +import { + watch, + computed, + reactive, + defineComponent, + type CSSProperties, +} from 'vue'; // Utils import { diff --git a/packages/vant/src/image/Image.tsx b/packages/vant/src/image/Image.tsx index 2679b4c8c..d1fb5b400 100644 --- a/packages/vant/src/image/Image.tsx +++ b/packages/vant/src/image/Image.tsx @@ -1,14 +1,14 @@ import { ref, - Slot, watch, computed, - PropType, - CSSProperties, onBeforeUnmount, defineComponent, - ExtractPropTypes, getCurrentInstance, + type Slot, + type PropType, + type CSSProperties, + type ExtractPropTypes, } from 'vue'; // Utils diff --git a/packages/vant/src/index-anchor/IndexAnchor.tsx b/packages/vant/src/index-anchor/IndexAnchor.tsx index 073706fe7..1793b67d3 100644 --- a/packages/vant/src/index-anchor/IndexAnchor.tsx +++ b/packages/vant/src/index-anchor/IndexAnchor.tsx @@ -2,9 +2,9 @@ import { ref, reactive, computed, - CSSProperties, defineComponent, - ExtractPropTypes, + type CSSProperties, + type ExtractPropTypes, } from 'vue'; // Utils diff --git a/packages/vant/src/index-bar/IndexBar.tsx b/packages/vant/src/index-bar/IndexBar.tsx index 3a2544d5f..eefd6bcfd 100644 --- a/packages/vant/src/index-bar/IndexBar.tsx +++ b/packages/vant/src/index-bar/IndexBar.tsx @@ -3,14 +3,14 @@ import { watch, computed, nextTick, - PropType, Teleport, onMounted, - InjectionKey, - CSSProperties, - TeleportProps, defineComponent, - ExtractPropTypes, + type PropType, + type InjectionKey, + type CSSProperties, + type TeleportProps, + type ExtractPropTypes, } from 'vue'; // Utils diff --git a/packages/vant/src/list/List.tsx b/packages/vant/src/list/List.tsx index 470a9a3e0..f9fabc94e 100644 --- a/packages/vant/src/list/List.tsx +++ b/packages/vant/src/list/List.tsx @@ -5,7 +5,7 @@ import { onUpdated, onMounted, defineComponent, - ExtractPropTypes, + type ExtractPropTypes, } from 'vue'; // Utils diff --git a/packages/vant/src/loading/Loading.tsx b/packages/vant/src/loading/Loading.tsx index c95057ef6..dc705c5d8 100644 --- a/packages/vant/src/loading/Loading.tsx +++ b/packages/vant/src/loading/Loading.tsx @@ -1,4 +1,4 @@ -import { computed, defineComponent, ExtractPropTypes } from 'vue'; +import { computed, defineComponent, type ExtractPropTypes } from 'vue'; import { extend, addUnit, diff --git a/packages/vant/src/nav-bar/NavBar.tsx b/packages/vant/src/nav-bar/NavBar.tsx index 0182bf334..e8a867e4a 100644 --- a/packages/vant/src/nav-bar/NavBar.tsx +++ b/packages/vant/src/nav-bar/NavBar.tsx @@ -1,4 +1,9 @@ -import { ref, CSSProperties, defineComponent, ExtractPropTypes } from 'vue'; +import { + ref, + defineComponent, + type CSSProperties, + type ExtractPropTypes, +} from 'vue'; // Utils import { diff --git a/packages/vant/src/notice-bar/NoticeBar.tsx b/packages/vant/src/notice-bar/NoticeBar.tsx index 68084373d..5c0511b1f 100644 --- a/packages/vant/src/notice-bar/NoticeBar.tsx +++ b/packages/vant/src/notice-bar/NoticeBar.tsx @@ -2,9 +2,9 @@ import { ref, watch, reactive, - PropType, defineComponent, - ExtractPropTypes, + type PropType, + type ExtractPropTypes, } from 'vue'; // Utils diff --git a/packages/vant/src/notify/Notify.tsx b/packages/vant/src/notify/Notify.tsx index 9207dbd2e..56d6918ce 100644 --- a/packages/vant/src/notify/Notify.tsx +++ b/packages/vant/src/notify/Notify.tsx @@ -1,4 +1,4 @@ -import { defineComponent, ExtractPropTypes } from 'vue'; +import { defineComponent, type ExtractPropTypes } from 'vue'; import { extend, numericProp, diff --git a/packages/vant/src/notify/function-call.tsx b/packages/vant/src/notify/function-call.tsx index 479246624..eac843c32 100644 --- a/packages/vant/src/notify/function-call.tsx +++ b/packages/vant/src/notify/function-call.tsx @@ -4,7 +4,7 @@ import { isObject, inBrowser, withInstall, - ComponentInstance, + type ComponentInstance, } from '../utils'; import { mountComponent, usePopupState } from '../utils/mount-component'; import VanNotify from './Notify'; diff --git a/packages/vant/src/number-keyboard/NumberKeyboard.tsx b/packages/vant/src/number-keyboard/NumberKeyboard.tsx index f32bca960..91e86f6ab 100644 --- a/packages/vant/src/number-keyboard/NumberKeyboard.tsx +++ b/packages/vant/src/number-keyboard/NumberKeyboard.tsx @@ -1,14 +1,14 @@ import { ref, - Slot, watch, computed, Teleport, - PropType, Transition, - TeleportProps, defineComponent, - ExtractPropTypes, + type Slot, + type PropType, + type TeleportProps, + type ExtractPropTypes, } from 'vue'; // Utils diff --git a/packages/vant/src/number-keyboard/NumberKeyboardKey.tsx b/packages/vant/src/number-keyboard/NumberKeyboardKey.tsx index b1ca0e245..225a98804 100644 --- a/packages/vant/src/number-keyboard/NumberKeyboardKey.tsx +++ b/packages/vant/src/number-keyboard/NumberKeyboardKey.tsx @@ -1,4 +1,4 @@ -import { ref, PropType, defineComponent } from 'vue'; +import { ref, defineComponent, type PropType } from 'vue'; import { numericProp, createNamespace, preventDefault } from '../utils'; import { useTouch } from '../composables/use-touch'; import { Loading } from '../loading'; diff --git a/packages/vant/src/overlay/Overlay.tsx b/packages/vant/src/overlay/Overlay.tsx index d343cd0a9..b74a10ad5 100644 --- a/packages/vant/src/overlay/Overlay.tsx +++ b/packages/vant/src/overlay/Overlay.tsx @@ -1,9 +1,9 @@ import { - PropType, Transition, - CSSProperties, defineComponent, - ExtractPropTypes, + type PropType, + type CSSProperties, + type ExtractPropTypes, } from 'vue'; import { noop, diff --git a/packages/vant/src/pagination/Pagination.tsx b/packages/vant/src/pagination/Pagination.tsx index a23be865d..4fb506896 100644 --- a/packages/vant/src/pagination/Pagination.tsx +++ b/packages/vant/src/pagination/Pagination.tsx @@ -1,4 +1,9 @@ -import { computed, watchEffect, defineComponent, ExtractPropTypes } from 'vue'; +import { + computed, + watchEffect, + defineComponent, + type ExtractPropTypes, +} from 'vue'; import { clamp, makeStringProp, diff --git a/packages/vant/src/password-input/PasswordInput.tsx b/packages/vant/src/password-input/PasswordInput.tsx index 777d98bbc..ddf6258af 100644 --- a/packages/vant/src/password-input/PasswordInput.tsx +++ b/packages/vant/src/password-input/PasswordInput.tsx @@ -1,4 +1,4 @@ -import { defineComponent, ExtractPropTypes } from 'vue'; +import { defineComponent, type ExtractPropTypes } from 'vue'; import { addUnit, truthProp, diff --git a/packages/vant/src/picker/Picker.tsx b/packages/vant/src/picker/Picker.tsx index b084dbc50..f0c5b0496 100644 --- a/packages/vant/src/picker/Picker.tsx +++ b/packages/vant/src/picker/Picker.tsx @@ -2,9 +2,9 @@ import { ref, watch, computed, - PropType, defineComponent, - ExtractPropTypes, + type PropType, + type ExtractPropTypes, } from 'vue'; // Utils diff --git a/packages/vant/src/popover/Popover.tsx b/packages/vant/src/popover/Popover.tsx index 5116e8a9c..b587d7387 100644 --- a/packages/vant/src/popover/Popover.tsx +++ b/packages/vant/src/popover/Popover.tsx @@ -2,13 +2,13 @@ import { ref, watch, nextTick, - PropType, onMounted, - CSSProperties, - TeleportProps, onBeforeUnmount, defineComponent, - ExtractPropTypes, + type PropType, + type CSSProperties, + type TeleportProps, + type ExtractPropTypes, } from 'vue'; import { Instance, createPopper, offsetModifier } from '@vant/popperjs'; @@ -20,10 +20,10 @@ import { numericProp, unknownProp, BORDER_BOTTOM, + makeArrayProp, makeStringProp, createNamespace, - ComponentInstance, - makeArrayProp, + type ComponentInstance, } from '../utils'; // Composables diff --git a/packages/vant/src/popup/Popup.tsx b/packages/vant/src/popup/Popup.tsx index 3c47671fd..a98363f02 100644 --- a/packages/vant/src/popup/Popup.tsx +++ b/packages/vant/src/popup/Popup.tsx @@ -7,10 +7,10 @@ import { onMounted, Transition, onActivated, - CSSProperties, onDeactivated, defineComponent, - ExtractPropTypes, + type CSSProperties, + type ExtractPropTypes, } from 'vue'; // Utils diff --git a/packages/vant/src/popup/shared.ts b/packages/vant/src/popup/shared.ts index c9af1e2ca..923c881c8 100644 --- a/packages/vant/src/popup/shared.ts +++ b/packages/vant/src/popup/shared.ts @@ -1,5 +1,5 @@ -import { PropType, CSSProperties, TeleportProps } from 'vue'; import { truthProp, unknownProp, Interceptor, numericProp } from '../utils'; +import type { PropType, CSSProperties, TeleportProps } from 'vue'; export const popupSharedProps = { // whether to show popup diff --git a/packages/vant/src/progress/Progress.tsx b/packages/vant/src/progress/Progress.tsx index 34a148142..b56b565a5 100644 --- a/packages/vant/src/progress/Progress.tsx +++ b/packages/vant/src/progress/Progress.tsx @@ -1,4 +1,4 @@ -import { computed, defineComponent, ExtractPropTypes } from 'vue'; +import { computed, defineComponent, type ExtractPropTypes } from 'vue'; import { addUnit, truthProp, numericProp, createNamespace } from '../utils'; const [name, bem] = createNamespace('progress'); diff --git a/packages/vant/src/pull-refresh/PullRefresh.tsx b/packages/vant/src/pull-refresh/PullRefresh.tsx index e586b5b40..7720efd28 100644 --- a/packages/vant/src/pull-refresh/PullRefresh.tsx +++ b/packages/vant/src/pull-refresh/PullRefresh.tsx @@ -4,7 +4,7 @@ import { reactive, nextTick, defineComponent, - ExtractPropTypes, + type ExtractPropTypes, } from 'vue'; // Utils diff --git a/packages/vant/src/radio-group/RadioGroup.tsx b/packages/vant/src/radio-group/RadioGroup.tsx index 0cb833199..56e28bf24 100644 --- a/packages/vant/src/radio-group/RadioGroup.tsx +++ b/packages/vant/src/radio-group/RadioGroup.tsx @@ -1,9 +1,9 @@ import { watch, - PropType, - InjectionKey, defineComponent, - ExtractPropTypes, + type PropType, + type InjectionKey, + type ExtractPropTypes, } from 'vue'; import { unknownProp, numericProp, createNamespace } from '../utils'; import { useChildren, useCustomFieldValue } from '@vant/use'; diff --git a/packages/vant/src/radio/Radio.tsx b/packages/vant/src/radio/Radio.tsx index 2fbf993a9..cd6c0ca77 100644 --- a/packages/vant/src/radio/Radio.tsx +++ b/packages/vant/src/radio/Radio.tsx @@ -1,4 +1,4 @@ -import { defineComponent, ExtractPropTypes } from 'vue'; +import { defineComponent, type ExtractPropTypes } from 'vue'; // Utils import { pick, createNamespace } from '../utils'; diff --git a/packages/vant/src/rate/Rate.tsx b/packages/vant/src/rate/Rate.tsx index 6cbbddfa3..1bed973f7 100644 --- a/packages/vant/src/rate/Rate.tsx +++ b/packages/vant/src/rate/Rate.tsx @@ -1,4 +1,4 @@ -import { computed, defineComponent, ExtractPropTypes } from 'vue'; +import { computed, defineComponent, type ExtractPropTypes } from 'vue'; // Utils import { diff --git a/packages/vant/src/row/Row.tsx b/packages/vant/src/row/Row.tsx index d2e9b75a0..fb7b31be6 100644 --- a/packages/vant/src/row/Row.tsx +++ b/packages/vant/src/row/Row.tsx @@ -1,10 +1,10 @@ import { computed, - PropType, - ComputedRef, - InjectionKey, defineComponent, - ExtractPropTypes, + type PropType, + type ComputedRef, + type InjectionKey, + type ExtractPropTypes, } from 'vue'; import { truthProp, diff --git a/packages/vant/src/search/Search.tsx b/packages/vant/src/search/Search.tsx index a9386e724..159b7d0bc 100644 --- a/packages/vant/src/search/Search.tsx +++ b/packages/vant/src/search/Search.tsx @@ -1,4 +1,4 @@ -import { ref, defineComponent, ExtractPropTypes } from 'vue'; +import { ref, defineComponent, type ExtractPropTypes } from 'vue'; // Utils import { diff --git a/packages/vant/src/share-sheet/ShareSheet.tsx b/packages/vant/src/share-sheet/ShareSheet.tsx index 95404e032..071ea6f5c 100644 --- a/packages/vant/src/share-sheet/ShareSheet.tsx +++ b/packages/vant/src/share-sheet/ShareSheet.tsx @@ -1,4 +1,4 @@ -import { defineComponent, ExtractPropTypes } from 'vue'; +import { defineComponent, type ExtractPropTypes } from 'vue'; // Utils import { diff --git a/packages/vant/src/sidebar-item/SidebarItem.tsx b/packages/vant/src/sidebar-item/SidebarItem.tsx index 3faa0537b..366d2fec9 100644 --- a/packages/vant/src/sidebar-item/SidebarItem.tsx +++ b/packages/vant/src/sidebar-item/SidebarItem.tsx @@ -1,4 +1,4 @@ -import { defineComponent, ExtractPropTypes } from 'vue'; +import { defineComponent, type ExtractPropTypes } from 'vue'; // Utils import { extend, numericProp, createNamespace } from '../utils'; diff --git a/packages/vant/src/sidebar/Sidebar.tsx b/packages/vant/src/sidebar/Sidebar.tsx index f6f1fcf23..511344dc5 100644 --- a/packages/vant/src/sidebar/Sidebar.tsx +++ b/packages/vant/src/sidebar/Sidebar.tsx @@ -1,4 +1,4 @@ -import { defineComponent, InjectionKey, ExtractPropTypes } from 'vue'; +import { defineComponent, type InjectionKey, type ExtractPropTypes } from 'vue'; import { makeNumericProp, createNamespace } from '../utils'; import { useChildren } from '@vant/use'; diff --git a/packages/vant/src/skeleton/Skeleton.tsx b/packages/vant/src/skeleton/Skeleton.tsx index 98ec88811..0157ea2af 100644 --- a/packages/vant/src/skeleton/Skeleton.tsx +++ b/packages/vant/src/skeleton/Skeleton.tsx @@ -1,4 +1,4 @@ -import { PropType, defineComponent, ExtractPropTypes } from 'vue'; +import { defineComponent, type PropType, type ExtractPropTypes } from 'vue'; import { addUnit, truthProp, diff --git a/packages/vant/src/slider/Slider.tsx b/packages/vant/src/slider/Slider.tsx index 5f2559f23..9ed73eeb1 100644 --- a/packages/vant/src/slider/Slider.tsx +++ b/packages/vant/src/slider/Slider.tsx @@ -1,10 +1,10 @@ import { ref, computed, - PropType, - CSSProperties, defineComponent, - ExtractPropTypes, + type PropType, + type CSSProperties, + type ExtractPropTypes, } from 'vue'; // Utils diff --git a/packages/vant/src/stepper/Stepper.tsx b/packages/vant/src/stepper/Stepper.tsx index e62389f6f..b6336edb4 100644 --- a/packages/vant/src/stepper/Stepper.tsx +++ b/packages/vant/src/stepper/Stepper.tsx @@ -2,10 +2,10 @@ import { ref, watch, computed, - PropType, nextTick, defineComponent, - ExtractPropTypes, + type PropType, + type ExtractPropTypes, } from 'vue'; // Utils diff --git a/packages/vant/src/steps/Steps.tsx b/packages/vant/src/steps/Steps.tsx index c31ba93a1..26ff208be 100644 --- a/packages/vant/src/steps/Steps.tsx +++ b/packages/vant/src/steps/Steps.tsx @@ -1,4 +1,4 @@ -import { defineComponent, ExtractPropTypes, InjectionKey } from 'vue'; +import { defineComponent, type ExtractPropTypes, type InjectionKey } from 'vue'; import { makeStringProp, makeNumericProp, createNamespace } from '../utils'; import { useChildren } from '@vant/use'; diff --git a/packages/vant/src/sticky/Sticky.tsx b/packages/vant/src/sticky/Sticky.tsx index 118262d3a..73901d285 100644 --- a/packages/vant/src/sticky/Sticky.tsx +++ b/packages/vant/src/sticky/Sticky.tsx @@ -2,11 +2,11 @@ import { ref, watch, computed, - PropType, reactive, - CSSProperties, defineComponent, - ExtractPropTypes, + type PropType, + type CSSProperties, + type ExtractPropTypes, } from 'vue'; // Utils diff --git a/packages/vant/src/submit-bar/SubmitBar.tsx b/packages/vant/src/submit-bar/SubmitBar.tsx index fc80bb467..6d85d9bb6 100644 --- a/packages/vant/src/submit-bar/SubmitBar.tsx +++ b/packages/vant/src/submit-bar/SubmitBar.tsx @@ -1,4 +1,4 @@ -import { PropType, defineComponent, ExtractPropTypes } from 'vue'; +import { defineComponent, type PropType, type ExtractPropTypes } from 'vue'; import { truthProp, makeStringProp, diff --git a/packages/vant/src/swipe-cell/SwipeCell.tsx b/packages/vant/src/swipe-cell/SwipeCell.tsx index 61174a534..668b10776 100644 --- a/packages/vant/src/swipe-cell/SwipeCell.tsx +++ b/packages/vant/src/swipe-cell/SwipeCell.tsx @@ -3,9 +3,9 @@ import { Ref, reactive, computed, - PropType, defineComponent, - ExtractPropTypes, + type PropType, + type ExtractPropTypes, } from 'vue'; // Utils diff --git a/packages/vant/src/swipe-item/SwipeItem.tsx b/packages/vant/src/swipe-item/SwipeItem.tsx index 9bb26e51a..c93a6f551 100644 --- a/packages/vant/src/swipe-item/SwipeItem.tsx +++ b/packages/vant/src/swipe-item/SwipeItem.tsx @@ -3,8 +3,8 @@ import { nextTick, reactive, onMounted, - CSSProperties, defineComponent, + type CSSProperties, } from 'vue'; // Utils diff --git a/packages/vant/src/swipe/Swipe.tsx b/packages/vant/src/swipe/Swipe.tsx index 564fd277a..87400c217 100644 --- a/packages/vant/src/swipe/Swipe.tsx +++ b/packages/vant/src/swipe/Swipe.tsx @@ -5,12 +5,12 @@ import { computed, onMounted, onActivated, - InjectionKey, - CSSProperties, onDeactivated, onBeforeUnmount, defineComponent, - ExtractPropTypes, + type InjectionKey, + type CSSProperties, + type ExtractPropTypes, } from 'vue'; // Utils diff --git a/packages/vant/src/switch/Switch.tsx b/packages/vant/src/switch/Switch.tsx index 18798f8aa..bfc337f80 100644 --- a/packages/vant/src/switch/Switch.tsx +++ b/packages/vant/src/switch/Switch.tsx @@ -1,4 +1,4 @@ -import { defineComponent, ExtractPropTypes } from 'vue'; +import { defineComponent, type ExtractPropTypes } from 'vue'; import { addUnit, numericProp, unknownProp, createNamespace } from '../utils'; import { useCustomFieldValue } from '@vant/use'; import { Loading } from '../loading'; diff --git a/packages/vant/src/tab/Tab.tsx b/packages/vant/src/tab/Tab.tsx index c7623f025..908a9e5f0 100644 --- a/packages/vant/src/tab/Tab.tsx +++ b/packages/vant/src/tab/Tab.tsx @@ -4,10 +4,10 @@ import { provide, computed, nextTick, - PropType, - CSSProperties, defineComponent, - ExtractPropTypes, + type PropType, + type CSSProperties, + type ExtractPropTypes, } from 'vue'; // Utils diff --git a/packages/vant/src/tabbar-item/TabbarItem.tsx b/packages/vant/src/tabbar-item/TabbarItem.tsx index 26a225ed0..4fc41da39 100644 --- a/packages/vant/src/tabbar-item/TabbarItem.tsx +++ b/packages/vant/src/tabbar-item/TabbarItem.tsx @@ -1,8 +1,8 @@ import { computed, defineComponent, - ExtractPropTypes, getCurrentInstance, + type ExtractPropTypes, } from 'vue'; // Utils diff --git a/packages/vant/src/tabbar/Tabbar.tsx b/packages/vant/src/tabbar/Tabbar.tsx index 29e6d5020..aae7cae8c 100644 --- a/packages/vant/src/tabbar/Tabbar.tsx +++ b/packages/vant/src/tabbar/Tabbar.tsx @@ -1,9 +1,9 @@ import { ref, - PropType, - InjectionKey, defineComponent, - ExtractPropTypes, + type PropType, + type InjectionKey, + type ExtractPropTypes, } from 'vue'; // Utils diff --git a/packages/vant/src/tabs/Tabs.tsx b/packages/vant/src/tabs/Tabs.tsx index 4d53ec615..ec7c68339 100644 --- a/packages/vant/src/tabs/Tabs.tsx +++ b/packages/vant/src/tabs/Tabs.tsx @@ -4,14 +4,14 @@ import { computed, reactive, nextTick, - PropType, onActivated, - InjectionKey, - CSSProperties, defineComponent, - ExtractPropTypes, getCurrentInstance, - ComponentPublicInstance, + type PropType, + type InjectionKey, + type CSSProperties, + type ExtractPropTypes, + type ComponentPublicInstance, } from 'vue'; // Utils @@ -31,8 +31,8 @@ import { createNamespace, makeNumericProp, setRootScrollTop, - ComponentInstance, BORDER_TOP_BOTTOM, + type ComponentInstance, } from '../utils'; import { scrollLeftTo, scrollTopTo } from './utils'; diff --git a/packages/vant/src/tabs/TabsTitle.tsx b/packages/vant/src/tabs/TabsTitle.tsx index 8a3c2bc7e..72f9215cc 100644 --- a/packages/vant/src/tabs/TabsTitle.tsx +++ b/packages/vant/src/tabs/TabsTitle.tsx @@ -1,4 +1,4 @@ -import { computed, CSSProperties, defineComponent } from 'vue'; +import { computed, defineComponent, type CSSProperties } from 'vue'; import { isDef, truthProp, numericProp, createNamespace } from '../utils'; import { Badge } from '../badge'; diff --git a/packages/vant/src/tag/Tag.tsx b/packages/vant/src/tag/Tag.tsx index 5fcd94344..ccf655809 100644 --- a/packages/vant/src/tag/Tag.tsx +++ b/packages/vant/src/tag/Tag.tsx @@ -1,9 +1,9 @@ import { - PropType, Transition, - CSSProperties, defineComponent, - ExtractPropTypes, + type PropType, + type CSSProperties, + type ExtractPropTypes, } from 'vue'; import { truthProp, makeStringProp, createNamespace } from '../utils'; import { Icon } from '../icon'; diff --git a/packages/vant/src/toast/Toast.tsx b/packages/vant/src/toast/Toast.tsx index 154ddd98b..920b9e50c 100644 --- a/packages/vant/src/toast/Toast.tsx +++ b/packages/vant/src/toast/Toast.tsx @@ -1,11 +1,11 @@ import { watch, - PropType, onMounted, onUnmounted, - CSSProperties, defineComponent, - ExtractPropTypes, + type PropType, + type CSSProperties, + type ExtractPropTypes, } from 'vue'; // Utils diff --git a/packages/vant/src/toast/function-call.tsx b/packages/vant/src/toast/function-call.tsx index b4998958d..f23787d18 100644 --- a/packages/vant/src/toast/function-call.tsx +++ b/packages/vant/src/toast/function-call.tsx @@ -1,10 +1,10 @@ -import { ref, App, getCurrentInstance, watch } from 'vue'; +import { ref, watch, getCurrentInstance, type App } from 'vue'; import { extend, isObject, inBrowser, withInstall, - ComponentInstance, + type ComponentInstance, } from '../utils'; import { mountComponent, usePopupState } from '../utils/mount-component'; import VanToast from './Toast'; diff --git a/packages/vant/src/tree-select/TreeSelect.tsx b/packages/vant/src/tree-select/TreeSelect.tsx index cf9e9f250..0aef98b05 100644 --- a/packages/vant/src/tree-select/TreeSelect.tsx +++ b/packages/vant/src/tree-select/TreeSelect.tsx @@ -1,4 +1,4 @@ -import { PropType, defineComponent, ExtractPropTypes } from 'vue'; +import { defineComponent, type PropType, type ExtractPropTypes } from 'vue'; // Utils import { diff --git a/packages/vant/src/uploader/Uploader.tsx b/packages/vant/src/uploader/Uploader.tsx index 1f5884c4e..4dbab14e4 100644 --- a/packages/vant/src/uploader/Uploader.tsx +++ b/packages/vant/src/uploader/Uploader.tsx @@ -1,10 +1,10 @@ import { ref, reactive, - PropType, defineComponent, - ExtractPropTypes, onBeforeUnmount, + type PropType, + type ExtractPropTypes, } from 'vue'; // Utils @@ -19,7 +19,7 @@ import { makeArrayProp, makeStringProp, makeNumericProp, - ComponentInstance, + type ComponentInstance, } from '../utils'; import { bem, @@ -37,7 +37,7 @@ import { useExpose } from '../composables/use-expose'; // Components import { Icon } from '../icon'; -import { ImagePreview, ImagePreviewOptions } from '../image-preview'; +import { ImagePreview, type ImagePreviewOptions } from '../image-preview'; import UploaderPreviewItem from './UploaderPreviewItem'; // Types diff --git a/packages/vant/src/uploader/UploaderPreviewItem.tsx b/packages/vant/src/uploader/UploaderPreviewItem.tsx index 0c5fe5692..15061d112 100644 --- a/packages/vant/src/uploader/UploaderPreviewItem.tsx +++ b/packages/vant/src/uploader/UploaderPreviewItem.tsx @@ -1,4 +1,4 @@ -import { PropType, defineComponent } from 'vue'; +import { defineComponent, type PropType } from 'vue'; // Utils import { t, bem, isImageFile } from './utils';