@maxtan/ez-ui 0.24.0 → 1.0.1

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.
@@ -2,6 +2,7 @@ import { AllowedComponentProps } from 'vue';
2
2
  import { App } from 'vue';
3
3
  import { Arrayable } from 'element-plus/es/utils/typescript.mjs';
4
4
  import { Awaitable } from 'element-plus/es/utils/typescript.mjs';
5
+ import { BasePage as BasePage_2 } from '.';
5
6
  import { CheckboxGroupValueType } from 'element-plus';
6
7
  import { CheckboxOption as CheckboxOption_2 } from '.';
7
8
  import { CheckboxProps as CheckboxProps_2 } from '.';
@@ -17,18 +18,23 @@ import { ComponentPublicInstance as ComponentPublicInstance_2 } from 'vue';
17
18
  import { CreateComponentPublicInstanceWithMixins } from 'vue';
18
19
  import { DebuggerEvent } from 'vue';
19
20
  import { DialogProps as DialogProps_2 } from '.';
20
- import { DialogSolts as DialogSolts_2 } from '.';
21
+ import { DialogSlots as DialogSlots_2 } from '.';
21
22
  import { DynamicFormProps as DynamicFormProps_2 } from '.';
22
23
  import { DynamicFormSlots as DynamicFormSlots_2 } from '.';
23
24
  import { EpPropFinalized } from 'element-plus/es/utils/index.mjs';
24
25
  import { EpPropMergeType } from 'element-plus/es/utils/index.mjs';
25
26
  import { ExtractPropTypes as ExtractPropTypes_2 } from 'vue';
26
27
  import { EzFormItemProps as EzFormItemProps_2 } from '.';
27
- import { FastTableSolt as FastTableSolt_2 } from '.';
28
+ import { FastTableEmits as FastTableEmits_2 } from '.';
29
+ import { FastTableErrorContext as FastTableErrorContext_2 } from '.';
30
+ import { FastTableExpose as FastTableExpose_2 } from '.';
28
31
  import { FormData as FormData_3 } from '.';
32
+ import { FormGroupConfig as FormGroupConfig_2 } from '.';
33
+ import { FormInstance } from 'element-plus';
29
34
  import { FormItemConfig as FormItemConfig_2 } from '.';
30
35
  import { FormItemContext } from 'element-plus';
31
36
  import { FormItemProp } from 'element-plus';
37
+ import { FormItemProps } from 'element-plus';
32
38
  import { FormItemRule } from 'element-plus';
33
39
  import { FormProps } from 'element-plus';
34
40
  import { FormValidateCallback } from 'element-plus';
@@ -37,29 +43,37 @@ import { GlobalComponents } from 'vue';
37
43
  import { GlobalDirectives } from 'vue';
38
44
  import { IconProps as IconProps_2 } from '.';
39
45
  import { ImageUpload as ImageUpload_2 } from '.';
46
+ import { ImageUploadModelValue as ImageUploadModelValue_2 } from '.';
40
47
  import { Mutable } from 'element-plus/es/utils/typescript.mjs';
41
48
  import { nextTick as nextTick_2 } from 'vue';
42
49
  import { OnCleanup } from '@vue/reactivity';
50
+ import { Page as Page_2 } from '.';
51
+ import { PaginationProps as PaginationProps_2 } from '.';
43
52
  import { Plugin as Plugin_2 } from 'vue';
44
53
  import { PrimitiveValue as PrimitiveValue_2 } from '..';
45
54
  import { PropType as PropType_2 } from 'vue';
46
55
  import { PublicProps } from 'vue';
56
+ import { QueryPanelProps as QueryPanelProps_2 } from '.';
47
57
  import { RadioOption as RadioOption_2 } from '.';
48
58
  import { RadioProps as RadioProps_2 } from '.';
49
59
  import { RadioType as RadioType_2 } from '.';
50
60
  import { Reactive } from 'vue';
51
- import { SearchFormProps as SearchFormProps_2 } from '.';
52
- import { SearchParams as SearchParams_2 } from '.';
61
+ import { RenderContentFunction } from 'element-plus';
62
+ import { SelectModelValue as SelectModelValue_2 } from '.';
53
63
  import { SelectOption as SelectOption_2 } from '.';
54
64
  import { SelectProps as SelectProps_2 } from '.';
65
+ import { ShallowRef as ShallowRef_2 } from 'vue';
55
66
  import { ShallowUnwrapRef } from 'vue';
56
67
  import { Slot as Slot_2 } from 'vue';
57
- import { TableColumn as TableColumn_2 } from '..';
58
- import { TableColumn as TableColumn_3 } from '.';
59
- import { TableColumnCtx } from 'element-plus';
68
+ import { StyleValue } from 'vue';
69
+ import { TableColumn as TableColumn_2 } from '.';
60
70
  import { TableExpose as TableExpose_2 } from '.';
61
- import { TableHeaderProps as TableHeaderProps_2 } from '.';
62
- import { TableSolt as TableSolt_2 } from '.';
71
+ import { TableInstance } from 'element-plus';
72
+ import { TableRowKey as TableRowKey_2 } from '..';
73
+ import { TableRowKey as TableRowKey_3 } from '.';
74
+ import { TableSlot as TableSlot_2 } from '.';
75
+ import { TreeKey } from 'element-plus';
76
+ import { TreeOptionProps } from 'element-plus';
63
77
  import { UploadData } from 'element-plus';
64
78
  import { UploadFile } from 'element-plus';
65
79
  import { UploadFiles } from 'element-plus';
@@ -77,7 +91,7 @@ import { WatchStopHandle } from 'vue';
77
91
  /**
78
92
  * 异步回调函数类型
79
93
  */
80
- export declare type AsyncCallbackFn<T = any> = (value: T) => Promise<void>;
94
+ export declare type AsyncCallbackFn<T = unknown> = (value: T) => Promise<void>;
81
95
 
82
96
  /**
83
97
  * 基础组件 Props 接口
@@ -98,7 +112,7 @@ export declare interface BaseComponentProps {
98
112
  * 基础选项接口
99
113
  * 适用于 select、radio、checkbox 等选择类组件
100
114
  */
101
- export declare interface BaseOption<T = any> {
115
+ export declare interface BaseOption<T = PrimitiveValue> {
102
116
  /** 显示标签 */
103
117
  label: string;
104
118
  /** 选项值 */
@@ -106,33 +120,86 @@ export declare interface BaseOption<T = any> {
106
120
  /** 是否禁用 */
107
121
  disabled?: boolean;
108
122
  /** 扩展属性 */
109
- [key: string]: any;
123
+ [key: string]: unknown;
110
124
  }
111
125
 
112
- declare interface BasePage {
126
+ export declare interface BasePage {
113
127
  current: number;
114
128
  size: number;
115
129
  }
116
130
 
117
- declare interface BaseSort {
118
- desc?: string;
119
- asc?: string;
131
+ /**
132
+ * 通用分页/排序参数基类
133
+ * 作为查询页与列表页的共享参数协议基础
134
+ */
135
+ export declare interface BaseQueryParams {
136
+ /** 当前页 */
137
+ current: number;
138
+ /** 每页条数 */
139
+ size: number;
140
+ /** 升序字段 */
141
+ asc?: string | null;
142
+ /** 降序字段 */
143
+ desc?: string | null;
144
+ }
145
+
146
+ export declare interface BaseSort {
147
+ desc?: string | null;
148
+ asc?: string | null;
120
149
  }
121
150
 
122
151
  /**
123
152
  * 通用回调函数类型
124
153
  */
125
- export declare type CallbackFn<T = any> = (value: T) => void;
154
+ export declare type CallbackFn<T = unknown> = (value: T) => void;
155
+
156
+ /**
157
+ * 仅声明当前 DynamicForm 已覆盖的 cascader attrs;
158
+ * 其余字段保持开放,确保上游组件新增能力时无需这里抢先适配。
159
+ */
160
+ export declare interface CascaderFormItemAttrs {
161
+ [key: string]: unknown;
162
+ props?: FormCascaderProps;
163
+ multiple?: boolean;
164
+ filterable?: boolean;
165
+ clearable?: boolean;
166
+ showAllLevels?: boolean;
167
+ collapseTags?: boolean;
168
+ collapseTagsTooltip?: boolean;
169
+ maxCollapseTags?: number;
170
+ debounce?: number;
171
+ separator?: string;
172
+ placement?: string;
173
+ popperClass?: string;
174
+ popperStyle?: StyleValue;
175
+ teleported?: boolean;
176
+ validateEvent?: boolean;
177
+ placeholder?: string;
178
+ }
179
+
180
+ export declare interface CascaderFormItemConfig<T = unknown> extends FormItemConfigBase<T, FormItemAttrs<CascaderFormItemAttrs>, FormCascaderOption[]> {
181
+ /** 级联选择 */
182
+ type: FormItemType.CASCADER | `${FormItemType.CASCADER}`;
183
+ component?: never;
184
+ }
126
185
 
127
186
  /**
128
187
  * 触发方式为 change 的表单项类型
129
188
  */
130
189
  export declare const CHANGE_TRIGGER_TYPES: Set<string>;
131
190
 
191
+ export declare type CheckboxFormItemAttrs = FormItemAttrs<Omit<CheckboxProps, 'options'>>;
192
+
193
+ export declare interface CheckboxFormItemConfig<T = unknown> extends FormItemConfigBase<T, CheckboxFormItemAttrs, CheckboxOption[]> {
194
+ /** 多选框 */
195
+ type: FormItemType.CHECKBOX | `${FormItemType.CHECKBOX}`;
196
+ component?: never;
197
+ }
198
+
132
199
  /**
133
200
  * Checkbox 选项接口(扩展了基础选项)
134
201
  */
135
- export declare interface CheckboxOption extends BaseOption<string | number | boolean | Record<string, unknown>> {
202
+ export declare interface CheckboxOption extends BaseOption<PrimitiveValue> {
136
203
  /** true 时的标签 */
137
204
  trueLabel?: string | number;
138
205
  /** false 时的标签 */
@@ -164,16 +231,44 @@ export declare type ComponentSize = 'large' | 'default' | 'small';
164
231
  */
165
232
  export declare type ComponentType = 'default' | 'button' | 'border';
166
233
 
234
+ export declare const createTypedFastTable: <T extends object, P extends object = QueryParams_2>() => TypedFastTableComponent<T, P>;
235
+
236
+ export declare interface CustomFormItemConfig<T = unknown> extends FormItemConfigBase<T, FormFieldComponentAttrs<T>, never> {
237
+ /**
238
+ * 自定义字段组件。
239
+ * 组件需要遵循字段契约:接收 modelValue、disabled,并通过 update:modelValue 回传值。
240
+ */
241
+ component: Component_2;
242
+ /** 自定义组件可选描述性类型,不参与内建分支判断 */
243
+ type?: string;
244
+ /** 自定义组件分支不会自动透传 options */
245
+ options?: never;
246
+ }
247
+
167
248
  declare const _default: {
168
249
  install: (app: App) => void;
169
250
  };
170
251
  export default _default;
171
252
 
253
+ export declare interface DefaultFormItemConfig<T = unknown> extends FormItemConfigBase<T> {
254
+ /** 内建表单项类型;不传时默认按 input 渲染 */
255
+ type?: DefaultFormItemType;
256
+ /** 默认分支不接受自定义组件,使用 component 分支时请显式传 component */
257
+ component?: never;
258
+ }
259
+
260
+ export declare type DefaultFormItemType = StandardFormItemType | `${StandardFormItemType}`;
261
+
172
262
  export declare enum DialogDefaultText {
173
263
  CANCEL = "\u53D6\u6D88",
174
264
  CONFIRM = "\u786E\u5B9A"
175
265
  }
176
266
 
267
+ export declare interface DialogEmits {
268
+ (e: 'cancel'): void;
269
+ (e: 'confirm'): void;
270
+ }
271
+
177
272
  export declare interface DialogProps {
178
273
  title?: string;
179
274
  loading?: boolean;
@@ -182,12 +277,17 @@ export declare interface DialogProps {
182
277
  }
183
278
 
184
279
  /** 弹窗插槽类型 */
185
- export declare type DialogSolts = {
280
+ export declare type DialogSlots = {
186
281
  header?: () => VNodeChild;
187
282
  default?: () => VNodeChild;
188
283
  footer?: () => VNodeChild;
189
284
  };
190
285
 
286
+ /**
287
+ * @deprecated 请改用 DialogSlots。
288
+ */
289
+ export declare type DialogSolts = DialogSlots;
290
+
191
291
  /**
192
292
  * 动态表单暴露的方法
193
293
  */
@@ -200,10 +300,32 @@ export declare interface DynamicFormExpose {
200
300
  clearValidate: (props?: string | string[]) => void;
201
301
  /** 获取表单数据(深拷贝) */
202
302
  getFormData: () => FormData_2;
303
+ /** 获取序列化后的提交数据 */
304
+ getSubmitData: () => FormData_2;
203
305
  /** 设置表单数据 */
204
306
  setFormData: (data: FormData_2, merge?: boolean) => void;
307
+ /** 设置需要反序列化后回填的提交数据,仅回填已声明的表单字段 */
308
+ setSubmitData: (data: FormData_2, merge?: boolean) => void;
309
+ /** 重置到当前基线数据 */
310
+ resetForm: () => void;
311
+ /** 将当前表单数据记录为新的基线 */
312
+ captureInitialData: () => void;
205
313
  /** 表单实例 */
206
- formRef: any;
314
+ formRef: ShallowRef_2<FormInstance | undefined>;
315
+ }
316
+
317
+ /**
318
+ * 分组插槽作用域
319
+ */
320
+ export declare interface DynamicFormGroupSlotScope {
321
+ /** 分组配置 */
322
+ group: FormGroupConfig;
323
+ /** 分组索引 */
324
+ index: number;
325
+ /** 分组内可见项 */
326
+ items: FormItemConfig[];
327
+ /** 完整表单数据 */
328
+ formData: FormData_2;
207
329
  }
208
330
 
209
331
  /**
@@ -219,8 +341,10 @@ export declare interface DynamicFormLabelSlotScope {
219
341
  * 继承 FormProps,排除会干扰内部逻辑的属性,并添加组件特有属性
220
342
  */
221
343
  export declare interface DynamicFormProps extends Partial<Omit<FormProps, 'model' | 'rules' | 'showMessage'>> {
222
- /** 表单配置项 */
223
- items: FormItemConfig[];
344
+ /** 单分组场景的简写配置,适合简单平铺表单 */
345
+ items?: FormItemConfig[];
346
+ /** 标准分组配置,适合长期维护的正式模式 */
347
+ groups?: FormGroupConfig[];
224
348
  /** 双向绑定的表单数据 */
225
349
  modelValue?: FormData_2;
226
350
  /** 栅格布局列数(默认 1) */
@@ -235,10 +359,11 @@ export declare interface DynamicFormProps extends Partial<Omit<FormProps, 'model
235
359
  * 动态表单插槽
236
360
  */
237
361
  export declare interface DynamicFormSlots {
238
- /** 表单项自定义插槽 */
239
- [key: string]: (scope: DynamicFormSlotScope) => VNode_2 | VNode_2[];
240
- /** 表单项标签插槽 */
241
- [key: `label-${string}`]: (scope: DynamicFormLabelSlotScope) => VNode_2 | VNode_2[];
362
+ /**
363
+ * 动态表单支持项级与分组级的动态插槽,
364
+ * 统一放宽为 any 作用域,避免模板静态校验冲突。
365
+ */
366
+ [key: string]: ((scope: any) => VNodeChild) | undefined;
242
367
  }
243
368
 
244
369
  /**
@@ -248,7 +373,7 @@ export declare interface DynamicFormSlotScope {
248
373
  /** 表单项配置 */
249
374
  item: FormItemConfig;
250
375
  /** 当前值 */
251
- value: any;
376
+ value: unknown;
252
377
  /** 完整表单数据 */
253
378
  formData: FormData_2;
254
379
  }
@@ -296,13 +421,14 @@ export declare const EzDialog: ({
296
421
  new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly<{
297
422
  modelValue?: boolean;
298
423
  } & DialogProps_2> & Readonly<{
299
- onConfirm?: (...args: any[]) => any;
300
- onCancel?: (...args: any[]) => any;
424
+ onConfirm?: () => any;
425
+ onCancel?: () => any;
301
426
  "onUpdate:modelValue"?: (value: boolean) => any;
302
427
  }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
303
- confirm: (...args: any[]) => void;
304
- cancel: (...args: any[]) => void;
305
- "update:modelValue": (value: boolean) => void;
428
+ "update:modelValue": (value: boolean) => any;
429
+ } & {
430
+ confirm: () => any;
431
+ cancel: () => any;
306
432
  }, PublicProps, {
307
433
  loading: boolean;
308
434
  title: string;
@@ -318,8 +444,8 @@ export declare const EzDialog: ({
318
444
  }, Readonly<{
319
445
  modelValue?: boolean;
320
446
  } & DialogProps_2> & Readonly<{
321
- onConfirm?: (...args: any[]) => any;
322
- onCancel?: (...args: any[]) => any;
447
+ onConfirm?: () => any;
448
+ onCancel?: () => any;
323
449
  "onUpdate:modelValue"?: (value: boolean) => any;
324
450
  }>, {}, {}, {}, {}, {
325
451
  loading: boolean;
@@ -333,20 +459,21 @@ export declare const EzDialog: ({
333
459
  } & ComponentOptionsBase<Readonly<{
334
460
  modelValue?: boolean;
335
461
  } & DialogProps_2> & Readonly<{
336
- onConfirm?: (...args: any[]) => any;
337
- onCancel?: (...args: any[]) => any;
462
+ onConfirm?: () => any;
463
+ onCancel?: () => any;
338
464
  "onUpdate:modelValue"?: (value: boolean) => any;
339
465
  }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
340
- confirm: (...args: any[]) => void;
341
- cancel: (...args: any[]) => void;
342
- "update:modelValue": (value: boolean) => void;
466
+ "update:modelValue": (value: boolean) => any;
467
+ } & {
468
+ confirm: () => any;
469
+ cancel: () => any;
343
470
  }, string, {
344
471
  loading: boolean;
345
472
  title: string;
346
473
  cancelText: string;
347
474
  confirmText: string;
348
475
  }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
349
- $slots: Readonly<DialogSolts_2> & DialogSolts_2;
476
+ $slots: Readonly<DialogSlots_2> & DialogSlots_2;
350
477
  }) & Plugin_2) & Record<string, any>;
351
478
 
352
479
  export declare const EzDynamicForm: ({
@@ -359,15 +486,20 @@ export declare const EzDynamicForm: ({
359
486
  validateField: (props: string | string[]) => Promise<boolean>;
360
487
  clearValidate: (props?: string | string[]) => void;
361
488
  getFormData: () => FormData_3;
489
+ getSubmitData: () => FormData_3;
362
490
  setFormData: (data: FormData_3, merge?: boolean) => void;
363
- formRef: any;
491
+ setSubmitData: (data: FormData_3, merge?: boolean) => void;
492
+ resetForm: () => void;
493
+ captureInitialData: () => void;
494
+ formRef: ShallowRef_2<FormInstance | undefined>;
364
495
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
365
496
  "update:modelValue": (value: FormData_3) => any;
366
497
  }, PublicProps, {
367
498
  items: FormItemConfig_2[];
499
+ groups: FormGroupConfig_2[];
368
500
  cols: number;
369
501
  gutter: number;
370
- }, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
502
+ }, true, {}, {}, GlobalComponents, GlobalDirectives, string, {
371
503
  formRef: {
372
504
  $: ComponentInternalInstance;
373
505
  $data: {};
@@ -387,23 +519,23 @@ export declare const EzDynamicForm: ({
387
519
  readonly scrollToError: boolean;
388
520
  }> & Omit<{
389
521
  readonly disabled: boolean;
522
+ readonly labelWidth: EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
390
523
  readonly labelPosition: EpPropMergeType<StringConstructor, "top" | "left" | "right", unknown>;
524
+ readonly inlineMessage: boolean;
525
+ readonly showMessage: EpPropMergeType<BooleanConstructor, unknown, unknown>;
391
526
  readonly requireAsteriskPosition: EpPropMergeType<StringConstructor, "left" | "right", unknown>;
392
- readonly labelWidth: EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
393
527
  readonly labelSuffix: string;
394
528
  readonly inline: boolean;
395
- readonly inlineMessage: boolean;
396
529
  readonly statusIcon: boolean;
397
- readonly showMessage: EpPropMergeType<BooleanConstructor, unknown, unknown>;
398
530
  readonly validateOnRuleChange: EpPropMergeType<BooleanConstructor, unknown, unknown>;
399
531
  readonly hideRequiredAsterisk: boolean;
400
532
  readonly scrollToError: boolean;
401
533
  readonly scrollIntoViewOptions: true;
402
534
  readonly size?: EpPropMergeType<StringConstructor, "" | "small" | "large" | "default", unknown>;
403
- readonly model?: Record<string, any>;
404
535
  readonly rules?: Partial<Record<string, Arrayable<FormItemRule>>>;
536
+ readonly model?: Record<string, any>;
405
537
  onValidate?: ((prop: FormItemProp, isValid: boolean, message: string) => any) | undefined;
406
- } & VNodeProps & AllowedComponentProps & ComponentCustomProps, "disabled" | "labelPosition" | "requireAsteriskPosition" | "labelWidth" | "labelSuffix" | "inline" | "inlineMessage" | "statusIcon" | "showMessage" | "validateOnRuleChange" | "hideRequiredAsterisk" | "scrollToError" | "scrollIntoViewOptions">;
538
+ } & VNodeProps & AllowedComponentProps & ComponentCustomProps, "disabled" | "labelWidth" | "labelPosition" | "inlineMessage" | "showMessage" | "requireAsteriskPosition" | "labelSuffix" | "inline" | "statusIcon" | "validateOnRuleChange" | "hideRequiredAsterisk" | "scrollToError" | "scrollIntoViewOptions">;
407
539
  $attrs: {
408
540
  [x: string]: unknown;
409
541
  };
@@ -535,7 +667,7 @@ export declare const EzDynamicForm: ({
535
667
  readonly disabled: BooleanConstructor;
536
668
  }>> & {
537
669
  onValidate?: ((prop: FormItemProp, isValid: boolean, message: string) => any) | undefined;
538
- }, "disabled" | "labelPosition" | "requireAsteriskPosition" | "labelWidth" | "labelSuffix" | "inline" | "inlineMessage" | "statusIcon" | "showMessage" | "validateOnRuleChange" | "hideRequiredAsterisk" | "scrollToError" | "scrollIntoViewOptions" | "fields" | "validate" | "clearValidate" | "validateField" | "resetFields" | "scrollToField" | "getField" | "setInitialValues"> & ShallowUnwrapRef< {
670
+ }, "disabled" | "labelWidth" | "labelPosition" | "inlineMessage" | "showMessage" | "fields" | "requireAsteriskPosition" | "labelSuffix" | "inline" | "statusIcon" | "validateOnRuleChange" | "hideRequiredAsterisk" | "scrollToError" | "scrollIntoViewOptions" | "validate" | "validateField" | "resetFields" | "clearValidate" | "scrollToField" | "getField" | "setInitialValues"> & ShallowUnwrapRef< {
539
671
  validate: (callback?: FormValidateCallback) => FormValidationResult;
540
672
  validateField: (props?: Arrayable<FormItemProp>, callback?: FormValidateCallback) => FormValidationResult;
541
673
  resetFields: (props?: Arrayable<FormItemProp>) => void;
@@ -565,10 +697,15 @@ export declare const EzDynamicForm: ({
565
697
  validateField: (props: string | string[]) => Promise<boolean>;
566
698
  clearValidate: (props?: string | string[]) => void;
567
699
  getFormData: () => FormData_3;
700
+ getSubmitData: () => FormData_3;
568
701
  setFormData: (data: FormData_3, merge?: boolean) => void;
569
- formRef: any;
702
+ setSubmitData: (data: FormData_3, merge?: boolean) => void;
703
+ resetForm: () => void;
704
+ captureInitialData: () => void;
705
+ formRef: ShallowRef_2<FormInstance | undefined>;
570
706
  }, {}, {}, {}, {
571
707
  items: FormItemConfig_2[];
708
+ groups: FormGroupConfig_2[];
572
709
  cols: number;
573
710
  gutter: number;
574
711
  }>;
@@ -584,28 +721,35 @@ validate: () => Promise<boolean>;
584
721
  validateField: (props: string | string[]) => Promise<boolean>;
585
722
  clearValidate: (props?: string | string[]) => void;
586
723
  getFormData: () => FormData_3;
724
+ getSubmitData: () => FormData_3;
587
725
  setFormData: (data: FormData_3, merge?: boolean) => void;
588
- formRef: any;
726
+ setSubmitData: (data: FormData_3, merge?: boolean) => void;
727
+ resetForm: () => void;
728
+ captureInitialData: () => void;
729
+ formRef: ShallowRef_2<FormInstance | undefined>;
589
730
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
590
731
  "update:modelValue": (value: FormData_3) => any;
591
732
  }, string, {
592
733
  items: FormItemConfig_2[];
734
+ groups: FormGroupConfig_2[];
593
735
  cols: number;
594
736
  gutter: number;
595
737
  }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
596
738
  $slots: Readonly<DynamicFormSlots_2> & DynamicFormSlots_2;
597
739
  }) & Plugin_2) & Record<string, any>;
598
740
 
599
- export declare const EzFastTable: ((<T = any>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
741
+ export declare const EzFastTable: ((<T extends Record<string, unknown> = Record<string, unknown>, P extends QueryParams_2 = QueryParams_2>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
600
742
  attrs: any;
601
- slots: Readonly<NonNullable<FastTableSolt_2<T>>> & {
602
- form: () => void;
603
- header: (props: TableHeaderProps_2<T>) => void;
604
- freeArea: () => void;
743
+ slots: Readonly<NonNullable<FastTableSlot<T, P>>> & {
744
+ form: (props: FastTableFormSlotProps<P>) => void;
745
+ header: (props: TableHeaderProps<T>) => void;
746
+ freeArea: (props: FastTableFormSlotProps<P>) => void;
747
+ empty: () => void;
748
+ error: (props: FastTableErrorSlotProps<P>) => void;
605
749
  } & {
606
750
  [x: string]: (props: {
607
751
  row: T;
608
- column: TableColumn_2<T>;
752
+ column: TableColumn<T>;
609
753
  $index: number;
610
754
  }) => VNodeChild;
611
755
  } & {
@@ -613,43 +757,44 @@ export declare const EzFastTable: ((<T = any>(__VLS_props: NonNullable<Awaited<t
613
757
  empty?: () => VNodeChild;
614
758
  } & {
615
759
  [x: `header-${string}`]: (props: {
616
- column: TableColumn_2<T>;
760
+ column: TableColumn<T>;
617
761
  $index: number;
618
762
  }) => VNodeChild;
619
763
  };
620
- emit: ((event: "reset" | "changePage" | "query", ...args: any[]) => void) & (((evt: "update:columns", value: TableColumn_2<T>[]) => void) & ((evt: "update:params", value: SearchParams_2) => void) & ((evt: "update:loading", value: boolean) => void));
764
+ emit: FastTableEmits_2<T, P>;
621
765
  }, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
622
766
  props: {
623
- readonly onReset?: (...args: any[]) => any;
624
- readonly "onUpdate:columns"?: (value: TableColumn_2<T>[]) => any;
625
- readonly "onUpdate:params"?: (value: SearchParams_2) => any;
626
- readonly "onUpdate:loading"?: (value: boolean) => any;
627
- readonly onChangePage?: (...args: any[]) => any;
628
- readonly onQuery?: (...args: any[]) => any;
629
- params?: SearchParams_2;
630
- columns?: TableColumn_2<T>[] & TableColumn_2<any>[];
767
+ readonly onReset?: () => any;
768
+ readonly "onUpdate:columns"?: (columns: TableColumn<T>[]) => any;
769
+ readonly "onUpdate:params"?: (params: P) => any;
770
+ readonly "onUpdate:loading"?: (loading: boolean) => any;
771
+ readonly onChangePage?: (page: Partial<BasePage_2>) => any;
772
+ readonly onQuery?: () => any;
773
+ params?: P;
631
774
  loading?: boolean;
632
- api: (params?: any) => Promise<any>;
633
- beforeSearch?: (params: SearchParams_2) => Promise<void>;
775
+ columns: TableColumn<T>[];
776
+ api: (params?: unknown) => Promise<unknown>;
777
+ beforeSearch?: (params: P) => void | Promise<void>;
778
+ transformParams?: (params: P) => unknown;
779
+ responseAdapter?: (response: unknown) => Page_2<T> | Promise<Page_2<T>>;
780
+ onError?: (error: unknown, context: FastTableErrorContext_2<P>) => void | Promise<void>;
634
781
  columnTool?: boolean;
635
782
  expanded?: boolean;
636
- data?: any[];
637
- rowKey?: string;
783
+ border?: boolean;
784
+ rowKey?: TableRowKey_2<T>;
638
785
  } & PublicProps;
639
- expose(exposed: ShallowUnwrapRef< {
640
- search: () => void;
641
- query: () => Promise<void>;
642
- getTableRef: () => any;
643
- }>): void;
786
+ expose(exposed: ShallowUnwrapRef<FastTableExpose_2<P>>): void;
644
787
  attrs: any;
645
- slots: Readonly<NonNullable<FastTableSolt_2<T>>> & {
646
- form: () => void;
647
- header: (props: TableHeaderProps_2<T>) => void;
648
- freeArea: () => void;
788
+ slots: Readonly<NonNullable<FastTableSlot<T, P>>> & {
789
+ form: (props: FastTableFormSlotProps<P>) => void;
790
+ header: (props: TableHeaderProps<T>) => void;
791
+ freeArea: (props: FastTableFormSlotProps<P>) => void;
792
+ empty: () => void;
793
+ error: (props: FastTableErrorSlotProps<P>) => void;
649
794
  } & {
650
795
  [x: string]: (props: {
651
796
  row: T;
652
- column: TableColumn_2<T>;
797
+ column: TableColumn<T>;
653
798
  $index: number;
654
799
  }) => VNodeChild;
655
800
  } & {
@@ -657,11 +802,11 @@ export declare const EzFastTable: ((<T = any>(__VLS_props: NonNullable<Awaited<t
657
802
  empty?: () => VNodeChild;
658
803
  } & {
659
804
  [x: `header-${string}`]: (props: {
660
- column: TableColumn_2<T>;
805
+ column: TableColumn<T>;
661
806
  $index: number;
662
807
  }) => VNodeChild;
663
808
  };
664
- emit: ((event: "reset" | "changePage" | "query", ...args: any[]) => void) & (((evt: "update:columns", value: TableColumn_2<T>[]) => void) & ((evt: "update:params", value: SearchParams_2) => void) & ((evt: "update:loading", value: boolean) => void));
809
+ emit: FastTableEmits_2<T, P>;
665
810
  }>) => VNode_2 & {
666
811
  __ctx?: Awaited<typeof __VLS_setup>;
667
812
  }) & Plugin_2) & Record<string, any>;
@@ -703,10 +848,10 @@ formData: FormData_3;
703
848
  }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
704
849
  $slots: {
705
850
  label?(_: {
706
- config: FormItemConfig_2<any>;
851
+ config: FormItemConfig_2;
707
852
  }): any;
708
853
  default?(_: {
709
- config: FormItemConfig_2<any>;
854
+ config: FormItemConfig_2;
710
855
  value: any;
711
856
  formData: FormData_3;
712
857
  }): any;
@@ -754,14 +899,24 @@ color: string;
754
899
 
755
900
  export declare const EzImageUpload: ({
756
901
  new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly<{
757
- modelValue?: string;
902
+ modelValue?: ImageUploadModelValue_2;
758
903
  } & ImageUpload_2> & Readonly<{
904
+ onError?: (file: File, error: Error) => any;
905
+ onDelete?: (url: string) => any;
759
906
  "onUpdate:modelValue"?: (value: string) => any;
907
+ onSuccess?: (file: File, url: string) => any;
760
908
  }>, {
909
+ clearFiles: () => void;
910
+ submit: () => void;
761
911
  getUploadRef: () => any;
762
912
  getUrlList: () => string[];
763
913
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
764
914
  "update:modelValue": (value: string) => any;
915
+ } & {
916
+ error: (file: File, error: Error) => any;
917
+ delete: (url: string) => any;
918
+ "update:modelValue": (value: string) => any;
919
+ success: (file: File, url: string) => any;
765
920
  }, PublicProps, {
766
921
  style: Record<string, string>;
767
922
  disabled: boolean;
@@ -808,10 +963,10 @@ export declare const EzImageUpload: ({
808
963
  readonly onError: (error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
809
964
  readonly onProgress: (evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
810
965
  readonly multiple: boolean;
966
+ readonly onSuccess: (response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
811
967
  readonly beforeUpload: (rawFile: UploadRawFile) => Awaitable<void | undefined | null | boolean | File | Blob>;
812
968
  readonly onRemove: (uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
813
969
  readonly onPreview: (uploadFile: UploadFile) => void;
814
- readonly onSuccess: (response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
815
970
  readonly onExceed: (files: File[], uploadFiles: UploadUserFile[]) => void;
816
971
  readonly action: string;
817
972
  readonly method: string;
@@ -829,7 +984,7 @@ export declare const EzImageUpload: ({
829
984
  readonly beforeRemove?: (uploadFile: UploadFile, uploadFiles: UploadFiles) => Awaitable<boolean>;
830
985
  readonly crossorigin?: EpPropMergeType<(new (...args: any[]) => "" | "anonymous" | "use-credentials") | (() => "" | "anonymous" | "use-credentials") | ((new (...args: any[]) => "" | "anonymous" | "use-credentials") | (() => "" | "anonymous" | "use-credentials"))[], unknown, unknown>;
831
986
  readonly headers?: EpPropMergeType<(new (...args: any[]) => Record<string, any> | Headers) | (() => Record<string, any> | Headers) | ((new (...args: any[]) => Record<string, any> | Headers) | (() => Record<string, any> | Headers))[], unknown, unknown>;
832
- } & VNodeProps & AllowedComponentProps & ComponentCustomProps, "name" | "disabled" | "data" | "onChange" | "onError" | "onProgress" | "multiple" | "beforeUpload" | "onRemove" | "onPreview" | "onSuccess" | "onExceed" | "action" | "method" | "drag" | "withCredentials" | "showFileList" | "accept" | "fileList" | "autoUpload" | "listType" | "httpRequest" | "directory">;
987
+ } & VNodeProps & AllowedComponentProps & ComponentCustomProps, "name" | "disabled" | "data" | "onChange" | "onError" | "onProgress" | "multiple" | "onSuccess" | "beforeUpload" | "onRemove" | "onPreview" | "onExceed" | "action" | "method" | "drag" | "withCredentials" | "showFileList" | "accept" | "fileList" | "autoUpload" | "listType" | "httpRequest" | "directory">;
833
988
  $attrs: {
834
989
  [x: string]: unknown;
835
990
  };
@@ -1148,7 +1303,7 @@ export declare const EzImageUpload: ({
1148
1303
  readonly disabled: EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
1149
1304
  readonly limit: NumberConstructor;
1150
1305
  readonly directory: BooleanConstructor;
1151
- }>>, "name" | "disabled" | "data" | "onChange" | "submit" | "onError" | "onProgress" | "multiple" | "beforeUpload" | "onRemove" | "onPreview" | "onSuccess" | "onExceed" | "action" | "method" | "drag" | "withCredentials" | "showFileList" | "accept" | "fileList" | "autoUpload" | "listType" | "httpRequest" | "directory" | "abort" | "clearFiles" | "handleStart" | "handleRemove"> & ShallowUnwrapRef< {
1306
+ }>>, "name" | "disabled" | "data" | "onChange" | "submit" | "onError" | "onProgress" | "multiple" | "onSuccess" | "beforeUpload" | "onRemove" | "onPreview" | "onExceed" | "action" | "method" | "drag" | "withCredentials" | "showFileList" | "accept" | "fileList" | "autoUpload" | "listType" | "httpRequest" | "directory" | "abort" | "clearFiles" | "handleStart" | "handleRemove"> & ShallowUnwrapRef< {
1152
1307
  abort: (file: UploadFile) => void;
1153
1308
  submit: () => void;
1154
1309
  clearFiles: (states?: UploadStatus[]) => void;
@@ -1187,10 +1342,15 @@ export declare const EzImageUpload: ({
1187
1342
  M: {};
1188
1343
  Defaults: {};
1189
1344
  }, Readonly<{
1190
- modelValue?: string;
1345
+ modelValue?: ImageUploadModelValue_2;
1191
1346
  } & ImageUpload_2> & Readonly<{
1347
+ onError?: (file: File, error: Error) => any;
1348
+ onDelete?: (url: string) => any;
1192
1349
  "onUpdate:modelValue"?: (value: string) => any;
1350
+ onSuccess?: (file: File, url: string) => any;
1193
1351
  }>, {
1352
+ clearFiles: () => void;
1353
+ submit: () => void;
1194
1354
  getUploadRef: () => any;
1195
1355
  getUrlList: () => string[];
1196
1356
  }, {}, {}, {}, {
@@ -1209,14 +1369,24 @@ export declare const EzImageUpload: ({
1209
1369
  __isTeleport?: never;
1210
1370
  __isSuspense?: never;
1211
1371
  } & ComponentOptionsBase<Readonly<{
1212
- modelValue?: string;
1372
+ modelValue?: ImageUploadModelValue_2;
1213
1373
  } & ImageUpload_2> & Readonly<{
1374
+ onError?: (file: File, error: Error) => any;
1375
+ onDelete?: (url: string) => any;
1214
1376
  "onUpdate:modelValue"?: (value: string) => any;
1377
+ onSuccess?: (file: File, url: string) => any;
1215
1378
  }>, {
1379
+ clearFiles: () => void;
1380
+ submit: () => void;
1216
1381
  getUploadRef: () => any;
1217
1382
  getUrlList: () => string[];
1218
1383
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1219
1384
  "update:modelValue": (value: string) => any;
1385
+ } & {
1386
+ error: (file: File, error: Error) => any;
1387
+ delete: (url: string) => any;
1388
+ "update:modelValue": (value: string) => any;
1389
+ success: (file: File, url: string) => any;
1220
1390
  }, string, {
1221
1391
  style: Record<string, string>;
1222
1392
  disabled: boolean;
@@ -1234,13 +1404,27 @@ export declare const EzPagination: ({
1234
1404
  new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly<{
1235
1405
  currentPage?: number;
1236
1406
  pageSize?: number;
1237
- }> & Readonly<{
1407
+ } & PaginationProps_2> & Readonly<{
1408
+ onChange?: (currentPage: number, pageSize: number) => any;
1409
+ "onCurrent-change"?: (page: number) => any;
1238
1410
  "onUpdate:currentPage"?: (value: number) => any;
1239
1411
  "onUpdate:pageSize"?: (value: number) => any;
1412
+ "onSize-change"?: (size: number) => any;
1240
1413
  }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1241
1414
  "update:currentPage": (value: number) => any;
1242
1415
  "update:pageSize": (value: number) => any;
1243
- }, PublicProps, {}, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
1416
+ } & {
1417
+ change: (currentPage: number, pageSize: number) => any;
1418
+ "current-change": (page: number) => any;
1419
+ "update:currentPage": (page: number) => any;
1420
+ "update:pageSize": (size: number) => any;
1421
+ "size-change": (size: number) => any;
1422
+ }, PublicProps, {
1423
+ disabled: boolean;
1424
+ background: boolean;
1425
+ layout: string;
1426
+ pageSizes: number[];
1427
+ }, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
1244
1428
  P: {};
1245
1429
  B: {};
1246
1430
  D: {};
@@ -1250,75 +1434,59 @@ export declare const EzPagination: ({
1250
1434
  }, Readonly<{
1251
1435
  currentPage?: number;
1252
1436
  pageSize?: number;
1253
- }> & Readonly<{
1437
+ } & PaginationProps_2> & Readonly<{
1438
+ onChange?: (currentPage: number, pageSize: number) => any;
1439
+ "onCurrent-change"?: (page: number) => any;
1254
1440
  "onUpdate:currentPage"?: (value: number) => any;
1255
1441
  "onUpdate:pageSize"?: (value: number) => any;
1256
- }>, {}, {}, {}, {}, {}>;
1442
+ "onSize-change"?: (size: number) => any;
1443
+ }>, {}, {}, {}, {}, {
1444
+ disabled: boolean;
1445
+ background: boolean;
1446
+ layout: string;
1447
+ pageSizes: number[];
1448
+ }>;
1257
1449
  __isFragment?: never;
1258
1450
  __isTeleport?: never;
1259
1451
  __isSuspense?: never;
1260
1452
  } & ComponentOptionsBase<Readonly<{
1261
1453
  currentPage?: number;
1262
1454
  pageSize?: number;
1263
- }> & Readonly<{
1455
+ } & PaginationProps_2> & Readonly<{
1456
+ onChange?: (currentPage: number, pageSize: number) => any;
1457
+ "onCurrent-change"?: (page: number) => any;
1264
1458
  "onUpdate:currentPage"?: (value: number) => any;
1265
1459
  "onUpdate:pageSize"?: (value: number) => any;
1460
+ "onSize-change"?: (size: number) => any;
1266
1461
  }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1267
1462
  "update:currentPage": (value: number) => any;
1268
1463
  "update:pageSize": (value: number) => any;
1269
- }, string, {}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & Plugin_2) & Record<string, any>;
1270
-
1271
- export declare const EzRadio: ({
1272
- new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly<{
1273
- modelValue?: PrimitiveValue_2;
1274
- } & RadioProps_2> & Readonly<{
1275
- "onUpdate:modelValue"?: (value: PrimitiveValue_2) => any;
1276
- }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1277
- "update:modelValue": (value: PrimitiveValue_2) => any;
1278
- }, PublicProps, {
1279
- type: RadioType_2;
1280
- options: RadioOption_2[];
1281
- }, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
1282
- P: {};
1283
- B: {};
1284
- D: {};
1285
- C: {};
1286
- M: {};
1287
- Defaults: {};
1288
- }, Readonly<{
1289
- modelValue?: PrimitiveValue_2;
1290
- } & RadioProps_2> & Readonly<{
1291
- "onUpdate:modelValue"?: (value: PrimitiveValue_2) => any;
1292
- }>, {}, {}, {}, {}, {
1293
- type: RadioType_2;
1294
- options: RadioOption_2[];
1295
- }>;
1296
- __isFragment?: never;
1297
- __isTeleport?: never;
1298
- __isSuspense?: never;
1299
- } & ComponentOptionsBase<Readonly<{
1300
- modelValue?: PrimitiveValue_2;
1301
- } & RadioProps_2> & Readonly<{
1302
- "onUpdate:modelValue"?: (value: PrimitiveValue_2) => any;
1303
- }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1304
- "update:modelValue": (value: PrimitiveValue_2) => any;
1464
+ } & {
1465
+ change: (currentPage: number, pageSize: number) => any;
1466
+ "current-change": (page: number) => any;
1467
+ "update:currentPage": (page: number) => any;
1468
+ "update:pageSize": (size: number) => any;
1469
+ "size-change": (size: number) => any;
1305
1470
  }, string, {
1306
- type: RadioType_2;
1307
- options: RadioOption_2[];
1471
+ disabled: boolean;
1472
+ background: boolean;
1473
+ layout: string;
1474
+ pageSizes: number[];
1308
1475
  }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & Plugin_2) & Record<string, any>;
1309
1476
 
1310
- export declare const EzSearchForm: ({
1477
+ export declare const EzQueryPanel: ({
1311
1478
  new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly<{
1312
- expanded?: Boolean;
1313
- } & SearchFormProps_2> & Readonly<{
1314
- "onUpdate:expanded"?: (value: Boolean) => any;
1479
+ expanded?: boolean;
1480
+ } & QueryPanelProps_2> & Readonly<{
1481
+ "onUpdate:expanded"?: (value: boolean) => any;
1315
1482
  }>, {
1316
1483
  countViewHeight: () => void;
1317
1484
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1318
- "update:expanded": (value: Boolean) => any;
1485
+ "update:expanded": (value: boolean) => any;
1319
1486
  }, PublicProps, {
1320
1487
  collapsedHeight: number;
1321
1488
  }, true, {}, {}, GlobalComponents, GlobalDirectives, string, {
1489
+ layoutRef: HTMLDivElement;
1322
1490
  wrapRef: HTMLDivElement;
1323
1491
  }, any, ComponentProvideOptions, {
1324
1492
  P: {};
@@ -1328,9 +1496,9 @@ export declare const EzSearchForm: ({
1328
1496
  M: {};
1329
1497
  Defaults: {};
1330
1498
  }, Readonly<{
1331
- expanded?: Boolean;
1332
- } & SearchFormProps_2> & Readonly<{
1333
- "onUpdate:expanded"?: (value: Boolean) => any;
1499
+ expanded?: boolean;
1500
+ } & QueryPanelProps_2> & Readonly<{
1501
+ "onUpdate:expanded"?: (value: boolean) => any;
1334
1502
  }>, {
1335
1503
  countViewHeight: () => void;
1336
1504
  }, {}, {}, {}, {
@@ -1340,13 +1508,13 @@ export declare const EzSearchForm: ({
1340
1508
  __isTeleport?: never;
1341
1509
  __isSuspense?: never;
1342
1510
  } & ComponentOptionsBase<Readonly<{
1343
- expanded?: Boolean;
1344
- } & SearchFormProps_2> & Readonly<{
1345
- "onUpdate:expanded"?: (value: Boolean) => any;
1511
+ expanded?: boolean;
1512
+ } & QueryPanelProps_2> & Readonly<{
1513
+ "onUpdate:expanded"?: (value: boolean) => any;
1346
1514
  }>, {
1347
1515
  countViewHeight: () => void;
1348
1516
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1349
- "update:expanded": (value: Boolean) => any;
1517
+ "update:expanded": (value: boolean) => any;
1350
1518
  }, string, {
1351
1519
  collapsedHeight: number;
1352
1520
  }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
@@ -1356,13 +1524,52 @@ collapsedHeight: number;
1356
1524
  };
1357
1525
  }) & Plugin_2) & Record<string, any>;
1358
1526
 
1527
+ export declare const EzRadio: ({
1528
+ new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly<{
1529
+ modelValue?: PrimitiveValue_2;
1530
+ } & RadioProps_2> & Readonly<{
1531
+ "onUpdate:modelValue"?: (value: PrimitiveValue_2) => any;
1532
+ }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1533
+ "update:modelValue": (value: PrimitiveValue_2) => any;
1534
+ }, PublicProps, {
1535
+ type: RadioType_2;
1536
+ options: RadioOption_2[];
1537
+ }, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
1538
+ P: {};
1539
+ B: {};
1540
+ D: {};
1541
+ C: {};
1542
+ M: {};
1543
+ Defaults: {};
1544
+ }, Readonly<{
1545
+ modelValue?: PrimitiveValue_2;
1546
+ } & RadioProps_2> & Readonly<{
1547
+ "onUpdate:modelValue"?: (value: PrimitiveValue_2) => any;
1548
+ }>, {}, {}, {}, {}, {
1549
+ type: RadioType_2;
1550
+ options: RadioOption_2[];
1551
+ }>;
1552
+ __isFragment?: never;
1553
+ __isTeleport?: never;
1554
+ __isSuspense?: never;
1555
+ } & ComponentOptionsBase<Readonly<{
1556
+ modelValue?: PrimitiveValue_2;
1557
+ } & RadioProps_2> & Readonly<{
1558
+ "onUpdate:modelValue"?: (value: PrimitiveValue_2) => any;
1559
+ }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1560
+ "update:modelValue": (value: PrimitiveValue_2) => any;
1561
+ }, string, {
1562
+ type: RadioType_2;
1563
+ options: RadioOption_2[];
1564
+ }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & Plugin_2) & Record<string, any>;
1565
+
1359
1566
  export declare const EzSelect: ({
1360
1567
  new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly<{
1361
- modelValue?: any;
1568
+ modelValue?: SelectModelValue_2;
1362
1569
  } & SelectProps_2> & Readonly<{
1363
- "onUpdate:modelValue"?: (value: any) => any;
1570
+ "onUpdate:modelValue"?: (value: SelectModelValue_2) => any;
1364
1571
  }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1365
- "update:modelValue": (value: any) => any;
1572
+ "update:modelValue": (value: SelectModelValue_2) => any;
1366
1573
  }, PublicProps, {
1367
1574
  options: SelectOption_2[];
1368
1575
  }, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
@@ -1373,9 +1580,9 @@ export declare const EzSelect: ({
1373
1580
  M: {};
1374
1581
  Defaults: {};
1375
1582
  }, Readonly<{
1376
- modelValue?: any;
1583
+ modelValue?: SelectModelValue_2;
1377
1584
  } & SelectProps_2> & Readonly<{
1378
- "onUpdate:modelValue"?: (value: any) => any;
1585
+ "onUpdate:modelValue"?: (value: SelectModelValue_2) => any;
1379
1586
  }>, {}, {}, {}, {}, {
1380
1587
  options: SelectOption_2[];
1381
1588
  }>;
@@ -1383,21 +1590,21 @@ export declare const EzSelect: ({
1383
1590
  __isTeleport?: never;
1384
1591
  __isSuspense?: never;
1385
1592
  } & ComponentOptionsBase<Readonly<{
1386
- modelValue?: any;
1593
+ modelValue?: SelectModelValue_2;
1387
1594
  } & SelectProps_2> & Readonly<{
1388
- "onUpdate:modelValue"?: (value: any) => any;
1595
+ "onUpdate:modelValue"?: (value: SelectModelValue_2) => any;
1389
1596
  }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1390
- "update:modelValue": (value: any) => any;
1597
+ "update:modelValue": (value: SelectModelValue_2) => any;
1391
1598
  }, string, {
1392
1599
  options: SelectOption_2[];
1393
1600
  }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & Plugin_2) & Record<string, any>;
1394
1601
 
1395
- export declare const EzTable: ((<T = any>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
1602
+ export declare const EzTable: ((<T extends Record<string, unknown> = Record<string, unknown>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
1396
1603
  attrs: any;
1397
- slots: Readonly<NonNullable<TableSolt_2<T>>> & {
1604
+ slots: Readonly<NonNullable<TableSlot_2<T>>> & {
1398
1605
  [x: string]: (props: {
1399
1606
  row: T;
1400
- column: TableColumn_3<T>;
1607
+ column: TableColumn_2<T>;
1401
1608
  $index: number;
1402
1609
  }) => VNodeChild;
1403
1610
  } & {
@@ -1405,7 +1612,7 @@ export declare const EzTable: ((<T = any>(__VLS_props: NonNullable<Awaited<typeo
1405
1612
  empty?: () => VNodeChild;
1406
1613
  } & {
1407
1614
  [x: `header-${string}`]: (props: {
1408
- column: TableColumn_3<T>;
1615
+ column: TableColumn_2<T>;
1409
1616
  $index: number;
1410
1617
  }) => VNodeChild;
1411
1618
  };
@@ -1413,15 +1620,16 @@ export declare const EzTable: ((<T = any>(__VLS_props: NonNullable<Awaited<typeo
1413
1620
  }, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
1414
1621
  props: {
1415
1622
  data: T[];
1416
- columns: TableColumn_3<T>[];
1417
- rowKey?: string;
1623
+ columns: TableColumn_2<T>[];
1624
+ border?: boolean;
1625
+ rowKey?: TableRowKey_3<T>;
1418
1626
  } & PublicProps;
1419
1627
  expose(exposed: ShallowUnwrapRef<TableExpose_2>): void;
1420
1628
  attrs: any;
1421
- slots: Readonly<NonNullable<TableSolt_2<T>>> & {
1629
+ slots: Readonly<NonNullable<TableSlot_2<T>>> & {
1422
1630
  [x: string]: (props: {
1423
1631
  row: T;
1424
- column: TableColumn_3<T>;
1632
+ column: TableColumn_2<T>;
1425
1633
  $index: number;
1426
1634
  }) => VNodeChild;
1427
1635
  } & {
@@ -1429,7 +1637,7 @@ export declare const EzTable: ((<T = any>(__VLS_props: NonNullable<Awaited<typeo
1429
1637
  empty?: () => VNodeChild;
1430
1638
  } & {
1431
1639
  [x: `header-${string}`]: (props: {
1432
- column: TableColumn_3<T>;
1640
+ column: TableColumn_2<T>;
1433
1641
  $index: number;
1434
1642
  }) => VNodeChild;
1435
1643
  };
@@ -1438,31 +1646,163 @@ export declare const EzTable: ((<T = any>(__VLS_props: NonNullable<Awaited<typeo
1438
1646
  __ctx?: Awaited<typeof __VLS_setup>;
1439
1647
  }) & Plugin_2) & Record<string, any>;
1440
1648
 
1441
- export declare interface FastTableExpose {
1649
+ export declare interface FastTableEmits<T extends Record<string, unknown> = Record<string, unknown>, P extends QueryParams_2 = QueryParams_2> {
1650
+ /** 查询参数变化 */
1651
+ (evt: 'update:params', params: P): void;
1652
+ /** 加载状态变化 */
1653
+ (evt: 'update:loading', loading: boolean): void;
1654
+ /** 分页变化 */
1655
+ (evt: 'changePage', page: Partial<BasePage>): void;
1656
+ /** 重置 */
1657
+ (evt: 'reset'): void;
1658
+ /** 查询完成 */
1659
+ (evt: 'query'): void;
1660
+ /** 列配置变化 */
1661
+ (evt: 'update:columns', columns: TableColumn<T>[]): void;
1662
+ }
1663
+
1664
+ export declare interface FastTableErrorContext<P extends QueryParams_2 = QueryParams_2> {
1665
+ stage: FastTableErrorStage;
1666
+ params: P;
1667
+ }
1668
+
1669
+ /** 错误插槽作用域 */
1670
+ export declare interface FastTableErrorSlotProps<P extends QueryParams_2 = QueryParams_2> {
1671
+ /** 错误对象 */
1672
+ error: unknown;
1673
+ /** 错误发生的阶段 */
1674
+ stage: FastTableErrorStage;
1675
+ /** 发生错误时的参数快照 */
1676
+ params: P;
1677
+ /** 重试方法 */
1678
+ retry: () => void;
1679
+ }
1680
+
1681
+ export declare type FastTableErrorStage = 'beforeSearch' | 'transformParams' | 'api' | 'responseAdapter';
1682
+
1683
+ /** FastTable 错误状态 */
1684
+ export declare interface FastTableErrorState<P extends QueryParams_2 = QueryParams_2> {
1685
+ /** 错误对象 */
1686
+ error: unknown;
1687
+ /** 错误发生的阶段 */
1688
+ stage: FastTableErrorStage;
1689
+ /** 发生错误时的参数快照 */
1690
+ params: P;
1691
+ }
1692
+
1693
+ export declare interface FastTableExpose<P extends QueryParams_2 = QueryParams_2> {
1442
1694
  /** 搜索(重置到第一页) */
1443
1695
  search: () => void;
1444
1696
  /** 查询(保持当前页) */
1445
1697
  query: () => Promise<void>;
1698
+ /** 局部更新查询参数 */
1699
+ patchParams: (patch: Partial<P>, options?: FastTableParamsUpdateOptions) => void;
1700
+ /** 完整替换查询参数 */
1701
+ replaceParams: (nextParams: P, options?: FastTableParamsUpdateOptions) => void;
1702
+ /** 重置到当前基线参数并重新查询 */
1703
+ reset: () => void;
1704
+ /** 将当前参数记录为新的重置基线 */
1705
+ captureInitialParams: () => void;
1446
1706
  /** 获取表格引用 */
1447
- getTableRef: () => any;
1707
+ getTableRef: TableExpose['getTableRef'];
1708
+ /** 重新布局表格 */
1709
+ doLayout: () => void;
1710
+ /** 清除错误状态 */
1711
+ clearError: () => void;
1712
+ /** 获取当前错误状态 */
1713
+ getErrorState: () => FastTableErrorState<P> | null;
1714
+ }
1715
+
1716
+ export declare interface FastTableFormSlotProps<P extends QueryParams_2 = QueryParams_2> {
1717
+ params: P;
1718
+ loading: boolean;
1719
+ expanded: boolean;
1720
+ search: () => void;
1721
+ query: () => Promise<void>;
1722
+ reset: () => void;
1723
+ captureInitialParams: () => void;
1724
+ patchParams: (patch: Partial<P>, options?: FastTableParamsUpdateOptions) => void;
1725
+ replaceParams: (nextParams: P, options?: FastTableParamsUpdateOptions) => void;
1726
+ }
1727
+
1728
+ export declare interface FastTableParamsUpdateOptions {
1729
+ /** 是否将分页重置为第一页 */
1730
+ resetPage?: boolean;
1731
+ /** 是否将当前参数记录为新的基线 */
1732
+ captureInitial?: boolean;
1448
1733
  }
1449
1734
 
1450
- export declare interface FastTableProps extends Partial<TableProps> {
1735
+ export declare interface FastTableProps<T extends Record<string, unknown> = Record<string, unknown>, P extends QueryParams_2 = QueryParams_2, RequestParams = P, ResponseData = unknown> extends Partial<Omit<TableProps<T>, 'data' | 'columns'>> {
1736
+ /** 查询参数模型 */
1737
+ params?: P;
1738
+ /** 请求加载态 */
1739
+ loading?: boolean;
1740
+ /** 表格列配置 */
1741
+ columns: TableColumn<T>[];
1451
1742
  /** 接口方法 */
1452
- api: (params?: any) => Promise<any>;
1743
+ api: (params?: RequestParams) => Promise<ResponseData>;
1453
1744
  /** 查询前钩子 */
1454
- beforeSearch?: (params: SearchParams) => Promise<void>;
1745
+ beforeSearch?: (params: P) => void | Promise<void>;
1746
+ /** 请求参数转换钩子,返回值会作为 api 的最终入参 */
1747
+ transformParams?: (params: P) => RequestParams | Promise<RequestParams>;
1748
+ /** 响应适配钩子,将接口返回转换为分页结构 */
1749
+ responseAdapter?: (response: ResponseData) => Page<T> | Promise<Page<T>>;
1750
+ /** 查询链路错误钩子 */
1751
+ onError?: (error: unknown, context: FastTableErrorContext<P>) => void | Promise<void>;
1455
1752
  /** 列管理工具 */
1456
1753
  columnTool?: boolean;
1457
1754
  expanded?: boolean;
1458
1755
  }
1459
1756
 
1460
1757
  /** 插槽类型 */
1461
- export declare type FastTableSolt<D> = {
1462
- form: () => void;
1758
+ export declare type FastTableSlot<D, P extends QueryParams_2 = QueryParams_2> = {
1759
+ form: (props: FastTableFormSlotProps<P>) => void;
1463
1760
  header: (props: TableHeaderProps<D>) => void;
1464
- freeArea: () => void;
1465
- } & TableSolt<D>;
1761
+ freeArea: (props: FastTableFormSlotProps<P>) => void;
1762
+ /** 空数据状态插槽 */
1763
+ empty: () => void;
1764
+ /** 错误状态插槽 */
1765
+ error: (props: FastTableErrorSlotProps<P>) => void;
1766
+ } & TableSlot<D>;
1767
+
1768
+ export declare type FormBuiltinItemType = FormItemType | `${FormItemType}`;
1769
+
1770
+ export declare type FormCascaderNodeValue = string | number | Record<string, unknown>;
1771
+
1772
+ /**
1773
+ * 级联选项结构。
1774
+ * 使用稳定的本地别名表达树形级联数据,
1775
+ * 避免把公共 API 直接暴露为 Element Plus cascader-panel 的内部类型。
1776
+ */
1777
+ export declare interface FormCascaderOption extends Record<string, unknown> {
1778
+ label?: string;
1779
+ value?: string | number | Record<string, unknown>;
1780
+ children?: FormCascaderOption[];
1781
+ disabled?: boolean;
1782
+ leaf?: boolean;
1783
+ }
1784
+
1785
+ /**
1786
+ * Cascader 的公开模块仍会继续引用 cascader-panel 子模块类型,
1787
+ * 因此这里保留本地别名作为 API 边界,只声明已验证字段并保持开放透传。
1788
+ */
1789
+ export declare interface FormCascaderProps {
1790
+ [key: string]: unknown;
1791
+ expandTrigger?: 'click' | 'hover';
1792
+ multiple?: boolean;
1793
+ checkStrictly?: boolean;
1794
+ emitPath?: boolean;
1795
+ lazy?: boolean;
1796
+ value?: string;
1797
+ label?: string;
1798
+ children?: string;
1799
+ disabled?: string | ((data: FormCascaderOption, node: unknown) => boolean);
1800
+ leaf?: string | ((data: FormCascaderOption, node: unknown) => boolean);
1801
+ hoverThreshold?: number;
1802
+ checkOnClickNode?: boolean;
1803
+ checkOnClickLeaf?: boolean;
1804
+ showPrefix?: boolean;
1805
+ }
1466
1806
 
1467
1807
  /**
1468
1808
  * 联动条件函数类型
@@ -1472,19 +1812,81 @@ export declare type FormConditionFn = (formData: FormData_2) => boolean;
1472
1812
  /**
1473
1813
  * 表单数据类型
1474
1814
  */
1475
- declare type FormData_2 = Record<string, any>;
1815
+ declare type FormData_2 = Record<string, unknown>;
1476
1816
  export { FormData_2 as FormData }
1477
1817
 
1818
+ export declare type FormDeserializeFn<T = unknown> = (value: unknown, formData: FormData_2, item: FormItemConfig<T>) => T;
1819
+
1820
+ export declare type FormFieldComponentAttrs<T = any> = FormItemAttrs<{
1821
+ modelValue?: T;
1822
+ disabled?: boolean;
1823
+ 'onUpdate:modelValue'?: (value: T) => void;
1824
+ }>;
1825
+
1826
+ /**
1827
+ * DynamicForm 当前支持字段的通用值类型。
1828
+ * 保持足够宽以兼容不同内建控件,同时避免回退为 any。
1829
+ */
1830
+ export declare type FormFieldValue = string | number | boolean | null | undefined | Date | Record<string, unknown> | Array<string | number | boolean | Date | Record<string, unknown>>;
1831
+
1832
+ /**
1833
+ * 表单分组配置
1834
+ */
1835
+ export declare interface FormGroupConfig {
1836
+ /** 分组唯一标识(用于 key、插槽名) */
1837
+ name?: string;
1838
+ /** 分组标题 */
1839
+ title?: string;
1840
+ /** 分组描述 */
1841
+ description?: string;
1842
+ /** 分组下的表单项 */
1843
+ items: FormItemConfig[];
1844
+ /** 分组内栅格列数(不传则继承全局 cols) */
1845
+ cols?: number;
1846
+ /** 分组内栅格间距(不传则继承全局 gutter) */
1847
+ gutter?: number;
1848
+ /** 是否隐藏分组 */
1849
+ hidden?: boolean;
1850
+ /** 分组显示条件 */
1851
+ show?: FormConditionFn;
1852
+ /** 分组容器 class */
1853
+ className?: string;
1854
+ /** 分组容器 style */
1855
+ style?: StyleValue;
1856
+ /** 分组头部 class */
1857
+ headerClassName?: string;
1858
+ /** 分组头部 style */
1859
+ headerStyle?: StyleValue;
1860
+ /** 分组主体 class */
1861
+ bodyClassName?: string;
1862
+ /** 分组主体 style */
1863
+ bodyStyle?: StyleValue;
1864
+ /** 自定义分组头插槽名 */
1865
+ headerSlot?: string;
1866
+ /** 自定义分组内容插槽名 */
1867
+ slot?: string;
1868
+ }
1869
+
1870
+ /**
1871
+ * 表单 attrs 的公共透传类型。
1872
+ * 已知字段保留补全,未知字段继续允许透传,避免上游组件新增 props 时这里被迫同步补类型。
1873
+ */
1874
+ export declare type FormItemAttrs<T extends object = Record<string, never>> = Partial<T> & Record<string, unknown>;
1875
+
1876
+ /**
1877
+ * 表单项配置
1878
+ * 对常见封装组件做专门分支约束,其余内建 Element Plus 表单控件继续保持宽透传。
1879
+ */
1880
+ export declare type FormItemConfig<T = unknown> = DefaultFormItemConfig<T> | SelectFormItemConfig<T> | RadioFormItemConfig<T> | CheckboxFormItemConfig<T> | TreeSelectFormItemConfig<T> | CascaderFormItemConfig<T> | UploadImagesFormItemConfig<T> | CustomFormItemConfig<T>;
1881
+
1478
1882
  /**
1479
1883
  * 表单项配置
1480
1884
  */
1481
- export declare interface FormItemConfig<T = any> {
1885
+ declare interface FormItemConfigBase<T = unknown, A extends Record<string, unknown> = Record<string, unknown>, O = FormItemOption<T>[]> {
1482
1886
  /** 字段名(必填) */
1483
1887
  prop: string;
1484
1888
  /** 标签 */
1485
1889
  label?: string;
1486
- /** 组件类型 */
1487
- type?: FormItemType | `${FormItemType}` | string;
1488
1890
  /** 默认值 */
1489
1891
  defaultValue?: T;
1490
1892
  /** 验证规则 */
@@ -1502,23 +1904,25 @@ export declare interface FormItemConfig<T = any> {
1502
1904
  /** 占位符(不填则自动生成) */
1503
1905
  placeholder?: string;
1504
1906
  /** 选项配置(用于 select、radio、checkbox、cascader 等) */
1505
- options?: FormItemOption<T>[];
1907
+ options?: O;
1506
1908
  /** 组件属性(透传给具体组件) */
1507
- attrs?: Record<string, any>;
1508
- /** 自定义组件 */
1509
- component?: Component_2;
1909
+ attrs?: A;
1510
1910
  /** 额外的 el-form-item 属性 */
1511
- itemAttrs?: Record<string, any>;
1911
+ itemAttrs?: FormItemWrapperAttrs;
1512
1912
  /** 联动显示条件(返回 true 显示,false 隐藏) */
1513
1913
  show?: FormConditionFn;
1514
1914
  /** 联动禁用条件(返回 true 禁用,false 启用) */
1515
1915
  disabledWhen?: FormConditionFn;
1916
+ /** 提交前字段序列化,可用于拆分日期范围、清洗值或派生附加字段 */
1917
+ serialize?: FormSerializeFn<T>;
1918
+ /** 外部数据回填到表单时的反序列化 */
1919
+ deserialize?: FormDeserializeFn<T>;
1516
1920
  }
1517
1921
 
1518
1922
  /**
1519
1923
  * 表单选项配置(继承自共享基础选项)
1520
1924
  */
1521
- export declare type FormItemOption<T = any> = BaseOption<T>;
1925
+ export declare type FormItemOption<T = unknown> = BaseOption<T>;
1522
1926
 
1523
1927
  /**
1524
1928
  * 表单项类型枚举
@@ -1559,14 +1963,49 @@ export declare enum FormItemType {
1559
1963
  TREE_SELECT = "tree-select",
1560
1964
  /** 级联选择 */
1561
1965
  CASCADER = "cascader",
1562
- /** 树形控件 */
1563
- TREE = "tree",
1564
1966
  /** 滑块 */
1565
1967
  SLIDER = "slider",
1566
1968
  /** 评分 */
1567
1969
  RATE = "rate"
1568
1970
  }
1569
1971
 
1972
+ /**
1973
+ * 表单项容器直接复用 Element Plus FormItem 的稳定公开类型,
1974
+ * 同时排除由 DynamicForm 自己管理的字段。
1975
+ */
1976
+ export declare type FormItemWrapperAttrs = FormItemAttrs<Omit<FormItemProps, 'prop' | 'label' | 'rules'>>;
1977
+
1978
+ export declare type FormSerializeFn<T = unknown> = (value: T, formData: FormData_2, item: FormItemConfig<T>) => T | FormTransformOutput<T> | void;
1979
+
1980
+ export declare interface FormTransformOutput<T = unknown> {
1981
+ /** 序列化后写回当前字段的值 */
1982
+ value?: T;
1983
+ /** 额外合并到结果中的字段 */
1984
+ fields?: FormData_2;
1985
+ /** 是否从结果中移除当前字段 */
1986
+ omit?: boolean;
1987
+ }
1988
+
1989
+ /**
1990
+ * 树形节点数据。
1991
+ * DynamicForm 对 tree / tree-select 只约束为结构化节点数组,不绑定具体字段名,
1992
+ * 节点映射由 attrs.props 等运行时配置决定。
1993
+ */
1994
+ export declare interface FormTreeNode extends Record<string, unknown> {
1995
+ children?: FormTreeNode[];
1996
+ }
1997
+
1998
+ export declare type FormTreeNodeKey = TreeKey;
1999
+
2000
+ /**
2001
+ * 树组件 props 映射配置。
2002
+ * 基于 Element Plus 的稳定公开类型做本地别名,
2003
+ * 既复用官方类型演进,也保留 DynamicForm 自己的公共 API 边界。
2004
+ */
2005
+ export declare type FormTreeOptionProps = TreeOptionProps & Record<string, unknown>;
2006
+
2007
+ export declare type FormTreeRenderContent = RenderContentFunction;
2008
+
1570
2009
  /**
1571
2010
  * 根据类型获取输入动词
1572
2011
  * @param type 表单项类型
@@ -1584,13 +2023,13 @@ export declare function getTrigger(type?: string): string;
1584
2023
  /**
1585
2024
  * Select 分组选项(重导出以便使用)
1586
2025
  */
1587
- export declare type GroupOption = GroupOption_2<string | number | boolean | Record<string, any>>;
2026
+ export declare type GroupOption = GroupOption_2<SelectOptionValue>;
1588
2027
 
1589
2028
  /**
1590
2029
  * 分组选项接口
1591
2030
  * 用于需要分组显示的选择组件
1592
2031
  */
1593
- declare interface GroupOption_2<T = any> {
2032
+ declare interface GroupOption_2<T = PrimitiveValue> {
1594
2033
  /** 分组标签 */
1595
2034
  label: string;
1596
2035
  /** 选项集合 */
@@ -1642,9 +2081,9 @@ export declare interface ImageUpload {
1642
2081
  }
1643
2082
 
1644
2083
  export declare interface ImageUploadEmits {
1645
- (e: 'update:modelValue', value: string | string[]): void;
2084
+ (e: 'update:modelValue', value: ImageUploadModelValue): void;
1646
2085
  (e: 'success', file: File, url: string): void;
1647
- (e: 'error', file: File, error: any): void;
2086
+ (e: 'error', file: File, error: Error): void;
1648
2087
  (e: 'delete', url: string): void;
1649
2088
  }
1650
2089
 
@@ -1655,17 +2094,32 @@ export declare interface ImageUploadExpose {
1655
2094
  submit: () => void;
1656
2095
  }
1657
2096
 
2097
+ export declare type ImageUploadModelValue = string;
2098
+
1658
2099
  export declare const install: (app: App) => void;
1659
2100
 
1660
2101
  /**
1661
2102
  * 键值对类型
1662
2103
  */
1663
- export declare type KeyValuePair = Record<string, any>;
2104
+ export declare type KeyValuePair = Record<string, unknown>;
1664
2105
 
1665
2106
  /** 公共分页返回类型 */
1666
2107
  export declare interface Page<T> extends BasePage {
1667
2108
  records: T[];
1668
- size: number;
2109
+ total: number;
2110
+ }
2111
+
2112
+ export declare interface PaginationEmits {
2113
+ /** 当前页码变化 */
2114
+ (e: 'update:currentPage', page: number): void;
2115
+ /** 每页条数变化 */
2116
+ (e: 'update:pageSize', size: number): void;
2117
+ /** 当前页码变化,对齐 Element Plus 事件名 */
2118
+ (e: 'current-change', page: number): void;
2119
+ /** 每页条数变化,对齐 Element Plus 事件名 */
2120
+ (e: 'size-change', size: number): void;
2121
+ /** 任一分页值变化 */
2122
+ (e: 'change', currentPage: number, pageSize: number): void;
1669
2123
  }
1670
2124
 
1671
2125
  /**
@@ -1691,13 +2145,53 @@ export declare interface PaginationProps {
1691
2145
  /**
1692
2146
  * 判断函数类型
1693
2147
  */
1694
- export declare type PredicateFn<T = any> = (value: T) => boolean;
2148
+ export declare type PredicateFn<T = unknown> = (value: T) => boolean;
1695
2149
 
1696
2150
  /**
1697
2151
  * 常用值类型
1698
2152
  */
1699
2153
  export declare type PrimitiveValue = string | number | boolean;
1700
2154
 
2155
+ /**
2156
+ * QueryPanel 组件 Emits
2157
+ */
2158
+ export declare interface QueryPanelEmits {
2159
+ /** 监听展开状态 */
2160
+ (event: 'update:expanded', value: boolean): void;
2161
+ }
2162
+
2163
+ export declare interface QueryPanelExpose {
2164
+ /** 重新计算视图高度 */
2165
+ countViewHeight: () => void;
2166
+ }
2167
+
2168
+ /**
2169
+ * QueryPanel 组件 Props
2170
+ */
2171
+ export declare interface QueryPanelProps {
2172
+ /** 展开状态 */
2173
+ expanded?: boolean;
2174
+ /** 折叠时的高度(px) */
2175
+ collapsedHeight?: number;
2176
+ }
2177
+
2178
+ /**
2179
+ * 通用查询参数类型
2180
+ * 推荐在 DynamicForm / SearchForm / FastTable 组合场景中作为统一模型使用
2181
+ */
2182
+ export declare type QueryParams<T extends Record<string, unknown> = Record<string, unknown>> = BaseQueryParams & Partial<T>;
2183
+
2184
+ /** 分页/查询参数类型 */
2185
+ declare type QueryParams_2<T extends Record<string, unknown> = Record<string, unknown>> = QueryParams<T>;
2186
+
2187
+ export declare type RadioFormItemAttrs = FormItemAttrs<Omit<RadioProps, 'options'>>;
2188
+
2189
+ export declare interface RadioFormItemConfig<T = unknown> extends FormItemConfigBase<T, RadioFormItemAttrs, RadioOption[]> {
2190
+ /** 单选框 */
2191
+ type: FormItemType.RADIO | `${FormItemType.RADIO}`;
2192
+ component?: never;
2193
+ }
2194
+
1701
2195
  /**
1702
2196
  * Radio 选项接口
1703
2197
  */
@@ -1727,36 +2221,6 @@ declare type Response_2<T> = {
1727
2221
  };
1728
2222
  export { Response_2 as Response }
1729
2223
 
1730
- /**
1731
- * SearchForm 组件 Emits
1732
- */
1733
- export declare interface SearchFormEmits {
1734
- /** 点击搜索按钮时触发 */
1735
- search: () => void;
1736
- /** 点击重置按钮时触发 */
1737
- reset: () => void;
1738
- }
1739
-
1740
- export declare interface SearchFormExpose {
1741
- /** 重新计算视图高度 */
1742
- countViewHeight: () => void;
1743
- }
1744
-
1745
- /**
1746
- * SearchForm 组件 Props
1747
- */
1748
- export declare interface SearchFormProps {
1749
- /** 折叠时的高度(px) */
1750
- collapsedHeight?: number;
1751
- /** 是否显示重置按钮 */
1752
- reset?: boolean;
1753
- }
1754
-
1755
- /** 分页参数类型 */
1756
- export declare type SearchParams<T = any> = BasePage & BaseSort & {
1757
- [k in keyof T]: any;
1758
- };
1759
-
1760
2224
  /**
1761
2225
  * 表单项类型集合(用于内部判断)
1762
2226
  */
@@ -1767,11 +2231,11 @@ export declare const SELECT_FORM_TYPES: Set<string>;
1767
2231
  */
1768
2232
  export declare interface SelectEmits {
1769
2233
  /** 选中值发生变化时触发 */
1770
- (e: 'change', value: any): void;
2234
+ (e: 'change', value: SelectModelValue): void;
1771
2235
  /** 下拉框出现/隐藏时触发 */
1772
2236
  (e: 'visible-change', visible: boolean): void;
1773
2237
  /** 多选模式下移除tag时触发 */
1774
- (e: 'remove-tag', value: any): void;
2238
+ (e: 'remove-tag', value: SelectOptionValue): void;
1775
2239
  /** 可清空的单选模式下用户点击清空按钮时触发 */
1776
2240
  (e: 'clear'): void;
1777
2241
  /** 当 input 失去焦点时触发 */
@@ -1780,13 +2244,26 @@ export declare interface SelectEmits {
1780
2244
  (e: 'focus', event: FocusEvent): void;
1781
2245
  }
1782
2246
 
2247
+ /**
2248
+ * 封装组件分支直接复用各自公开 props,减少重复维护。
2249
+ * 这里仍包一层 FormItemAttrs,确保未知扩展字段继续可透传。
2250
+ */
2251
+ export declare type SelectFormItemAttrs = FormItemAttrs<Omit<SelectProps, 'options'>>;
2252
+
2253
+ export declare interface SelectFormItemConfig<T = unknown> extends FormItemConfigBase<T, SelectFormItemAttrs, SelectOption[]> {
2254
+ /** 下拉选择(支持普通选项与分组选项) */
2255
+ type: FormItemType.SELECT | `${FormItemType.SELECT}`;
2256
+ component?: never;
2257
+ }
2258
+
2259
+ export declare type SelectModelValue = SelectOptionValue | SelectOptionValue[];
2260
+
1783
2261
  /**
1784
2262
  * Select 选项类型(支持单个选项或分组选项)
1785
2263
  */
1786
- export declare type SelectOption = BaseOption<string | number | boolean | Record<string, any>> | GroupOption;
2264
+ export declare type SelectOption = BaseOption<SelectOptionValue> | GroupOption;
1787
2265
 
1788
- /** @deprecated 使用 BaseOption 代替 */
1789
- export declare type SelectOptionItem = BaseOption<string | number | boolean | Record<string, any>>;
2266
+ export declare type SelectOptionValue = PrimitiveValue | Record<string, unknown>;
1790
2267
 
1791
2268
  /**
1792
2269
  * Select 组件 Props
@@ -1796,42 +2273,94 @@ export declare interface SelectProps {
1796
2273
  options: SelectOption[];
1797
2274
  }
1798
2275
 
1799
- /** @deprecated 使用 SelectProps 代替 */
1800
- export declare type SelectPropsType = SelectProps;
1801
-
1802
2276
  export declare enum SortEnum {
1803
2277
  ASC = "ascending",
1804
2278
  DESC = "descending",
1805
2279
  EMPTY
1806
2280
  }
1807
2281
 
1808
- export declare interface TableColumn<T = any> extends Partial<TableColumnCtx<T>> {
1809
- hidden?: 0 | 1;
1810
- transform?: (item: T) => string;
2282
+ declare type SpecializedFormItemType = FormItemType.SELECT | FormItemType.RADIO | FormItemType.CHECKBOX | FormItemType.TREE_SELECT | FormItemType.CASCADER | FormItemType.UPLOAD_IMAGES;
2283
+
2284
+ declare type StandardFormItemType = Exclude<FormItemType, SpecializedFormItemType>;
2285
+
2286
+ export declare interface TableColumn<T = Record<string, unknown>> {
2287
+ /**
2288
+ * 仅用于类型推断,运行时不会使用。
2289
+ * 让包装组件可以从 TableColumn<T>[] 更稳定地反推出行类型 T。
2290
+ */
2291
+ readonly [tableColumnRowBrand]?: T;
2292
+ /** 列唯一标识,透传给 Element Plus column-key */
2293
+ columnKey?: string;
2294
+ /** 列类型 */
2295
+ type?: TableColumnType | string;
2296
+ /** 字段名 */
2297
+ prop?: string;
2298
+ /** 列标题 */
2299
+ label?: string;
2300
+ /** 列宽 */
2301
+ width?: string | number;
2302
+ /** 最小列宽 */
2303
+ minWidth?: string | number;
2304
+ /** 对齐方式 */
2305
+ align?: TableColumnAlign;
2306
+ /** 表头对齐方式 */
2307
+ headerAlign?: TableColumnAlign;
2308
+ /** 是否固定列 */
2309
+ fixed?: boolean | 'left' | 'right';
2310
+ /** 是否允许拖动列宽 */
2311
+ resizable?: boolean;
2312
+ /** 是否展示 overflow tooltip */
2313
+ showOverflowTooltip?: boolean;
2314
+ /** 是否保留 selection 选中状态 */
2315
+ reserveSelection?: boolean;
2316
+ /** 排序配置 */
2317
+ sortable?: boolean | 'custom';
2318
+ /** 排序方法 */
2319
+ sortMethod?: (a: T, b: T) => number;
2320
+ /** 自定义排序数据 */
2321
+ sortBy?: TableColumnSortBy<T>;
2322
+ /** 自定义渲染/格式化 */
2323
+ formatter?: TableColumnFormatter<T>;
2324
+ /** 列显示状态,true 表示隐藏 */
2325
+ hidden?: boolean;
2326
+ /** 单元格为空时的兜底展示文案,不影响 slot / formatter */
2327
+ emptyValue?: string;
2328
+ /** 排序模式:local 使用表格本地排序,remote 由 FastTable 驱动远程查询 */
2329
+ sortMode?: TableSortMode;
2330
+ /** 远程排序字段名,默认使用当前列 prop */
2331
+ sortField?: string;
2332
+ /** 其余透传给 ElTableColumn 的公开属性 */
2333
+ [key: string]: unknown;
1811
2334
  }
1812
2335
 
1813
- export declare interface TableEmits {
1814
- (e: 'selection-change', selection: any[]): void;
1815
- (e: 'sort-change', params: {
1816
- column: any;
1817
- prop: string;
1818
- order: string;
1819
- }): void;
2336
+ export declare type TableColumnAlign = 'left' | 'center' | 'right';
2337
+
2338
+ export declare type TableColumnFormatter<T = Record<string, unknown>> = (row: T, column: Record<string, unknown>, cellValue: unknown, index: number) => string | VNode_2;
2339
+
2340
+ declare const tableColumnRowBrand: unique symbol;
2341
+
2342
+ export declare type TableColumnSortBy<T = Record<string, unknown>> = string | string[] | ((row: T, index: number, array?: T[]) => string);
2343
+
2344
+ export declare type TableColumnType = 'default' | 'selection' | 'index' | 'expand';
2345
+
2346
+ export declare interface TableEmits<T = Record<string, unknown>> {
2347
+ (e: 'selection-change', selection: T[]): void;
2348
+ (e: 'sort-change', params: TableSortChangeParams<T>): void;
1820
2349
  }
1821
2350
 
1822
2351
  export declare interface TableExpose {
1823
2352
  /** 获取表格引用 */
1824
- getTableRef: () => any;
2353
+ getTableRef: () => TableInstance | undefined;
1825
2354
  /** 清空选择 */
1826
2355
  clearSelection: () => void;
1827
2356
  /** 切换行选择状态 */
1828
- toggleRowSelection: (row: any, selected?: boolean) => void;
2357
+ toggleRowSelection: (row: unknown, selected?: boolean) => void;
1829
2358
  /** 切换所有行选择状态 */
1830
2359
  toggleAllSelection: () => void;
1831
2360
  /** 切换行展开状态 */
1832
- toggleRowExpansion: (row: any, expanded?: boolean) => void;
2361
+ toggleRowExpansion: (row: unknown, expanded?: boolean) => void;
1833
2362
  /** 设置当前行 */
1834
- setCurrentRow: (row: any) => void;
2363
+ setCurrentRow: (row: unknown) => void;
1835
2364
  /** 清空排序 */
1836
2365
  clearSort: () => void;
1837
2366
  /** 清空过滤器 */
@@ -1839,23 +2368,28 @@ export declare interface TableExpose {
1839
2368
  /** 重新布局 */
1840
2369
  doLayout: () => void;
1841
2370
  /** 排序 */
1842
- sort: (prop: string, order: string) => void;
2371
+ sort: (prop: string, order: TableSortOrder) => void;
1843
2372
  }
1844
2373
 
1845
2374
  /** 表格上方插槽类型 */
1846
2375
  export declare type TableHeaderProps<T> = {
1847
2376
  selectList: T[];
1848
- selectIds: string[];
2377
+ selectIds: TableRowId[];
1849
2378
  };
1850
2379
 
1851
- export declare interface TableProps<T = any> {
2380
+ export declare interface TableProps<T = Record<string, unknown>> {
1852
2381
  data: T[];
1853
2382
  columns: TableColumn<T>[];
1854
- rowKey?: string;
2383
+ border?: boolean;
2384
+ rowKey?: TableRowKey<T>;
1855
2385
  }
1856
2386
 
2387
+ export declare type TableRowId = string | number;
2388
+
2389
+ export declare type TableRowKey<T = Record<string, unknown>> = string | ((row: T) => string);
2390
+
1857
2391
  /** 表格插槽类型 */
1858
- export declare type TableSolt<D> = {
2392
+ export declare type TableSlot<D> = {
1859
2393
  [key in string]?: (props: {
1860
2394
  row: D;
1861
2395
  column: TableColumn<D>;
@@ -1871,4 +2405,94 @@ export declare type TableSolt<D> = {
1871
2405
  }) => VNodeChild;
1872
2406
  };
1873
2407
 
2408
+ export declare interface TableSortChangeParams<T = Record<string, unknown>> {
2409
+ column: TableColumn<T>;
2410
+ prop: string;
2411
+ order: TableSortOrder;
2412
+ }
2413
+
2414
+ export declare type TableSortMode = 'local' | 'remote';
2415
+
2416
+ export declare type TableSortOrder = 'ascending' | 'descending' | null;
2417
+
2418
+ /**
2419
+ * 仅收敛当前组件内部已经验证过的常用 tree-select attrs;
2420
+ * 对官方后续新增 attrs 保持开放透传,避免形成升级阻塞点。
2421
+ */
2422
+ export declare interface TreeSelectFormItemAttrs {
2423
+ [key: string]: unknown;
2424
+ props?: FormTreeOptionProps;
2425
+ nodeKey?: string;
2426
+ renderAfterExpand?: boolean;
2427
+ showCheckbox?: boolean;
2428
+ checkStrictly?: boolean;
2429
+ checkOnClickNode?: boolean;
2430
+ checkOnClickLeaf?: boolean;
2431
+ checkDescendants?: boolean;
2432
+ defaultExpandAll?: boolean;
2433
+ expandOnClickNode?: boolean;
2434
+ autoExpandParent?: boolean;
2435
+ defaultCheckedKeys?: FormTreeNodeKey[];
2436
+ defaultExpandedKeys?: FormTreeNodeKey[];
2437
+ currentNodeKey?: FormTreeNodeKey;
2438
+ accordion?: boolean;
2439
+ lazy?: boolean;
2440
+ highlightCurrent?: boolean;
2441
+ indent?: number;
2442
+ filterable?: boolean;
2443
+ clearable?: boolean;
2444
+ multiple?: boolean;
2445
+ multipleLimit?: number;
2446
+ collapseTags?: boolean;
2447
+ collapseTagsTooltip?: boolean;
2448
+ maxCollapseTags?: number;
2449
+ renderContent?: FormTreeRenderContent;
2450
+ emptyText?: string;
2451
+ placeholder?: string;
2452
+ }
2453
+
2454
+ export declare interface TreeSelectFormItemConfig<T = unknown> extends FormItemConfigBase<T, FormItemAttrs<TreeSelectFormItemAttrs>, FormTreeNode[]> {
2455
+ /** 树形选择 */
2456
+ type: FormItemType.TREE_SELECT | `${FormItemType.TREE_SELECT}`;
2457
+ component?: never;
2458
+ }
2459
+
2460
+ export declare type TypedFastTableComponent<T extends object, P extends object = QueryParams_2> = typeof EzFastTable & {
2461
+ new (): {
2462
+ $props: TypedFastTableProps<T, P>;
2463
+ $slots: TypedFastTableSlots<T, P>;
2464
+ };
2465
+ };
2466
+
2467
+ declare type TypedFastTableErrorSlotProps<P extends object> = Omit<FastTableErrorSlotProps<any>, 'params'> & {
2468
+ params: P;
2469
+ };
2470
+
2471
+ declare type TypedFastTableFormSlotProps<P extends object> = Omit<FastTableFormSlotProps<any>, 'params'> & {
2472
+ params: P;
2473
+ };
2474
+
2475
+ declare type TypedFastTableProps<T extends object, P extends object> = Omit<FastTableProps<Record<string, unknown>, QueryParams_2, unknown, unknown>, 'params' | 'columns'> & {
2476
+ params?: P;
2477
+ columns: TableColumn<T>[];
2478
+ };
2479
+
2480
+ declare type TypedFastTableSlots<T extends object, P extends object> = {
2481
+ form?: (props: TypedFastTableFormSlotProps<P>) => void;
2482
+ header?: (props: TableHeaderProps<T>) => void;
2483
+ freeArea?: (props: TypedFastTableFormSlotProps<P>) => void;
2484
+ empty?: () => void;
2485
+ error?: (props: TypedFastTableErrorSlotProps<P>) => void;
2486
+ } & TableSlot<T>;
2487
+
2488
+ export declare type UploadImagesFormItemAttrs = FormItemAttrs<Omit<ImageUpload, 'disabled'>>;
2489
+
2490
+ export declare interface UploadImagesFormItemConfig<T = unknown> extends FormItemConfigBase<T, UploadImagesFormItemAttrs, never> {
2491
+ /** 图片上传 */
2492
+ type: FormItemType.UPLOAD_IMAGES | `${FormItemType.UPLOAD_IMAGES}`;
2493
+ /** Upload 分支不使用 options */
2494
+ options?: never;
2495
+ component?: never;
2496
+ }
2497
+
1874
2498
  export { }