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