@vtj/ui 0.6.25 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/dist/index.cjs +7 -0
- package/dist/index.iife.js +7 -0
- package/dist/index.mjs +4165 -0
- package/dist/index.umd.js +7 -0
- package/dist/style.css +1 -0
- package/package.json +23 -21
- package/types/components/action/Action.d.ts +23 -22
- package/types/components/action/Trigger.d.ts +15 -14
- package/types/components/action/hooks.d.ts +7 -6
- package/types/components/action/types.d.ts +14 -10
- package/types/components/action-bar/ActionBar.d.ts +41 -40
- package/types/components/action-bar/types.d.ts +10 -11
- package/types/components/chart/Chart.d.ts +4 -4
- package/types/components/chart/types.d.ts +3 -3
- package/types/components/chart/useChart.d.ts +5 -5
- package/types/components/container/Container.d.ts +7 -7
- package/types/components/container/types.d.ts +3 -3
- package/types/components/data-item/DataItem.d.ts +23 -22
- package/types/components/data-item/types.d.ts +3 -3
- package/types/components/dialog/Dialog.d.ts +9 -9
- package/types/components/dialog/create.d.ts +2 -2
- package/types/components/dialog/hooks.d.ts +5 -5
- package/types/components/dialog/types.d.ts +4 -4
- package/types/components/dialog-form/DialogForm.d.ts +3 -3
- package/types/components/dialog-form/types.d.ts +3 -3
- package/types/components/field/Field.d.ts +17 -4
- package/types/components/field/editors/CheckboxEditor.d.ts +6 -3
- package/types/components/field/editors/RadioEditor.d.ts +6 -3
- package/types/components/field/editors/SelectEditor.d.ts +6 -3
- package/types/components/field/hooks/useEditor.d.ts +3 -3
- package/types/components/field/types.d.ts +16 -4
- package/types/components/form/Form.d.ts +13 -3
- package/types/components/form/types.d.ts +10 -2
- package/types/components/header/Header.d.ts +2 -2
- package/types/components/header/types.d.ts +4 -3
- package/types/components/icon/Icon.d.ts +2 -2
- package/types/components/index.d.ts +2 -2
- package/types/components/list/List.d.ts +109 -0
- package/types/components/list/index.d.ts +3 -0
- package/types/components/list/types.d.ts +58 -0
- package/types/components/mask/Mask.d.ts +23 -22
- package/types/components/mask/components/Avatar.d.ts +2 -2
- package/types/components/mask/components/Brand.d.ts +5 -2
- package/types/components/mask/components/Content.d.ts +3 -3
- package/types/components/mask/components/Menu.d.ts +6 -3
- package/types/components/mask/components/Sidebar.d.ts +2 -2
- package/types/components/mask/components/SwitchBar.d.ts +5 -2
- package/types/components/mask/components/Tabs.d.ts +4 -4
- package/types/components/mask/components/ThemeSwitch.d.ts +2 -2
- package/types/components/mask/components/Toolbar.d.ts +7 -4
- package/types/components/mask/defineTab.d.ts +1 -1
- package/types/components/mask/hooks/useContent.d.ts +2 -2
- package/types/components/mask/hooks/useHome.d.ts +1 -1
- package/types/components/mask/hooks/useMenus.d.ts +3 -3
- package/types/components/mask/hooks/useSidebar.d.ts +1 -2
- package/types/components/mask/hooks/useTabs.d.ts +4 -4
- package/types/components/mask/types.d.ts +3 -3
- package/types/components/menu/Menu.d.ts +6 -3
- package/types/components/menu/MenuItem.d.ts +3 -3
- package/types/components/menu/types.d.ts +2 -2
- package/types/components/panel/Panel.d.ts +6 -24
- package/types/components/panel/types.d.ts +9 -11
- package/types/components/shared.d.ts +2 -1
- package/types/components/tabs/Tabs.d.ts +3 -3
- package/types/components/tabs/types.d.ts +3 -3
- package/types/components/test/Test.d.ts +244 -0
- package/types/components/test/index.d.ts +3 -0
- package/types/components/test/types.d.ts +41 -0
- package/types/directives/vDraggable.d.ts +2 -2
- package/types/directives/vResizable.d.ts +2 -2
- package/types/hooks/index.d.ts +1 -0
- package/types/hooks/useDisabled.d.ts +1 -1
- package/types/hooks/useIcon.d.ts +3 -3
- package/types/index.d.ts +1 -4
- package/types/install.d.ts +4 -0
- package/types/list.d.ts +1 -1
- package/types/utils/util.d.ts +1 -3
- package/types/version.d.ts +8 -1
- package/cdn/index.js +0 -1
- package/cdn/style.css +0 -1
- package/lib/index.js +0 -3830
- package/lib/style.css +0 -1
- package/types/components/simple-mask/SimpleMask.d.ts +0 -43
- package/types/components/simple-mask/index.d.ts +0 -2
- package/types/components/startup/Startup.d.ts +0 -38
- package/types/components/startup/index.d.ts +0 -2
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { DefineComponent, ComponentOptionsMixin,
|
|
2
|
-
import { MenuProps, MenuDataItem } from './types';
|
|
1
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
|
|
2
|
+
import type { MenuProps, MenuDataItem } from './types';
|
|
3
3
|
declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<MenuProps>, {
|
|
4
4
|
data: () => never[];
|
|
5
5
|
subMenuProps: () => {};
|
|
6
6
|
}>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
7
7
|
select: (item: MenuDataItem) => void;
|
|
8
|
-
}, string,
|
|
8
|
+
}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<MenuProps>, {
|
|
9
9
|
data: () => never[];
|
|
10
10
|
subMenuProps: () => {};
|
|
11
11
|
}>>> & {
|
|
@@ -28,3 +28,6 @@ type __VLS_WithDefaults<P, D> = {
|
|
|
28
28
|
default: D[K];
|
|
29
29
|
}> : P[K];
|
|
30
30
|
};
|
|
31
|
+
type __VLS_Prettify<T> = {
|
|
32
|
+
[K in keyof T]: T[K];
|
|
33
|
+
} & {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { MenuDataItem, SubMenuProps } from './types';
|
|
2
|
-
import { ComponentOptionsMixin,
|
|
1
|
+
import type { MenuDataItem, SubMenuProps } from './types';
|
|
2
|
+
import { ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType, type DefineComponent } from 'vue';
|
|
3
3
|
export interface Props {
|
|
4
4
|
item: MenuDataItem;
|
|
5
5
|
subMenu?: SubMenuProps;
|
|
6
6
|
defaultIcon?: DefineComponent<any, any, any, any>;
|
|
7
7
|
}
|
|
8
|
-
declare const _default: DefineComponent<__VLS_TypePropsToRuntimeProps<Props>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string,
|
|
8
|
+
declare const _default: DefineComponent<__VLS_TypePropsToRuntimeProps<Props>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>>, {}, {}>;
|
|
9
9
|
export default _default;
|
|
10
10
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
11
11
|
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SubMenuProps as ElSubMenuProps, BadgeProps } from 'element-plus';
|
|
2
|
-
import { DefineComponent } from 'vue';
|
|
1
|
+
import type { SubMenuProps as ElSubMenuProps, BadgeProps } from 'element-plus';
|
|
2
|
+
import type { DefineComponent } from 'vue';
|
|
3
3
|
export interface MenuDataItem {
|
|
4
4
|
id: string | number;
|
|
5
5
|
title?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IconParam, ContainerDirection, ContainerWrap, ContainerJustifyContent, ContainerAlignItems, ContainerAlignContent } from '../';
|
|
2
2
|
import { BaseSize } from '../shared';
|
|
3
|
-
import { DefineComponent, PropType, ExtractPropTypes, Ref, ComponentOptionsMixin,
|
|
3
|
+
import { DefineComponent, PropType, ExtractPropTypes, Ref, ComponentOptionsMixin, PublicProps } from 'vue';
|
|
4
4
|
declare const _default: __VLS_WithTemplateSlots<DefineComponent<{
|
|
5
5
|
fit: {
|
|
6
6
|
type: BooleanConstructor;
|
|
@@ -53,14 +53,6 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<{
|
|
|
53
53
|
};
|
|
54
54
|
}>>> | null>;
|
|
55
55
|
};
|
|
56
|
-
bodyPadding: {
|
|
57
|
-
type: BooleanConstructor;
|
|
58
|
-
default: boolean;
|
|
59
|
-
};
|
|
60
|
-
footerPadding: {
|
|
61
|
-
type: BooleanConstructor;
|
|
62
|
-
default: boolean;
|
|
63
|
-
};
|
|
64
56
|
body: {
|
|
65
57
|
type: PropType<Readonly<Partial<ExtractPropTypes<{
|
|
66
58
|
tag: {
|
|
@@ -113,7 +105,7 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<{
|
|
|
113
105
|
default: boolean;
|
|
114
106
|
};
|
|
115
107
|
alignSelf: {
|
|
116
|
-
type: PropType<"auto"
|
|
108
|
+
type: PropType<ContainerAlignItems | "auto">;
|
|
117
109
|
default: string;
|
|
118
110
|
};
|
|
119
111
|
overflow: {
|
|
@@ -183,7 +175,7 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<{
|
|
|
183
175
|
default: boolean;
|
|
184
176
|
};
|
|
185
177
|
alignSelf: {
|
|
186
|
-
type: PropType<"auto"
|
|
178
|
+
type: PropType<ContainerAlignItems | "auto">;
|
|
187
179
|
default: string;
|
|
188
180
|
};
|
|
189
181
|
overflow: {
|
|
@@ -203,7 +195,7 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<{
|
|
|
203
195
|
};
|
|
204
196
|
}, {
|
|
205
197
|
bodyRef: Ref<any>;
|
|
206
|
-
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string,
|
|
198
|
+
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<{
|
|
207
199
|
fit: {
|
|
208
200
|
type: BooleanConstructor;
|
|
209
201
|
default: boolean;
|
|
@@ -255,14 +247,6 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<{
|
|
|
255
247
|
};
|
|
256
248
|
}>>> | null>;
|
|
257
249
|
};
|
|
258
|
-
bodyPadding: {
|
|
259
|
-
type: BooleanConstructor;
|
|
260
|
-
default: boolean;
|
|
261
|
-
};
|
|
262
|
-
footerPadding: {
|
|
263
|
-
type: BooleanConstructor;
|
|
264
|
-
default: boolean;
|
|
265
|
-
};
|
|
266
250
|
body: {
|
|
267
251
|
type: PropType<Readonly<Partial<ExtractPropTypes<{
|
|
268
252
|
tag: {
|
|
@@ -315,7 +299,7 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<{
|
|
|
315
299
|
default: boolean;
|
|
316
300
|
};
|
|
317
301
|
alignSelf: {
|
|
318
|
-
type: PropType<"auto"
|
|
302
|
+
type: PropType<ContainerAlignItems | "auto">;
|
|
319
303
|
default: string;
|
|
320
304
|
};
|
|
321
305
|
overflow: {
|
|
@@ -385,7 +369,7 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<{
|
|
|
385
369
|
default: boolean;
|
|
386
370
|
};
|
|
387
371
|
alignSelf: {
|
|
388
|
-
type: PropType<"auto"
|
|
372
|
+
type: PropType<ContainerAlignItems | "auto">;
|
|
389
373
|
default: string;
|
|
390
374
|
};
|
|
391
375
|
overflow: {
|
|
@@ -408,8 +392,6 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<{
|
|
|
408
392
|
fit: boolean;
|
|
409
393
|
border: boolean;
|
|
410
394
|
card: boolean;
|
|
411
|
-
bodyPadding: boolean;
|
|
412
|
-
footerPadding: boolean;
|
|
413
395
|
}, {}>, {
|
|
414
396
|
header?(_: {}): any;
|
|
415
397
|
title?(_: {}): any;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IconParam, ContainerDirection, ContainerWrap, ContainerJustifyContent, ContainerAlignItems, ContainerAlignContent } from '../';
|
|
2
2
|
import { ExtractPropTypes, PropType } from 'vue';
|
|
3
|
-
import { ComponentPropsType, BaseSize } from '../shared';
|
|
3
|
+
import type { ComponentPropsType, BaseSize } from '../shared';
|
|
4
4
|
export declare const panelProps: {
|
|
5
5
|
/**
|
|
6
6
|
* 宽高自适应
|
|
@@ -83,16 +83,11 @@ export declare const panelProps: {
|
|
|
83
83
|
};
|
|
84
84
|
}>>> | null>;
|
|
85
85
|
};
|
|
86
|
-
bodyPadding: {
|
|
87
|
-
type: BooleanConstructor;
|
|
88
|
-
default: boolean;
|
|
89
|
-
};
|
|
90
|
-
footerPadding: {
|
|
91
|
-
type: BooleanConstructor;
|
|
92
|
-
default: boolean;
|
|
93
|
-
};
|
|
94
86
|
body: {
|
|
95
87
|
type: PropType<Readonly<Partial<ExtractPropTypes<{
|
|
88
|
+
/**
|
|
89
|
+
* 阴影设置
|
|
90
|
+
*/
|
|
96
91
|
tag: {
|
|
97
92
|
type: StringConstructor;
|
|
98
93
|
default: string;
|
|
@@ -143,7 +138,7 @@ export declare const panelProps: {
|
|
|
143
138
|
default: boolean;
|
|
144
139
|
};
|
|
145
140
|
alignSelf: {
|
|
146
|
-
type: PropType<"auto"
|
|
141
|
+
type: PropType<ContainerAlignItems | "auto">;
|
|
147
142
|
default: string;
|
|
148
143
|
};
|
|
149
144
|
overflow: {
|
|
@@ -163,6 +158,9 @@ export declare const panelProps: {
|
|
|
163
158
|
};
|
|
164
159
|
footer: {
|
|
165
160
|
type: PropType<Readonly<Partial<ExtractPropTypes<{
|
|
161
|
+
/**
|
|
162
|
+
* 阴影设置
|
|
163
|
+
*/
|
|
166
164
|
tag: {
|
|
167
165
|
type: StringConstructor;
|
|
168
166
|
default: string;
|
|
@@ -213,7 +211,7 @@ export declare const panelProps: {
|
|
|
213
211
|
default: boolean;
|
|
214
212
|
};
|
|
215
213
|
alignSelf: {
|
|
216
|
-
type: PropType<"auto"
|
|
214
|
+
type: PropType<ContainerAlignItems | "auto">;
|
|
217
215
|
default: string;
|
|
218
216
|
};
|
|
219
217
|
overflow: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExtractPropTypes } from 'vue';
|
|
1
|
+
import type { ExtractPropTypes } from 'vue';
|
|
2
2
|
import type { MenuProps } from './menu';
|
|
3
3
|
export interface MaskProject {
|
|
4
4
|
id?: string;
|
|
@@ -24,3 +24,4 @@ export type RecordToUnion<T extends Record<string, any>> = T[keyof T];
|
|
|
24
24
|
export type Emits<T extends Record<string, any>> = UnionToIntersection<RecordToUnion<{
|
|
25
25
|
[K in keyof T]: (evt: K, ...args: T[K]) => void;
|
|
26
26
|
}>>;
|
|
27
|
+
export type DataLoader<T = any, P = any> = T | ((params?: P) => T | Promise<T>);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IconParam } from '..';
|
|
2
|
-
import { DefineComponent, PropType, ComponentOptionsMixin,
|
|
3
|
-
import { TabsItem } from './types';
|
|
2
|
+
import { DefineComponent, PropType, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
|
|
3
|
+
import { type TabsItem } from './types';
|
|
4
4
|
declare const _default: __VLS_WithTemplateSlots<DefineComponent<{
|
|
5
5
|
items: {
|
|
6
6
|
type: PropType<TabsItem[]>;
|
|
@@ -9,7 +9,7 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<{
|
|
|
9
9
|
border: {
|
|
10
10
|
type: BooleanConstructor;
|
|
11
11
|
};
|
|
12
|
-
}, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string,
|
|
12
|
+
}, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<{
|
|
13
13
|
items: {
|
|
14
14
|
type: PropType<TabsItem[]>;
|
|
15
15
|
default(): never[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { PropType } from 'vue';
|
|
2
|
-
import { ComponentPropsType } from '../shared';
|
|
3
|
-
import { IconParam } from '../';
|
|
1
|
+
import type { PropType } from 'vue';
|
|
2
|
+
import type { ComponentPropsType } from '../shared';
|
|
3
|
+
import type { IconParam } from '../';
|
|
4
4
|
export interface TabsItem {
|
|
5
5
|
label: string;
|
|
6
6
|
name: string | number;
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
import { DefineComponent, Ref, ComponentOptionsMixin, ExtractPropTypes, PublicProps } from 'vue';
|
|
2
|
+
declare const _default: __VLS_WithTemplateSlots<DefineComponent<{
|
|
3
|
+
stringProp: {
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
};
|
|
6
|
+
booleanProp: {
|
|
7
|
+
type: BooleanConstructor;
|
|
8
|
+
};
|
|
9
|
+
numberProp: {
|
|
10
|
+
type: NumberConstructor;
|
|
11
|
+
};
|
|
12
|
+
selectProp: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
};
|
|
15
|
+
objectProp: {
|
|
16
|
+
type: ObjectConstructor;
|
|
17
|
+
};
|
|
18
|
+
arrayProp: {
|
|
19
|
+
type: ArrayConstructor;
|
|
20
|
+
};
|
|
21
|
+
iconProp: {
|
|
22
|
+
type: StringConstructor;
|
|
23
|
+
};
|
|
24
|
+
colorProp: {
|
|
25
|
+
type: StringConstructor;
|
|
26
|
+
};
|
|
27
|
+
modelValue: {
|
|
28
|
+
type: StringConstructor;
|
|
29
|
+
};
|
|
30
|
+
syncProp: {
|
|
31
|
+
type: StringConstructor;
|
|
32
|
+
};
|
|
33
|
+
}, {
|
|
34
|
+
click: () => void;
|
|
35
|
+
submit: () => void;
|
|
36
|
+
data: Ref<any>;
|
|
37
|
+
change: (params: any) => void;
|
|
38
|
+
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
39
|
+
click: (props: Readonly<Partial<ExtractPropTypes<{
|
|
40
|
+
stringProp: {
|
|
41
|
+
type: StringConstructor;
|
|
42
|
+
};
|
|
43
|
+
booleanProp: {
|
|
44
|
+
type: BooleanConstructor;
|
|
45
|
+
};
|
|
46
|
+
numberProp: {
|
|
47
|
+
type: NumberConstructor;
|
|
48
|
+
};
|
|
49
|
+
selectProp: {
|
|
50
|
+
type: StringConstructor;
|
|
51
|
+
};
|
|
52
|
+
objectProp: {
|
|
53
|
+
type: ObjectConstructor;
|
|
54
|
+
};
|
|
55
|
+
arrayProp: {
|
|
56
|
+
type: ArrayConstructor;
|
|
57
|
+
};
|
|
58
|
+
iconProp: {
|
|
59
|
+
type: StringConstructor;
|
|
60
|
+
};
|
|
61
|
+
colorProp: {
|
|
62
|
+
type: StringConstructor;
|
|
63
|
+
};
|
|
64
|
+
modelValue: {
|
|
65
|
+
type: StringConstructor;
|
|
66
|
+
};
|
|
67
|
+
syncProp: {
|
|
68
|
+
type: StringConstructor;
|
|
69
|
+
};
|
|
70
|
+
}>>>) => void;
|
|
71
|
+
submit: (props: Readonly<Partial<ExtractPropTypes<{
|
|
72
|
+
stringProp: {
|
|
73
|
+
type: StringConstructor;
|
|
74
|
+
};
|
|
75
|
+
booleanProp: {
|
|
76
|
+
type: BooleanConstructor;
|
|
77
|
+
};
|
|
78
|
+
numberProp: {
|
|
79
|
+
type: NumberConstructor;
|
|
80
|
+
};
|
|
81
|
+
selectProp: {
|
|
82
|
+
type: StringConstructor;
|
|
83
|
+
};
|
|
84
|
+
objectProp: {
|
|
85
|
+
type: ObjectConstructor;
|
|
86
|
+
};
|
|
87
|
+
arrayProp: {
|
|
88
|
+
type: ArrayConstructor;
|
|
89
|
+
};
|
|
90
|
+
iconProp: {
|
|
91
|
+
type: StringConstructor;
|
|
92
|
+
};
|
|
93
|
+
colorProp: {
|
|
94
|
+
type: StringConstructor;
|
|
95
|
+
};
|
|
96
|
+
modelValue: {
|
|
97
|
+
type: StringConstructor;
|
|
98
|
+
};
|
|
99
|
+
syncProp: {
|
|
100
|
+
type: StringConstructor;
|
|
101
|
+
};
|
|
102
|
+
}>>>) => void;
|
|
103
|
+
change: (data: any) => void;
|
|
104
|
+
"update:modelValue": (value?: string | undefined) => void;
|
|
105
|
+
"update:syncProp": (value?: string | undefined) => void;
|
|
106
|
+
}, string, PublicProps, Readonly<ExtractPropTypes<{
|
|
107
|
+
stringProp: {
|
|
108
|
+
type: StringConstructor;
|
|
109
|
+
};
|
|
110
|
+
booleanProp: {
|
|
111
|
+
type: BooleanConstructor;
|
|
112
|
+
};
|
|
113
|
+
numberProp: {
|
|
114
|
+
type: NumberConstructor;
|
|
115
|
+
};
|
|
116
|
+
selectProp: {
|
|
117
|
+
type: StringConstructor;
|
|
118
|
+
};
|
|
119
|
+
objectProp: {
|
|
120
|
+
type: ObjectConstructor;
|
|
121
|
+
};
|
|
122
|
+
arrayProp: {
|
|
123
|
+
type: ArrayConstructor;
|
|
124
|
+
};
|
|
125
|
+
iconProp: {
|
|
126
|
+
type: StringConstructor;
|
|
127
|
+
};
|
|
128
|
+
colorProp: {
|
|
129
|
+
type: StringConstructor;
|
|
130
|
+
};
|
|
131
|
+
modelValue: {
|
|
132
|
+
type: StringConstructor;
|
|
133
|
+
};
|
|
134
|
+
syncProp: {
|
|
135
|
+
type: StringConstructor;
|
|
136
|
+
};
|
|
137
|
+
}>> & {
|
|
138
|
+
onChange?: ((data: any) => any) | undefined;
|
|
139
|
+
onSubmit?: ((props: Readonly<Partial<ExtractPropTypes<{
|
|
140
|
+
stringProp: {
|
|
141
|
+
type: StringConstructor;
|
|
142
|
+
};
|
|
143
|
+
booleanProp: {
|
|
144
|
+
type: BooleanConstructor;
|
|
145
|
+
};
|
|
146
|
+
numberProp: {
|
|
147
|
+
type: NumberConstructor;
|
|
148
|
+
};
|
|
149
|
+
selectProp: {
|
|
150
|
+
type: StringConstructor;
|
|
151
|
+
};
|
|
152
|
+
objectProp: {
|
|
153
|
+
type: ObjectConstructor;
|
|
154
|
+
};
|
|
155
|
+
arrayProp: {
|
|
156
|
+
type: ArrayConstructor;
|
|
157
|
+
};
|
|
158
|
+
iconProp: {
|
|
159
|
+
type: StringConstructor;
|
|
160
|
+
};
|
|
161
|
+
colorProp: {
|
|
162
|
+
type: StringConstructor;
|
|
163
|
+
};
|
|
164
|
+
modelValue: {
|
|
165
|
+
type: StringConstructor;
|
|
166
|
+
};
|
|
167
|
+
syncProp: {
|
|
168
|
+
type: StringConstructor;
|
|
169
|
+
};
|
|
170
|
+
}>>>) => any) | undefined;
|
|
171
|
+
onClick?: ((props: Readonly<Partial<ExtractPropTypes<{
|
|
172
|
+
stringProp: {
|
|
173
|
+
type: StringConstructor;
|
|
174
|
+
};
|
|
175
|
+
booleanProp: {
|
|
176
|
+
type: BooleanConstructor;
|
|
177
|
+
};
|
|
178
|
+
numberProp: {
|
|
179
|
+
type: NumberConstructor;
|
|
180
|
+
};
|
|
181
|
+
selectProp: {
|
|
182
|
+
type: StringConstructor;
|
|
183
|
+
};
|
|
184
|
+
objectProp: {
|
|
185
|
+
type: ObjectConstructor;
|
|
186
|
+
};
|
|
187
|
+
arrayProp: {
|
|
188
|
+
type: ArrayConstructor;
|
|
189
|
+
};
|
|
190
|
+
iconProp: {
|
|
191
|
+
type: StringConstructor;
|
|
192
|
+
};
|
|
193
|
+
colorProp: {
|
|
194
|
+
type: StringConstructor;
|
|
195
|
+
};
|
|
196
|
+
modelValue: {
|
|
197
|
+
type: StringConstructor;
|
|
198
|
+
};
|
|
199
|
+
syncProp: {
|
|
200
|
+
type: StringConstructor;
|
|
201
|
+
};
|
|
202
|
+
}>>>) => any) | undefined;
|
|
203
|
+
"onUpdate:modelValue"?: ((value?: string | undefined) => any) | undefined;
|
|
204
|
+
"onUpdate:syncProp"?: ((value?: string | undefined) => any) | undefined;
|
|
205
|
+
}, {
|
|
206
|
+
booleanProp: boolean;
|
|
207
|
+
}, {}>, {
|
|
208
|
+
default?(_: {
|
|
209
|
+
props: {
|
|
210
|
+
readonly booleanProp: boolean;
|
|
211
|
+
readonly modelValue?: string | undefined;
|
|
212
|
+
readonly stringProp?: string | undefined;
|
|
213
|
+
readonly numberProp?: number | undefined;
|
|
214
|
+
readonly selectProp?: string | undefined;
|
|
215
|
+
readonly objectProp?: Record<string, any> | undefined;
|
|
216
|
+
readonly arrayProp?: unknown[] | undefined;
|
|
217
|
+
readonly iconProp?: string | undefined;
|
|
218
|
+
readonly colorProp?: string | undefined;
|
|
219
|
+
readonly syncProp?: string | undefined;
|
|
220
|
+
};
|
|
221
|
+
data: any;
|
|
222
|
+
}): any;
|
|
223
|
+
extra?(_: {
|
|
224
|
+
props: {
|
|
225
|
+
readonly booleanProp: boolean;
|
|
226
|
+
readonly modelValue?: string | undefined;
|
|
227
|
+
readonly stringProp?: string | undefined;
|
|
228
|
+
readonly numberProp?: number | undefined;
|
|
229
|
+
readonly selectProp?: string | undefined;
|
|
230
|
+
readonly objectProp?: Record<string, any> | undefined;
|
|
231
|
+
readonly arrayProp?: unknown[] | undefined;
|
|
232
|
+
readonly iconProp?: string | undefined;
|
|
233
|
+
readonly colorProp?: string | undefined;
|
|
234
|
+
readonly syncProp?: string | undefined;
|
|
235
|
+
};
|
|
236
|
+
data: any;
|
|
237
|
+
}): any;
|
|
238
|
+
}>;
|
|
239
|
+
export default _default;
|
|
240
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
241
|
+
new (): {
|
|
242
|
+
$slots: S;
|
|
243
|
+
};
|
|
244
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { ComponentPropsType } from '../shared';
|
|
2
|
+
export declare const testProps: {
|
|
3
|
+
stringProp: {
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
};
|
|
6
|
+
booleanProp: {
|
|
7
|
+
type: BooleanConstructor;
|
|
8
|
+
};
|
|
9
|
+
numberProp: {
|
|
10
|
+
type: NumberConstructor;
|
|
11
|
+
};
|
|
12
|
+
selectProp: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
};
|
|
15
|
+
objectProp: {
|
|
16
|
+
type: ObjectConstructor;
|
|
17
|
+
};
|
|
18
|
+
arrayProp: {
|
|
19
|
+
type: ArrayConstructor;
|
|
20
|
+
};
|
|
21
|
+
iconProp: {
|
|
22
|
+
type: StringConstructor;
|
|
23
|
+
};
|
|
24
|
+
colorProp: {
|
|
25
|
+
type: StringConstructor;
|
|
26
|
+
};
|
|
27
|
+
modelValue: {
|
|
28
|
+
type: StringConstructor;
|
|
29
|
+
};
|
|
30
|
+
syncProp: {
|
|
31
|
+
type: StringConstructor;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
export type TestProps = ComponentPropsType<typeof testProps>;
|
|
35
|
+
export type TestEmits = {
|
|
36
|
+
click: [props: TestProps];
|
|
37
|
+
submit: [props: TestProps];
|
|
38
|
+
change: [data: any];
|
|
39
|
+
'update:modelValue': [value?: string];
|
|
40
|
+
'update:syncProp': [value?: string];
|
|
41
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Directive, MaybeRef } from 'vue';
|
|
2
|
-
import { UseDraggableOptions } from '@vueuse/core';
|
|
1
|
+
import { type Directive, type MaybeRef } from 'vue';
|
|
2
|
+
import { type UseDraggableOptions } from '@vueuse/core';
|
|
3
3
|
declare global {
|
|
4
4
|
interface HTMLElement {
|
|
5
5
|
__draggable__?: Draggable | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Directive, Ref } from 'vue';
|
|
2
|
-
import { useMouseInElement, Fn } from '@vueuse/core';
|
|
1
|
+
import { type Directive, type Ref } from 'vue';
|
|
2
|
+
import { useMouseInElement, type Fn } from '@vueuse/core';
|
|
3
3
|
declare global {
|
|
4
4
|
interface HTMLElement {
|
|
5
5
|
__resizable__?: Resizable | null;
|
package/types/hooks/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ComputedRef, MaybeRef } from 'vue';
|
|
1
|
+
import { ComputedRef, type MaybeRef } from 'vue';
|
|
2
2
|
export type IUseDisabled = MaybeRef<undefined | boolean | ((...args: any[]) => boolean)>;
|
|
3
3
|
export declare function useDisabled(disabled: IUseDisabled, params?: any): ComputedRef<boolean>;
|
package/types/hooks/useIcon.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { IconParam, IconProps } from '../components';
|
|
1
|
+
import { type ComputedRef, type MaybeRef } from 'vue';
|
|
2
|
+
import { type IconParam, type IconProps } from '../components';
|
|
3
3
|
export declare function useIconProps(iconRef: MaybeRef<IconParam | undefined>): ComputedRef<IconProps | null>;
|
|
4
|
-
export declare function useIcon(icon: MaybeRef<IconParam | undefined>):
|
|
4
|
+
export declare function useIcon(icon: MaybeRef<IconParam | undefined>): Record<string, any> | undefined;
|
package/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
export { version as VTJ_UI_VERSION } from './version';
|
|
2
2
|
import components from './list';
|
|
3
3
|
export { components };
|
|
4
4
|
export * from './components';
|
|
@@ -6,6 +6,3 @@ export * from './directives';
|
|
|
6
6
|
export * from './hooks';
|
|
7
7
|
export * from './utils';
|
|
8
8
|
export * from './constants';
|
|
9
|
-
export * from './version';
|
|
10
|
-
export declare const install: (app: App<any>) => void;
|
|
11
|
-
export default install;
|
package/types/list.d.ts
CHANGED
package/types/utils/util.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
export declare function getSizeValue(value: string | number): string;
|
|
2
2
|
export declare function parseSize(size: string | number | undefined, max: number): number;
|
|
3
|
-
export declare function
|
|
4
|
-
export declare function pick<T extends Record<string, any>, K extends Record<string, any>>(target: T, keys: string[]): K;
|
|
5
|
-
export declare const NOOP: () => void;
|
|
3
|
+
export declare function toObjectProps<T extends Record<string, any>>(value?: boolean | T, defaultValue?: T): T;
|
package/types/version.d.ts
CHANGED
|
@@ -1 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
/**!
|
|
2
|
+
* Copyright (c) 2024, VTJ.PRO All rights reserved.
|
|
3
|
+
* @name @vtj/ui
|
|
4
|
+
* @author CHC chenhuachun1549@dingtalk.com
|
|
5
|
+
* @version 0.7.0
|
|
6
|
+
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
7
|
+
*/
|
|
8
|
+
export declare const version = "0.7.0";
|