@ug666/ui-vue 0.1.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/dist/components/accordion.vue.d.ts +108 -0
- package/dist/components/accordion.vue.d.ts.map +1 -0
- package/dist/components/alert.vue.d.ts +41 -0
- package/dist/components/alert.vue.d.ts.map +1 -0
- package/dist/components/avatar-group.vue.d.ts +26 -0
- package/dist/components/avatar-group.vue.d.ts.map +1 -0
- package/dist/components/avatar.vue.d.ts +84 -0
- package/dist/components/avatar.vue.d.ts.map +1 -0
- package/dist/components/badge.vue.d.ts +28 -0
- package/dist/components/badge.vue.d.ts.map +1 -0
- package/dist/components/breadcrumb.vue.d.ts +75 -0
- package/dist/components/breadcrumb.vue.d.ts.map +1 -0
- package/dist/components/button.vue.d.ts +48 -0
- package/dist/components/button.vue.d.ts.map +1 -0
- package/dist/components/card.vue.d.ts +63 -0
- package/dist/components/card.vue.d.ts.map +1 -0
- package/dist/components/checkbox.vue.d.ts +42 -0
- package/dist/components/checkbox.vue.d.ts.map +1 -0
- package/dist/components/context/accordion-context.d.ts +22 -0
- package/dist/components/context/accordion-context.d.ts.map +1 -0
- package/dist/components/context/avatar-context.d.ts +8 -0
- package/dist/components/context/avatar-context.d.ts.map +1 -0
- package/dist/components/context/context-menu-context.d.ts +17 -0
- package/dist/components/context/context-menu-context.d.ts.map +1 -0
- package/dist/components/context/drawer-context.d.ts +13 -0
- package/dist/components/context/drawer-context.d.ts.map +1 -0
- package/dist/components/context/dropdown-context.d.ts +13 -0
- package/dist/components/context/dropdown-context.d.ts.map +1 -0
- package/dist/components/context/form-context.d.ts +11 -0
- package/dist/components/context/form-context.d.ts.map +1 -0
- package/dist/components/context/navigation-menu-context.d.ts +14 -0
- package/dist/components/context/navigation-menu-context.d.ts.map +1 -0
- package/dist/components/context/popover-context.d.ts +17 -0
- package/dist/components/context/popover-context.d.ts.map +1 -0
- package/dist/components/context/radio-context.d.ts +13 -0
- package/dist/components/context/radio-context.d.ts.map +1 -0
- package/dist/components/context/tabs-context.d.ts +9 -0
- package/dist/components/context/tabs-context.d.ts.map +1 -0
- package/dist/components/context/tooltip-context.d.ts +13 -0
- package/dist/components/context/tooltip-context.d.ts.map +1 -0
- package/dist/components/context-menu.vue.d.ts +116 -0
- package/dist/components/context-menu.vue.d.ts.map +1 -0
- package/dist/components/descriptions.vue.d.ts +77 -0
- package/dist/components/descriptions.vue.d.ts.map +1 -0
- package/dist/components/dialog.vue.d.ts +37 -0
- package/dist/components/dialog.vue.d.ts.map +1 -0
- package/dist/components/drawer.vue.d.ts +140 -0
- package/dist/components/drawer.vue.d.ts.map +1 -0
- package/dist/components/dropdown.vue.d.ts +137 -0
- package/dist/components/dropdown.vue.d.ts.map +1 -0
- package/dist/components/empty-state.vue.d.ts +37 -0
- package/dist/components/empty-state.vue.d.ts.map +1 -0
- package/dist/components/form.vue.d.ts +167 -0
- package/dist/components/form.vue.d.ts.map +1 -0
- package/dist/components/input.vue.d.ts +56 -0
- package/dist/components/input.vue.d.ts.map +1 -0
- package/dist/components/label.vue.d.ts +30 -0
- package/dist/components/label.vue.d.ts.map +1 -0
- package/dist/components/modal.vue.d.ts +53 -0
- package/dist/components/modal.vue.d.ts.map +1 -0
- package/dist/components/navigation-menu.vue.d.ts +112 -0
- package/dist/components/navigation-menu.vue.d.ts.map +1 -0
- package/dist/components/number-input.vue.d.ts +38 -0
- package/dist/components/number-input.vue.d.ts.map +1 -0
- package/dist/components/otp-input.vue.d.ts +25 -0
- package/dist/components/otp-input.vue.d.ts.map +1 -0
- package/dist/components/pagination.vue.d.ts +21 -0
- package/dist/components/pagination.vue.d.ts.map +1 -0
- package/dist/components/popover.vue.d.ts +100 -0
- package/dist/components/popover.vue.d.ts.map +1 -0
- package/dist/components/progress.vue.d.ts +20 -0
- package/dist/components/progress.vue.d.ts.map +1 -0
- package/dist/components/radio-group.vue.d.ts +41 -0
- package/dist/components/radio-group.vue.d.ts.map +1 -0
- package/dist/components/radio.vue.d.ts +28 -0
- package/dist/components/radio.vue.d.ts.map +1 -0
- package/dist/components/select.vue.d.ts +57 -0
- package/dist/components/select.vue.d.ts.map +1 -0
- package/dist/components/separator.vue.d.ts +14 -0
- package/dist/components/separator.vue.d.ts.map +1 -0
- package/dist/components/sheet.vue.d.ts +54 -0
- package/dist/components/sheet.vue.d.ts.map +1 -0
- package/dist/components/sidebar.vue.d.ts +40 -0
- package/dist/components/sidebar.vue.d.ts.map +1 -0
- package/dist/components/skeleton.vue.d.ts +13 -0
- package/dist/components/skeleton.vue.d.ts.map +1 -0
- package/dist/components/slider.vue.d.ts +34 -0
- package/dist/components/slider.vue.d.ts.map +1 -0
- package/dist/components/spinner.vue.d.ts +16 -0
- package/dist/components/spinner.vue.d.ts.map +1 -0
- package/dist/components/statistic.vue.d.ts +47 -0
- package/dist/components/statistic.vue.d.ts.map +1 -0
- package/dist/components/steps.vue.d.ts +31 -0
- package/dist/components/steps.vue.d.ts.map +1 -0
- package/dist/components/switch.vue.d.ts +32 -0
- package/dist/components/switch.vue.d.ts.map +1 -0
- package/dist/components/table.vue.d.ts +63 -0
- package/dist/components/table.vue.d.ts.map +1 -0
- package/dist/components/tabs.vue.d.ts +114 -0
- package/dist/components/tabs.vue.d.ts.map +1 -0
- package/dist/components/tag.vue.d.ts +45 -0
- package/dist/components/tag.vue.d.ts.map +1 -0
- package/dist/components/textarea.vue.d.ts +54 -0
- package/dist/components/textarea.vue.d.ts.map +1 -0
- package/dist/components/toast-state.d.ts +29 -0
- package/dist/components/toast-state.d.ts.map +1 -0
- package/dist/components/toast.vue.d.ts +12 -0
- package/dist/components/toast.vue.d.ts.map +1 -0
- package/dist/components/tooltip.vue.d.ts +63 -0
- package/dist/components/tooltip.vue.d.ts.map +1 -0
- package/dist/composables/index.cjs +1 -0
- package/dist/composables/index.d.ts +21 -0
- package/dist/composables/index.d.ts.map +1 -0
- package/dist/composables/index.js +2 -0
- package/dist/composables/use-click-outside.d.ts +17 -0
- package/dist/composables/use-click-outside.d.ts.map +1 -0
- package/dist/composables/use-copy-to-clipboard.d.ts +21 -0
- package/dist/composables/use-copy-to-clipboard.d.ts.map +1 -0
- package/dist/composables/use-debounce.d.ts +17 -0
- package/dist/composables/use-debounce.d.ts.map +1 -0
- package/dist/composables/use-event-listener.d.ts +25 -0
- package/dist/composables/use-event-listener.d.ts.map +1 -0
- package/dist/composables/use-form.d.ts +31 -0
- package/dist/composables/use-form.d.ts.map +1 -0
- package/dist/composables/use-hotkeys.d.ts +27 -0
- package/dist/composables/use-hotkeys.d.ts.map +1 -0
- package/dist/composables/use-interval.d.ts +20 -0
- package/dist/composables/use-interval.d.ts.map +1 -0
- package/dist/composables/use-local-storage.d.ts +17 -0
- package/dist/composables/use-local-storage.d.ts.map +1 -0
- package/dist/composables/use-media-query.d.ts +14 -0
- package/dist/composables/use-media-query.d.ts.map +1 -0
- package/dist/composables/use-mounted.d.ts +19 -0
- package/dist/composables/use-mounted.d.ts.map +1 -0
- package/dist/composables/use-pagination.d.ts +36 -0
- package/dist/composables/use-pagination.d.ts.map +1 -0
- package/dist/composables/use-timeout.d.ts +20 -0
- package/dist/composables/use-timeout.d.ts.map +1 -0
- package/dist/composables/use-toast.d.ts +16 -0
- package/dist/composables/use-toast.d.ts.map +1 -0
- package/dist/composables/use-toggle.d.ts +25 -0
- package/dist/composables/use-toggle.d.ts.map +1 -0
- package/dist/composables-BwdwEG7n.js +296 -0
- package/dist/composables-BwdwEG7n.js.map +1 -0
- package/dist/composables-Cxcf-3ov.cjs +2 -0
- package/dist/composables-Cxcf-3ov.cjs.map +1 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +53 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2941 -0
- package/dist/index.js.map +1 -0
- package/dist/tokens.css +9 -0
- package/package.json +51 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export declare const UTableHeader: import('vue').DefineComponent<{
|
|
2
|
+
class?: string | undefined;
|
|
3
|
+
}, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
4
|
+
[key: string]: any;
|
|
5
|
+
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
|
|
6
|
+
class?: string | undefined;
|
|
7
|
+
}> & Readonly<{}>, {
|
|
8
|
+
class: string;
|
|
9
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
10
|
+
export declare const UTableBody: import('vue').DefineComponent<{
|
|
11
|
+
class?: string | undefined;
|
|
12
|
+
}, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
13
|
+
[key: string]: any;
|
|
14
|
+
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
|
|
15
|
+
class?: string | undefined;
|
|
16
|
+
}> & Readonly<{}>, {
|
|
17
|
+
class: string;
|
|
18
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
19
|
+
export declare const UTableRow: import('vue').DefineComponent<{
|
|
20
|
+
class?: string | undefined;
|
|
21
|
+
}, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
22
|
+
[key: string]: any;
|
|
23
|
+
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
|
|
24
|
+
class?: string | undefined;
|
|
25
|
+
}> & Readonly<{}>, {
|
|
26
|
+
class: string;
|
|
27
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
28
|
+
export declare const UTableHead: import('vue').DefineComponent<{
|
|
29
|
+
class?: string | undefined;
|
|
30
|
+
}, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
31
|
+
[key: string]: any;
|
|
32
|
+
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
|
|
33
|
+
class?: string | undefined;
|
|
34
|
+
}> & Readonly<{}>, {
|
|
35
|
+
class: string;
|
|
36
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
37
|
+
export declare const UTableCell: import('vue').DefineComponent<{
|
|
38
|
+
class?: string | undefined;
|
|
39
|
+
}, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
40
|
+
[key: string]: any;
|
|
41
|
+
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
|
|
42
|
+
class?: string | undefined;
|
|
43
|
+
}> & Readonly<{}>, {
|
|
44
|
+
class: string;
|
|
45
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
46
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
47
|
+
/** table 元素额外 CSS 类名 */
|
|
48
|
+
class?: string;
|
|
49
|
+
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
|
|
50
|
+
/** table 元素额外 CSS 类名 */
|
|
51
|
+
class?: string;
|
|
52
|
+
}> & Readonly<{}>, {
|
|
53
|
+
class: string;
|
|
54
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>, {
|
|
55
|
+
default?(_: {}): any;
|
|
56
|
+
}>;
|
|
57
|
+
export default _default;
|
|
58
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
59
|
+
new (): {
|
|
60
|
+
$slots: S;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=table.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.vue.d.ts","sourceRoot":"","sources":["../../src/components/table.vue"],"names":[],"mappings":"AAKA;AA8FA,eAAO,MAAM,YAAY;YApBf,MAAM;;;;YAAN,MAAM;;;4EAoBgG,CAAA;AAChH,eAAO,MAAM,UAAU;YArBb,MAAM;;;;YAAN,MAAM;;;4EAqBoF,CAAA;AACpG,eAAO,MAAM,SAAS;YAtBZ,MAAM;;;;YAAN,MAAM;;;4EAsBqH,CAAA;AACrI,eAAO,MAAM,UAAU;YAvBb,MAAM;;;;YAAN,MAAM;;;4EAuBqJ,CAAA;AACrK,eAAO,MAAM,UAAU;YAxBb,MAAM;;;;YAAN,MAAM;;;4EAwB6H,CAC5I;;IAOC,wBAAwB;YAChB,MAAM;;IADd,wBAAwB;YAChB,MAAM;;WAAN,MAAM;;qBA8Ba,GAAG;;AArChC,wBAyEK;AAaL,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
export declare const UTabsList: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
|
+
/** 额外 CSS 类名 */
|
|
3
|
+
class: {
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
default: undefined;
|
|
6
|
+
};
|
|
7
|
+
}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
10
|
+
/** 额外 CSS 类名 */
|
|
11
|
+
class: {
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
default: undefined;
|
|
14
|
+
};
|
|
15
|
+
}>> & Readonly<{}>, {
|
|
16
|
+
class: string;
|
|
17
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
18
|
+
export declare const UTabsTrigger: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
19
|
+
/** 当前触发器对应的标签值 */
|
|
20
|
+
value: {
|
|
21
|
+
type: StringConstructor;
|
|
22
|
+
required: true;
|
|
23
|
+
};
|
|
24
|
+
/** 是否禁用当前标签 */
|
|
25
|
+
disabled: {
|
|
26
|
+
type: BooleanConstructor;
|
|
27
|
+
default: boolean;
|
|
28
|
+
};
|
|
29
|
+
/** 额外 CSS 类名 */
|
|
30
|
+
class: {
|
|
31
|
+
type: StringConstructor;
|
|
32
|
+
default: undefined;
|
|
33
|
+
};
|
|
34
|
+
}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
35
|
+
[key: string]: any;
|
|
36
|
+
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
37
|
+
click: (_event: MouseEvent) => true;
|
|
38
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
39
|
+
/** 当前触发器对应的标签值 */
|
|
40
|
+
value: {
|
|
41
|
+
type: StringConstructor;
|
|
42
|
+
required: true;
|
|
43
|
+
};
|
|
44
|
+
/** 是否禁用当前标签 */
|
|
45
|
+
disabled: {
|
|
46
|
+
type: BooleanConstructor;
|
|
47
|
+
default: boolean;
|
|
48
|
+
};
|
|
49
|
+
/** 额外 CSS 类名 */
|
|
50
|
+
class: {
|
|
51
|
+
type: StringConstructor;
|
|
52
|
+
default: undefined;
|
|
53
|
+
};
|
|
54
|
+
}>> & Readonly<{
|
|
55
|
+
onClick?: ((_event: MouseEvent) => any) | undefined;
|
|
56
|
+
}>, {
|
|
57
|
+
disabled: boolean;
|
|
58
|
+
class: string;
|
|
59
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
60
|
+
export declare const UTabsContent: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
61
|
+
/** 当前内容面板对应的标签值 */
|
|
62
|
+
value: {
|
|
63
|
+
type: StringConstructor;
|
|
64
|
+
required: true;
|
|
65
|
+
};
|
|
66
|
+
/** 额外 CSS 类名 */
|
|
67
|
+
class: {
|
|
68
|
+
type: StringConstructor;
|
|
69
|
+
default: undefined;
|
|
70
|
+
};
|
|
71
|
+
}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
72
|
+
[key: string]: any;
|
|
73
|
+
}> | null, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
74
|
+
/** 当前内容面板对应的标签值 */
|
|
75
|
+
value: {
|
|
76
|
+
type: StringConstructor;
|
|
77
|
+
required: true;
|
|
78
|
+
};
|
|
79
|
+
/** 额外 CSS 类名 */
|
|
80
|
+
class: {
|
|
81
|
+
type: StringConstructor;
|
|
82
|
+
default: undefined;
|
|
83
|
+
};
|
|
84
|
+
}>> & Readonly<{}>, {
|
|
85
|
+
class: string;
|
|
86
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
87
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
88
|
+
modelValue?: string;
|
|
89
|
+
} & {
|
|
90
|
+
/** 容器额外 CSS 类名 */
|
|
91
|
+
class?: string;
|
|
92
|
+
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
93
|
+
"update:modelValue": (value: string) => any;
|
|
94
|
+
valueChange: (value: string) => any;
|
|
95
|
+
}, string, import('vue').PublicProps, Readonly<{
|
|
96
|
+
modelValue?: string;
|
|
97
|
+
} & {
|
|
98
|
+
/** 容器额外 CSS 类名 */
|
|
99
|
+
class?: string;
|
|
100
|
+
}> & Readonly<{
|
|
101
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
102
|
+
onValueChange?: ((value: string) => any) | undefined;
|
|
103
|
+
}>, {
|
|
104
|
+
class: string;
|
|
105
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>, {
|
|
106
|
+
default?(_: {}): any;
|
|
107
|
+
}>;
|
|
108
|
+
export default _default;
|
|
109
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
110
|
+
new (): {
|
|
111
|
+
$slots: S;
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
//# sourceMappingURL=tabs.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabs.vue.d.ts","sourceRoot":"","sources":["../../src/components/tabs.vue"],"names":[],"mappings":"AAKA;AAiLA,eAAO,MAAM,SAAS;IAGlB,gBAAgB;;;;;;;;IAAhB,gBAAgB;;;;;;;4EAUlB,CAAA;AAEF,eAAO,MAAM,YAAY;IAGrB,kBAAkB;;;;;IAKlB,eAAe;;;;;IAKf,gBAAgB;;;;;;;;oBAOA,UAAU;;IAjB1B,kBAAkB;;;;;IAKlB,eAAe;;;;;IAKf,gBAAgB;;;;;;;;;;4EAuClB,CAAA;AAEF,eAAO,MAAM,YAAY;IAGrB,mBAAmB;;;;;IAKnB,gBAAgB;;;;;;;;IALhB,mBAAmB;;;;;IAKnB,gBAAgB;;;;;;;4EAkBlB,CACD;;iBA2Cc,MAAM;;IApCnB,kBAAkB;YACV,MAAM;;;;;iBAmCD,MAAM;;IApCnB,kBAAkB;YACV,MAAM;;;;;WAAN,MAAM;;qBAsDa,GAAG;;AA7DhC,wBAmGK;AAaL,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
type TagVariant = 'default' | 'primary' | 'success' | 'warning' | 'destructive' | 'outline';
|
|
2
|
+
type TagSize = 'sm' | 'default';
|
|
3
|
+
interface Props {
|
|
4
|
+
/** 样式变体 */
|
|
5
|
+
variant?: TagVariant;
|
|
6
|
+
/** 尺寸 */
|
|
7
|
+
size?: TagSize;
|
|
8
|
+
/** 是否显示关闭按钮 */
|
|
9
|
+
closable?: boolean;
|
|
10
|
+
/** 是否禁用 */
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
/** 自定义背景色(覆盖 variant 颜色) */
|
|
13
|
+
color?: string;
|
|
14
|
+
/** 额外 CSS 类名 */
|
|
15
|
+
class?: string;
|
|
16
|
+
}
|
|
17
|
+
declare function __VLS_template(): {
|
|
18
|
+
attrs: Partial<{}>;
|
|
19
|
+
slots: {
|
|
20
|
+
default?(_: {}): any;
|
|
21
|
+
};
|
|
22
|
+
refs: {};
|
|
23
|
+
rootEl: HTMLSpanElement;
|
|
24
|
+
};
|
|
25
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
26
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
27
|
+
close: (event: MouseEvent) => any;
|
|
28
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
29
|
+
onClose?: ((event: MouseEvent) => any) | undefined;
|
|
30
|
+
}>, {
|
|
31
|
+
variant: TagVariant;
|
|
32
|
+
size: TagSize;
|
|
33
|
+
disabled: boolean;
|
|
34
|
+
class: string;
|
|
35
|
+
color: string;
|
|
36
|
+
closable: boolean;
|
|
37
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLSpanElement>;
|
|
38
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
39
|
+
export default _default;
|
|
40
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
41
|
+
new (): {
|
|
42
|
+
$slots: S;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=tag.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tag.vue.d.ts","sourceRoot":"","sources":["../../src/components/tag.vue"],"names":[],"mappings":"AAKA;AA2GA,KAAK,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,aAAa,GAAG,SAAS,CAAA;AAC3F,KAAK,OAAO,GAAG,IAAI,GAAG,SAAS,CAAA;AAE/B,UAAU,KAAK;IACb,WAAW;IACX,OAAO,CAAC,EAAE,UAAU,CAAA;IACpB,SAAS;IACT,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,eAAe;IACf,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW;IACX,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,4BAA4B;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,gBAAgB;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AA+DD,iBAAS,cAAc;WA6CT,OAAO,IAA6B;;yBAVrB,GAAG;;;;EAe/B;AAcD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;aA3IT,UAAU;UAEb,OAAO;cAIH,OAAO;WAIV,MAAM;WAFN,MAAM;cAJH,OAAO;yFAgJlB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
/** 标签文本 */
|
|
3
|
+
label?: string;
|
|
4
|
+
/** 错误提示文本 */
|
|
5
|
+
error?: string;
|
|
6
|
+
/** 帮助说明文本 */
|
|
7
|
+
helperText?: string;
|
|
8
|
+
/** 文本域 id,不传则自动生成 */
|
|
9
|
+
id?: string;
|
|
10
|
+
/** 默认行数 */
|
|
11
|
+
rows?: number;
|
|
12
|
+
/** 是否禁用 */
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
/** 占位文本 */
|
|
15
|
+
placeholder?: string;
|
|
16
|
+
/** 额外 CSS 类名 */
|
|
17
|
+
class?: string;
|
|
18
|
+
}
|
|
19
|
+
type __VLS_Props = Props;
|
|
20
|
+
declare function focus(): void;
|
|
21
|
+
declare function blur(): void;
|
|
22
|
+
type __VLS_PublicProps = {
|
|
23
|
+
modelValue?: string | undefined;
|
|
24
|
+
} & __VLS_Props;
|
|
25
|
+
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {
|
|
26
|
+
focus: typeof focus;
|
|
27
|
+
blur: typeof blur;
|
|
28
|
+
el: import('vue').Ref<HTMLTextAreaElement | null, HTMLTextAreaElement | null>;
|
|
29
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
30
|
+
input: (event: Event) => any;
|
|
31
|
+
blur: (event: FocusEvent) => any;
|
|
32
|
+
focus: (event: FocusEvent) => any;
|
|
33
|
+
change: (event: Event) => any;
|
|
34
|
+
"update:modelValue": (value: string | undefined) => any;
|
|
35
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
36
|
+
onInput?: ((event: Event) => any) | undefined;
|
|
37
|
+
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
38
|
+
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
39
|
+
onChange?: ((event: Event) => any) | undefined;
|
|
40
|
+
"onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
|
|
41
|
+
}>, {
|
|
42
|
+
disabled: boolean;
|
|
43
|
+
class: string;
|
|
44
|
+
label: string;
|
|
45
|
+
id: string;
|
|
46
|
+
error: string;
|
|
47
|
+
helperText: string;
|
|
48
|
+
placeholder: string;
|
|
49
|
+
rows: number;
|
|
50
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
51
|
+
textareaRef: HTMLTextAreaElement;
|
|
52
|
+
}, any>;
|
|
53
|
+
export default _default;
|
|
54
|
+
//# sourceMappingURL=textarea.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textarea.vue.d.ts","sourceRoot":"","sources":["../../src/components/textarea.vue"],"names":[],"mappings":"AAKA;AAqJA,UAAU,KAAK;IACb,WAAW;IACX,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,aAAa;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,aAAa;IACb,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,qBAAqB;IACrB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,WAAW;IACX,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,WAAW;IACX,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW;IACX,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gBAAgB;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,KAAK,WAAW,GAAG,KAAK,CAAC;AA8DzB,iBAAS,KAAK,SAEb;AAED,iBAAS,IAAI,SAEZ;AA0BD,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/B,GAAG,WAAW,CAAC;;;;;;;;;;;;;;;;;;cAvGH,OAAO;WAIV,MAAM;WAdN,MAAM;QAMT,MAAM;WAJH,MAAM;gBAED,MAAM;iBAQL,MAAM;UAJb,MAAM;;;;AAgMf,wBAUG"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export type ToastType = 'success' | 'error' | 'info';
|
|
2
|
+
export interface ToastItem {
|
|
3
|
+
/** 通知唯一 id */
|
|
4
|
+
id: string;
|
|
5
|
+
/** 通知内容 */
|
|
6
|
+
message: string;
|
|
7
|
+
/** 通知类型 */
|
|
8
|
+
type: ToastType;
|
|
9
|
+
}
|
|
10
|
+
export interface UseToastReturn {
|
|
11
|
+
/** 只读通知列表 */
|
|
12
|
+
items: Readonly<ToastItem[]>;
|
|
13
|
+
/** 成功通知 */
|
|
14
|
+
success: (message: string) => void;
|
|
15
|
+
/** 错误通知 */
|
|
16
|
+
error: (message: string) => void;
|
|
17
|
+
/** 信息通知 */
|
|
18
|
+
info: (message: string) => void;
|
|
19
|
+
/** 移除通知 */
|
|
20
|
+
remove: (id: string) => void;
|
|
21
|
+
}
|
|
22
|
+
export declare function removeToast(id: string): void;
|
|
23
|
+
export declare function useToast(): UseToastReturn;
|
|
24
|
+
export declare const toast: {
|
|
25
|
+
success(message: string): void;
|
|
26
|
+
error(message: string): void;
|
|
27
|
+
info(message: string): void;
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=toast-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toast-state.d.ts","sourceRoot":"","sources":["../../src/components/toast-state.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAA;AAEpD,MAAM,WAAW,SAAS;IACxB,cAAc;IACd,EAAE,EAAE,MAAM,CAAA;IACV,WAAW;IACX,OAAO,EAAE,MAAM,CAAA;IACf,WAAW;IACX,IAAI,EAAE,SAAS,CAAA;CAChB;AAED,MAAM,WAAW,cAAc;IAC7B,aAAa;IACb,KAAK,EAAE,QAAQ,CAAC,SAAS,EAAE,CAAC,CAAA;IAC5B,WAAW;IACX,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,WAAW;IACX,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IAChC,WAAW;IACX,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IAC/B,WAAW;IACX,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;CAC7B;AAUD,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,QAGrC;AAYD,wBAAgB,QAAQ,IAAI,cAAc,CAczC;AAED,eAAO,MAAM,KAAK;qBACC,MAAM;mBAGR,MAAM;kBAGP,MAAM;CAGrB,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { toast, useToast } from './toast-state';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<{
|
|
3
|
+
/** 容器额外 CSS 类名 */
|
|
4
|
+
class?: string;
|
|
5
|
+
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
|
|
6
|
+
/** 容器额外 CSS 类名 */
|
|
7
|
+
class?: string;
|
|
8
|
+
}> & Readonly<{}>, {
|
|
9
|
+
class: string;
|
|
10
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
export default _default;
|
|
12
|
+
//# sourceMappingURL=toast.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toast.vue.d.ts","sourceRoot":"","sources":["../../src/components/toast.vue"],"names":[],"mappings":"AAKA;AA2EA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAC9C;;IAOC,kBAAkB;YACV,MAAM;;IADd,kBAAkB;YACV,MAAM;;WAAN,MAAM;;AAPhB,wBAqIK"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export declare const UTooltipTrigger: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
|
+
/** 额外 CSS 类名 */
|
|
3
|
+
class: {
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
default: undefined;
|
|
6
|
+
};
|
|
7
|
+
}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
10
|
+
/** 额外 CSS 类名 */
|
|
11
|
+
class: {
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
default: undefined;
|
|
14
|
+
};
|
|
15
|
+
}>> & Readonly<{}>, {
|
|
16
|
+
class: string;
|
|
17
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
18
|
+
export declare const UTooltipContent: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
19
|
+
/** 气泡显示方向 */
|
|
20
|
+
side: {
|
|
21
|
+
type: () => "top" | "bottom" | "left" | "right";
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
24
|
+
/** 额外 CSS 类名 */
|
|
25
|
+
class: {
|
|
26
|
+
type: StringConstructor;
|
|
27
|
+
default: undefined;
|
|
28
|
+
};
|
|
29
|
+
}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
30
|
+
[key: string]: any;
|
|
31
|
+
}> | null, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
32
|
+
/** 气泡显示方向 */
|
|
33
|
+
side: {
|
|
34
|
+
type: () => "top" | "bottom" | "left" | "right";
|
|
35
|
+
default: string;
|
|
36
|
+
};
|
|
37
|
+
/** 额外 CSS 类名 */
|
|
38
|
+
class: {
|
|
39
|
+
type: StringConstructor;
|
|
40
|
+
default: undefined;
|
|
41
|
+
};
|
|
42
|
+
}>> & Readonly<{}>, {
|
|
43
|
+
class: string;
|
|
44
|
+
side: "left" | "right" | "top" | "bottom";
|
|
45
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
46
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
47
|
+
/** 根容器额外 CSS 类名 */
|
|
48
|
+
class?: string;
|
|
49
|
+
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
|
|
50
|
+
/** 根容器额外 CSS 类名 */
|
|
51
|
+
class?: string;
|
|
52
|
+
}> & Readonly<{}>, {
|
|
53
|
+
class: string;
|
|
54
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLSpanElement>, {
|
|
55
|
+
default?(_: {}): any;
|
|
56
|
+
}>;
|
|
57
|
+
export default _default;
|
|
58
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
59
|
+
new (): {
|
|
60
|
+
$slots: S;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=tooltip.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tooltip.vue.d.ts","sourceRoot":"","sources":["../../src/components/tooltip.vue"],"names":[],"mappings":"AAKA;AA6PA,eAAO,MAAM,eAAe;IAGxB,gBAAgB;;;;;;;;IAAhB,gBAAgB;;;;;;;4EA8ClB,CAAA;AAEF,eAAO,MAAM,eAAe;IAGxB,aAAa;;cAEK,MAAM,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO;;;IAG3D,gBAAgB;;;;;;;;IALhB,aAAa;;cAEK,MAAM,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO;;;IAG3D,gBAAgB;;;;;;;;4EAkFlB,CACD;;IAOC,mBAAmB;YACX,MAAM;;IADd,mBAAmB;YACX,MAAM;;WAAN,MAAM;;qBAwCa,GAAG;;AA/ChC,wBAmFK;AAaL,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../composables-Cxcf-3ov.cjs`);exports.toast=e.g,exports.useClickOutside=e.d,exports.useCopyToClipboard=e.u,exports.useDebounce=e.m,exports.useEventListener=e.t,exports.useForm=e.s,exports.useHotkeys=e.n,exports.useInterval=e.i,exports.useLocalStorage=e.p,exports.useMediaQuery=e.f,exports.useMounted=e.a,exports.usePagination=e.c,exports.useTimeout=e.r,exports.useToast=e.o,exports.useToggle=e.l;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description: Vue composables 入口 — 导出所有组合式函数
|
|
3
|
+
* @author: UG - 一个斗码大陆苦逼的三段码之气的少年,并没有神秘戒指中码老的帮助,但总有一天,我会成为斗码大陆中码帝一样的存在。三十年河东,三十年河西,莫欺少年穷。
|
|
4
|
+
* @date: 2026-04-17
|
|
5
|
+
*/
|
|
6
|
+
export { useDebounce } from './use-debounce';
|
|
7
|
+
export { useLocalStorage } from './use-local-storage';
|
|
8
|
+
export { useMediaQuery } from './use-media-query';
|
|
9
|
+
export { useClickOutside } from './use-click-outside';
|
|
10
|
+
export { useCopyToClipboard } from './use-copy-to-clipboard';
|
|
11
|
+
export { useToggle } from './use-toggle';
|
|
12
|
+
export { usePagination } from './use-pagination';
|
|
13
|
+
export { useForm } from './use-form';
|
|
14
|
+
export { toast, useToast } from './use-toast';
|
|
15
|
+
export type { ToastItem, ToastType, UseToastReturn } from './use-toast';
|
|
16
|
+
export { useMounted } from './use-mounted';
|
|
17
|
+
export { useInterval } from './use-interval';
|
|
18
|
+
export { useTimeout } from './use-timeout';
|
|
19
|
+
export { useHotkeys, type UseHotkeysOptions } from './use-hotkeys';
|
|
20
|
+
export { useEventListener } from './use-event-listener';
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/composables/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AACpC,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAC7C,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAGvE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAE,UAAU,EAAE,KAAK,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as e, c as t, d as n, f as r, g as i, i as a, l as o, m as s, n as c, o as l, p as u, r as d, s as f, t as p, u as m } from "../composables-BwdwEG7n.js";
|
|
2
|
+
export { i as toast, n as useClickOutside, m as useCopyToClipboard, s as useDebounce, p as useEventListener, f as useForm, c as useHotkeys, a as useInterval, u as useLocalStorage, r as useMediaQuery, e as useMounted, t as usePagination, d as useTimeout, l as useToast, o as useToggle };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* 检测点击目标元素外部的行为,常用于关闭弹层或下拉菜单。
|
|
4
|
+
*
|
|
5
|
+
* @typeParam T 目标元素类型
|
|
6
|
+
* @param handler 点击元素外部时触发的回调
|
|
7
|
+
* @returns 绑定到目标元素的 ref
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const targetRef = useClickOutside<HTMLDivElement>(() => {
|
|
12
|
+
* isOpen.value = false
|
|
13
|
+
* })
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export declare function useClickOutside<T extends HTMLElement>(handler: () => void): Ref<T | null>;
|
|
17
|
+
//# sourceMappingURL=use-click-outside.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-click-outside.d.ts","sourceRoot":"","sources":["../../src/composables/use-click-outside.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAsC,KAAK,GAAG,EAAE,MAAM,KAAK,CAAA;AAElE;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,WAAW,EAAE,OAAO,EAAE,MAAM,IAAI,GAAG,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,CAyBzF"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
interface UseCopyToClipboardReturn {
|
|
3
|
+
/** 是否处于已复制状态 */
|
|
4
|
+
copied: Ref<boolean>;
|
|
5
|
+
/** 复制文本到剪贴板 */
|
|
6
|
+
copy: (text: string) => Promise<void>;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* 复制文本到剪贴板,并在成功后将 copied 状态维持 2 秒。
|
|
10
|
+
*
|
|
11
|
+
* @returns 包含 copied 状态与 copy 方法的对象
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const { copied, copy } = useCopyToClipboard()
|
|
16
|
+
* await copy('https://example.com')
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export declare function useCopyToClipboard(): UseCopyToClipboardReturn;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=use-copy-to-clipboard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-copy-to-clipboard.d.ts","sourceRoot":"","sources":["../../src/composables/use-copy-to-clipboard.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAoB,KAAK,GAAG,EAAE,MAAM,KAAK,CAAA;AAEhD,UAAU,wBAAwB;IAChC,gBAAgB;IAChB,MAAM,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IACpB,eAAe;IACf,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;CACtC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,IAAI,wBAAwB,CAiC7D"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* 对值进行防抖处理,在延迟时间内多次变化时只在最后一次更新。
|
|
4
|
+
*
|
|
5
|
+
* @typeParam T 值的类型
|
|
6
|
+
* @param value 需要防抖的值或 ref
|
|
7
|
+
* @param delay 防抖延迟毫秒数,默认 500ms
|
|
8
|
+
* @returns 防抖后的 ref 值
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const search = ref('')
|
|
13
|
+
* const debouncedSearch = useDebounce(search, 500)
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export declare function useDebounce<T>(value: Ref<T> | T, delay?: number): Ref<T>;
|
|
17
|
+
//# sourceMappingURL=use-debounce.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-debounce.d.ts","sourceRoot":"","sources":["../../src/composables/use-debounce.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAyC,KAAK,GAAG,EAAE,MAAM,KAAK,CAAA;AAErE;;;;;;;;;;;;;GAaG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,KAAK,SAAM,GAAG,GAAG,CAAC,CAAC,CAAC,CAuCrE"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { MaybeRefOrGetter } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* 在指定目标上绑定事件监听器,组件卸载时自动清理。
|
|
4
|
+
*
|
|
5
|
+
* target 支持响应式值(Ref / Getter / 原始值);
|
|
6
|
+
* 传入 null 时跳过绑定,适合 ref 尚未挂载的场景。
|
|
7
|
+
* target 变化时自动解绑旧目标并绑定新目标。
|
|
8
|
+
*
|
|
9
|
+
* @typeParam K WindowEventMap 中的事件名称
|
|
10
|
+
* @param event 事件名称,如 "scroll"、"resize"、"click"
|
|
11
|
+
* @param handler 事件处理函数
|
|
12
|
+
* @param target 监听目标;默认 window;传 null 跳过绑定(支持响应式)
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* // 监听全局滚动
|
|
17
|
+
* useEventListener('scroll', () => { scrollY.value = window.scrollY })
|
|
18
|
+
*
|
|
19
|
+
* // 监听特定元素的点击(响应式 ref)
|
|
20
|
+
* const divRef = ref<HTMLDivElement | null>(null)
|
|
21
|
+
* useEventListener('click', handleClick, divRef)
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export declare function useEventListener<K extends keyof WindowEventMap>(event: K, handler: (event: WindowEventMap[K]) => void, target?: MaybeRefOrGetter<EventTarget | null>): void;
|
|
25
|
+
//# sourceMappingURL=use-event-listener.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-event-listener.d.ts","sourceRoot":"","sources":["../../src/composables/use-event-listener.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAA0C,KAAK,gBAAgB,EAAE,MAAM,KAAK,CAAA;AAEnF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,MAAM,cAAc,EAC7D,KAAK,EAAE,CAAC,EACR,OAAO,EAAE,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,KAAK,IAAI,EAC3C,MAAM,CAAC,EAAE,gBAAgB,CAAC,WAAW,GAAG,IAAI,CAAC,GAC5C,IAAI,CA4BN"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
interface UseFormReturn<T extends Record<string, unknown>> {
|
|
3
|
+
/** 当前表单值 */
|
|
4
|
+
values: Ref<T>;
|
|
5
|
+
/** 字段错误信息 */
|
|
6
|
+
errors: Ref<Partial<Record<keyof T, string>>>;
|
|
7
|
+
/** 生成字段变更处理器 */
|
|
8
|
+
handleChange: (field: keyof T) => (event: Event) => void;
|
|
9
|
+
/** 设置字段错误 */
|
|
10
|
+
setError: (field: keyof T, message: string) => void;
|
|
11
|
+
/** 重置表单 */
|
|
12
|
+
reset: () => void;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* 管理轻量表单状态,包含字段值、错误信息和重置能力。
|
|
16
|
+
*
|
|
17
|
+
* @typeParam T 表单值对象类型
|
|
18
|
+
* @param initialValues 表单初始值
|
|
19
|
+
* @returns 表单状态与操作方法
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```ts
|
|
23
|
+
* const { values, errors, handleChange, setError, reset } = useForm({
|
|
24
|
+
* username: '',
|
|
25
|
+
* email: '',
|
|
26
|
+
* })
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export declare function useForm<T extends Record<string, unknown>>(initialValues: T): UseFormReturn<T>;
|
|
30
|
+
export {};
|
|
31
|
+
//# sourceMappingURL=use-form.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-form.d.ts","sourceRoot":"","sources":["../../src/composables/use-form.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAc,KAAK,GAAG,EAAE,MAAM,KAAK,CAAA;AAE1C,UAAU,aAAa,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACvD,YAAY;IACZ,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,CAAA;IACd,aAAa;IACb,MAAM,EAAE,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAA;IAC7C,gBAAgB;IAChB,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;IACxD,aAAa;IACb,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACnD,WAAW;IACX,KAAK,EAAE,MAAM,IAAI,CAAA;CAClB;AA0BD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,OAAO,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,EAAE,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CA2C7F"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export interface UseHotkeysOptions {
|
|
2
|
+
/** 是否阻止默认浏览器行为,默认 false */
|
|
3
|
+
preventDefault?: boolean;
|
|
4
|
+
/** 监听目标,默认 window;传 null 则跳过绑定 */
|
|
5
|
+
target?: HTMLElement | null;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* 将快捷键字符串绑定到回调函数。
|
|
9
|
+
*
|
|
10
|
+
* 支持修饰键组合:ctrl、cmd(Meta)、alt、shift,加主键(不区分大小写)。
|
|
11
|
+
* 组件挂载时绑定,卸载时自动解绑。
|
|
12
|
+
*
|
|
13
|
+
* @param keys 快捷键字符串,如 "ctrl+k"、"cmd+s"、"escape"
|
|
14
|
+
* @param callback 触发时调用的函数
|
|
15
|
+
* @param options 额外配置项
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* // 全局搜索快捷键
|
|
20
|
+
* useHotkeys('ctrl+k', () => { searchOpen.value = true }, { preventDefault: true })
|
|
21
|
+
*
|
|
22
|
+
* // ESC 关闭弹窗
|
|
23
|
+
* useHotkeys('escape', () => { dialogOpen.value = false })
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
export declare function useHotkeys(keys: string, callback: (event: KeyboardEvent) => void, options?: UseHotkeysOptions): void;
|
|
27
|
+
//# sourceMappingURL=use-hotkeys.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-hotkeys.d.ts","sourceRoot":"","sources":["../../src/composables/use-hotkeys.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,iBAAiB;IAChC,2BAA2B;IAC3B,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,kCAAkC;IAClC,MAAM,CAAC,EAAE,WAAW,GAAG,IAAI,CAAA;CAC5B;AAwBD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,UAAU,CACxB,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,EACxC,OAAO,GAAE,iBAAsB,GAC9B,IAAI,CA8BN"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { MaybeRefOrGetter } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* 以指定间隔重复调用回调函数。
|
|
4
|
+
*
|
|
5
|
+
* delay 支持响应式值(Ref / Getter / 原始值),变化时自动重置定时器。
|
|
6
|
+
* 当 delay 为 null 时定时器暂停;组件卸载时自动清理。
|
|
7
|
+
*
|
|
8
|
+
* @param callback 每次触发时调用的函数
|
|
9
|
+
* @param delay 间隔毫秒数;传入 null 则暂停定时器(支持响应式)
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const running = ref(true)
|
|
14
|
+
* const count = ref(0)
|
|
15
|
+
*
|
|
16
|
+
* useInterval(() => count.value++, computed(() => running.value ? 1000 : null))
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export declare function useInterval(callback: () => void, delay: MaybeRefOrGetter<number | null>): void;
|
|
20
|
+
//# sourceMappingURL=use-interval.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-interval.d.ts","sourceRoot":"","sources":["../../src/composables/use-interval.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAA+B,KAAK,gBAAgB,EAAE,MAAM,KAAK,CAAA;AAExE;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,WAAW,CACzB,QAAQ,EAAE,MAAM,IAAI,EACpB,KAAK,EAAE,gBAAgB,CAAC,MAAM,GAAG,IAAI,CAAC,GACrC,IAAI,CAqBN"}
|