@maxtan/ez-ui 0.25.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,19 +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 '.';
29
32
  import { FormGroupConfig as FormGroupConfig_2 } from '.';
33
+ import { FormInstance } from 'element-plus';
30
34
  import { FormItemConfig as FormItemConfig_2 } from '.';
31
35
  import { FormItemContext } from 'element-plus';
32
36
  import { FormItemProp } from 'element-plus';
37
+ import { FormItemProps } from 'element-plus';
33
38
  import { FormItemRule } from 'element-plus';
34
39
  import { FormProps } from 'element-plus';
35
40
  import { FormValidateCallback } from 'element-plus';
@@ -38,29 +43,37 @@ import { GlobalComponents } from 'vue';
38
43
  import { GlobalDirectives } from 'vue';
39
44
  import { IconProps as IconProps_2 } from '.';
40
45
  import { ImageUpload as ImageUpload_2 } from '.';
46
+ import { ImageUploadModelValue as ImageUploadModelValue_2 } from '.';
41
47
  import { Mutable } from 'element-plus/es/utils/typescript.mjs';
42
48
  import { nextTick as nextTick_2 } from 'vue';
43
49
  import { OnCleanup } from '@vue/reactivity';
50
+ import { Page as Page_2 } from '.';
51
+ import { PaginationProps as PaginationProps_2 } from '.';
44
52
  import { Plugin as Plugin_2 } from 'vue';
45
53
  import { PrimitiveValue as PrimitiveValue_2 } from '..';
46
54
  import { PropType as PropType_2 } from 'vue';
47
55
  import { PublicProps } from 'vue';
56
+ import { QueryPanelProps as QueryPanelProps_2 } from '.';
48
57
  import { RadioOption as RadioOption_2 } from '.';
49
58
  import { RadioProps as RadioProps_2 } from '.';
50
59
  import { RadioType as RadioType_2 } from '.';
51
60
  import { Reactive } from 'vue';
52
- import { SearchFormProps as SearchFormProps_2 } from '.';
53
- import { SearchParams as SearchParams_2 } from '.';
61
+ import { RenderContentFunction } from 'element-plus';
62
+ import { SelectModelValue as SelectModelValue_2 } from '.';
54
63
  import { SelectOption as SelectOption_2 } from '.';
55
64
  import { SelectProps as SelectProps_2 } from '.';
65
+ import { ShallowRef as ShallowRef_2 } from 'vue';
56
66
  import { ShallowUnwrapRef } from 'vue';
57
67
  import { Slot as Slot_2 } from 'vue';
58
- import { TableColumn as TableColumn_2 } from '..';
59
- import { TableColumn as TableColumn_3 } from '.';
60
- import { TableColumnCtx } from 'element-plus';
68
+ import { StyleValue } from 'vue';
69
+ import { TableColumn as TableColumn_2 } from '.';
61
70
  import { TableExpose as TableExpose_2 } from '.';
62
- import { TableHeaderProps as TableHeaderProps_2 } from '.';
63
- 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';
64
77
  import { UploadData } from 'element-plus';
65
78
  import { UploadFile } from 'element-plus';
66
79
  import { UploadFiles } from 'element-plus';
@@ -78,7 +91,7 @@ import { WatchStopHandle } from 'vue';
78
91
  /**
79
92
  * 异步回调函数类型
80
93
  */
81
- export declare type AsyncCallbackFn<T = any> = (value: T) => Promise<void>;
94
+ export declare type AsyncCallbackFn<T = unknown> = (value: T) => Promise<void>;
82
95
 
83
96
  /**
84
97
  * 基础组件 Props 接口
@@ -99,7 +112,7 @@ export declare interface BaseComponentProps {
99
112
  * 基础选项接口
100
113
  * 适用于 select、radio、checkbox 等选择类组件
101
114
  */
102
- export declare interface BaseOption<T = any> {
115
+ export declare interface BaseOption<T = PrimitiveValue> {
103
116
  /** 显示标签 */
104
117
  label: string;
105
118
  /** 选项值 */
@@ -107,33 +120,86 @@ export declare interface BaseOption<T = any> {
107
120
  /** 是否禁用 */
108
121
  disabled?: boolean;
109
122
  /** 扩展属性 */
110
- [key: string]: any;
123
+ [key: string]: unknown;
111
124
  }
112
125
 
113
- declare interface BasePage {
126
+ export declare interface BasePage {
114
127
  current: number;
115
128
  size: number;
116
129
  }
117
130
 
118
- declare interface BaseSort {
119
- desc?: string;
120
- 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;
121
149
  }
122
150
 
123
151
  /**
124
152
  * 通用回调函数类型
125
153
  */
126
- 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
+ }
127
185
 
128
186
  /**
129
187
  * 触发方式为 change 的表单项类型
130
188
  */
131
189
  export declare const CHANGE_TRIGGER_TYPES: Set<string>;
132
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
+
133
199
  /**
134
200
  * Checkbox 选项接口(扩展了基础选项)
135
201
  */
136
- export declare interface CheckboxOption extends BaseOption<string | number | boolean | Record<string, unknown>> {
202
+ export declare interface CheckboxOption extends BaseOption<PrimitiveValue> {
137
203
  /** true 时的标签 */
138
204
  trueLabel?: string | number;
139
205
  /** false 时的标签 */
@@ -165,16 +231,44 @@ export declare type ComponentSize = 'large' | 'default' | 'small';
165
231
  */
166
232
  export declare type ComponentType = 'default' | 'button' | 'border';
167
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
+
168
248
  declare const _default: {
169
249
  install: (app: App) => void;
170
250
  };
171
251
  export default _default;
172
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
+
173
262
  export declare enum DialogDefaultText {
174
263
  CANCEL = "\u53D6\u6D88",
175
264
  CONFIRM = "\u786E\u5B9A"
176
265
  }
177
266
 
267
+ export declare interface DialogEmits {
268
+ (e: 'cancel'): void;
269
+ (e: 'confirm'): void;
270
+ }
271
+
178
272
  export declare interface DialogProps {
179
273
  title?: string;
180
274
  loading?: boolean;
@@ -183,12 +277,17 @@ export declare interface DialogProps {
183
277
  }
184
278
 
185
279
  /** 弹窗插槽类型 */
186
- export declare type DialogSolts = {
280
+ export declare type DialogSlots = {
187
281
  header?: () => VNodeChild;
188
282
  default?: () => VNodeChild;
189
283
  footer?: () => VNodeChild;
190
284
  };
191
285
 
286
+ /**
287
+ * @deprecated 请改用 DialogSlots。
288
+ */
289
+ export declare type DialogSolts = DialogSlots;
290
+
192
291
  /**
193
292
  * 动态表单暴露的方法
194
293
  */
@@ -201,10 +300,18 @@ export declare interface DynamicFormExpose {
201
300
  clearValidate: (props?: string | string[]) => void;
202
301
  /** 获取表单数据(深拷贝) */
203
302
  getFormData: () => FormData_2;
303
+ /** 获取序列化后的提交数据 */
304
+ getSubmitData: () => FormData_2;
204
305
  /** 设置表单数据 */
205
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;
206
313
  /** 表单实例 */
207
- formRef: any;
314
+ formRef: ShallowRef_2<FormInstance | undefined>;
208
315
  }
209
316
 
210
317
  /**
@@ -234,9 +341,9 @@ export declare interface DynamicFormLabelSlotScope {
234
341
  * 继承 FormProps,排除会干扰内部逻辑的属性,并添加组件特有属性
235
342
  */
236
343
  export declare interface DynamicFormProps extends Partial<Omit<FormProps, 'model' | 'rules' | 'showMessage'>> {
237
- /** 扁平表单配置项(兼容旧版) */
344
+ /** 单分组场景的简写配置,适合简单平铺表单 */
238
345
  items?: FormItemConfig[];
239
- /** 分组表单配置项(新版推荐) */
346
+ /** 标准分组配置,适合长期维护的正式模式 */
240
347
  groups?: FormGroupConfig[];
241
348
  /** 双向绑定的表单数据 */
242
349
  modelValue?: FormData_2;
@@ -256,7 +363,7 @@ export declare interface DynamicFormSlots {
256
363
  * 动态表单支持项级与分组级的动态插槽,
257
364
  * 统一放宽为 any 作用域,避免模板静态校验冲突。
258
365
  */
259
- [key: string]: ((scope: any) => VNode_2 | VNode_2[]) | undefined;
366
+ [key: string]: ((scope: any) => VNodeChild) | undefined;
260
367
  }
261
368
 
262
369
  /**
@@ -266,7 +373,7 @@ export declare interface DynamicFormSlotScope {
266
373
  /** 表单项配置 */
267
374
  item: FormItemConfig;
268
375
  /** 当前值 */
269
- value: any;
376
+ value: unknown;
270
377
  /** 完整表单数据 */
271
378
  formData: FormData_2;
272
379
  }
@@ -314,13 +421,14 @@ export declare const EzDialog: ({
314
421
  new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly<{
315
422
  modelValue?: boolean;
316
423
  } & DialogProps_2> & Readonly<{
317
- onConfirm?: (...args: any[]) => any;
318
- onCancel?: (...args: any[]) => any;
424
+ onConfirm?: () => any;
425
+ onCancel?: () => any;
319
426
  "onUpdate:modelValue"?: (value: boolean) => any;
320
427
  }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
321
- confirm: (...args: any[]) => void;
322
- cancel: (...args: any[]) => void;
323
- "update:modelValue": (value: boolean) => void;
428
+ "update:modelValue": (value: boolean) => any;
429
+ } & {
430
+ confirm: () => any;
431
+ cancel: () => any;
324
432
  }, PublicProps, {
325
433
  loading: boolean;
326
434
  title: string;
@@ -336,8 +444,8 @@ export declare const EzDialog: ({
336
444
  }, Readonly<{
337
445
  modelValue?: boolean;
338
446
  } & DialogProps_2> & Readonly<{
339
- onConfirm?: (...args: any[]) => any;
340
- onCancel?: (...args: any[]) => any;
447
+ onConfirm?: () => any;
448
+ onCancel?: () => any;
341
449
  "onUpdate:modelValue"?: (value: boolean) => any;
342
450
  }>, {}, {}, {}, {}, {
343
451
  loading: boolean;
@@ -351,20 +459,21 @@ export declare const EzDialog: ({
351
459
  } & ComponentOptionsBase<Readonly<{
352
460
  modelValue?: boolean;
353
461
  } & DialogProps_2> & Readonly<{
354
- onConfirm?: (...args: any[]) => any;
355
- onCancel?: (...args: any[]) => any;
462
+ onConfirm?: () => any;
463
+ onCancel?: () => any;
356
464
  "onUpdate:modelValue"?: (value: boolean) => any;
357
465
  }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
358
- confirm: (...args: any[]) => void;
359
- cancel: (...args: any[]) => void;
360
- "update:modelValue": (value: boolean) => void;
466
+ "update:modelValue": (value: boolean) => any;
467
+ } & {
468
+ confirm: () => any;
469
+ cancel: () => any;
361
470
  }, string, {
362
471
  loading: boolean;
363
472
  title: string;
364
473
  cancelText: string;
365
474
  confirmText: string;
366
475
  }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
367
- $slots: Readonly<DialogSolts_2> & DialogSolts_2;
476
+ $slots: Readonly<DialogSlots_2> & DialogSlots_2;
368
477
  }) & Plugin_2) & Record<string, any>;
369
478
 
370
479
  export declare const EzDynamicForm: ({
@@ -377,8 +486,12 @@ export declare const EzDynamicForm: ({
377
486
  validateField: (props: string | string[]) => Promise<boolean>;
378
487
  clearValidate: (props?: string | string[]) => void;
379
488
  getFormData: () => FormData_3;
489
+ getSubmitData: () => FormData_3;
380
490
  setFormData: (data: FormData_3, merge?: boolean) => void;
381
- formRef: any;
491
+ setSubmitData: (data: FormData_3, merge?: boolean) => void;
492
+ resetForm: () => void;
493
+ captureInitialData: () => void;
494
+ formRef: ShallowRef_2<FormInstance | undefined>;
382
495
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
383
496
  "update:modelValue": (value: FormData_3) => any;
384
497
  }, PublicProps, {
@@ -406,23 +519,23 @@ export declare const EzDynamicForm: ({
406
519
  readonly scrollToError: boolean;
407
520
  }> & Omit<{
408
521
  readonly disabled: boolean;
522
+ readonly labelWidth: EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
409
523
  readonly labelPosition: EpPropMergeType<StringConstructor, "top" | "left" | "right", unknown>;
524
+ readonly inlineMessage: boolean;
525
+ readonly showMessage: EpPropMergeType<BooleanConstructor, unknown, unknown>;
410
526
  readonly requireAsteriskPosition: EpPropMergeType<StringConstructor, "left" | "right", unknown>;
411
- readonly labelWidth: EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
412
527
  readonly labelSuffix: string;
413
528
  readonly inline: boolean;
414
- readonly inlineMessage: boolean;
415
529
  readonly statusIcon: boolean;
416
- readonly showMessage: EpPropMergeType<BooleanConstructor, unknown, unknown>;
417
530
  readonly validateOnRuleChange: EpPropMergeType<BooleanConstructor, unknown, unknown>;
418
531
  readonly hideRequiredAsterisk: boolean;
419
532
  readonly scrollToError: boolean;
420
533
  readonly scrollIntoViewOptions: true;
421
534
  readonly size?: EpPropMergeType<StringConstructor, "" | "small" | "large" | "default", unknown>;
422
- readonly model?: Record<string, any>;
423
535
  readonly rules?: Partial<Record<string, Arrayable<FormItemRule>>>;
536
+ readonly model?: Record<string, any>;
424
537
  onValidate?: ((prop: FormItemProp, isValid: boolean, message: string) => any) | undefined;
425
- } & 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">;
426
539
  $attrs: {
427
540
  [x: string]: unknown;
428
541
  };
@@ -554,7 +667,7 @@ export declare const EzDynamicForm: ({
554
667
  readonly disabled: BooleanConstructor;
555
668
  }>> & {
556
669
  onValidate?: ((prop: FormItemProp, isValid: boolean, message: string) => any) | undefined;
557
- }, "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< {
558
671
  validate: (callback?: FormValidateCallback) => FormValidationResult;
559
672
  validateField: (props?: Arrayable<FormItemProp>, callback?: FormValidateCallback) => FormValidationResult;
560
673
  resetFields: (props?: Arrayable<FormItemProp>) => void;
@@ -584,8 +697,12 @@ export declare const EzDynamicForm: ({
584
697
  validateField: (props: string | string[]) => Promise<boolean>;
585
698
  clearValidate: (props?: string | string[]) => void;
586
699
  getFormData: () => FormData_3;
700
+ getSubmitData: () => FormData_3;
587
701
  setFormData: (data: FormData_3, merge?: boolean) => void;
588
- formRef: any;
702
+ setSubmitData: (data: FormData_3, merge?: boolean) => void;
703
+ resetForm: () => void;
704
+ captureInitialData: () => void;
705
+ formRef: ShallowRef_2<FormInstance | undefined>;
589
706
  }, {}, {}, {}, {
590
707
  items: FormItemConfig_2[];
591
708
  groups: FormGroupConfig_2[];
@@ -604,8 +721,12 @@ validate: () => Promise<boolean>;
604
721
  validateField: (props: string | string[]) => Promise<boolean>;
605
722
  clearValidate: (props?: string | string[]) => void;
606
723
  getFormData: () => FormData_3;
724
+ getSubmitData: () => FormData_3;
607
725
  setFormData: (data: FormData_3, merge?: boolean) => void;
608
- formRef: any;
726
+ setSubmitData: (data: FormData_3, merge?: boolean) => void;
727
+ resetForm: () => void;
728
+ captureInitialData: () => void;
729
+ formRef: ShallowRef_2<FormInstance | undefined>;
609
730
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
610
731
  "update:modelValue": (value: FormData_3) => any;
611
732
  }, string, {
@@ -617,16 +738,18 @@ gutter: number;
617
738
  $slots: Readonly<DynamicFormSlots_2> & DynamicFormSlots_2;
618
739
  }) & Plugin_2) & Record<string, any>;
619
740
 
620
- 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?: {
621
742
  attrs: any;
622
- slots: Readonly<NonNullable<FastTableSolt_2<T>>> & {
623
- form: () => void;
624
- header: (props: TableHeaderProps_2<T>) => void;
625
- 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;
626
749
  } & {
627
750
  [x: string]: (props: {
628
751
  row: T;
629
- column: TableColumn_2<T>;
752
+ column: TableColumn<T>;
630
753
  $index: number;
631
754
  }) => VNodeChild;
632
755
  } & {
@@ -634,43 +757,44 @@ export declare const EzFastTable: ((<T = any>(__VLS_props: NonNullable<Awaited<t
634
757
  empty?: () => VNodeChild;
635
758
  } & {
636
759
  [x: `header-${string}`]: (props: {
637
- column: TableColumn_2<T>;
760
+ column: TableColumn<T>;
638
761
  $index: number;
639
762
  }) => VNodeChild;
640
763
  };
641
- 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>;
642
765
  }, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
643
766
  props: {
644
- readonly onReset?: (...args: any[]) => any;
645
- readonly "onUpdate:columns"?: (value: TableColumn_2<T>[]) => any;
646
- readonly "onUpdate:params"?: (value: SearchParams_2) => any;
647
- readonly "onUpdate:loading"?: (value: boolean) => any;
648
- readonly onChangePage?: (...args: any[]) => any;
649
- readonly onQuery?: (...args: any[]) => any;
650
- params?: SearchParams_2;
651
- 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;
652
774
  loading?: boolean;
653
- api: (params?: any) => Promise<any>;
654
- 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>;
655
781
  columnTool?: boolean;
656
782
  expanded?: boolean;
657
- data?: any[];
658
- rowKey?: string;
783
+ border?: boolean;
784
+ rowKey?: TableRowKey_2<T>;
659
785
  } & PublicProps;
660
- expose(exposed: ShallowUnwrapRef< {
661
- search: () => void;
662
- query: () => Promise<void>;
663
- getTableRef: () => any;
664
- }>): void;
786
+ expose(exposed: ShallowUnwrapRef<FastTableExpose_2<P>>): void;
665
787
  attrs: any;
666
- slots: Readonly<NonNullable<FastTableSolt_2<T>>> & {
667
- form: () => void;
668
- header: (props: TableHeaderProps_2<T>) => void;
669
- 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;
670
794
  } & {
671
795
  [x: string]: (props: {
672
796
  row: T;
673
- column: TableColumn_2<T>;
797
+ column: TableColumn<T>;
674
798
  $index: number;
675
799
  }) => VNodeChild;
676
800
  } & {
@@ -678,11 +802,11 @@ export declare const EzFastTable: ((<T = any>(__VLS_props: NonNullable<Awaited<t
678
802
  empty?: () => VNodeChild;
679
803
  } & {
680
804
  [x: `header-${string}`]: (props: {
681
- column: TableColumn_2<T>;
805
+ column: TableColumn<T>;
682
806
  $index: number;
683
807
  }) => VNodeChild;
684
808
  };
685
- 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>;
686
810
  }>) => VNode_2 & {
687
811
  __ctx?: Awaited<typeof __VLS_setup>;
688
812
  }) & Plugin_2) & Record<string, any>;
@@ -724,10 +848,10 @@ formData: FormData_3;
724
848
  }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
725
849
  $slots: {
726
850
  label?(_: {
727
- config: FormItemConfig_2<any>;
851
+ config: FormItemConfig_2;
728
852
  }): any;
729
853
  default?(_: {
730
- config: FormItemConfig_2<any>;
854
+ config: FormItemConfig_2;
731
855
  value: any;
732
856
  formData: FormData_3;
733
857
  }): any;
@@ -775,14 +899,24 @@ color: string;
775
899
 
776
900
  export declare const EzImageUpload: ({
777
901
  new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly<{
778
- modelValue?: string;
902
+ modelValue?: ImageUploadModelValue_2;
779
903
  } & ImageUpload_2> & Readonly<{
904
+ onError?: (file: File, error: Error) => any;
905
+ onDelete?: (url: string) => any;
780
906
  "onUpdate:modelValue"?: (value: string) => any;
907
+ onSuccess?: (file: File, url: string) => any;
781
908
  }>, {
909
+ clearFiles: () => void;
910
+ submit: () => void;
782
911
  getUploadRef: () => any;
783
912
  getUrlList: () => string[];
784
913
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
785
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;
786
920
  }, PublicProps, {
787
921
  style: Record<string, string>;
788
922
  disabled: boolean;
@@ -829,10 +963,10 @@ export declare const EzImageUpload: ({
829
963
  readonly onError: (error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
830
964
  readonly onProgress: (evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
831
965
  readonly multiple: boolean;
966
+ readonly onSuccess: (response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
832
967
  readonly beforeUpload: (rawFile: UploadRawFile) => Awaitable<void | undefined | null | boolean | File | Blob>;
833
968
  readonly onRemove: (uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
834
969
  readonly onPreview: (uploadFile: UploadFile) => void;
835
- readonly onSuccess: (response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
836
970
  readonly onExceed: (files: File[], uploadFiles: UploadUserFile[]) => void;
837
971
  readonly action: string;
838
972
  readonly method: string;
@@ -850,7 +984,7 @@ export declare const EzImageUpload: ({
850
984
  readonly beforeRemove?: (uploadFile: UploadFile, uploadFiles: UploadFiles) => Awaitable<boolean>;
851
985
  readonly crossorigin?: EpPropMergeType<(new (...args: any[]) => "" | "anonymous" | "use-credentials") | (() => "" | "anonymous" | "use-credentials") | ((new (...args: any[]) => "" | "anonymous" | "use-credentials") | (() => "" | "anonymous" | "use-credentials"))[], unknown, unknown>;
852
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>;
853
- } & 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">;
854
988
  $attrs: {
855
989
  [x: string]: unknown;
856
990
  };
@@ -1169,7 +1303,7 @@ export declare const EzImageUpload: ({
1169
1303
  readonly disabled: EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
1170
1304
  readonly limit: NumberConstructor;
1171
1305
  readonly directory: BooleanConstructor;
1172
- }>>, "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< {
1173
1307
  abort: (file: UploadFile) => void;
1174
1308
  submit: () => void;
1175
1309
  clearFiles: (states?: UploadStatus[]) => void;
@@ -1208,10 +1342,15 @@ export declare const EzImageUpload: ({
1208
1342
  M: {};
1209
1343
  Defaults: {};
1210
1344
  }, Readonly<{
1211
- modelValue?: string;
1345
+ modelValue?: ImageUploadModelValue_2;
1212
1346
  } & ImageUpload_2> & Readonly<{
1347
+ onError?: (file: File, error: Error) => any;
1348
+ onDelete?: (url: string) => any;
1213
1349
  "onUpdate:modelValue"?: (value: string) => any;
1350
+ onSuccess?: (file: File, url: string) => any;
1214
1351
  }>, {
1352
+ clearFiles: () => void;
1353
+ submit: () => void;
1215
1354
  getUploadRef: () => any;
1216
1355
  getUrlList: () => string[];
1217
1356
  }, {}, {}, {}, {
@@ -1230,14 +1369,24 @@ export declare const EzImageUpload: ({
1230
1369
  __isTeleport?: never;
1231
1370
  __isSuspense?: never;
1232
1371
  } & ComponentOptionsBase<Readonly<{
1233
- modelValue?: string;
1372
+ modelValue?: ImageUploadModelValue_2;
1234
1373
  } & ImageUpload_2> & Readonly<{
1374
+ onError?: (file: File, error: Error) => any;
1375
+ onDelete?: (url: string) => any;
1235
1376
  "onUpdate:modelValue"?: (value: string) => any;
1377
+ onSuccess?: (file: File, url: string) => any;
1236
1378
  }>, {
1379
+ clearFiles: () => void;
1380
+ submit: () => void;
1237
1381
  getUploadRef: () => any;
1238
1382
  getUrlList: () => string[];
1239
1383
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1240
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;
1241
1390
  }, string, {
1242
1391
  style: Record<string, string>;
1243
1392
  disabled: boolean;
@@ -1255,13 +1404,27 @@ export declare const EzPagination: ({
1255
1404
  new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly<{
1256
1405
  currentPage?: number;
1257
1406
  pageSize?: number;
1258
- }> & Readonly<{
1407
+ } & PaginationProps_2> & Readonly<{
1408
+ onChange?: (currentPage: number, pageSize: number) => any;
1409
+ "onCurrent-change"?: (page: number) => any;
1259
1410
  "onUpdate:currentPage"?: (value: number) => any;
1260
1411
  "onUpdate:pageSize"?: (value: number) => any;
1412
+ "onSize-change"?: (size: number) => any;
1261
1413
  }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1262
1414
  "update:currentPage": (value: number) => any;
1263
1415
  "update:pageSize": (value: number) => any;
1264
- }, 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, {
1265
1428
  P: {};
1266
1429
  B: {};
1267
1430
  D: {};
@@ -1271,75 +1434,59 @@ export declare const EzPagination: ({
1271
1434
  }, Readonly<{
1272
1435
  currentPage?: number;
1273
1436
  pageSize?: number;
1274
- }> & Readonly<{
1437
+ } & PaginationProps_2> & Readonly<{
1438
+ onChange?: (currentPage: number, pageSize: number) => any;
1439
+ "onCurrent-change"?: (page: number) => any;
1275
1440
  "onUpdate:currentPage"?: (value: number) => any;
1276
1441
  "onUpdate:pageSize"?: (value: number) => any;
1277
- }>, {}, {}, {}, {}, {}>;
1442
+ "onSize-change"?: (size: number) => any;
1443
+ }>, {}, {}, {}, {}, {
1444
+ disabled: boolean;
1445
+ background: boolean;
1446
+ layout: string;
1447
+ pageSizes: number[];
1448
+ }>;
1278
1449
  __isFragment?: never;
1279
1450
  __isTeleport?: never;
1280
1451
  __isSuspense?: never;
1281
1452
  } & ComponentOptionsBase<Readonly<{
1282
1453
  currentPage?: number;
1283
1454
  pageSize?: number;
1284
- }> & Readonly<{
1455
+ } & PaginationProps_2> & Readonly<{
1456
+ onChange?: (currentPage: number, pageSize: number) => any;
1457
+ "onCurrent-change"?: (page: number) => any;
1285
1458
  "onUpdate:currentPage"?: (value: number) => any;
1286
1459
  "onUpdate:pageSize"?: (value: number) => any;
1460
+ "onSize-change"?: (size: number) => any;
1287
1461
  }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1288
1462
  "update:currentPage": (value: number) => any;
1289
1463
  "update:pageSize": (value: number) => any;
1290
- }, string, {}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & Plugin_2) & Record<string, any>;
1291
-
1292
- export declare const EzRadio: ({
1293
- new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly<{
1294
- modelValue?: PrimitiveValue_2;
1295
- } & RadioProps_2> & Readonly<{
1296
- "onUpdate:modelValue"?: (value: PrimitiveValue_2) => any;
1297
- }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1298
- "update:modelValue": (value: PrimitiveValue_2) => any;
1299
- }, PublicProps, {
1300
- type: RadioType_2;
1301
- options: RadioOption_2[];
1302
- }, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
1303
- P: {};
1304
- B: {};
1305
- D: {};
1306
- C: {};
1307
- M: {};
1308
- Defaults: {};
1309
- }, Readonly<{
1310
- modelValue?: PrimitiveValue_2;
1311
- } & RadioProps_2> & Readonly<{
1312
- "onUpdate:modelValue"?: (value: PrimitiveValue_2) => any;
1313
- }>, {}, {}, {}, {}, {
1314
- type: RadioType_2;
1315
- options: RadioOption_2[];
1316
- }>;
1317
- __isFragment?: never;
1318
- __isTeleport?: never;
1319
- __isSuspense?: never;
1320
- } & ComponentOptionsBase<Readonly<{
1321
- modelValue?: PrimitiveValue_2;
1322
- } & RadioProps_2> & Readonly<{
1323
- "onUpdate:modelValue"?: (value: PrimitiveValue_2) => any;
1324
- }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1325
- "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;
1326
1470
  }, string, {
1327
- type: RadioType_2;
1328
- options: RadioOption_2[];
1471
+ disabled: boolean;
1472
+ background: boolean;
1473
+ layout: string;
1474
+ pageSizes: number[];
1329
1475
  }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & Plugin_2) & Record<string, any>;
1330
1476
 
1331
- export declare const EzSearchForm: ({
1477
+ export declare const EzQueryPanel: ({
1332
1478
  new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly<{
1333
- expanded?: Boolean;
1334
- } & SearchFormProps_2> & Readonly<{
1335
- "onUpdate:expanded"?: (value: Boolean) => any;
1479
+ expanded?: boolean;
1480
+ } & QueryPanelProps_2> & Readonly<{
1481
+ "onUpdate:expanded"?: (value: boolean) => any;
1336
1482
  }>, {
1337
1483
  countViewHeight: () => void;
1338
1484
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1339
- "update:expanded": (value: Boolean) => any;
1485
+ "update:expanded": (value: boolean) => any;
1340
1486
  }, PublicProps, {
1341
1487
  collapsedHeight: number;
1342
1488
  }, true, {}, {}, GlobalComponents, GlobalDirectives, string, {
1489
+ layoutRef: HTMLDivElement;
1343
1490
  wrapRef: HTMLDivElement;
1344
1491
  }, any, ComponentProvideOptions, {
1345
1492
  P: {};
@@ -1349,9 +1496,9 @@ export declare const EzSearchForm: ({
1349
1496
  M: {};
1350
1497
  Defaults: {};
1351
1498
  }, Readonly<{
1352
- expanded?: Boolean;
1353
- } & SearchFormProps_2> & Readonly<{
1354
- "onUpdate:expanded"?: (value: Boolean) => any;
1499
+ expanded?: boolean;
1500
+ } & QueryPanelProps_2> & Readonly<{
1501
+ "onUpdate:expanded"?: (value: boolean) => any;
1355
1502
  }>, {
1356
1503
  countViewHeight: () => void;
1357
1504
  }, {}, {}, {}, {
@@ -1361,13 +1508,13 @@ export declare const EzSearchForm: ({
1361
1508
  __isTeleport?: never;
1362
1509
  __isSuspense?: never;
1363
1510
  } & ComponentOptionsBase<Readonly<{
1364
- expanded?: Boolean;
1365
- } & SearchFormProps_2> & Readonly<{
1366
- "onUpdate:expanded"?: (value: Boolean) => any;
1511
+ expanded?: boolean;
1512
+ } & QueryPanelProps_2> & Readonly<{
1513
+ "onUpdate:expanded"?: (value: boolean) => any;
1367
1514
  }>, {
1368
1515
  countViewHeight: () => void;
1369
1516
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1370
- "update:expanded": (value: Boolean) => any;
1517
+ "update:expanded": (value: boolean) => any;
1371
1518
  }, string, {
1372
1519
  collapsedHeight: number;
1373
1520
  }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
@@ -1377,13 +1524,52 @@ collapsedHeight: number;
1377
1524
  };
1378
1525
  }) & Plugin_2) & Record<string, any>;
1379
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
+
1380
1566
  export declare const EzSelect: ({
1381
1567
  new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly<{
1382
- modelValue?: any;
1568
+ modelValue?: SelectModelValue_2;
1383
1569
  } & SelectProps_2> & Readonly<{
1384
- "onUpdate:modelValue"?: (value: any) => any;
1570
+ "onUpdate:modelValue"?: (value: SelectModelValue_2) => any;
1385
1571
  }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1386
- "update:modelValue": (value: any) => any;
1572
+ "update:modelValue": (value: SelectModelValue_2) => any;
1387
1573
  }, PublicProps, {
1388
1574
  options: SelectOption_2[];
1389
1575
  }, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
@@ -1394,9 +1580,9 @@ export declare const EzSelect: ({
1394
1580
  M: {};
1395
1581
  Defaults: {};
1396
1582
  }, Readonly<{
1397
- modelValue?: any;
1583
+ modelValue?: SelectModelValue_2;
1398
1584
  } & SelectProps_2> & Readonly<{
1399
- "onUpdate:modelValue"?: (value: any) => any;
1585
+ "onUpdate:modelValue"?: (value: SelectModelValue_2) => any;
1400
1586
  }>, {}, {}, {}, {}, {
1401
1587
  options: SelectOption_2[];
1402
1588
  }>;
@@ -1404,21 +1590,21 @@ export declare const EzSelect: ({
1404
1590
  __isTeleport?: never;
1405
1591
  __isSuspense?: never;
1406
1592
  } & ComponentOptionsBase<Readonly<{
1407
- modelValue?: any;
1593
+ modelValue?: SelectModelValue_2;
1408
1594
  } & SelectProps_2> & Readonly<{
1409
- "onUpdate:modelValue"?: (value: any) => any;
1595
+ "onUpdate:modelValue"?: (value: SelectModelValue_2) => any;
1410
1596
  }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1411
- "update:modelValue": (value: any) => any;
1597
+ "update:modelValue": (value: SelectModelValue_2) => any;
1412
1598
  }, string, {
1413
1599
  options: SelectOption_2[];
1414
1600
  }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & Plugin_2) & Record<string, any>;
1415
1601
 
1416
- 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?: {
1417
1603
  attrs: any;
1418
- slots: Readonly<NonNullable<TableSolt_2<T>>> & {
1604
+ slots: Readonly<NonNullable<TableSlot_2<T>>> & {
1419
1605
  [x: string]: (props: {
1420
1606
  row: T;
1421
- column: TableColumn_3<T>;
1607
+ column: TableColumn_2<T>;
1422
1608
  $index: number;
1423
1609
  }) => VNodeChild;
1424
1610
  } & {
@@ -1426,7 +1612,7 @@ export declare const EzTable: ((<T = any>(__VLS_props: NonNullable<Awaited<typeo
1426
1612
  empty?: () => VNodeChild;
1427
1613
  } & {
1428
1614
  [x: `header-${string}`]: (props: {
1429
- column: TableColumn_3<T>;
1615
+ column: TableColumn_2<T>;
1430
1616
  $index: number;
1431
1617
  }) => VNodeChild;
1432
1618
  };
@@ -1434,15 +1620,16 @@ export declare const EzTable: ((<T = any>(__VLS_props: NonNullable<Awaited<typeo
1434
1620
  }, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
1435
1621
  props: {
1436
1622
  data: T[];
1437
- columns: TableColumn_3<T>[];
1438
- rowKey?: string;
1623
+ columns: TableColumn_2<T>[];
1624
+ border?: boolean;
1625
+ rowKey?: TableRowKey_3<T>;
1439
1626
  } & PublicProps;
1440
1627
  expose(exposed: ShallowUnwrapRef<TableExpose_2>): void;
1441
1628
  attrs: any;
1442
- slots: Readonly<NonNullable<TableSolt_2<T>>> & {
1629
+ slots: Readonly<NonNullable<TableSlot_2<T>>> & {
1443
1630
  [x: string]: (props: {
1444
1631
  row: T;
1445
- column: TableColumn_3<T>;
1632
+ column: TableColumn_2<T>;
1446
1633
  $index: number;
1447
1634
  }) => VNodeChild;
1448
1635
  } & {
@@ -1450,7 +1637,7 @@ export declare const EzTable: ((<T = any>(__VLS_props: NonNullable<Awaited<typeo
1450
1637
  empty?: () => VNodeChild;
1451
1638
  } & {
1452
1639
  [x: `header-${string}`]: (props: {
1453
- column: TableColumn_3<T>;
1640
+ column: TableColumn_2<T>;
1454
1641
  $index: number;
1455
1642
  }) => VNodeChild;
1456
1643
  };
@@ -1459,31 +1646,163 @@ export declare const EzTable: ((<T = any>(__VLS_props: NonNullable<Awaited<typeo
1459
1646
  __ctx?: Awaited<typeof __VLS_setup>;
1460
1647
  }) & Plugin_2) & Record<string, any>;
1461
1648
 
1462
- 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> {
1463
1694
  /** 搜索(重置到第一页) */
1464
1695
  search: () => void;
1465
1696
  /** 查询(保持当前页) */
1466
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;
1467
1706
  /** 获取表格引用 */
1468
- 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;
1469
1733
  }
1470
1734
 
1471
- 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>[];
1472
1742
  /** 接口方法 */
1473
- api: (params?: any) => Promise<any>;
1743
+ api: (params?: RequestParams) => Promise<ResponseData>;
1474
1744
  /** 查询前钩子 */
1475
- 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>;
1476
1752
  /** 列管理工具 */
1477
1753
  columnTool?: boolean;
1478
1754
  expanded?: boolean;
1479
1755
  }
1480
1756
 
1481
1757
  /** 插槽类型 */
1482
- export declare type FastTableSolt<D> = {
1483
- form: () => void;
1758
+ export declare type FastTableSlot<D, P extends QueryParams_2 = QueryParams_2> = {
1759
+ form: (props: FastTableFormSlotProps<P>) => void;
1484
1760
  header: (props: TableHeaderProps<D>) => void;
1485
- freeArea: () => void;
1486
- } & 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
+ }
1487
1806
 
1488
1807
  /**
1489
1808
  * 联动条件函数类型
@@ -1493,9 +1812,23 @@ export declare type FormConditionFn = (formData: FormData_2) => boolean;
1493
1812
  /**
1494
1813
  * 表单数据类型
1495
1814
  */
1496
- declare type FormData_2 = Record<string, any>;
1815
+ declare type FormData_2 = Record<string, unknown>;
1497
1816
  export { FormData_2 as FormData }
1498
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
+
1499
1832
  /**
1500
1833
  * 表单分组配置
1501
1834
  */
@@ -1519,31 +1852,41 @@ export declare interface FormGroupConfig {
1519
1852
  /** 分组容器 class */
1520
1853
  className?: string;
1521
1854
  /** 分组容器 style */
1522
- style?: string | Record<string, any>;
1855
+ style?: StyleValue;
1523
1856
  /** 分组头部 class */
1524
1857
  headerClassName?: string;
1525
1858
  /** 分组头部 style */
1526
- headerStyle?: string | Record<string, any>;
1859
+ headerStyle?: StyleValue;
1527
1860
  /** 分组主体 class */
1528
1861
  bodyClassName?: string;
1529
1862
  /** 分组主体 style */
1530
- bodyStyle?: string | Record<string, any>;
1863
+ bodyStyle?: StyleValue;
1531
1864
  /** 自定义分组头插槽名 */
1532
1865
  headerSlot?: string;
1533
1866
  /** 自定义分组内容插槽名 */
1534
1867
  slot?: string;
1535
1868
  }
1536
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
+
1537
1882
  /**
1538
1883
  * 表单项配置
1539
1884
  */
1540
- export declare interface FormItemConfig<T = any> {
1885
+ declare interface FormItemConfigBase<T = unknown, A extends Record<string, unknown> = Record<string, unknown>, O = FormItemOption<T>[]> {
1541
1886
  /** 字段名(必填) */
1542
1887
  prop: string;
1543
1888
  /** 标签 */
1544
1889
  label?: string;
1545
- /** 组件类型 */
1546
- type?: FormItemType | `${FormItemType}` | string;
1547
1890
  /** 默认值 */
1548
1891
  defaultValue?: T;
1549
1892
  /** 验证规则 */
@@ -1561,23 +1904,25 @@ export declare interface FormItemConfig<T = any> {
1561
1904
  /** 占位符(不填则自动生成) */
1562
1905
  placeholder?: string;
1563
1906
  /** 选项配置(用于 select、radio、checkbox、cascader 等) */
1564
- options?: FormItemOption<T>[];
1907
+ options?: O;
1565
1908
  /** 组件属性(透传给具体组件) */
1566
- attrs?: Record<string, any>;
1567
- /** 自定义组件 */
1568
- component?: Component_2;
1909
+ attrs?: A;
1569
1910
  /** 额外的 el-form-item 属性 */
1570
- itemAttrs?: Record<string, any>;
1911
+ itemAttrs?: FormItemWrapperAttrs;
1571
1912
  /** 联动显示条件(返回 true 显示,false 隐藏) */
1572
1913
  show?: FormConditionFn;
1573
1914
  /** 联动禁用条件(返回 true 禁用,false 启用) */
1574
1915
  disabledWhen?: FormConditionFn;
1916
+ /** 提交前字段序列化,可用于拆分日期范围、清洗值或派生附加字段 */
1917
+ serialize?: FormSerializeFn<T>;
1918
+ /** 外部数据回填到表单时的反序列化 */
1919
+ deserialize?: FormDeserializeFn<T>;
1575
1920
  }
1576
1921
 
1577
1922
  /**
1578
1923
  * 表单选项配置(继承自共享基础选项)
1579
1924
  */
1580
- export declare type FormItemOption<T = any> = BaseOption<T>;
1925
+ export declare type FormItemOption<T = unknown> = BaseOption<T>;
1581
1926
 
1582
1927
  /**
1583
1928
  * 表单项类型枚举
@@ -1618,14 +1963,49 @@ export declare enum FormItemType {
1618
1963
  TREE_SELECT = "tree-select",
1619
1964
  /** 级联选择 */
1620
1965
  CASCADER = "cascader",
1621
- /** 树形控件 */
1622
- TREE = "tree",
1623
1966
  /** 滑块 */
1624
1967
  SLIDER = "slider",
1625
1968
  /** 评分 */
1626
1969
  RATE = "rate"
1627
1970
  }
1628
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
+
1629
2009
  /**
1630
2010
  * 根据类型获取输入动词
1631
2011
  * @param type 表单项类型
@@ -1643,13 +2023,13 @@ export declare function getTrigger(type?: string): string;
1643
2023
  /**
1644
2024
  * Select 分组选项(重导出以便使用)
1645
2025
  */
1646
- export declare type GroupOption = GroupOption_2<string | number | boolean | Record<string, any>>;
2026
+ export declare type GroupOption = GroupOption_2<SelectOptionValue>;
1647
2027
 
1648
2028
  /**
1649
2029
  * 分组选项接口
1650
2030
  * 用于需要分组显示的选择组件
1651
2031
  */
1652
- declare interface GroupOption_2<T = any> {
2032
+ declare interface GroupOption_2<T = PrimitiveValue> {
1653
2033
  /** 分组标签 */
1654
2034
  label: string;
1655
2035
  /** 选项集合 */
@@ -1701,9 +2081,9 @@ export declare interface ImageUpload {
1701
2081
  }
1702
2082
 
1703
2083
  export declare interface ImageUploadEmits {
1704
- (e: 'update:modelValue', value: string | string[]): void;
2084
+ (e: 'update:modelValue', value: ImageUploadModelValue): void;
1705
2085
  (e: 'success', file: File, url: string): void;
1706
- (e: 'error', file: File, error: any): void;
2086
+ (e: 'error', file: File, error: Error): void;
1707
2087
  (e: 'delete', url: string): void;
1708
2088
  }
1709
2089
 
@@ -1714,17 +2094,32 @@ export declare interface ImageUploadExpose {
1714
2094
  submit: () => void;
1715
2095
  }
1716
2096
 
2097
+ export declare type ImageUploadModelValue = string;
2098
+
1717
2099
  export declare const install: (app: App) => void;
1718
2100
 
1719
2101
  /**
1720
2102
  * 键值对类型
1721
2103
  */
1722
- export declare type KeyValuePair = Record<string, any>;
2104
+ export declare type KeyValuePair = Record<string, unknown>;
1723
2105
 
1724
2106
  /** 公共分页返回类型 */
1725
2107
  export declare interface Page<T> extends BasePage {
1726
2108
  records: T[];
1727
- 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;
1728
2123
  }
1729
2124
 
1730
2125
  /**
@@ -1750,13 +2145,53 @@ export declare interface PaginationProps {
1750
2145
  /**
1751
2146
  * 判断函数类型
1752
2147
  */
1753
- export declare type PredicateFn<T = any> = (value: T) => boolean;
2148
+ export declare type PredicateFn<T = unknown> = (value: T) => boolean;
1754
2149
 
1755
2150
  /**
1756
2151
  * 常用值类型
1757
2152
  */
1758
2153
  export declare type PrimitiveValue = string | number | boolean;
1759
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
+
1760
2195
  /**
1761
2196
  * Radio 选项接口
1762
2197
  */
@@ -1786,36 +2221,6 @@ declare type Response_2<T> = {
1786
2221
  };
1787
2222
  export { Response_2 as Response }
1788
2223
 
1789
- /**
1790
- * SearchForm 组件 Emits
1791
- */
1792
- export declare interface SearchFormEmits {
1793
- /** 点击搜索按钮时触发 */
1794
- search: () => void;
1795
- /** 点击重置按钮时触发 */
1796
- reset: () => void;
1797
- }
1798
-
1799
- export declare interface SearchFormExpose {
1800
- /** 重新计算视图高度 */
1801
- countViewHeight: () => void;
1802
- }
1803
-
1804
- /**
1805
- * SearchForm 组件 Props
1806
- */
1807
- export declare interface SearchFormProps {
1808
- /** 折叠时的高度(px) */
1809
- collapsedHeight?: number;
1810
- /** 是否显示重置按钮 */
1811
- reset?: boolean;
1812
- }
1813
-
1814
- /** 分页参数类型 */
1815
- export declare type SearchParams<T = any> = BasePage & BaseSort & {
1816
- [k in keyof T]: any;
1817
- };
1818
-
1819
2224
  /**
1820
2225
  * 表单项类型集合(用于内部判断)
1821
2226
  */
@@ -1826,11 +2231,11 @@ export declare const SELECT_FORM_TYPES: Set<string>;
1826
2231
  */
1827
2232
  export declare interface SelectEmits {
1828
2233
  /** 选中值发生变化时触发 */
1829
- (e: 'change', value: any): void;
2234
+ (e: 'change', value: SelectModelValue): void;
1830
2235
  /** 下拉框出现/隐藏时触发 */
1831
2236
  (e: 'visible-change', visible: boolean): void;
1832
2237
  /** 多选模式下移除tag时触发 */
1833
- (e: 'remove-tag', value: any): void;
2238
+ (e: 'remove-tag', value: SelectOptionValue): void;
1834
2239
  /** 可清空的单选模式下用户点击清空按钮时触发 */
1835
2240
  (e: 'clear'): void;
1836
2241
  /** 当 input 失去焦点时触发 */
@@ -1839,13 +2244,26 @@ export declare interface SelectEmits {
1839
2244
  (e: 'focus', event: FocusEvent): void;
1840
2245
  }
1841
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
+
1842
2261
  /**
1843
2262
  * Select 选项类型(支持单个选项或分组选项)
1844
2263
  */
1845
- export declare type SelectOption = BaseOption<string | number | boolean | Record<string, any>> | GroupOption;
2264
+ export declare type SelectOption = BaseOption<SelectOptionValue> | GroupOption;
1846
2265
 
1847
- /** @deprecated 使用 BaseOption 代替 */
1848
- export declare type SelectOptionItem = BaseOption<string | number | boolean | Record<string, any>>;
2266
+ export declare type SelectOptionValue = PrimitiveValue | Record<string, unknown>;
1849
2267
 
1850
2268
  /**
1851
2269
  * Select 组件 Props
@@ -1855,42 +2273,94 @@ export declare interface SelectProps {
1855
2273
  options: SelectOption[];
1856
2274
  }
1857
2275
 
1858
- /** @deprecated 使用 SelectProps 代替 */
1859
- export declare type SelectPropsType = SelectProps;
1860
-
1861
2276
  export declare enum SortEnum {
1862
2277
  ASC = "ascending",
1863
2278
  DESC = "descending",
1864
2279
  EMPTY
1865
2280
  }
1866
2281
 
1867
- export declare interface TableColumn<T = any> extends Partial<TableColumnCtx<T>> {
1868
- hidden?: 0 | 1;
1869
- 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;
1870
2334
  }
1871
2335
 
1872
- export declare interface TableEmits {
1873
- (e: 'selection-change', selection: any[]): void;
1874
- (e: 'sort-change', params: {
1875
- column: any;
1876
- prop: string;
1877
- order: string;
1878
- }): 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;
1879
2349
  }
1880
2350
 
1881
2351
  export declare interface TableExpose {
1882
2352
  /** 获取表格引用 */
1883
- getTableRef: () => any;
2353
+ getTableRef: () => TableInstance | undefined;
1884
2354
  /** 清空选择 */
1885
2355
  clearSelection: () => void;
1886
2356
  /** 切换行选择状态 */
1887
- toggleRowSelection: (row: any, selected?: boolean) => void;
2357
+ toggleRowSelection: (row: unknown, selected?: boolean) => void;
1888
2358
  /** 切换所有行选择状态 */
1889
2359
  toggleAllSelection: () => void;
1890
2360
  /** 切换行展开状态 */
1891
- toggleRowExpansion: (row: any, expanded?: boolean) => void;
2361
+ toggleRowExpansion: (row: unknown, expanded?: boolean) => void;
1892
2362
  /** 设置当前行 */
1893
- setCurrentRow: (row: any) => void;
2363
+ setCurrentRow: (row: unknown) => void;
1894
2364
  /** 清空排序 */
1895
2365
  clearSort: () => void;
1896
2366
  /** 清空过滤器 */
@@ -1898,23 +2368,28 @@ export declare interface TableExpose {
1898
2368
  /** 重新布局 */
1899
2369
  doLayout: () => void;
1900
2370
  /** 排序 */
1901
- sort: (prop: string, order: string) => void;
2371
+ sort: (prop: string, order: TableSortOrder) => void;
1902
2372
  }
1903
2373
 
1904
2374
  /** 表格上方插槽类型 */
1905
2375
  export declare type TableHeaderProps<T> = {
1906
2376
  selectList: T[];
1907
- selectIds: string[];
2377
+ selectIds: TableRowId[];
1908
2378
  };
1909
2379
 
1910
- export declare interface TableProps<T = any> {
2380
+ export declare interface TableProps<T = Record<string, unknown>> {
1911
2381
  data: T[];
1912
2382
  columns: TableColumn<T>[];
1913
- rowKey?: string;
2383
+ border?: boolean;
2384
+ rowKey?: TableRowKey<T>;
1914
2385
  }
1915
2386
 
2387
+ export declare type TableRowId = string | number;
2388
+
2389
+ export declare type TableRowKey<T = Record<string, unknown>> = string | ((row: T) => string);
2390
+
1916
2391
  /** 表格插槽类型 */
1917
- export declare type TableSolt<D> = {
2392
+ export declare type TableSlot<D> = {
1918
2393
  [key in string]?: (props: {
1919
2394
  row: D;
1920
2395
  column: TableColumn<D>;
@@ -1930,4 +2405,94 @@ export declare type TableSolt<D> = {
1930
2405
  }) => VNodeChild;
1931
2406
  };
1932
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
+
1933
2498
  export { }