easy-ep-ui 0.1.1 → 0.2.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 +172 -0
- package/README.md +29 -14
- package/dist/easy-ep-ui.js +1 -1
- package/dist/style.css +1 -1
- package/es/charts/BaseBar/index.d.ts +2 -0
- package/es/charts/BaseBar/src/index.vue.d.ts +45 -0
- package/es/charts/BaseLine/index.d.ts +2 -0
- package/es/charts/BaseLine/src/index.vue.d.ts +47 -0
- package/es/charts/BasePie/index.d.ts +2 -0
- package/es/charts/BasePie/src/index.vue.d.ts +41 -0
- package/es/charts/BaseRadar/index.d.ts +2 -0
- package/es/charts/BaseRadar/src/index.vue.d.ts +47 -0
- package/es/charts/config.d.ts +32 -0
- package/es/charts/index.d.ts +8 -0
- package/es/charts/useChart.d.ts +21 -0
- package/es/components/ee-dept-cascader/index.d.ts +2 -0
- package/es/components/ee-dept-cascader/src/index.vue.d.ts +26 -0
- package/es/components/ee-dept-cascader/type.d.ts +39 -0
- package/es/components/ee-dict-select/src/index.vue.d.ts +19 -18
- package/es/components/ee-dict-select/type.d.ts +54 -0
- package/es/components/ee-form-dialog/src/index.vue.d.ts +108 -8
- package/es/components/ee-form-table/src/components/FormAuto.vue.d.ts +115 -0
- package/es/components/ee-form-table/src/components/FormDrawer.vue.d.ts +280 -7
- package/es/components/ee-form-table/src/components/TableToolbar.vue.d.ts +10 -3
- package/es/components/ee-form-table/src/constants.d.ts +2 -2
- package/es/components/ee-form-table/src/hooks/useCrud.d.ts +3 -1
- package/es/components/ee-form-table/src/hooks/useExport.d.ts +2 -0
- package/es/components/ee-form-table/src/hooks/useForm.d.ts +4 -2
- package/es/components/ee-form-table/src/hooks/useTable.d.ts +28 -11
- package/es/components/ee-form-table/src/index.vue.d.ts +33 -2
- package/es/components/ee-form-table/types.d.ts +86 -1
- package/es/components/ee-remote-select/index.d.ts +2 -0
- package/es/components/ee-remote-select/src/index.vue.d.ts +30 -0
- package/es/components/ee-remote-select/type.d.ts +53 -0
- package/es/components/ee-role-select/index.d.ts +2 -0
- package/es/components/ee-role-select/src/index.vue.d.ts +29 -0
- package/es/components/ee-role-select/type.d.ts +44 -0
- package/es/components/ee-search-bar/src/index.vue.d.ts +80 -10
- package/es/components/ee-status-tag/src/index.vue.d.ts +1 -1
- package/es/components/ee-user-select/index.d.ts +2 -0
- package/es/components/ee-user-select/src/index.vue.d.ts +29 -0
- package/es/components/ee-user-select/type.d.ts +46 -0
- package/es/hooks/index.d.ts +4 -0
- package/es/hooks/useRemoteSelectPagination.d.ts +68 -0
- package/es/hooks/useSelectEcho.d.ts +27 -0
- package/es/index.d.ts +50 -2
- package/es/index.mjs +3119 -1092
- package/es/locale/en.d.ts +3 -0
- package/es/locale/index.d.ts +91 -0
- package/es/locale/useLocale.d.ts +13 -0
- package/es/locale/zh-cn.d.ts +3 -0
- package/es/style.css +1 -1
- package/es/utils/types.d.ts +39 -0
- package/lib/charts/BaseBar/index.d.ts +2 -0
- package/lib/charts/BaseBar/src/index.vue.d.ts +45 -0
- package/lib/charts/BaseLine/index.d.ts +2 -0
- package/lib/charts/BaseLine/src/index.vue.d.ts +47 -0
- package/lib/charts/BasePie/index.d.ts +2 -0
- package/lib/charts/BasePie/src/index.vue.d.ts +41 -0
- package/lib/charts/BaseRadar/index.d.ts +2 -0
- package/lib/charts/BaseRadar/src/index.vue.d.ts +47 -0
- package/lib/charts/config.d.ts +32 -0
- package/lib/charts/index.d.ts +8 -0
- package/lib/charts/useChart.d.ts +21 -0
- package/lib/components/ee-dept-cascader/index.d.ts +2 -0
- package/lib/components/ee-dept-cascader/src/index.vue.d.ts +26 -0
- package/lib/components/ee-dept-cascader/type.d.ts +39 -0
- package/lib/components/ee-dict-select/src/index.vue.d.ts +19 -18
- package/lib/components/ee-dict-select/type.d.ts +54 -0
- package/lib/components/ee-form-dialog/src/index.vue.d.ts +108 -8
- package/lib/components/ee-form-table/src/components/FormAuto.vue.d.ts +115 -0
- package/lib/components/ee-form-table/src/components/FormDrawer.vue.d.ts +280 -7
- package/lib/components/ee-form-table/src/components/TableToolbar.vue.d.ts +10 -3
- package/lib/components/ee-form-table/src/constants.d.ts +2 -2
- package/lib/components/ee-form-table/src/hooks/useCrud.d.ts +3 -1
- package/lib/components/ee-form-table/src/hooks/useExport.d.ts +2 -0
- package/lib/components/ee-form-table/src/hooks/useForm.d.ts +4 -2
- package/lib/components/ee-form-table/src/hooks/useTable.d.ts +28 -11
- package/lib/components/ee-form-table/src/index.vue.d.ts +33 -2
- package/lib/components/ee-form-table/types.d.ts +86 -1
- package/lib/components/ee-remote-select/index.d.ts +2 -0
- package/lib/components/ee-remote-select/src/index.vue.d.ts +30 -0
- package/lib/components/ee-remote-select/type.d.ts +53 -0
- package/lib/components/ee-role-select/index.d.ts +2 -0
- package/lib/components/ee-role-select/src/index.vue.d.ts +29 -0
- package/lib/components/ee-role-select/type.d.ts +44 -0
- package/lib/components/ee-search-bar/src/index.vue.d.ts +80 -10
- package/lib/components/ee-status-tag/src/index.vue.d.ts +1 -1
- package/lib/components/ee-user-select/index.d.ts +2 -0
- package/lib/components/ee-user-select/src/index.vue.d.ts +29 -0
- package/lib/components/ee-user-select/type.d.ts +46 -0
- package/lib/hooks/index.d.ts +4 -0
- package/lib/hooks/useRemoteSelectPagination.d.ts +68 -0
- package/lib/hooks/useSelectEcho.d.ts +27 -0
- package/lib/index.cjs +1 -1
- package/lib/index.d.ts +50 -2
- package/lib/locale/en.d.ts +3 -0
- package/lib/locale/index.d.ts +91 -0
- package/lib/locale/useLocale.d.ts +13 -0
- package/lib/locale/zh-cn.d.ts +3 -0
- package/lib/style.css +1 -1
- package/lib/utils/types.d.ts +39 -0
- package/package.json +5 -2
|
@@ -1,24 +1,166 @@
|
|
|
1
|
-
import { DrawerConfig } from '../../types';
|
|
1
|
+
import { DrawerConfig, TableColumn, DictOption } from '../../types';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
visible: boolean;
|
|
4
4
|
drawerMode: string;
|
|
5
|
-
|
|
5
|
+
formMode: string;
|
|
6
6
|
editingRow: Record<string, unknown> | null;
|
|
7
7
|
formData: Record<string, unknown>;
|
|
8
8
|
drawerCfg: DrawerConfig;
|
|
9
|
+
columns?: TableColumn[];
|
|
9
10
|
size?: 'large' | 'default' | 'small';
|
|
10
11
|
saving: boolean;
|
|
12
|
+
dictMap?: Record<string, DictOption[]>;
|
|
11
13
|
};
|
|
12
14
|
declare function __VLS_template(): {
|
|
13
15
|
attrs: Partial<{}>;
|
|
14
|
-
slots: Partial<Record<
|
|
16
|
+
slots: Partial<Record<string, (_: {
|
|
15
17
|
row: Record<string, unknown> | null;
|
|
16
18
|
formData: Record<string, unknown>;
|
|
17
|
-
}) => any>> & Partial<Record<
|
|
19
|
+
}) => any>> & Partial<Record<string, (_: {
|
|
18
20
|
row: Record<string, unknown> | null;
|
|
19
21
|
formData: Record<string, unknown>;
|
|
20
|
-
}) => any
|
|
21
|
-
|
|
22
|
+
}) => any>> & {
|
|
23
|
+
'view-form'?(_: {
|
|
24
|
+
row: Record<string, unknown> | null;
|
|
25
|
+
formData: Record<string, unknown>;
|
|
26
|
+
}): any;
|
|
27
|
+
'view-form'?(_: {
|
|
28
|
+
row: Record<string, unknown> | null;
|
|
29
|
+
formData: Record<string, unknown>;
|
|
30
|
+
}): any;
|
|
31
|
+
};
|
|
32
|
+
refs: {
|
|
33
|
+
formAutoRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
34
|
+
formData: Record<string, any>;
|
|
35
|
+
columns: TableColumn[];
|
|
36
|
+
formMode: "add" | "edit";
|
|
37
|
+
formCols: number;
|
|
38
|
+
formLabelWidth: string;
|
|
39
|
+
size?: "large" | "default" | "small";
|
|
40
|
+
dictMap?: Record<string, DictOption[]>;
|
|
41
|
+
}> & Readonly<{}>, {
|
|
42
|
+
validate: () => import('element-plus').FormValidationResult | undefined;
|
|
43
|
+
resetFields: () => void | undefined;
|
|
44
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
45
|
+
formRef: ({
|
|
46
|
+
$: import('vue').ComponentInternalInstance;
|
|
47
|
+
$data: {};
|
|
48
|
+
$props: {
|
|
49
|
+
readonly model?: Record<string, any> | undefined;
|
|
50
|
+
readonly rules?: import('element-plus').FormRules | undefined;
|
|
51
|
+
readonly labelPosition?: "left" | "right" | "top" | undefined;
|
|
52
|
+
readonly requireAsteriskPosition?: "left" | "right" | undefined;
|
|
53
|
+
readonly labelWidth?: string | number | undefined;
|
|
54
|
+
readonly labelSuffix?: string | undefined;
|
|
55
|
+
readonly inline?: boolean | undefined;
|
|
56
|
+
readonly inlineMessage?: boolean | undefined;
|
|
57
|
+
readonly statusIcon?: boolean | undefined;
|
|
58
|
+
readonly showMessage?: boolean | undefined;
|
|
59
|
+
readonly validateOnRuleChange?: boolean | undefined;
|
|
60
|
+
readonly hideRequiredAsterisk?: boolean | undefined;
|
|
61
|
+
readonly scrollToError?: boolean | undefined;
|
|
62
|
+
readonly scrollIntoViewOptions?: (ScrollIntoViewOptions | boolean) | undefined;
|
|
63
|
+
readonly size?: import('element-plus').ComponentSize | undefined;
|
|
64
|
+
readonly disabled?: boolean | undefined;
|
|
65
|
+
readonly onValidate?: ((prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => any) | undefined | undefined;
|
|
66
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
67
|
+
$attrs: import('vue').Attrs;
|
|
68
|
+
$refs: {
|
|
69
|
+
[x: string]: unknown;
|
|
70
|
+
};
|
|
71
|
+
$slots: Readonly<{
|
|
72
|
+
[name: string]: import('vue').Slot<any> | undefined;
|
|
73
|
+
}>;
|
|
74
|
+
$root: import('vue').ComponentPublicInstance | null;
|
|
75
|
+
$parent: import('vue').ComponentPublicInstance | null;
|
|
76
|
+
$host: Element | null;
|
|
77
|
+
$emit: (event: "validate", prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => void;
|
|
78
|
+
$el: any;
|
|
79
|
+
$options: import('vue').ComponentOptionsBase<Readonly<import('element-plus').FormProps> & Readonly<{
|
|
80
|
+
onValidate?: ((prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
81
|
+
}>, {
|
|
82
|
+
validate: (callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
83
|
+
validateField: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>, callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
84
|
+
resetFields: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>) => void;
|
|
85
|
+
clearValidate: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>) => void;
|
|
86
|
+
scrollToField: (prop: import('element-plus').FormItemProp) => void;
|
|
87
|
+
getField: (prop: import('element-plus').FormItemProp) => import('element-plus').FormItemContext | undefined;
|
|
88
|
+
fields: import('vue').Reactive<import('element-plus').FormItemContext[]>;
|
|
89
|
+
setInitialValues: (initModel: Record<string, any>) => void;
|
|
90
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
91
|
+
validate: (prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => void;
|
|
92
|
+
}, string, {
|
|
93
|
+
labelWidth: string | number;
|
|
94
|
+
labelPosition: "left" | "right" | "top";
|
|
95
|
+
requireAsteriskPosition: "left" | "right";
|
|
96
|
+
labelSuffix: string;
|
|
97
|
+
showMessage: boolean;
|
|
98
|
+
validateOnRuleChange: boolean;
|
|
99
|
+
scrollIntoViewOptions: ScrollIntoViewOptions | boolean;
|
|
100
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
101
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
102
|
+
created?: (() => void) | (() => void)[];
|
|
103
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
104
|
+
mounted?: (() => void) | (() => void)[];
|
|
105
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
106
|
+
updated?: (() => void) | (() => void)[];
|
|
107
|
+
activated?: (() => void) | (() => void)[];
|
|
108
|
+
deactivated?: (() => void) | (() => void)[];
|
|
109
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
110
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
111
|
+
destroyed?: (() => void) | (() => void)[];
|
|
112
|
+
unmounted?: (() => void) | (() => void)[];
|
|
113
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
114
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
115
|
+
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
116
|
+
};
|
|
117
|
+
$forceUpdate: () => void;
|
|
118
|
+
$nextTick: typeof import('vue').nextTick;
|
|
119
|
+
$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;
|
|
120
|
+
} & Readonly<{
|
|
121
|
+
labelWidth: string | number;
|
|
122
|
+
labelPosition: "left" | "right" | "top";
|
|
123
|
+
requireAsteriskPosition: "left" | "right";
|
|
124
|
+
labelSuffix: string;
|
|
125
|
+
showMessage: boolean;
|
|
126
|
+
validateOnRuleChange: boolean;
|
|
127
|
+
scrollIntoViewOptions: ScrollIntoViewOptions | boolean;
|
|
128
|
+
}> & Omit<Readonly<import('element-plus').FormProps> & Readonly<{
|
|
129
|
+
onValidate?: ((prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
130
|
+
}>, "fields" | "labelWidth" | "labelPosition" | "requireAsteriskPosition" | "labelSuffix" | "showMessage" | "validateOnRuleChange" | "scrollIntoViewOptions" | "validate" | "validateField" | "resetFields" | "clearValidate" | "scrollToField" | "getField" | "setInitialValues"> & {
|
|
131
|
+
validate: (callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
132
|
+
validateField: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>, callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
133
|
+
resetFields: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>) => void;
|
|
134
|
+
clearValidate: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>) => void;
|
|
135
|
+
scrollToField: (prop: import('element-plus').FormItemProp) => void;
|
|
136
|
+
getField: (prop: import('element-plus').FormItemProp) => import('element-plus').FormItemContext | undefined;
|
|
137
|
+
fields: import('vue').Reactive<import('element-plus').FormItemContext[]>;
|
|
138
|
+
setInitialValues: (initModel: Record<string, any>) => void;
|
|
139
|
+
} & {} & import('vue').ComponentCustomProperties & {} & {
|
|
140
|
+
$slots: {
|
|
141
|
+
default?: (props: {}) => any;
|
|
142
|
+
};
|
|
143
|
+
}) | null;
|
|
144
|
+
}, any, import('vue').ComponentProvideOptions, {
|
|
145
|
+
P: {};
|
|
146
|
+
B: {};
|
|
147
|
+
D: {};
|
|
148
|
+
C: {};
|
|
149
|
+
M: {};
|
|
150
|
+
Defaults: {};
|
|
151
|
+
}, Readonly<{
|
|
152
|
+
formData: Record<string, any>;
|
|
153
|
+
columns: TableColumn[];
|
|
154
|
+
formMode: "add" | "edit";
|
|
155
|
+
formCols: number;
|
|
156
|
+
formLabelWidth: string;
|
|
157
|
+
size?: "large" | "default" | "small";
|
|
158
|
+
dictMap?: Record<string, DictOption[]>;
|
|
159
|
+
}> & Readonly<{}>, {
|
|
160
|
+
validate: () => import('element-plus').FormValidationResult | undefined;
|
|
161
|
+
resetFields: () => void | undefined;
|
|
162
|
+
}, {}, {}, {}, {}> | null;
|
|
163
|
+
};
|
|
22
164
|
rootEl: any;
|
|
23
165
|
};
|
|
24
166
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
@@ -28,7 +170,138 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
28
170
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
29
171
|
"onUpdate:visible"?: ((value: boolean) => any) | undefined;
|
|
30
172
|
onSave?: (() => any) | undefined;
|
|
31
|
-
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
173
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
174
|
+
formAutoRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
175
|
+
formData: Record<string, any>;
|
|
176
|
+
columns: TableColumn[];
|
|
177
|
+
formMode: "add" | "edit";
|
|
178
|
+
formCols: number;
|
|
179
|
+
formLabelWidth: string;
|
|
180
|
+
size?: "large" | "default" | "small";
|
|
181
|
+
dictMap?: Record<string, DictOption[]>;
|
|
182
|
+
}> & Readonly<{}>, {
|
|
183
|
+
validate: () => import('element-plus').FormValidationResult | undefined;
|
|
184
|
+
resetFields: () => void | undefined;
|
|
185
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
186
|
+
formRef: ({
|
|
187
|
+
$: import('vue').ComponentInternalInstance;
|
|
188
|
+
$data: {};
|
|
189
|
+
$props: {
|
|
190
|
+
readonly model?: Record<string, any> | undefined;
|
|
191
|
+
readonly rules?: import('element-plus').FormRules | undefined;
|
|
192
|
+
readonly labelPosition?: "left" | "right" | "top" | undefined;
|
|
193
|
+
readonly requireAsteriskPosition?: "left" | "right" | undefined;
|
|
194
|
+
readonly labelWidth?: string | number | undefined;
|
|
195
|
+
readonly labelSuffix?: string | undefined;
|
|
196
|
+
readonly inline?: boolean | undefined;
|
|
197
|
+
readonly inlineMessage?: boolean | undefined;
|
|
198
|
+
readonly statusIcon?: boolean | undefined;
|
|
199
|
+
readonly showMessage?: boolean | undefined;
|
|
200
|
+
readonly validateOnRuleChange?: boolean | undefined;
|
|
201
|
+
readonly hideRequiredAsterisk?: boolean | undefined;
|
|
202
|
+
readonly scrollToError?: boolean | undefined;
|
|
203
|
+
readonly scrollIntoViewOptions?: (ScrollIntoViewOptions | boolean) | undefined;
|
|
204
|
+
readonly size?: import('element-plus').ComponentSize | undefined;
|
|
205
|
+
readonly disabled?: boolean | undefined;
|
|
206
|
+
readonly onValidate?: ((prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => any) | undefined | undefined;
|
|
207
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
208
|
+
$attrs: import('vue').Attrs;
|
|
209
|
+
$refs: {
|
|
210
|
+
[x: string]: unknown;
|
|
211
|
+
};
|
|
212
|
+
$slots: Readonly<{
|
|
213
|
+
[name: string]: import('vue').Slot<any> | undefined;
|
|
214
|
+
}>;
|
|
215
|
+
$root: import('vue').ComponentPublicInstance | null;
|
|
216
|
+
$parent: import('vue').ComponentPublicInstance | null;
|
|
217
|
+
$host: Element | null;
|
|
218
|
+
$emit: (event: "validate", prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => void;
|
|
219
|
+
$el: any;
|
|
220
|
+
$options: import('vue').ComponentOptionsBase<Readonly<import('element-plus').FormProps> & Readonly<{
|
|
221
|
+
onValidate?: ((prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
222
|
+
}>, {
|
|
223
|
+
validate: (callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
224
|
+
validateField: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>, callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
225
|
+
resetFields: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>) => void;
|
|
226
|
+
clearValidate: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>) => void;
|
|
227
|
+
scrollToField: (prop: import('element-plus').FormItemProp) => void;
|
|
228
|
+
getField: (prop: import('element-plus').FormItemProp) => import('element-plus').FormItemContext | undefined;
|
|
229
|
+
fields: import('vue').Reactive<import('element-plus').FormItemContext[]>;
|
|
230
|
+
setInitialValues: (initModel: Record<string, any>) => void;
|
|
231
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
232
|
+
validate: (prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => void;
|
|
233
|
+
}, string, {
|
|
234
|
+
labelWidth: string | number;
|
|
235
|
+
labelPosition: "left" | "right" | "top";
|
|
236
|
+
requireAsteriskPosition: "left" | "right";
|
|
237
|
+
labelSuffix: string;
|
|
238
|
+
showMessage: boolean;
|
|
239
|
+
validateOnRuleChange: boolean;
|
|
240
|
+
scrollIntoViewOptions: ScrollIntoViewOptions | boolean;
|
|
241
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
242
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
243
|
+
created?: (() => void) | (() => void)[];
|
|
244
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
245
|
+
mounted?: (() => void) | (() => void)[];
|
|
246
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
247
|
+
updated?: (() => void) | (() => void)[];
|
|
248
|
+
activated?: (() => void) | (() => void)[];
|
|
249
|
+
deactivated?: (() => void) | (() => void)[];
|
|
250
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
251
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
252
|
+
destroyed?: (() => void) | (() => void)[];
|
|
253
|
+
unmounted?: (() => void) | (() => void)[];
|
|
254
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
255
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
256
|
+
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
257
|
+
};
|
|
258
|
+
$forceUpdate: () => void;
|
|
259
|
+
$nextTick: typeof import('vue').nextTick;
|
|
260
|
+
$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;
|
|
261
|
+
} & Readonly<{
|
|
262
|
+
labelWidth: string | number;
|
|
263
|
+
labelPosition: "left" | "right" | "top";
|
|
264
|
+
requireAsteriskPosition: "left" | "right";
|
|
265
|
+
labelSuffix: string;
|
|
266
|
+
showMessage: boolean;
|
|
267
|
+
validateOnRuleChange: boolean;
|
|
268
|
+
scrollIntoViewOptions: ScrollIntoViewOptions | boolean;
|
|
269
|
+
}> & Omit<Readonly<import('element-plus').FormProps> & Readonly<{
|
|
270
|
+
onValidate?: ((prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
271
|
+
}>, "fields" | "labelWidth" | "labelPosition" | "requireAsteriskPosition" | "labelSuffix" | "showMessage" | "validateOnRuleChange" | "scrollIntoViewOptions" | "validate" | "validateField" | "resetFields" | "clearValidate" | "scrollToField" | "getField" | "setInitialValues"> & {
|
|
272
|
+
validate: (callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
273
|
+
validateField: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>, callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
274
|
+
resetFields: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>) => void;
|
|
275
|
+
clearValidate: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>) => void;
|
|
276
|
+
scrollToField: (prop: import('element-plus').FormItemProp) => void;
|
|
277
|
+
getField: (prop: import('element-plus').FormItemProp) => import('element-plus').FormItemContext | undefined;
|
|
278
|
+
fields: import('vue').Reactive<import('element-plus').FormItemContext[]>;
|
|
279
|
+
setInitialValues: (initModel: Record<string, any>) => void;
|
|
280
|
+
} & {} & import('vue').ComponentCustomProperties & {} & {
|
|
281
|
+
$slots: {
|
|
282
|
+
default?: (props: {}) => any;
|
|
283
|
+
};
|
|
284
|
+
}) | null;
|
|
285
|
+
}, any, import('vue').ComponentProvideOptions, {
|
|
286
|
+
P: {};
|
|
287
|
+
B: {};
|
|
288
|
+
D: {};
|
|
289
|
+
C: {};
|
|
290
|
+
M: {};
|
|
291
|
+
Defaults: {};
|
|
292
|
+
}, Readonly<{
|
|
293
|
+
formData: Record<string, any>;
|
|
294
|
+
columns: TableColumn[];
|
|
295
|
+
formMode: "add" | "edit";
|
|
296
|
+
formCols: number;
|
|
297
|
+
formLabelWidth: string;
|
|
298
|
+
size?: "large" | "default" | "small";
|
|
299
|
+
dictMap?: Record<string, DictOption[]>;
|
|
300
|
+
}> & Readonly<{}>, {
|
|
301
|
+
validate: () => import('element-plus').FormValidationResult | undefined;
|
|
302
|
+
resetFields: () => void | undefined;
|
|
303
|
+
}, {}, {}, {}, {}> | null;
|
|
304
|
+
}, any>;
|
|
32
305
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
33
306
|
export default _default;
|
|
34
307
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -1,12 +1,21 @@
|
|
|
1
|
-
import { ToolbarConfig } from '../../types';
|
|
1
|
+
import { ToolbarConfig, TableColumn } from '../../types';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
show: boolean;
|
|
4
4
|
toolbarCfg: ToolbarConfig;
|
|
5
5
|
size?: 'large' | 'default' | 'small';
|
|
6
|
+
refreshing?: boolean;
|
|
6
7
|
deps: {
|
|
7
8
|
authPass: (auth?: string) => boolean;
|
|
8
9
|
selectionCount: number;
|
|
9
10
|
showColumnSetting: boolean;
|
|
11
|
+
allColumns: TableColumn[];
|
|
12
|
+
checkedColumns: string[];
|
|
13
|
+
toggleColumn: (prop: string) => void;
|
|
14
|
+
moveColumn: (from: number, to: number) => void;
|
|
15
|
+
showIndex: boolean;
|
|
16
|
+
toggleIndex: () => void;
|
|
17
|
+
selectionVisible: boolean;
|
|
18
|
+
toggleSelection: () => void;
|
|
10
19
|
};
|
|
11
20
|
};
|
|
12
21
|
declare function __VLS_template(): {
|
|
@@ -24,14 +33,12 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
24
33
|
import: () => any;
|
|
25
34
|
export: () => any;
|
|
26
35
|
refresh: () => any;
|
|
27
|
-
"column-setting": () => any;
|
|
28
36
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
29
37
|
onAdd?: (() => any) | undefined;
|
|
30
38
|
"onBatch-delete"?: (() => any) | undefined;
|
|
31
39
|
onImport?: (() => any) | undefined;
|
|
32
40
|
onExport?: (() => any) | undefined;
|
|
33
41
|
onRefresh?: (() => any) | undefined;
|
|
34
|
-
"onColumn-setting"?: (() => any) | undefined;
|
|
35
42
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
36
43
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
37
44
|
export default _default;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { SearchConfig, PaginationConfig, ActionConfig, ToolbarConfig, DrawerConfig, TableColumn } from '../types';
|
|
2
2
|
/** 默认行唯一标识字段名 */
|
|
3
3
|
export declare const DEFAULT_ROW_KEY = "id";
|
|
4
|
-
/**
|
|
5
|
-
export declare const DEFAULT_EMPTY_TEXT = "
|
|
4
|
+
/** 默认空数据提示文字(兜底,locale 优先) */
|
|
5
|
+
export declare const DEFAULT_EMPTY_TEXT = "";
|
|
6
6
|
/** 每页条数选项 */
|
|
7
7
|
export declare const DEFAULT_PAGE_SIZES: number[];
|
|
8
8
|
/** 分页布局字符串 */
|
|
@@ -10,6 +10,7 @@ import { CrudConfig } from '../../types';
|
|
|
10
10
|
* @param deps.setTotal - 设置总记录数的函数
|
|
11
11
|
* @param deps.selection - 选中的行数据列表(Ref)
|
|
12
12
|
* @param deps.emit - 对外触发事件的函数
|
|
13
|
+
* @param deps.t - 国际化翻译函数,接收 (section, key, args?) 返回本地化文字
|
|
13
14
|
*/
|
|
14
15
|
export declare function useCrud(props: {
|
|
15
16
|
crudConfig?: CrudConfig;
|
|
@@ -26,6 +27,7 @@ export declare function useCrud(props: {
|
|
|
26
27
|
setTotal: (total: number) => void;
|
|
27
28
|
selection: Ref<Record<string, unknown>[]>;
|
|
28
29
|
emit: (event: string, ...args: unknown[]) => void;
|
|
30
|
+
t: (section: string, key: string, args?: Record<string, string | number>) => string;
|
|
29
31
|
}): {
|
|
30
32
|
internalData: Ref<Record<string, unknown>[], Record<string, unknown>[]>;
|
|
31
33
|
loadingState: Ref<boolean, boolean>;
|
|
@@ -33,7 +35,7 @@ export declare function useCrud(props: {
|
|
|
33
35
|
fetchData: () => Promise<void>;
|
|
34
36
|
refreshTable: () => Promise<void>;
|
|
35
37
|
doDelete: (row: Record<string, unknown>) => Promise<void>;
|
|
36
|
-
handleDelete: (row: Record<string, unknown
|
|
38
|
+
handleDelete: (row: Record<string, unknown>) => Promise<void>;
|
|
37
39
|
doBatchDelete: (ids: (string | number)[]) => Promise<void>;
|
|
38
40
|
handleBatchDelete: () => Promise<void>;
|
|
39
41
|
};
|
|
@@ -8,6 +8,7 @@ import { ExportConfig, TableColumn } from '../../types';
|
|
|
8
8
|
* @param deps.dictLabel - 字典值转文本函数
|
|
9
9
|
* @param deps.setLoading - 设置加载状态
|
|
10
10
|
* @param deps.getCurrentData - 获取当前数据列表的函数
|
|
11
|
+
* @param deps.t - 国际化翻译函数,接收 (section, key, args?) 返回本地化文字
|
|
11
12
|
*/
|
|
12
13
|
export declare function useExport(props: {
|
|
13
14
|
exportConfig?: ExportConfig;
|
|
@@ -26,6 +27,7 @@ export declare function useExport(props: {
|
|
|
26
27
|
fetchData: () => Promise<void>;
|
|
27
28
|
setLoading: (v: boolean) => void;
|
|
28
29
|
getCurrentData: () => Record<string, unknown>[];
|
|
30
|
+
t: (section: string, key: string, args?: Record<string, string | number>) => string;
|
|
29
31
|
}): {
|
|
30
32
|
handleExport: () => Promise<void>;
|
|
31
33
|
exporting: Ref<boolean, boolean>;
|
|
@@ -4,7 +4,7 @@ import { DrawerConfig } from '../../types';
|
|
|
4
4
|
* @param props.drawerConfig - 抽屉/弹窗的外观配置
|
|
5
5
|
* @param props.rowKey - 数据行的唯一键(用于编辑时取 ID)
|
|
6
6
|
* @returns formVisible - 表单是否显示
|
|
7
|
-
* @returns
|
|
7
|
+
* @returns formMode - 表单模式:add | edit | view
|
|
8
8
|
* @returns editingRow - 当前编辑的行数据(新增时为 null)
|
|
9
9
|
* @returns formData - 表单绑定的数据对象
|
|
10
10
|
* @returns saving - 是否正在保存(加载状态)
|
|
@@ -12,6 +12,7 @@ import { DrawerConfig } from '../../types';
|
|
|
12
12
|
* @returns drawerCfg - 合并默认值后的配置
|
|
13
13
|
* @returns openAdd - 打开新增表单
|
|
14
14
|
* @returns openEdit - 打开编辑表单
|
|
15
|
+
* @returns openView - 打开查看表单
|
|
15
16
|
* @returns closeForm - 关闭表单
|
|
16
17
|
*/
|
|
17
18
|
export declare function useForm(props: {
|
|
@@ -19,7 +20,7 @@ export declare function useForm(props: {
|
|
|
19
20
|
rowKey?: string;
|
|
20
21
|
}): {
|
|
21
22
|
formVisible: ReturnType<typeof ref<boolean>>;
|
|
22
|
-
|
|
23
|
+
formMode: ReturnType<typeof ref<'add' | 'edit' | 'view'>>;
|
|
23
24
|
editingRow: ReturnType<typeof ref<Record<string, unknown> | null>>;
|
|
24
25
|
formData: ReturnType<typeof ref<Record<string, unknown>>>;
|
|
25
26
|
saving: ReturnType<typeof ref<boolean>>;
|
|
@@ -27,5 +28,6 @@ export declare function useForm(props: {
|
|
|
27
28
|
drawerCfg: DrawerConfig;
|
|
28
29
|
openAdd: () => void;
|
|
29
30
|
openEdit: (row: Record<string, unknown>) => void;
|
|
31
|
+
openView: (row: Record<string, unknown>) => void;
|
|
30
32
|
closeForm: () => void;
|
|
31
33
|
};
|
|
@@ -1,15 +1,5 @@
|
|
|
1
1
|
import { ComputedRef } from 'vue';
|
|
2
2
|
import { TableColumn, SelectionConfig, ColumnSettingConfig, AutoHeightConfig } from '../../types';
|
|
3
|
-
/**
|
|
4
|
-
* @param props.columns - 表格列配置
|
|
5
|
-
* @param props.selectionConfig - 选择列配置
|
|
6
|
-
* @param props.columnSetting - 列设置配置
|
|
7
|
-
* @param props.rowKey - 数据行唯一标识字段名
|
|
8
|
-
* @param props.tableHeight - 固定表格高度
|
|
9
|
-
* @param props.tableMaxHeight - 表格最大高度
|
|
10
|
-
* @param props.autoHeight - 自适应高度配置
|
|
11
|
-
* @param deps.authPass - 权限判断函数(用于按权限过滤列)
|
|
12
|
-
*/
|
|
13
3
|
export declare function useTable(props: {
|
|
14
4
|
columns: TableColumn[];
|
|
15
5
|
data?: Record<string, unknown>[];
|
|
@@ -32,11 +22,32 @@ export declare function useTable(props: {
|
|
|
32
22
|
singleSelection: import('vue').Ref<string | number | null, string | number | null>;
|
|
33
23
|
columnSettingVisible: import('vue').Ref<boolean, boolean>;
|
|
34
24
|
checkedColumns: import('vue').Ref<string[], string[]>;
|
|
25
|
+
columnOrder: import('vue').Ref<string[], string[]>;
|
|
26
|
+
columnWidths: import('vue').Ref<Record<string, string | number>, Record<string, string | number>>;
|
|
35
27
|
selectionCfg: ComputedRef<SelectionConfig>;
|
|
36
28
|
columnSettingCfg: ComputedRef<ColumnSettingConfig>;
|
|
37
29
|
showColumnSetting: ComputedRef<boolean | undefined>;
|
|
30
|
+
showIndex: import('vue').Ref<boolean, boolean>;
|
|
31
|
+
selectionVisible: import('vue').Ref<boolean, boolean>;
|
|
38
32
|
allColumns: ComputedRef<TableColumn[]>;
|
|
39
|
-
visibleColumns: ComputedRef<
|
|
33
|
+
visibleColumns: ComputedRef<{
|
|
34
|
+
width: string | number;
|
|
35
|
+
prop: string;
|
|
36
|
+
label: string;
|
|
37
|
+
minWidth?: string | number;
|
|
38
|
+
align?: import('../../types').AlignType;
|
|
39
|
+
fixed?: import('../../types').FixedType;
|
|
40
|
+
sortable?: boolean;
|
|
41
|
+
show?: boolean;
|
|
42
|
+
showTooltip?: boolean;
|
|
43
|
+
formatter?: (row: Record<string, unknown>, column: TableColumn, cellValue: unknown, index: number) => unknown;
|
|
44
|
+
dictKey?: string;
|
|
45
|
+
slotName?: string;
|
|
46
|
+
search?: import('../../types').ColumnSearchItem;
|
|
47
|
+
form?: import('../../types').ColumnFormItem;
|
|
48
|
+
auth?: string;
|
|
49
|
+
children?: TableColumn[];
|
|
50
|
+
}[]>;
|
|
40
51
|
tableComputedHeight: ComputedRef<string | number | undefined>;
|
|
41
52
|
tableMaxHeightProp: ComputedRef<string | number | undefined>;
|
|
42
53
|
tableWrapperStyle: ComputedRef<{
|
|
@@ -46,4 +57,10 @@ export declare function useTable(props: {
|
|
|
46
57
|
}>;
|
|
47
58
|
handleSelectionChange: (val: Record<string, unknown>[]) => void;
|
|
48
59
|
handleSingleSelect: (row: Record<string, unknown>) => void;
|
|
60
|
+
toggleColumn: (prop: string) => void;
|
|
61
|
+
toggleIndex: () => void;
|
|
62
|
+
toggleSelection: () => void;
|
|
63
|
+
moveColumn: (fromIdx: number, toIdx: number) => void;
|
|
64
|
+
onColumnResize: (newWidth: string | number, col: any) => void;
|
|
65
|
+
saveToStorage: () => void;
|
|
49
66
|
};
|
|
@@ -3,6 +3,7 @@ type __VLS_Props = {
|
|
|
3
3
|
columns: TableColumn[];
|
|
4
4
|
data?: Record<string, any>[];
|
|
5
5
|
loading?: boolean;
|
|
6
|
+
readOnly?: boolean;
|
|
6
7
|
searchConfig?: any;
|
|
7
8
|
pagination?: any;
|
|
8
9
|
actionConfig?: ActionConfig | boolean;
|
|
@@ -30,8 +31,25 @@ declare function __VLS_template(): {
|
|
|
30
31
|
slots: Partial<Record<string, (_: {
|
|
31
32
|
row: import('element-plus/es/components/table/src/table/defaults.mjs').DefaultRow;
|
|
32
33
|
index: number;
|
|
33
|
-
column:
|
|
34
|
-
|
|
34
|
+
column: {
|
|
35
|
+
width: string | number;
|
|
36
|
+
prop: string;
|
|
37
|
+
label: string;
|
|
38
|
+
minWidth?: string | number;
|
|
39
|
+
align?: import('../types').AlignType;
|
|
40
|
+
fixed?: import('../types').FixedType;
|
|
41
|
+
sortable?: boolean;
|
|
42
|
+
show?: boolean;
|
|
43
|
+
showTooltip?: boolean;
|
|
44
|
+
formatter?: (row: Record<string, unknown>, column: TableColumn, cellValue: unknown, index: number) => unknown;
|
|
45
|
+
dictKey?: string;
|
|
46
|
+
slotName?: string;
|
|
47
|
+
search?: import('../types').ColumnSearchItem;
|
|
48
|
+
form?: import('../types').ColumnFormItem;
|
|
49
|
+
auth?: string;
|
|
50
|
+
children?: TableColumn[];
|
|
51
|
+
};
|
|
52
|
+
}) => any>> & {
|
|
35
53
|
'search-action'?(_: {
|
|
36
54
|
params: Record<string, unknown>;
|
|
37
55
|
}): any;
|
|
@@ -43,6 +61,18 @@ declare function __VLS_template(): {
|
|
|
43
61
|
row: import('element-plus/es/components/table/src/table/defaults.mjs').DefaultRow;
|
|
44
62
|
}): any;
|
|
45
63
|
empty?(_: {}): any;
|
|
64
|
+
'add-form'?(_: {
|
|
65
|
+
row: Record<string, unknown> | null;
|
|
66
|
+
formData: Record<string, unknown>;
|
|
67
|
+
}): any;
|
|
68
|
+
'edit-form'?(_: {
|
|
69
|
+
row: Record<string, unknown> | null;
|
|
70
|
+
formData: Record<string, unknown>;
|
|
71
|
+
}): any;
|
|
72
|
+
'view-form'?(_: {
|
|
73
|
+
row: Record<string, unknown> | null;
|
|
74
|
+
formData: Record<string, unknown>;
|
|
75
|
+
}): any;
|
|
46
76
|
};
|
|
47
77
|
refs: {
|
|
48
78
|
tableRef: {
|
|
@@ -959,6 +989,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
|
|
|
959
989
|
emptyText: string;
|
|
960
990
|
border: boolean;
|
|
961
991
|
stripe: boolean;
|
|
992
|
+
readOnly: boolean;
|
|
962
993
|
authMode: "hide" | "disabled";
|
|
963
994
|
highlightCurrentRow: boolean;
|
|
964
995
|
rowKey: string;
|