straw-ui-vue 0.1.6 → 0.1.7

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.
@@ -4,8 +4,8 @@ export declare const StButton: import("@/utils/with-install.ts").SFCWithInstall<
4
4
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
5
5
  click: (event: MouseEvent) => any;
6
6
  }, import("vue").PublicProps, {
7
- type: import("./types.d.ts").ButtonType;
8
7
  variant: import("./types.d.ts").ButtonVariant;
8
+ type: import("./types.d.ts").ButtonType;
9
9
  disabled: boolean;
10
10
  loading: boolean;
11
11
  }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
@@ -18,8 +18,8 @@ export declare const StButton: import("@/utils/with-install.ts").SFCWithInstall<
18
18
  }, Readonly<import("./types.d.ts").ButtonProps> & Readonly<{
19
19
  onClick?: (event: MouseEvent) => any;
20
20
  }>, {}, {}, {}, {}, {
21
- type: import("./types.d.ts").ButtonType;
22
21
  variant: import("./types.d.ts").ButtonVariant;
22
+ type: import("./types.d.ts").ButtonType;
23
23
  disabled: boolean;
24
24
  loading: boolean;
25
25
  }>;
@@ -31,8 +31,8 @@ export declare const StButton: import("@/utils/with-install.ts").SFCWithInstall<
31
31
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
32
32
  click: (event: MouseEvent) => any;
33
33
  }, string, {
34
- type: import("./types.d.ts").ButtonType;
35
34
  variant: import("./types.d.ts").ButtonVariant;
35
+ type: import("./types.d.ts").ButtonType;
36
36
  disabled: boolean;
37
37
  loading: boolean;
38
38
  }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
@@ -5,8 +5,8 @@ declare const __VLS_base: import("vue").DefineComponent<ButtonProps, {}, {}, {},
5
5
  }, string, import("vue").PublicProps, Readonly<ButtonProps> & Readonly<{
6
6
  onClick?: (event: MouseEvent) => any;
7
7
  }>, {
8
- type: ButtonType;
9
8
  variant: ButtonVariant;
9
+ type: ButtonType;
10
10
  disabled: boolean;
11
11
  loading: boolean;
12
12
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -5,8 +5,8 @@ export declare const StTag: import("@/utils/with-install.ts").SFCWithInstall<{
5
5
  close: (event: MouseEvent) => any;
6
6
  }, import("vue").PublicProps, {
7
7
  color: string;
8
- type: import("./types.d.ts").TagType;
9
8
  variant: import("./types.d.ts").TagVariant;
9
+ type: import("./types.d.ts").TagType;
10
10
  disabled: boolean;
11
11
  closable: boolean;
12
12
  closeIconClass: commonClass;
@@ -22,8 +22,8 @@ export declare const StTag: import("@/utils/with-install.ts").SFCWithInstall<{
22
22
  onClose?: (event: MouseEvent) => any;
23
23
  }>, {}, {}, {}, {}, {
24
24
  color: string;
25
- type: import("./types.d.ts").TagType;
26
25
  variant: import("./types.d.ts").TagVariant;
26
+ type: import("./types.d.ts").TagType;
27
27
  disabled: boolean;
28
28
  closable: boolean;
29
29
  closeIconClass: commonClass;
@@ -38,8 +38,8 @@ export declare const StTag: import("@/utils/with-install.ts").SFCWithInstall<{
38
38
  close: (event: MouseEvent) => any;
39
39
  }, string, {
40
40
  color: string;
41
- type: import("./types.d.ts").TagType;
42
41
  variant: import("./types.d.ts").TagVariant;
42
+ type: import("./types.d.ts").TagType;
43
43
  disabled: boolean;
44
44
  closable: boolean;
45
45
  closeIconClass: commonClass;
@@ -11,8 +11,8 @@ declare const __VLS_base: import("vue").DefineComponent<TagProps, {}, {}, {}, {}
11
11
  onClose?: (event: MouseEvent) => any;
12
12
  }>, {
13
13
  color: string;
14
- type: TagType;
15
14
  variant: TagVariant;
15
+ type: TagType;
16
16
  disabled: boolean;
17
17
  closable: boolean;
18
18
  closeIconClass: commonClass;
@@ -2,12 +2,16 @@
2
2
  * 全局组件类型声明
3
3
  * 由 global-components-plugin 自动生成,请勿手动修改
4
4
  *
5
- * 此文件为 Vue 组件提供精确的类型提示,包括:
6
- * - Props: 组件属性类型
7
- * - Emits: 组件事件类型
8
- * - Slots: 组件插槽类型
5
+ * 使用 DefineComponent 的正确泛型参数顺序:
6
+ * - 第1个参数:Props 类型
7
+ * - 第2-7个参数:默认值 {}
8
+ * - 第8个参数:Emits 类型
9
+ * - 第9个参数:string(默认)
10
+ * - 第10个参数:PublicProps(从 Vue 导入)
11
+ * - 第11-12个参数:{}(让 TypeScript 自动推断)
12
+ * - 第13个参数:Slots 类型
9
13
  */
10
- import type { DefineComponent, EmitsOptions, SlotsType } from 'vue';
14
+ import type { DefineComponent, PublicProps, EmitsOptions, SlotsType } from 'vue';
11
15
  import type { ButtonEmits, ButtonProps, ButtonSlots } from './components/st-button/types.d.ts';
12
16
  import type { CascadePanelEmits, CascadePanelProps } from './components/st-cascade/types.d.ts';
13
17
  import type { CheckboxEmits, CheckboxProps, CheckboxSlots } from './components/st-checkbox/types.d.ts';
@@ -56,91 +60,91 @@ import type { TooltipContentProps, TooltipEmits, TooltipProps, TooltipTriggerPro
56
60
 
57
61
  declare module 'vue' {
58
62
  export interface GlobalComponents {
59
- StButton: DefineComponent<ButtonProps, {}, {}, {}, {}, {}, {}, ButtonEmits, string, {}, {}, {}, ButtonSlots>;
60
- StCascade: DefineComponent<{}, {}, {}, {}, {}, {}, {}, EmitsOptions, string, {}, {}, {}, SlotsType>;
61
- StCascadePanel: DefineComponent<CascadePanelProps, {}, {}, {}, {}, {}, {}, CascadePanelEmits, string, {}, {}, {}, SlotsType>;
62
- StCheckbox: DefineComponent<CheckboxProps, {}, {}, {}, {}, {}, {}, CheckboxEmits, string, {}, {}, {}, CheckboxSlots>;
63
- StCheckboxGroup: DefineComponent<CheckboxGroupProps, {}, {}, {}, {}, {}, {}, CheckboxGroupEmits, string, {}, {}, {}, CheckboxGroupSlots>;
64
- StColorPicker: DefineComponent<{}, {}, {}, {}, {}, {}, {}, EmitsOptions, string, {}, {}, {}, SlotsType>;
65
- StColorPickerPanel: DefineComponent<{}, {}, {}, {}, {}, {}, {}, EmitsOptions, string, {}, {}, {}, SlotsType>;
66
- StDatePicker: DefineComponent<{}, {}, {}, {}, {}, {}, {}, EmitsOptions, string, {}, {}, {}, SlotsType>;
67
- StDatePickerPanel: DefineComponent<DatePickerPanelProps, {}, {}, {}, {}, {}, {}, DatePickerPanelEmits, string, {}, {}, {}, SlotsType>;
68
- StDateTimePicker: DefineComponent<{}, {}, {}, {}, {}, {}, {}, EmitsOptions, string, {}, {}, {}, SlotsType>;
69
- StDateTimePickerPanel: DefineComponent<DateTimePickerPanelProps, {}, {}, {}, {}, {}, {}, DateTimePickerPanelEmits, string, {}, {}, {}, SlotsType>;
70
- StDialog: DefineComponent<DialogProps, {}, {}, {}, {}, {}, {}, DialogEmits, string, {}, {}, {}, DialogSlots>;
71
- StDialogBody: DefineComponent<DialogBodyProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, {}, {}, {}, SlotsType>;
72
- StDialogClose: DefineComponent<DialogCloseProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, {}, {}, {}, SlotsType>;
73
- StDialogContainer: DefineComponent<{}, {}, {}, {}, {}, {}, {}, EmitsOptions, string, {}, {}, {}, SlotsType>;
74
- StDialogContent: DefineComponent<DialogContentProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, {}, {}, {}, SlotsType>;
75
- StDialogFooter: DefineComponent<DialogFooterProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, {}, {}, {}, SlotsType>;
76
- StDialogFullscreen: DefineComponent<DialogFullscreenProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, {}, {}, {}, SlotsType>;
77
- StDialogHeader: DefineComponent<DialogHeaderProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, {}, {}, {}, SlotsType>;
78
- StDialogOverlay: DefineComponent<DialogOverlayProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, {}, {}, {}, SlotsType>;
79
- StDialogTitle: DefineComponent<DialogTitleProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, {}, {}, {}, SlotsType>;
80
- StDivider: DefineComponent<DividerProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, {}, {}, {}, DividerSlots>;
81
- StDrawer: DefineComponent<DrawerProps, {}, {}, {}, {}, {}, {}, DrawerEmits, string, {}, {}, {}, DrawerSlots>;
82
- StEmpty: DefineComponent<EmptyProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, {}, {}, {}, EmptySlots>;
83
- StFormControl: DefineComponent<FormControlProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, {}, {}, {}, FormControlSlots>;
84
- StFormDescription: DefineComponent<FormDescriptionProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, {}, {}, {}, FormDescriptionSlots>;
85
- StFormField: DefineComponent<FormFieldProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, {}, {}, {}, FormFieldSlots>;
86
- StFormItem: DefineComponent<FormItemProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, {}, {}, {}, FormItemSlots>;
87
- StFormLabel: DefineComponent<FormLabelProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, {}, {}, {}, FormLabelSlots>;
88
- StFormMessage: DefineComponent<FormMessageProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, {}, {}, {}, FormMessageSlots>;
89
- StImage: DefineComponent<ImageProps, {}, {}, {}, {}, {}, {}, ImageEmits, string, {}, {}, {}, ImageSlots>;
90
- StInput: DefineComponent<InputProps, {}, {}, {}, {}, {}, {}, InputEmits, string, {}, {}, {}, InputSlots>;
91
- StInputGroup: DefineComponent<InputGroupProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, {}, {}, {}, InputGroupSlots>;
92
- StInputGroupAddon: DefineComponent<InputGroupAddonProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, {}, {}, {}, InputGroupAddonSlots>;
93
- StInputGroupButton: DefineComponent<InputGroupButtonProps, {}, {}, {}, {}, {}, {}, InputGroupButtonEmits, string, {}, {}, {}, InputGroupButtonSlots>;
94
- StInputGroupInput: DefineComponent<InputGroupInputProps, {}, {}, {}, {}, {}, {}, InputGroupInputEmits, string, {}, {}, {}, SlotsType>;
95
- StInputGroupText: DefineComponent<InputGroupTextProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, {}, {}, {}, InputGroupTextSlots>;
96
- StInputGroupTextarea: DefineComponent<InputGroupTextareaProps, {}, {}, {}, {}, {}, {}, InputGroupTextareaEmits, string, {}, {}, {}, SlotsType>;
97
- StInputNumber: DefineComponent<InputNumberProps, {}, {}, {}, {}, {}, {}, InputNumberEmits, string, {}, {}, {}, SlotsType>;
98
- StLabel: DefineComponent<LabelProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, {}, {}, {}, LabelSlots>;
99
- StMenu: DefineComponent<MenuProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, {}, {}, {}, SlotsType>;
100
- StMenuContainer: DefineComponent<{}, {}, {}, {}, {}, {}, {}, EmitsOptions, string, {}, {}, {}, SlotsType>;
101
- StMenuContent: DefineComponent<MenuContentProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, {}, {}, {}, SlotsType>;
102
- StMenuDivider: DefineComponent<MenuDividerProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, {}, {}, {}, SlotsType>;
103
- StMenuGroup: DefineComponent<MenuGroupProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, {}, {}, {}, MenuGroupSlots>;
104
- StMenuItem: DefineComponent<MenuItemProps, {}, {}, {}, {}, {}, {}, MenuItemEmits, string, {}, {}, {}, MenuItemSlots>;
105
- StMenuNode: DefineComponent<MenuNodeProps, {}, {}, {}, {}, {}, {}, MenuNodeEmits, string, {}, {}, {}, MenuNodeSlots>;
106
- StMenuTrigger: DefineComponent<MenuTriggerProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, {}, {}, {}, SlotsType>;
107
- StPagination: DefineComponent<PaginationProps, {}, {}, {}, {}, {}, {}, PaginationEmits, string, {}, {}, {}, PaginationSlots>;
108
- StPopover: DefineComponent<PopoverProps, {}, {}, {}, {}, {}, {}, PopoverEmits, string, {}, {}, {}, SlotsType>;
109
- StPopoverArrow: DefineComponent<PopoverArrowProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, {}, {}, {}, SlotsType>;
110
- StPopoverContainer: DefineComponent<{}, {}, {}, {}, {}, {}, {}, EmitsOptions, string, {}, {}, {}, SlotsType>;
111
- StPopoverContent: DefineComponent<PopoverContentProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, {}, {}, {}, SlotsType>;
112
- StPopoverTrigger: DefineComponent<PopoverTriggerProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, {}, {}, {}, SlotsType>;
113
- StProgress: DefineComponent<ProgressProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, {}, {}, {}, ProgressSlots>;
114
- StRadio: DefineComponent<RadioProps, {}, {}, {}, {}, {}, {}, RadioEmits, string, {}, {}, {}, RadioSlots>;
115
- StRadioGroup: DefineComponent<RadioGroupProps, {}, {}, {}, {}, {}, {}, RadioGroupEmits, string, {}, {}, {}, RadioGroupSlots>;
116
- StScrollbar: DefineComponent<ScrollbarProps, {}, {}, {}, {}, {}, {}, ScrollbarEmits, string, {}, {}, {}, ScrollbarSlots>;
117
- StSegmented: DefineComponent<SegmentedProps, {}, {}, {}, {}, {}, {}, SegmentedEmits, string, {}, {}, {}, SegmentedSlots>;
118
- StSelect: DefineComponent<SelectProps, {}, {}, {}, {}, {}, {}, SelectEmits, string, {}, {}, {}, SlotsType>;
119
- StSelectContainer: DefineComponent<{}, {}, {}, {}, {}, {}, {}, EmitsOptions, string, {}, {}, {}, SlotsType>;
120
- StSelectContent: DefineComponent<SelectContentProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, {}, {}, {}, SlotsType>;
121
- StSelectEmpty: DefineComponent<SelectEmptyProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, {}, {}, {}, SlotsType>;
122
- StSelectGroup: DefineComponent<SelectGroupProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, {}, {}, {}, SlotsType>;
123
- StSelectItem: DefineComponent<SelectItemProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, {}, {}, {}, SlotsType>;
124
- StSelectTrigger: DefineComponent<SelectTriggerProps, {}, {}, {}, {}, {}, {}, SelectTriggerEmits, string, {}, {}, {}, SlotsType>;
125
- StSidebar: DefineComponent<{}, {}, {}, {}, {}, {}, {}, EmitsOptions, string, {}, {}, {}, SlotsType>;
126
- StSidebarItem: DefineComponent<{}, {}, {}, {}, {}, {}, {}, EmitsOptions, string, {}, {}, {}, SlotsType>;
127
- StSkeleton: DefineComponent<SkeletonProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, {}, {}, {}, SkeletonSlots>;
128
- StSkeletonItem: DefineComponent<SkeletonItemProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, {}, {}, {}, SkeletonItemSlots>;
129
- StSlider: DefineComponent<SliderProps, {}, {}, {}, {}, {}, {}, SliderEmits, string, {}, {}, {}, SliderSlots>;
130
- StSplitter: DefineComponent<SplitterProps, {}, {}, {}, {}, {}, {}, SplitterEmits, string, {}, {}, {}, SplitterSlots>;
131
- StSplitterPanel: DefineComponent<SplitterPanelProps, {}, {}, {}, {}, {}, {}, SplitterPanelEmits, string, {}, {}, {}, SplitterPanelSlots>;
132
- StSwitch: DefineComponent<SwitchProps, {}, {}, {}, {}, {}, {}, SwitchEmits, string, {}, {}, {}, SwitchSlots>;
133
- StTabs: DefineComponent<TabsProps, {}, {}, {}, {}, {}, {}, TabsEmits, string, {}, {}, {}, TabsSlots>;
134
- StTabsPane: DefineComponent<TabsPaneProps, {}, {}, {}, {}, {}, {}, TabsPaneEmits, string, {}, {}, {}, TabsPaneSlots>;
135
- StTag: DefineComponent<TagProps, {}, {}, {}, {}, {}, {}, TagEmits, string, {}, {}, {}, TagSlots>;
136
- StTimePicker: DefineComponent<{}, {}, {}, {}, {}, {}, {}, EmitsOptions, string, {}, {}, {}, SlotsType>;
137
- StTimePickerPanel: DefineComponent<TimePickerPanelProps, {}, {}, {}, {}, {}, {}, TimePickerPanelEmits, string, {}, {}, {}, SlotsType>;
138
- StToggle: DefineComponent<ToggleProps, {}, {}, {}, {}, {}, {}, ToggleEmits, string, {}, {}, {}, ToggleSlots>;
139
- StTooltip: DefineComponent<TooltipProps, {}, {}, {}, {}, {}, {}, TooltipEmits, string, {}, {}, {}, SlotsType>;
140
- StTooltipContainer: DefineComponent<{}, {}, {}, {}, {}, {}, {}, EmitsOptions, string, {}, {}, {}, SlotsType>;
141
- StTooltipContent: DefineComponent<TooltipContentProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, {}, {}, {}, SlotsType>;
142
- StTooltipTrigger: DefineComponent<TooltipTriggerProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, {}, {}, {}, SlotsType>;
143
- StTree: DefineComponent<{}, {}, {}, {}, {}, {}, {}, EmitsOptions, string, {}, {}, {}, SlotsType>;
63
+ StButton: DefineComponent<ButtonProps, {}, {}, {}, {}, {}, {}, ButtonEmits, string, PublicProps, ButtonProps, {}, ButtonSlots>;
64
+ StCascade: DefineComponent<{}, {}, {}, {}, {}, {}, {}, EmitsOptions, string, PublicProps, {}, {}, SlotsType>;
65
+ StCascadePanel: DefineComponent<CascadePanelProps, {}, {}, {}, {}, {}, {}, CascadePanelEmits, string, PublicProps, CascadePanelProps, {}, SlotsType>;
66
+ StCheckbox: DefineComponent<CheckboxProps, {}, {}, {}, {}, {}, {}, CheckboxEmits, string, PublicProps, CheckboxProps, {}, CheckboxSlots>;
67
+ StCheckboxGroup: DefineComponent<CheckboxGroupProps, {}, {}, {}, {}, {}, {}, CheckboxGroupEmits, string, PublicProps, CheckboxGroupProps, {}, CheckboxGroupSlots>;
68
+ StColorPicker: DefineComponent<{}, {}, {}, {}, {}, {}, {}, EmitsOptions, string, PublicProps, {}, {}, SlotsType>;
69
+ StColorPickerPanel: DefineComponent<{}, {}, {}, {}, {}, {}, {}, EmitsOptions, string, PublicProps, {}, {}, SlotsType>;
70
+ StDatePicker: DefineComponent<{}, {}, {}, {}, {}, {}, {}, EmitsOptions, string, PublicProps, {}, {}, SlotsType>;
71
+ StDatePickerPanel: DefineComponent<DatePickerPanelProps, {}, {}, {}, {}, {}, {}, DatePickerPanelEmits, string, PublicProps, DatePickerPanelProps, {}, SlotsType>;
72
+ StDateTimePicker: DefineComponent<{}, {}, {}, {}, {}, {}, {}, EmitsOptions, string, PublicProps, {}, {}, SlotsType>;
73
+ StDateTimePickerPanel: DefineComponent<DateTimePickerPanelProps, {}, {}, {}, {}, {}, {}, DateTimePickerPanelEmits, string, PublicProps, DateTimePickerPanelProps, {}, SlotsType>;
74
+ StDialog: DefineComponent<DialogProps, {}, {}, {}, {}, {}, {}, DialogEmits, string, PublicProps, DialogProps, {}, DialogSlots>;
75
+ StDialogBody: DefineComponent<DialogBodyProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, PublicProps, DialogBodyProps, {}, SlotsType>;
76
+ StDialogClose: DefineComponent<DialogCloseProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, PublicProps, DialogCloseProps, {}, SlotsType>;
77
+ StDialogContainer: DefineComponent<{}, {}, {}, {}, {}, {}, {}, EmitsOptions, string, PublicProps, {}, {}, SlotsType>;
78
+ StDialogContent: DefineComponent<DialogContentProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, PublicProps, DialogContentProps, {}, SlotsType>;
79
+ StDialogFooter: DefineComponent<DialogFooterProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, PublicProps, DialogFooterProps, {}, SlotsType>;
80
+ StDialogFullscreen: DefineComponent<DialogFullscreenProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, PublicProps, DialogFullscreenProps, {}, SlotsType>;
81
+ StDialogHeader: DefineComponent<DialogHeaderProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, PublicProps, DialogHeaderProps, {}, SlotsType>;
82
+ StDialogOverlay: DefineComponent<DialogOverlayProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, PublicProps, DialogOverlayProps, {}, SlotsType>;
83
+ StDialogTitle: DefineComponent<DialogTitleProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, PublicProps, DialogTitleProps, {}, SlotsType>;
84
+ StDivider: DefineComponent<DividerProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, PublicProps, DividerProps, {}, DividerSlots>;
85
+ StDrawer: DefineComponent<DrawerProps, {}, {}, {}, {}, {}, {}, DrawerEmits, string, PublicProps, DrawerProps, {}, DrawerSlots>;
86
+ StEmpty: DefineComponent<EmptyProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, PublicProps, EmptyProps, {}, EmptySlots>;
87
+ StFormControl: DefineComponent<FormControlProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, PublicProps, FormControlProps, {}, FormControlSlots>;
88
+ StFormDescription: DefineComponent<FormDescriptionProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, PublicProps, FormDescriptionProps, {}, FormDescriptionSlots>;
89
+ StFormField: DefineComponent<FormFieldProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, PublicProps, FormFieldProps, {}, FormFieldSlots>;
90
+ StFormItem: DefineComponent<FormItemProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, PublicProps, FormItemProps, {}, FormItemSlots>;
91
+ StFormLabel: DefineComponent<FormLabelProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, PublicProps, FormLabelProps, {}, FormLabelSlots>;
92
+ StFormMessage: DefineComponent<FormMessageProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, PublicProps, FormMessageProps, {}, FormMessageSlots>;
93
+ StImage: DefineComponent<ImageProps, {}, {}, {}, {}, {}, {}, ImageEmits, string, PublicProps, ImageProps, {}, ImageSlots>;
94
+ StInput: DefineComponent<InputProps, {}, {}, {}, {}, {}, {}, InputEmits, string, PublicProps, InputProps, {}, InputSlots>;
95
+ StInputGroup: DefineComponent<InputGroupProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, PublicProps, InputGroupProps, {}, InputGroupSlots>;
96
+ StInputGroupAddon: DefineComponent<InputGroupAddonProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, PublicProps, InputGroupAddonProps, {}, InputGroupAddonSlots>;
97
+ StInputGroupButton: DefineComponent<InputGroupButtonProps, {}, {}, {}, {}, {}, {}, InputGroupButtonEmits, string, PublicProps, InputGroupButtonProps, {}, InputGroupButtonSlots>;
98
+ StInputGroupInput: DefineComponent<InputGroupInputProps, {}, {}, {}, {}, {}, {}, InputGroupInputEmits, string, PublicProps, InputGroupInputProps, {}, SlotsType>;
99
+ StInputGroupText: DefineComponent<InputGroupTextProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, PublicProps, InputGroupTextProps, {}, InputGroupTextSlots>;
100
+ StInputGroupTextarea: DefineComponent<InputGroupTextareaProps, {}, {}, {}, {}, {}, {}, InputGroupTextareaEmits, string, PublicProps, InputGroupTextareaProps, {}, SlotsType>;
101
+ StInputNumber: DefineComponent<InputNumberProps, {}, {}, {}, {}, {}, {}, InputNumberEmits, string, PublicProps, InputNumberProps, {}, SlotsType>;
102
+ StLabel: DefineComponent<LabelProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, PublicProps, LabelProps, {}, LabelSlots>;
103
+ StMenu: DefineComponent<MenuProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, PublicProps, MenuProps, {}, SlotsType>;
104
+ StMenuContainer: DefineComponent<{}, {}, {}, {}, {}, {}, {}, EmitsOptions, string, PublicProps, {}, {}, SlotsType>;
105
+ StMenuContent: DefineComponent<MenuContentProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, PublicProps, MenuContentProps, {}, SlotsType>;
106
+ StMenuDivider: DefineComponent<MenuDividerProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, PublicProps, MenuDividerProps, {}, SlotsType>;
107
+ StMenuGroup: DefineComponent<MenuGroupProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, PublicProps, MenuGroupProps, {}, MenuGroupSlots>;
108
+ StMenuItem: DefineComponent<MenuItemProps, {}, {}, {}, {}, {}, {}, MenuItemEmits, string, PublicProps, MenuItemProps, {}, MenuItemSlots>;
109
+ StMenuNode: DefineComponent<MenuNodeProps, {}, {}, {}, {}, {}, {}, MenuNodeEmits, string, PublicProps, MenuNodeProps, {}, MenuNodeSlots>;
110
+ StMenuTrigger: DefineComponent<MenuTriggerProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, PublicProps, MenuTriggerProps, {}, SlotsType>;
111
+ StPagination: DefineComponent<PaginationProps, {}, {}, {}, {}, {}, {}, PaginationEmits, string, PublicProps, PaginationProps, {}, PaginationSlots>;
112
+ StPopover: DefineComponent<PopoverProps, {}, {}, {}, {}, {}, {}, PopoverEmits, string, PublicProps, PopoverProps, {}, SlotsType>;
113
+ StPopoverArrow: DefineComponent<PopoverArrowProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, PublicProps, PopoverArrowProps, {}, SlotsType>;
114
+ StPopoverContainer: DefineComponent<{}, {}, {}, {}, {}, {}, {}, EmitsOptions, string, PublicProps, {}, {}, SlotsType>;
115
+ StPopoverContent: DefineComponent<PopoverContentProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, PublicProps, PopoverContentProps, {}, SlotsType>;
116
+ StPopoverTrigger: DefineComponent<PopoverTriggerProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, PublicProps, PopoverTriggerProps, {}, SlotsType>;
117
+ StProgress: DefineComponent<ProgressProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, PublicProps, ProgressProps, {}, ProgressSlots>;
118
+ StRadio: DefineComponent<RadioProps, {}, {}, {}, {}, {}, {}, RadioEmits, string, PublicProps, RadioProps, {}, RadioSlots>;
119
+ StRadioGroup: DefineComponent<RadioGroupProps, {}, {}, {}, {}, {}, {}, RadioGroupEmits, string, PublicProps, RadioGroupProps, {}, RadioGroupSlots>;
120
+ StScrollbar: DefineComponent<ScrollbarProps, {}, {}, {}, {}, {}, {}, ScrollbarEmits, string, PublicProps, ScrollbarProps, {}, ScrollbarSlots>;
121
+ StSegmented: DefineComponent<SegmentedProps, {}, {}, {}, {}, {}, {}, SegmentedEmits, string, PublicProps, SegmentedProps, {}, SegmentedSlots>;
122
+ StSelect: DefineComponent<SelectProps, {}, {}, {}, {}, {}, {}, SelectEmits, string, PublicProps, SelectProps, {}, SlotsType>;
123
+ StSelectContainer: DefineComponent<{}, {}, {}, {}, {}, {}, {}, EmitsOptions, string, PublicProps, {}, {}, SlotsType>;
124
+ StSelectContent: DefineComponent<SelectContentProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, PublicProps, SelectContentProps, {}, SlotsType>;
125
+ StSelectEmpty: DefineComponent<SelectEmptyProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, PublicProps, SelectEmptyProps, {}, SlotsType>;
126
+ StSelectGroup: DefineComponent<SelectGroupProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, PublicProps, SelectGroupProps, {}, SlotsType>;
127
+ StSelectItem: DefineComponent<SelectItemProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, PublicProps, SelectItemProps, {}, SlotsType>;
128
+ StSelectTrigger: DefineComponent<SelectTriggerProps, {}, {}, {}, {}, {}, {}, SelectTriggerEmits, string, PublicProps, SelectTriggerProps, {}, SlotsType>;
129
+ StSidebar: DefineComponent<{}, {}, {}, {}, {}, {}, {}, EmitsOptions, string, PublicProps, {}, {}, SlotsType>;
130
+ StSidebarItem: DefineComponent<{}, {}, {}, {}, {}, {}, {}, EmitsOptions, string, PublicProps, {}, {}, SlotsType>;
131
+ StSkeleton: DefineComponent<SkeletonProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, PublicProps, SkeletonProps, {}, SkeletonSlots>;
132
+ StSkeletonItem: DefineComponent<SkeletonItemProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, PublicProps, SkeletonItemProps, {}, SkeletonItemSlots>;
133
+ StSlider: DefineComponent<SliderProps, {}, {}, {}, {}, {}, {}, SliderEmits, string, PublicProps, SliderProps, {}, SliderSlots>;
134
+ StSplitter: DefineComponent<SplitterProps, {}, {}, {}, {}, {}, {}, SplitterEmits, string, PublicProps, SplitterProps, {}, SplitterSlots>;
135
+ StSplitterPanel: DefineComponent<SplitterPanelProps, {}, {}, {}, {}, {}, {}, SplitterPanelEmits, string, PublicProps, SplitterPanelProps, {}, SplitterPanelSlots>;
136
+ StSwitch: DefineComponent<SwitchProps, {}, {}, {}, {}, {}, {}, SwitchEmits, string, PublicProps, SwitchProps, {}, SwitchSlots>;
137
+ StTabs: DefineComponent<TabsProps, {}, {}, {}, {}, {}, {}, TabsEmits, string, PublicProps, TabsProps, {}, TabsSlots>;
138
+ StTabsPane: DefineComponent<TabsPaneProps, {}, {}, {}, {}, {}, {}, TabsPaneEmits, string, PublicProps, TabsPaneProps, {}, TabsPaneSlots>;
139
+ StTag: DefineComponent<TagProps, {}, {}, {}, {}, {}, {}, TagEmits, string, PublicProps, TagProps, {}, TagSlots>;
140
+ StTimePicker: DefineComponent<{}, {}, {}, {}, {}, {}, {}, EmitsOptions, string, PublicProps, {}, {}, SlotsType>;
141
+ StTimePickerPanel: DefineComponent<TimePickerPanelProps, {}, {}, {}, {}, {}, {}, TimePickerPanelEmits, string, PublicProps, TimePickerPanelProps, {}, SlotsType>;
142
+ StToggle: DefineComponent<ToggleProps, {}, {}, {}, {}, {}, {}, ToggleEmits, string, PublicProps, ToggleProps, {}, ToggleSlots>;
143
+ StTooltip: DefineComponent<TooltipProps, {}, {}, {}, {}, {}, {}, TooltipEmits, string, PublicProps, TooltipProps, {}, SlotsType>;
144
+ StTooltipContainer: DefineComponent<{}, {}, {}, {}, {}, {}, {}, EmitsOptions, string, PublicProps, {}, {}, SlotsType>;
145
+ StTooltipContent: DefineComponent<TooltipContentProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, PublicProps, TooltipContentProps, {}, SlotsType>;
146
+ StTooltipTrigger: DefineComponent<TooltipTriggerProps, {}, {}, {}, {}, {}, {}, EmitsOptions, string, PublicProps, TooltipTriggerProps, {}, SlotsType>;
147
+ StTree: DefineComponent<{}, {}, {}, {}, {}, {}, {}, EmitsOptions, string, PublicProps, {}, {}, SlotsType>;
144
148
  }
145
149
  }
146
150
 
@@ -1 +1 @@
1
- function e(e){let t=e;return t.install=t=>{let n=e.name||e.__name;n&&t.component(n,e)},t}exports.withInstall=e;
1
+ function e(e){let t=e;return t.install=t=>{let n=e.name||e.__name;n&&t.component(n,e)},e.__typeProps&&(t.__typeProps=e.__typeProps),e.__typeEmits&&(t.__typeEmits=e.__typeEmits),e.__typeSlots&&(t.__typeSlots=e.__typeSlots),t}exports.withInstall=e;
@@ -1,35 +1,34 @@
1
- import type { Plugin, DefineComponent, SlotsType, EmitsOptions, ComponentObjectPropsOptions, ExtractPropTypes } from 'vue';
2
- /**
3
- * 从 Vue 组件中提取 Props 类型
4
- * 用于在模板中获得正确的属性提示
5
- */
6
- export type ExtractComponentProps<T> = T extends DefineComponent<infer PropsOrPropOptions, any, any, any, any, any, any, any, any, any, infer Props, any, any> ? Props : T extends {
7
- __typeProps: infer P;
8
- } ? P : T extends {
9
- props: infer P;
10
- } ? P extends ComponentObjectPropsOptions ? Readonly<ExtractPropTypes<P>> : P : {};
11
- /**
12
- * 从 Vue 组件中提取 Emits 类型
13
- * 用于在模板中获得正确的事件提示
14
- */
15
- export type ExtractComponentEmits<T> = T extends DefineComponent<any, any, any, any, any, any, any, infer E extends EmitsOptions, any, any, any, any, any> ? E : T extends {
16
- __typeEmits: infer E;
17
- } ? E : T extends {
18
- emits: infer E;
19
- } ? E extends EmitsOptions ? E : {} : {};
20
- /**
21
- * 从 Vue 组件中提取 Slots 类型
22
- * 用于在模板中获得正确的插槽提示
23
- */
24
- export type ExtractComponentSlots<T> = T extends DefineComponent<any, any, any, any, any, any, any, any, any, any, any, any, infer S extends SlotsType> ? S : T extends {
25
- __typeSlots: infer S;
26
- } ? S : {};
1
+ import type { Plugin, DefineComponent, SlotsType, EmitsOptions } from 'vue';
27
2
  /**
28
3
  * 带安装功能的组件类型
29
- * 保留组件的完整类型信息(Props、Emits、Slots),使 IDE 能正确显示提示
30
- * 使用简单的交叉类型,让 TypeScript 自动推断组件的完整类型
4
+ * 保留组件的完整类型信息(Props、Emits、Slots),使 Volar 能正确显示提示
5
+ *
6
+ * 使用 Vue 3 的 __typeProps、__typeEmits、__typeSlots 属性
7
+ * 这些属性是 Vue 3 为语言工具(如 Volar)专门设计的
31
8
  */
32
- export type SFCWithInstall<T> = T & Plugin;
9
+ export type SFCWithInstall<T> = T & Plugin & {
10
+ /**
11
+ * @private for language-tools use only
12
+ * 用于 Volar 识别 Props 类型
13
+ */
14
+ __typeProps?: T extends DefineComponent<infer P, any, any, any, any, any, any, any, any, any, any, any, any> ? P : T extends {
15
+ __typeProps: infer P;
16
+ } ? P : never;
17
+ /**
18
+ * @private for language-tools use only
19
+ * 用于 Volar 识别 Emits 类型
20
+ */
21
+ __typeEmits?: T extends DefineComponent<any, any, any, any, any, any, any, infer E extends EmitsOptions, any, any, any, any, any> ? E : T extends {
22
+ __typeEmits: infer E;
23
+ } ? E : never;
24
+ /**
25
+ * @private for language-tools use only
26
+ * 用于 Volar 识别 Slots 类型
27
+ */
28
+ __typeSlots?: T extends DefineComponent<any, any, any, any, any, any, any, any, any, any, any, any, infer S extends SlotsType> ? S : T extends {
29
+ __typeSlots: infer S;
30
+ } ? S : never;
31
+ };
33
32
  /**
34
33
  * 为组件添加安装功能
35
34
  * @param comp - Vue 组件
@@ -48,6 +47,27 @@ export declare function withInstallExtra<T, E extends Record<string, any>>(main:
48
47
  * 用于在模板中获得正确的类型提示
49
48
  */
50
49
  export type ExtractComponent<T> = T extends SFCWithInstall<infer C> ? C : T;
50
+ /**
51
+ * 从 Vue 组件中提取 Props 类型
52
+ * 用于在模板中获得正确的属性提示
53
+ */
54
+ export type ExtractComponentProps<T> = T extends DefineComponent<infer PropsOrPropOptions, any, any, any, any, any, any, any, any, any, infer Props, any, any> ? Props : T extends {
55
+ __typeProps: infer P;
56
+ } ? P : {};
57
+ /**
58
+ * 从 Vue 组件中提取 Emits 类型
59
+ * 用于在模板中获得正确的事件提示
60
+ */
61
+ export type ExtractComponentEmits<T> = T extends DefineComponent<any, any, any, any, any, any, any, infer E extends EmitsOptions, any, any, any, any, any> ? E : T extends {
62
+ __typeEmits: infer E;
63
+ } ? E : {};
64
+ /**
65
+ * 从 Vue 组件中提取 Slots 类型
66
+ * 用于在模板中获得正确的插槽提示
67
+ */
68
+ export type ExtractComponentSlots<T> = T extends DefineComponent<any, any, any, any, any, any, any, any, any, any, any, any, infer S extends SlotsType> ? S : T extends {
69
+ __typeSlots: infer S;
70
+ } ? S : {};
51
71
  /**
52
72
  * 组件实例类型
53
73
  * 用于获取组件暴露的方法和属性
@@ -4,7 +4,7 @@ function e(e) {
4
4
  return t.install = (t) => {
5
5
  let n = e.name || e.__name;
6
6
  n && t.component(n, e);
7
- }, t;
7
+ }, e.__typeProps && (t.__typeProps = e.__typeProps), e.__typeEmits && (t.__typeEmits = e.__typeEmits), e.__typeSlots && (t.__typeSlots = e.__typeSlots), t;
8
8
  }
9
9
  //#endregion
10
10
  export { e as withInstall };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "straw-ui-vue",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "A Vue 3 directive library",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",