@jt-home/mfe-components 1.0.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/index.cjs +2 -0
- package/dist/index.mjs +3029 -0
- package/dist/style.css +1 -0
- package/dist/types/components/JtButton/index.d.ts +1 -0
- package/dist/types/components/JtButton/index.vue.d.ts +21 -0
- package/dist/types/components/JtPageHeader/index.d.ts +2 -0
- package/dist/types/components/JtPageHeader/index.vue.d.ts +25 -0
- package/dist/types/components/JtPageHeader/types.d.ts +31 -0
- package/dist/types/components/JtPagination/index.d.ts +2 -0
- package/dist/types/components/JtPagination/index.vue.d.ts +22 -0
- package/dist/types/components/JtPagination/types.d.ts +16 -0
- package/dist/types/components/form/JtFormItems.vue.d.ts +16 -0
- package/dist/types/components/form/index.d.ts +4 -0
- package/dist/types/components/form/item/JtCascader/index.d.ts +1 -0
- package/dist/types/components/form/item/JtCascader/index.vue.d.ts +29 -0
- package/dist/types/components/form/item/JtDatePicker/index.d.ts +1 -0
- package/dist/types/components/form/item/JtDatePicker/index.vue.d.ts +9 -0
- package/dist/types/components/form/item/JtInput/index.d.ts +1 -0
- package/dist/types/components/form/item/JtInput/index.vue.d.ts +35 -0
- package/dist/types/components/form/item/JtSelect/index.d.ts +2 -0
- package/dist/types/components/form/item/JtSelect/index.vue.d.ts +34 -0
- package/dist/types/components/form/item/JtSelect/types.d.ts +6 -0
- package/dist/types/components/form/item/index.d.ts +5 -0
- package/dist/types/components/form/types.d.ts +71 -0
- package/dist/types/components/globalInfo/components/GlobalInfoGroup.vue.d.ts +105 -0
- package/dist/types/components/globalInfo/components/GlobalInfoProvider.vue.d.ts +22 -0
- package/dist/types/components/globalInfo/components/GlobalInfoSectionBlock.vue.d.ts +165 -0
- package/dist/types/components/globalInfo/components/GlobalInfoSectionOutlet.vue.d.ts +31 -0
- package/dist/types/components/globalInfo/components/GlobalInfoSections.vue.d.ts +59 -0
- package/dist/types/components/globalInfo/components/GlobalInfoSlotErrorBoundary.vue.d.ts +36 -0
- package/dist/types/components/globalInfo/controller/useGlobalInfoController.d.ts +19 -0
- package/dist/types/components/globalInfo/index.d.ts +14 -0
- package/dist/types/components/globalInfo/model/adapter.d.ts +9 -0
- package/dist/types/components/globalInfo/model/fieldUtils.d.ts +11 -0
- package/dist/types/components/globalInfo/model/types.d.ts +558 -0
- package/dist/types/components/globalInfo/renderers/GlobalInfoAutoRenderer.vue.d.ts +11 -0
- package/dist/types/components/globalInfo/renderers/GlobalInfoDeleteConfirm.vue.d.ts +28 -0
- package/dist/types/components/globalInfo/renderers/GlobalInfoFieldControl.vue.d.ts +19 -0
- package/dist/types/components/globalInfo/renderers/GlobalInfoFieldValue.vue.d.ts +11 -0
- package/dist/types/components/globalInfo/renderers/GlobalInfoFormRenderer.vue.d.ts +34 -0
- package/dist/types/components/globalInfo/renderers/GlobalInfoTableRenderer.vue.d.ts +39 -0
- package/dist/types/components/index.d.ts +11 -0
- package/dist/types/components/table/JtCrudTable.vue.d.ts +288 -0
- package/dist/types/components/table/JtFilterBar.vue.d.ts +65 -0
- package/dist/types/components/table/JtPagination.vue.d.ts +22 -0
- package/dist/types/components/table/JtTable.vue.d.ts +27 -0
- package/dist/types/components/table/index.d.ts +5 -0
- package/dist/types/components/table/types.d.ts +134 -0
- package/dist/types/components/table/useSearchDisabled.d.ts +12 -0
- package/dist/types/main.d.ts +3 -0
- package/dist/types/utils/componentAttrs.d.ts +14 -0
- package/package.json +77 -0
- package/readme.md +671 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { GlobalInfoActions, GlobalInfoField, GlobalInfoNode, GlobalInfoRawRecord, GlobalInfoSection, GlobalInfoState } from '../model/types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
section: GlobalInfoSection;
|
|
4
|
+
node?: GlobalInfoNode | null;
|
|
5
|
+
editing: boolean;
|
|
6
|
+
state: GlobalInfoState;
|
|
7
|
+
actions: GlobalInfoActions;
|
|
8
|
+
showAdd?: boolean;
|
|
9
|
+
showDelete?: boolean;
|
|
10
|
+
};
|
|
11
|
+
declare var __VLS_16: string, __VLS_17: {
|
|
12
|
+
field: GlobalInfoField;
|
|
13
|
+
section: GlobalInfoSection;
|
|
14
|
+
sectionView: GlobalInfoSection;
|
|
15
|
+
node: GlobalInfoNode | null | undefined;
|
|
16
|
+
row: GlobalInfoRawRecord;
|
|
17
|
+
rowIndex: number;
|
|
18
|
+
editing: boolean;
|
|
19
|
+
modelValue: unknown;
|
|
20
|
+
value: unknown;
|
|
21
|
+
state: GlobalInfoState;
|
|
22
|
+
actions: GlobalInfoActions;
|
|
23
|
+
updateModelValue: (value: unknown) => void;
|
|
24
|
+
};
|
|
25
|
+
type __VLS_Slots = {} & {
|
|
26
|
+
[K in NonNullable<typeof __VLS_16>]?: (props: typeof __VLS_17) => any;
|
|
27
|
+
};
|
|
28
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
29
|
+
showAdd: boolean;
|
|
30
|
+
showDelete: boolean;
|
|
31
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
32
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
33
|
+
declare const _default: typeof __VLS_export;
|
|
34
|
+
export default _default;
|
|
35
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
36
|
+
new (): {
|
|
37
|
+
$slots: S;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { JtCrudTable, JtFilterBar, JtTable } from './table/index';
|
|
2
|
+
export { JtPagination } from './JtPagination/index';
|
|
3
|
+
export type { JtCrudColumn, JtCrudOption, JtDicItem, JtPaginationData, JtSearchType, } from './table/index';
|
|
4
|
+
export { JtButton } from './JtButton/index';
|
|
5
|
+
export { JtCascader, JtDatePicker, JtFormItems, JtInput, JtSelect } from './form/index';
|
|
6
|
+
export { JtPageHeader } from './JtPageHeader/index';
|
|
7
|
+
export { GlobalInfoAutoRenderer, GlobalInfoDeleteConfirm, GlobalInfoFieldControl, GlobalInfoFieldValue, GlobalInfoFormRenderer, GlobalInfoGroup, GlobalInfoProvider, GlobalInfoSectionBlock, GlobalInfoSectionOutlet, GlobalInfoSections, GlobalInfoTableRenderer, useGlobalInfoController, buildGlobalInfoUpdatePayload, createEmptyGlobalInfoViewModel, isGlobalInfoNode, mergeGlobalInfoChildren, normalizeGlobalInfoDetail, normalizeGlobalInfoTree, resolveGlobalInfoRenderType, } from './globalInfo/index';
|
|
8
|
+
export type { JTCascaderFormItemConfig, JTCompatibleFormItemType, JTElementFormItemType, JTFormItemCascaderOption, JTFormItemConfig, JTFormItemEventHandler, JTFormItemType, JTFormItemsForm, JTFormItemsProps, JtOptionItem, } from './form/index';
|
|
9
|
+
export type { JtPageHeaderOperate, JtPageHeaderProps } from './JtPageHeader/index';
|
|
10
|
+
export type { JtPaginationOption } from './JtPagination/index';
|
|
11
|
+
export type { GlobalInfoActions, GlobalInfoApiOperation, GlobalInfoDetailParams, GlobalInfoField, GlobalInfoFieldOption, GlobalInfoInfoSet, GlobalInfoNode, GlobalInfoOperationContext, GlobalInfoOpenTreeParams, GlobalInfoProviderSlotProps, GlobalInfoRawRecord, GlobalInfoRenderType, GlobalInfoScheme, GlobalInfoSection, GlobalInfoSectionLoadTarget, GlobalInfoSectionSlotScope, GlobalInfoSectionStatus, GlobalInfoSectionTarget, GlobalInfoService, GlobalInfoSetMark, GlobalInfoState, GlobalInfoTemplateTreeParams, GlobalInfoUpdateParams, GlobalInfoViewModel, } from './globalInfo/index';
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
import type { JtCrudColumn, JtCrudOption } from './types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
columns: JtCrudColumn[];
|
|
4
|
+
option?: JtCrudOption;
|
|
5
|
+
data: any[];
|
|
6
|
+
total?: number;
|
|
7
|
+
tableEvents?: Record<string, (...args: any[]) => void>;
|
|
8
|
+
};
|
|
9
|
+
/** 开启筛选表单禁用,通常在查询或重置调用接口前执行。 */
|
|
10
|
+
declare function searchLoading(): void;
|
|
11
|
+
/** 关闭筛选表单禁用,通常在查询或重置接口 finally 中执行。 */
|
|
12
|
+
declare function searchDone(): void;
|
|
13
|
+
type __VLS_ModelProps = {
|
|
14
|
+
'currentPage'?: number;
|
|
15
|
+
'pageSize'?: number;
|
|
16
|
+
'searchModel'?: Record<string, any>;
|
|
17
|
+
};
|
|
18
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
19
|
+
declare var __VLS_1: {}, __VLS_16: `${string}-search`, __VLS_17: {
|
|
20
|
+
value: any;
|
|
21
|
+
column: JtCrudColumn;
|
|
22
|
+
setValue: (val: any) => void;
|
|
23
|
+
search: () => void;
|
|
24
|
+
reset: () => void;
|
|
25
|
+
disabled: boolean;
|
|
26
|
+
}, __VLS_19: {}, __VLS_31: `${string}-header`, __VLS_32: any, __VLS_36: `${string}-data`, __VLS_37: any, __VLS_40: any;
|
|
27
|
+
type __VLS_Slots = {} & {
|
|
28
|
+
[K in NonNullable<typeof __VLS_16>]?: (props: typeof __VLS_17) => any;
|
|
29
|
+
} & {
|
|
30
|
+
[K in NonNullable<typeof __VLS_31>]?: (props: typeof __VLS_32) => any;
|
|
31
|
+
} & {
|
|
32
|
+
[K in NonNullable<typeof __VLS_36>]?: (props: typeof __VLS_37) => any;
|
|
33
|
+
} & {
|
|
34
|
+
header?: (props: typeof __VLS_1) => any;
|
|
35
|
+
} & {
|
|
36
|
+
toolbar?: (props: typeof __VLS_19) => any;
|
|
37
|
+
} & {
|
|
38
|
+
menu?: (props: typeof __VLS_40) => any;
|
|
39
|
+
};
|
|
40
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
41
|
+
/** 获取内部 el-table 实例 */
|
|
42
|
+
tableRef: import("vue").ComputedRef<import("element-plus").TableInstance | undefined>;
|
|
43
|
+
/** 获取内部筛选条实例 */
|
|
44
|
+
filterBarRef: import("vue").Ref<({
|
|
45
|
+
$: import("vue").ComponentInternalInstance;
|
|
46
|
+
$data: {};
|
|
47
|
+
$props: {
|
|
48
|
+
readonly columns: JtCrudColumn[];
|
|
49
|
+
readonly option?: JtCrudOption | undefined;
|
|
50
|
+
readonly modelValue: Record<string, any>;
|
|
51
|
+
readonly onReset?: (() => any) | undefined;
|
|
52
|
+
readonly "onUpdate:modelValue"?: ((value: Record<string, any>) => any) | undefined;
|
|
53
|
+
readonly onSearch?: (() => any) | undefined;
|
|
54
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<{
|
|
55
|
+
columns: JtCrudColumn[];
|
|
56
|
+
option?: JtCrudOption;
|
|
57
|
+
modelValue: Record<string, any>;
|
|
58
|
+
}> & Readonly<{
|
|
59
|
+
onReset?: (() => any) | undefined;
|
|
60
|
+
"onUpdate:modelValue"?: ((value: Record<string, any>) => any) | undefined;
|
|
61
|
+
onSearch?: (() => any) | undefined;
|
|
62
|
+
}>;
|
|
63
|
+
$attrs: {
|
|
64
|
+
[x: string]: unknown;
|
|
65
|
+
};
|
|
66
|
+
$refs: {
|
|
67
|
+
[x: string]: unknown;
|
|
68
|
+
};
|
|
69
|
+
$slots: Readonly<{
|
|
70
|
+
[name: string]: import("vue").Slot<any> | undefined;
|
|
71
|
+
}>;
|
|
72
|
+
$root: import("vue").ComponentPublicInstance | null;
|
|
73
|
+
$parent: import("vue").ComponentPublicInstance | null;
|
|
74
|
+
$host: Element | null;
|
|
75
|
+
$emit: ((event: "reset") => void) & ((event: "update:modelValue", value: Record<string, any>) => void) & ((event: "search") => void);
|
|
76
|
+
$el: any;
|
|
77
|
+
$options: import("vue").ComponentOptionsBase<Readonly<{
|
|
78
|
+
columns: JtCrudColumn[];
|
|
79
|
+
option?: JtCrudOption;
|
|
80
|
+
modelValue: Record<string, any>;
|
|
81
|
+
}> & Readonly<{
|
|
82
|
+
onReset?: (() => any) | undefined;
|
|
83
|
+
"onUpdate:modelValue"?: ((value: Record<string, any>) => any) | undefined;
|
|
84
|
+
onSearch?: (() => any) | undefined;
|
|
85
|
+
}>, {
|
|
86
|
+
formRef: import("vue").Ref<import("element-plus").FormInstance | undefined, import("element-plus").FormInstance | undefined>;
|
|
87
|
+
searchDisabled: import("vue").Ref<boolean, boolean>;
|
|
88
|
+
searchLoading: () => void;
|
|
89
|
+
searchDone: () => void;
|
|
90
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
91
|
+
reset: () => any;
|
|
92
|
+
"update:modelValue": (value: Record<string, any>) => any;
|
|
93
|
+
search: () => any;
|
|
94
|
+
}, string, {
|
|
95
|
+
option: JtCrudOption;
|
|
96
|
+
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
|
|
97
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
98
|
+
created?: (() => void) | (() => void)[];
|
|
99
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
100
|
+
mounted?: (() => void) | (() => void)[];
|
|
101
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
102
|
+
updated?: (() => void) | (() => void)[];
|
|
103
|
+
activated?: (() => void) | (() => void)[];
|
|
104
|
+
deactivated?: (() => void) | (() => void)[];
|
|
105
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
106
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
107
|
+
destroyed?: (() => void) | (() => void)[];
|
|
108
|
+
unmounted?: (() => void) | (() => void)[];
|
|
109
|
+
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
110
|
+
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
111
|
+
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
112
|
+
};
|
|
113
|
+
$forceUpdate: () => void;
|
|
114
|
+
$nextTick: typeof import("vue").nextTick;
|
|
115
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
|
|
116
|
+
} & Readonly<{
|
|
117
|
+
option: JtCrudOption;
|
|
118
|
+
}> & Omit<Readonly<{
|
|
119
|
+
columns: JtCrudColumn[];
|
|
120
|
+
option?: JtCrudOption;
|
|
121
|
+
modelValue: Record<string, any>;
|
|
122
|
+
}> & Readonly<{
|
|
123
|
+
onReset?: (() => any) | undefined;
|
|
124
|
+
"onUpdate:modelValue"?: ((value: Record<string, any>) => any) | undefined;
|
|
125
|
+
onSearch?: (() => any) | undefined;
|
|
126
|
+
}>, "option" | "searchDisabled" | "searchLoading" | "searchDone" | "formRef"> & import("vue").ShallowUnwrapRef<{
|
|
127
|
+
formRef: import("vue").Ref<import("element-plus").FormInstance | undefined, import("element-plus").FormInstance | undefined>;
|
|
128
|
+
searchDisabled: import("vue").Ref<boolean, boolean>;
|
|
129
|
+
searchLoading: () => void;
|
|
130
|
+
searchDone: () => void;
|
|
131
|
+
}> & {} & import("vue").ComponentCustomProperties & {} & {
|
|
132
|
+
$slots: {
|
|
133
|
+
[x: `${string}-search`]: ((props: {
|
|
134
|
+
value: any;
|
|
135
|
+
column: JtCrudColumn;
|
|
136
|
+
setValue: (val: any) => void;
|
|
137
|
+
search: () => void;
|
|
138
|
+
reset: () => void;
|
|
139
|
+
disabled: boolean;
|
|
140
|
+
}) => any) | undefined;
|
|
141
|
+
} & {
|
|
142
|
+
'search-menu'?: (props: {
|
|
143
|
+
search: () => void;
|
|
144
|
+
reset: () => void;
|
|
145
|
+
disabled: boolean;
|
|
146
|
+
collapsed: boolean;
|
|
147
|
+
toggleCollapse: () => void;
|
|
148
|
+
}) => any;
|
|
149
|
+
};
|
|
150
|
+
}) | undefined, ({
|
|
151
|
+
$: import("vue").ComponentInternalInstance;
|
|
152
|
+
$data: {};
|
|
153
|
+
$props: {
|
|
154
|
+
readonly columns: JtCrudColumn[];
|
|
155
|
+
readonly option?: JtCrudOption | undefined;
|
|
156
|
+
readonly modelValue: Record<string, any>;
|
|
157
|
+
readonly onReset?: (() => any) | undefined;
|
|
158
|
+
readonly "onUpdate:modelValue"?: ((value: Record<string, any>) => any) | undefined;
|
|
159
|
+
readonly onSearch?: (() => any) | undefined;
|
|
160
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<{
|
|
161
|
+
columns: JtCrudColumn[];
|
|
162
|
+
option?: JtCrudOption;
|
|
163
|
+
modelValue: Record<string, any>;
|
|
164
|
+
}> & Readonly<{
|
|
165
|
+
onReset?: (() => any) | undefined;
|
|
166
|
+
"onUpdate:modelValue"?: ((value: Record<string, any>) => any) | undefined;
|
|
167
|
+
onSearch?: (() => any) | undefined;
|
|
168
|
+
}>;
|
|
169
|
+
$attrs: {
|
|
170
|
+
[x: string]: unknown;
|
|
171
|
+
};
|
|
172
|
+
$refs: {
|
|
173
|
+
[x: string]: unknown;
|
|
174
|
+
};
|
|
175
|
+
$slots: Readonly<{
|
|
176
|
+
[name: string]: import("vue").Slot<any> | undefined;
|
|
177
|
+
}>;
|
|
178
|
+
$root: import("vue").ComponentPublicInstance | null;
|
|
179
|
+
$parent: import("vue").ComponentPublicInstance | null;
|
|
180
|
+
$host: Element | null;
|
|
181
|
+
$emit: ((event: "reset") => void) & ((event: "update:modelValue", value: Record<string, any>) => void) & ((event: "search") => void);
|
|
182
|
+
$el: any;
|
|
183
|
+
$options: import("vue").ComponentOptionsBase<Readonly<{
|
|
184
|
+
columns: JtCrudColumn[];
|
|
185
|
+
option?: JtCrudOption;
|
|
186
|
+
modelValue: Record<string, any>;
|
|
187
|
+
}> & Readonly<{
|
|
188
|
+
onReset?: (() => any) | undefined;
|
|
189
|
+
"onUpdate:modelValue"?: ((value: Record<string, any>) => any) | undefined;
|
|
190
|
+
onSearch?: (() => any) | undefined;
|
|
191
|
+
}>, {
|
|
192
|
+
formRef: import("vue").Ref<import("element-plus").FormInstance | undefined, import("element-plus").FormInstance | undefined>;
|
|
193
|
+
searchDisabled: import("vue").Ref<boolean, boolean>;
|
|
194
|
+
searchLoading: () => void;
|
|
195
|
+
searchDone: () => void;
|
|
196
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
197
|
+
reset: () => any;
|
|
198
|
+
"update:modelValue": (value: Record<string, any>) => any;
|
|
199
|
+
search: () => any;
|
|
200
|
+
}, string, {
|
|
201
|
+
option: JtCrudOption;
|
|
202
|
+
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
|
|
203
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
204
|
+
created?: (() => void) | (() => void)[];
|
|
205
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
206
|
+
mounted?: (() => void) | (() => void)[];
|
|
207
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
208
|
+
updated?: (() => void) | (() => void)[];
|
|
209
|
+
activated?: (() => void) | (() => void)[];
|
|
210
|
+
deactivated?: (() => void) | (() => void)[];
|
|
211
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
212
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
213
|
+
destroyed?: (() => void) | (() => void)[];
|
|
214
|
+
unmounted?: (() => void) | (() => void)[];
|
|
215
|
+
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
216
|
+
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
217
|
+
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
218
|
+
};
|
|
219
|
+
$forceUpdate: () => void;
|
|
220
|
+
$nextTick: typeof import("vue").nextTick;
|
|
221
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
|
|
222
|
+
} & Readonly<{
|
|
223
|
+
option: JtCrudOption;
|
|
224
|
+
}> & Omit<Readonly<{
|
|
225
|
+
columns: JtCrudColumn[];
|
|
226
|
+
option?: JtCrudOption;
|
|
227
|
+
modelValue: Record<string, any>;
|
|
228
|
+
}> & Readonly<{
|
|
229
|
+
onReset?: (() => any) | undefined;
|
|
230
|
+
"onUpdate:modelValue"?: ((value: Record<string, any>) => any) | undefined;
|
|
231
|
+
onSearch?: (() => any) | undefined;
|
|
232
|
+
}>, "option" | "searchDisabled" | "searchLoading" | "searchDone" | "formRef"> & import("vue").ShallowUnwrapRef<{
|
|
233
|
+
formRef: import("vue").Ref<import("element-plus").FormInstance | undefined, import("element-plus").FormInstance | undefined>;
|
|
234
|
+
searchDisabled: import("vue").Ref<boolean, boolean>;
|
|
235
|
+
searchLoading: () => void;
|
|
236
|
+
searchDone: () => void;
|
|
237
|
+
}> & {} & import("vue").ComponentCustomProperties & {} & {
|
|
238
|
+
$slots: {
|
|
239
|
+
[x: `${string}-search`]: ((props: {
|
|
240
|
+
value: any;
|
|
241
|
+
column: JtCrudColumn;
|
|
242
|
+
setValue: (val: any) => void;
|
|
243
|
+
search: () => void;
|
|
244
|
+
reset: () => void;
|
|
245
|
+
disabled: boolean;
|
|
246
|
+
}) => any) | undefined;
|
|
247
|
+
} & {
|
|
248
|
+
'search-menu'?: (props: {
|
|
249
|
+
search: () => void;
|
|
250
|
+
reset: () => void;
|
|
251
|
+
disabled: boolean;
|
|
252
|
+
collapsed: boolean;
|
|
253
|
+
toggleCollapse: () => void;
|
|
254
|
+
}) => any;
|
|
255
|
+
};
|
|
256
|
+
}) | undefined>;
|
|
257
|
+
/** 开启筛选表单禁用。 */
|
|
258
|
+
searchLoading: typeof searchLoading;
|
|
259
|
+
/** 关闭筛选表单禁用。 */
|
|
260
|
+
searchDone: typeof searchDone;
|
|
261
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
262
|
+
reset: () => any;
|
|
263
|
+
search: (form: Record<string, any>) => any;
|
|
264
|
+
"update:currentPage": (value: number) => any;
|
|
265
|
+
"update:pageSize": (value: number) => any;
|
|
266
|
+
"page-change": (page: number) => any;
|
|
267
|
+
"size-change": (size: number) => any;
|
|
268
|
+
"update:searchModel": (value: Record<string, any>) => any;
|
|
269
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
270
|
+
onReset?: (() => any) | undefined;
|
|
271
|
+
onSearch?: ((form: Record<string, any>) => any) | undefined;
|
|
272
|
+
"onUpdate:currentPage"?: ((value: number) => any) | undefined;
|
|
273
|
+
"onUpdate:pageSize"?: ((value: number) => any) | undefined;
|
|
274
|
+
"onPage-change"?: ((page: number) => any) | undefined;
|
|
275
|
+
"onSize-change"?: ((size: number) => any) | undefined;
|
|
276
|
+
"onUpdate:searchModel"?: ((value: Record<string, any>) => any) | undefined;
|
|
277
|
+
}>, {
|
|
278
|
+
option: JtCrudOption;
|
|
279
|
+
total: number;
|
|
280
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
281
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
282
|
+
declare const _default: typeof __VLS_export;
|
|
283
|
+
export default _default;
|
|
284
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
285
|
+
new (): {
|
|
286
|
+
$slots: S;
|
|
287
|
+
};
|
|
288
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { FormInstance } from 'element-plus';
|
|
2
|
+
import type { JtCrudColumn, JtCrudOption } from './types';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
columns: JtCrudColumn[];
|
|
5
|
+
option?: JtCrudOption;
|
|
6
|
+
modelValue: Record<string, any>;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* 统一处理查询触发入口。
|
|
10
|
+
*
|
|
11
|
+
* 按钮点击、输入框回车和自定义搜索插槽调用 search() 都会进入这里:
|
|
12
|
+
* 已禁用时直接拦截,避免业务接口进行中重复查询。
|
|
13
|
+
* 真正的禁用开关由使用方通过 ref.searchLoading() / ref.searchDone() 控制。
|
|
14
|
+
*/
|
|
15
|
+
declare function handleSearch(): void;
|
|
16
|
+
/** 重置在禁用期间不响应,避免业务接口进行中重复操作。 */
|
|
17
|
+
declare function handleReset(): void;
|
|
18
|
+
declare function toggleCollapsed(): void;
|
|
19
|
+
declare var __VLS_19: `${string}-search`, __VLS_20: {
|
|
20
|
+
value: any;
|
|
21
|
+
column: JtCrudColumn;
|
|
22
|
+
setValue: (val: any) => void;
|
|
23
|
+
search: typeof handleSearch;
|
|
24
|
+
reset: typeof handleReset;
|
|
25
|
+
disabled: boolean;
|
|
26
|
+
}, __VLS_23: {
|
|
27
|
+
search: typeof handleSearch;
|
|
28
|
+
reset: typeof handleReset;
|
|
29
|
+
disabled: boolean;
|
|
30
|
+
collapsed: boolean;
|
|
31
|
+
toggleCollapse: typeof toggleCollapsed;
|
|
32
|
+
};
|
|
33
|
+
type __VLS_Slots = {} & {
|
|
34
|
+
[K in NonNullable<typeof __VLS_19>]?: (props: typeof __VLS_20) => any;
|
|
35
|
+
} & {
|
|
36
|
+
'search-menu'?: (props: typeof __VLS_23) => any;
|
|
37
|
+
};
|
|
38
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
|
|
39
|
+
/** 内部 Element Plus Form 实例,保留给业务侧做校验、重置等原生表单操作。 */
|
|
40
|
+
formRef: import("vue").Ref<FormInstance | undefined, FormInstance | undefined>;
|
|
41
|
+
/** 当前筛选表单禁用态。 */
|
|
42
|
+
searchDisabled: import("vue").Ref<boolean, boolean>;
|
|
43
|
+
/** 开启筛选表单禁用。 */
|
|
44
|
+
searchLoading: () => void;
|
|
45
|
+
/** 关闭筛选表单禁用。 */
|
|
46
|
+
searchDone: () => void;
|
|
47
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
48
|
+
reset: () => any;
|
|
49
|
+
"update:modelValue": (value: Record<string, any>) => any;
|
|
50
|
+
search: () => any;
|
|
51
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
52
|
+
onReset?: (() => any) | undefined;
|
|
53
|
+
"onUpdate:modelValue"?: ((value: Record<string, any>) => any) | undefined;
|
|
54
|
+
onSearch?: (() => any) | undefined;
|
|
55
|
+
}>, {
|
|
56
|
+
option: JtCrudOption;
|
|
57
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
58
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
59
|
+
declare const _default: typeof __VLS_export;
|
|
60
|
+
export default _default;
|
|
61
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
62
|
+
new (): {
|
|
63
|
+
$slots: S;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { JtCrudOption } from './types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
currentPage: number;
|
|
4
|
+
pageSize: number;
|
|
5
|
+
total: number;
|
|
6
|
+
option?: JtCrudOption;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
+
"current-change": (page: number) => any;
|
|
10
|
+
"update:currentPage": (value: number) => any;
|
|
11
|
+
"update:pageSize": (value: number) => any;
|
|
12
|
+
"page-change": (page: number) => any;
|
|
13
|
+
"size-change": (size: number) => any;
|
|
14
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
15
|
+
"onCurrent-change"?: ((page: number) => any) | undefined;
|
|
16
|
+
"onUpdate:currentPage"?: ((value: number) => any) | undefined;
|
|
17
|
+
"onUpdate:pageSize"?: ((value: number) => any) | undefined;
|
|
18
|
+
"onPage-change"?: ((page: number) => any) | undefined;
|
|
19
|
+
"onSize-change"?: ((size: number) => any) | undefined;
|
|
20
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
declare const _default: typeof __VLS_export;
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { TableInstance } from 'element-plus';
|
|
2
|
+
import type { JtCrudColumn, JtCrudOption } from './types';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
data: any[];
|
|
5
|
+
columns: JtCrudColumn[];
|
|
6
|
+
option?: JtCrudOption;
|
|
7
|
+
tableEvents?: Record<string, (...args: any[]) => void>;
|
|
8
|
+
};
|
|
9
|
+
declare var __VLS_27: `${string}-header`, __VLS_28: any, __VLS_32: `${string}-data`, __VLS_33: any, __VLS_42: any;
|
|
10
|
+
type __VLS_Slots = {} & {
|
|
11
|
+
[K in NonNullable<typeof __VLS_27>]?: (props: typeof __VLS_28) => any;
|
|
12
|
+
} & {
|
|
13
|
+
[K in NonNullable<typeof __VLS_32>]?: (props: typeof __VLS_33) => any;
|
|
14
|
+
} & {
|
|
15
|
+
menu?: (props: typeof __VLS_42) => any;
|
|
16
|
+
};
|
|
17
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
|
|
18
|
+
tableRef: import("vue").Ref<TableInstance | undefined, TableInstance | undefined>;
|
|
19
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
21
|
+
declare const _default: typeof __VLS_export;
|
|
22
|
+
export default _default;
|
|
23
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
24
|
+
new (): {
|
|
25
|
+
$slots: S;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as JtCrudTable } from './JtCrudTable.vue';
|
|
2
|
+
export { default as JtTable } from './JtTable.vue';
|
|
3
|
+
export { default as JtFilterBar } from './JtFilterBar.vue';
|
|
4
|
+
export { default as JtPagination } from './JtPagination.vue';
|
|
5
|
+
export type { JtCrudColumn, JtCrudOption, JtDicItem, JtPaginationData, JtSearchType, } from './types';
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/** 字典项配置,常用于把枚举值映射成展示文案。 */
|
|
2
|
+
export interface JtDicItem {
|
|
3
|
+
/** 展示文案。 */
|
|
4
|
+
label: string;
|
|
5
|
+
/** 实际值。 */
|
|
6
|
+
value: string | number | boolean;
|
|
7
|
+
/** 子级选项,常用于级联选择。 */
|
|
8
|
+
children?: JtDicItem[];
|
|
9
|
+
/** 是否禁用当前选项。 */
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/** 查询控件类型。 */
|
|
13
|
+
export type JtSearchType = 'input' | 'select' | 'remote-select' | 'cascader' | 'date' | 'daterange';
|
|
14
|
+
/** 表格列配置。 */
|
|
15
|
+
export interface JtCrudColumn {
|
|
16
|
+
/** 字段名,对应行数据中的 key。 */
|
|
17
|
+
prop: string;
|
|
18
|
+
/** 表头文案。 */
|
|
19
|
+
label: string;
|
|
20
|
+
/** 列宽,对应 el-table-column 的 width。 */
|
|
21
|
+
width?: number | string;
|
|
22
|
+
/** 最小列宽,对应 el-table-column 的 min-width。 */
|
|
23
|
+
minWidth?: number | string;
|
|
24
|
+
/** 对齐方式。 */
|
|
25
|
+
align?: 'left' | 'center' | 'right';
|
|
26
|
+
/** 固定列位置。 */
|
|
27
|
+
fixed?: 'left' | 'right' | boolean;
|
|
28
|
+
/** 是否排序。 */
|
|
29
|
+
sortable?: boolean | 'custom';
|
|
30
|
+
/** 内容溢出时是否展示 tooltip。 */
|
|
31
|
+
showOverflowTooltip?: boolean;
|
|
32
|
+
/** 是否隐藏当前列。 */
|
|
33
|
+
hide?: boolean;
|
|
34
|
+
/** 透传给 el-table-column 的其他属性。 */
|
|
35
|
+
columnOptions?: Record<string, any>;
|
|
36
|
+
/** 单元格格式化函数。 */
|
|
37
|
+
formatter?: (row: any, column: any, cellValue: any, index: number) => string;
|
|
38
|
+
/** 字典数据,用于把单元格值映射为展示文案。 */
|
|
39
|
+
dicData?: JtDicItem[];
|
|
40
|
+
/** 是否在筛选区展示该字段。 */
|
|
41
|
+
search?: boolean;
|
|
42
|
+
/** 筛选控件类型,默认 input。 */
|
|
43
|
+
searchType?: JtSearchType;
|
|
44
|
+
/** 筛选项在表单栅格中占用的列数,默认 1。 */
|
|
45
|
+
searchSpan?: number;
|
|
46
|
+
/** 筛选项是否展示必填星号。 */
|
|
47
|
+
searchRequired?: boolean;
|
|
48
|
+
/** 筛选项 label,不传时使用 label。 */
|
|
49
|
+
searchLabel?: string;
|
|
50
|
+
/** 筛选控件 placeholder。 */
|
|
51
|
+
searchPlaceholder?: string;
|
|
52
|
+
/** 筛选控件选项,未传时回退使用 dicData。 */
|
|
53
|
+
searchOptions?: JtDicItem[];
|
|
54
|
+
/** 远程搜索方法,返回 JtDicItem[] 时组件会自动更新下拉选项。 */
|
|
55
|
+
searchRemoteMethod?: (keyword: string, column: JtCrudColumn) => Promise<JtDicItem[] | void> | JtDicItem[] | void;
|
|
56
|
+
/** 远程搜索外部加载态,不传时组件内部自动维护。 */
|
|
57
|
+
searchLoading?: boolean;
|
|
58
|
+
/** 日期类筛选控件的 value-format。 */
|
|
59
|
+
searchValueFormat?: string;
|
|
60
|
+
/** 透传给筛选控件的属性,如 el-input、el-select、el-cascader、el-date-picker。 */
|
|
61
|
+
searchProps?: Record<string, any>;
|
|
62
|
+
}
|
|
63
|
+
/** 分页数据。 */
|
|
64
|
+
export interface JtPaginationData {
|
|
65
|
+
/** 当前页码。 */
|
|
66
|
+
currentPage: number;
|
|
67
|
+
/** 每页条数。 */
|
|
68
|
+
pageSize: number;
|
|
69
|
+
/** 总条数。 */
|
|
70
|
+
total: number;
|
|
71
|
+
}
|
|
72
|
+
/** CRUD 表格整体配置。 */
|
|
73
|
+
export interface JtCrudOption {
|
|
74
|
+
/** 行 key,默认 id。 */
|
|
75
|
+
rowKey?: string;
|
|
76
|
+
/** 是否加载中。 */
|
|
77
|
+
loading?: boolean;
|
|
78
|
+
/** 空数据文案。 */
|
|
79
|
+
emptyText?: string;
|
|
80
|
+
/** 表格高度。 */
|
|
81
|
+
height?: number | string;
|
|
82
|
+
/** 表格最大高度。 */
|
|
83
|
+
maxHeight?: number | string;
|
|
84
|
+
/** 透传给 el-table 的属性。 */
|
|
85
|
+
tableProps?: Record<string, any>;
|
|
86
|
+
/** 是否展示筛选区,默认 true。 */
|
|
87
|
+
searchShow?: boolean;
|
|
88
|
+
/** 每行展示的筛选项数量,默认 4。 */
|
|
89
|
+
searchSpan?: number;
|
|
90
|
+
/** 筛选 label 宽度,数字按 px 处理。 */
|
|
91
|
+
searchLabelWidth?: number | string;
|
|
92
|
+
/** 筛选 label 位置,默认 top。 */
|
|
93
|
+
searchLabelPosition?: 'left' | 'right' | 'top';
|
|
94
|
+
/** 筛选表单列间距,默认 14。 */
|
|
95
|
+
searchGutter?: number;
|
|
96
|
+
/** 筛选表单行间距,默认 14。 */
|
|
97
|
+
searchRowGap?: number;
|
|
98
|
+
/** 筛选区内边距,数字按 px 处理,默认 '18px 4px 0'。 */
|
|
99
|
+
searchPadding?: number | string;
|
|
100
|
+
/** 是否启用筛选项折叠,默认超过首行时启用。 */
|
|
101
|
+
searchCollapse?: boolean;
|
|
102
|
+
/** 筛选区初始是否收起,默认 false。 */
|
|
103
|
+
searchCollapsed?: boolean;
|
|
104
|
+
/** 收起时展示的行数,默认 1。 */
|
|
105
|
+
searchCollapsedRows?: number;
|
|
106
|
+
/** 查询按钮文案。 */
|
|
107
|
+
searchBtnText?: string;
|
|
108
|
+
/** 重置按钮文案。 */
|
|
109
|
+
resetBtnText?: string;
|
|
110
|
+
/** 是否展示操作列,默认 false。 */
|
|
111
|
+
menu?: boolean;
|
|
112
|
+
/** 操作列宽度。 */
|
|
113
|
+
menuWidth?: number | string;
|
|
114
|
+
/** 操作列最小宽度。 */
|
|
115
|
+
menuMinWidth?: number | string;
|
|
116
|
+
/** 操作列对齐方式。 */
|
|
117
|
+
menuAlign?: 'left' | 'center' | 'right';
|
|
118
|
+
/** 操作列表头文案。 */
|
|
119
|
+
menuLabel?: string;
|
|
120
|
+
/** 操作列固定位置。 */
|
|
121
|
+
menuFixed?: 'left' | 'right' | boolean;
|
|
122
|
+
/** 是否展示多选列,默认 false。 */
|
|
123
|
+
selection?: boolean;
|
|
124
|
+
/** 是否展示序号列,默认 false。 */
|
|
125
|
+
index?: boolean;
|
|
126
|
+
/** 序号列表头文案。 */
|
|
127
|
+
indexLabel?: string;
|
|
128
|
+
/** 是否展示分页,默认 true。 */
|
|
129
|
+
paginationShow?: boolean;
|
|
130
|
+
/** el-pagination 的 layout。 */
|
|
131
|
+
paginationLayout?: string;
|
|
132
|
+
/** 每页条数选项。 */
|
|
133
|
+
pageSizes?: number[];
|
|
134
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 管理筛选表单禁用态。
|
|
3
|
+
*
|
|
4
|
+
* 使用场景:
|
|
5
|
+
* - searchLoading:开启禁用,业务调用接口前执行。
|
|
6
|
+
* - searchDone:关闭禁用,业务接口结束后执行。
|
|
7
|
+
*/
|
|
8
|
+
export declare function useSearchDisabled(): {
|
|
9
|
+
searchDisabled: import("vue").Ref<boolean, boolean>;
|
|
10
|
+
searchLoading: () => void;
|
|
11
|
+
searchDone: () => void;
|
|
12
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import './assets/styles/base.css';
|
|
2
|
+
export { GlobalInfoAutoRenderer, GlobalInfoDeleteConfirm, GlobalInfoFieldControl, GlobalInfoFieldValue, GlobalInfoFormRenderer, GlobalInfoGroup, GlobalInfoProvider, GlobalInfoSectionBlock, GlobalInfoSectionOutlet, GlobalInfoSections, GlobalInfoTableRenderer, JtCascader, JtButton, JtCrudTable, JtDatePicker, JtFilterBar, JtFormItems, JtInput, JtPageHeader, JtPagination, JtSelect, JtTable, buildGlobalInfoUpdatePayload, createEmptyGlobalInfoViewModel, isGlobalInfoNode, mergeGlobalInfoChildren, normalizeGlobalInfoDetail, normalizeGlobalInfoTree, resolveGlobalInfoRenderType, useGlobalInfoController, } from './components/index';
|
|
3
|
+
export type { GlobalInfoActions, GlobalInfoApiOperation, GlobalInfoDetailParams, GlobalInfoField, GlobalInfoFieldOption, GlobalInfoInfoSet, GlobalInfoNode, GlobalInfoOperationContext, GlobalInfoOpenTreeParams, GlobalInfoProviderSlotProps, GlobalInfoRawRecord, GlobalInfoRenderType, GlobalInfoScheme, GlobalInfoSection, GlobalInfoSectionLoadTarget, GlobalInfoSectionSlotScope, GlobalInfoSectionStatus, GlobalInfoSectionTarget, GlobalInfoService, GlobalInfoSetMark, GlobalInfoState, GlobalInfoTemplateTreeParams, GlobalInfoUpdateParams, GlobalInfoViewModel, JTCascaderFormItemConfig, JtCrudColumn, JtCrudOption, JtDicItem, JTCompatibleFormItemType, JTElementFormItemType, JTFormItemConfig, JTFormItemEventHandler, JTFormItemType, JTFormItemsForm, JTFormItemsProps, JTFormItemCascaderOption, JtOptionItem, JtPageHeaderOperate, JtPageHeaderProps, JtPaginationData, JtPaginationOption, JtSearchType, } from './components/index';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** 组件事件监听函数类型,用于透传给 Vue 的 v-on。 */
|
|
2
|
+
export type ComponentEventHandler = (...args: unknown[]) => void;
|
|
3
|
+
/** 组件透传属性集合,包含普通属性和 onXxx 形式的事件属性。 */
|
|
4
|
+
export type ComponentAttrRecord = Record<string, unknown>;
|
|
5
|
+
/** v-on 可直接消费的事件集合,key 为事件名,value 为处理函数。 */
|
|
6
|
+
export type ComponentEventRecord = Record<string, ComponentEventHandler>;
|
|
7
|
+
/** 判断属性名是否是 Vue 事件属性,例如 onClick、on-visible-change、onUpdate:modelValue。 */
|
|
8
|
+
export declare function isEventAttrKey(key: string): boolean;
|
|
9
|
+
/** 将 onXxx 属性名转换成 v-on 需要的事件名。 */
|
|
10
|
+
export declare function toEventName(key: string): string;
|
|
11
|
+
/** 从透传属性中提取事件监听,非函数事件值会被忽略。 */
|
|
12
|
+
export declare function pickEventAttrs(attrs: ComponentAttrRecord, excludeKeys?: ReadonlySet<string>): ComponentEventRecord;
|
|
13
|
+
/** 从透传属性中排除内部字段和事件字段,保留可用于 v-bind 的普通属性。 */
|
|
14
|
+
export declare function omitEventAttrs(attrs: ComponentAttrRecord, excludeKeys?: ReadonlySet<string>): ComponentAttrRecord;
|