z-ui-pc 0.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.
@@ -0,0 +1,2494 @@
1
+ import { AllowedComponentProps } from 'vue';
2
+ import { App } from 'vue';
3
+ import { AsyncComponentLoader } from 'vue';
4
+ import { CascaderEmits } from 'element-plus/lib/components';
5
+ import { CascaderProps } from 'element-plus/es/components/cascader-panel/src/node';
6
+ import { cascaderProps } from 'element-plus/es/components/cascader/src/cascader';
7
+ import { CascaderValue } from 'element-plus';
8
+ import { ColProps } from 'element-plus';
9
+ import { Component } from 'vue';
10
+ import { ComponentCustomProps } from 'vue';
11
+ import { ComponentOptionsBase } from 'vue';
12
+ import { ComponentOptionsMixin } from 'vue';
13
+ import { ComponentProvideOptions } from 'vue';
14
+ import { ComponentPublicInstance } from 'vue';
15
+ import { ComputedRef } from 'vue';
16
+ import { CreateComponentPublicInstanceWithMixins } from 'vue';
17
+ import { DatePickerProps } from 'element-plus';
18
+ import { default as default_2 } from 'lodash';
19
+ import { DefineComponent } from 'vue';
20
+ import { ElForm } from 'element-plus';
21
+ import { EpPropMergeType } from 'element-plus/es/utils/index.mjs';
22
+ import { ExtractPropTypes } from 'vue';
23
+ import { FormBuilder as FormBuilder_2 } from './core/FormBuilder';
24
+ import { FormItemProp } from 'element-plus/es/components/form/src/form-item';
25
+ import { FormItemProps } from 'element-plus';
26
+ import { FormProps } from 'element-plus';
27
+ import { GlobalComponents } from 'vue';
28
+ import { GlobalDirectives } from 'vue';
29
+ import { h } from 'vue';
30
+ import { IAdvancedFilterFormItemGroup as IAdvancedFilterFormItemGroup_2 } from './typing/advanced-filter';
31
+ import { IBaseTableColumn as IBaseTableColumn_2 } from './zTable.types';
32
+ import { IBaseTableColumnStoreItem } from './useConfigOperation';
33
+ import { IBaseTableColumnStoreItem as IBaseTableColumnStoreItem_2 } from './hooks/useConfigOperation';
34
+ import { IBaseTableColumnStoreRow } from './useConfigOperation';
35
+ import { IBaseTableProps as IBaseTableProps_2 } from './hooks/useBaseTable';
36
+ import { IBaseTableRef as IBaseTableRef_2 } from './zTable.types';
37
+ import { ICallBackParams as ICallBackParams_2 } from '../zTable.types';
38
+ import { ICallBackParams as ICallBackParams_3 } from './zTable.types';
39
+ import { IColumnConfig as IColumnConfig_2 } from './hooks/useBaseTable';
40
+ import { InputEmits } from 'element-plus';
41
+ import { InputProps } from 'element-plus';
42
+ import { IOperationBtn as IOperationBtn_2 } from './zTable.types';
43
+ import { IPagination as IPagination_2 } from './zTable.types';
44
+ import { IViewConfigResult as IViewConfigResult_2 } from './config.types';
45
+ import { JSX } from 'vue/jsx-runtime';
46
+ import { ManipulateType } from 'dayjs';
47
+ import { PaginationProps } from 'element-plus';
48
+ import { Plugin as Plugin_2 } from 'vue';
49
+ import { PublicProps } from 'vue';
50
+ import { RadioProps } from 'element-plus';
51
+ import { Raw } from 'vue';
52
+ import { Ref } from 'vue';
53
+ import { RowProps } from 'element-plus';
54
+ import { SelectProps } from 'element-plus/es/components/select/src/select';
55
+ import { ShallowRef } from 'vue';
56
+ import { SwitchProps } from 'element-plus';
57
+ import { TableColumnCtx } from 'element-plus/es/components/table/src/table-column/defaults';
58
+ import { TableProps } from 'element-plus';
59
+ import { TConfigGroup } from '../components/config-columns/useConfigColumns';
60
+ import { TConfigGroup as TConfigGroup_2 } from './components/config-columns/useConfigColumns';
61
+ import { TOptionsReturn as TOptionsReturn_2 } from '../../core/typing';
62
+ import { VNode } from 'vue';
63
+ import { VNodeProps } from 'vue';
64
+
65
+ declare const __VLS_component: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
66
+
67
+ declare const __VLS_component_2: DefineComponent<Partial<IBaseNumberInputProps>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
68
+ "update:modelValue": (value: any) => any;
69
+ change: (value: string | number) => any;
70
+ }, string, PublicProps, Readonly<Partial<IBaseNumberInputProps>> & Readonly<{
71
+ "onUpdate:modelValue"?: ((value: any) => any) | undefined;
72
+ onChange?: ((value: string | number) => any) | undefined;
73
+ }>, {
74
+ modelValue: string | number | null;
75
+ readonly clearable: boolean;
76
+ readonly validateEvent: boolean;
77
+ on: TEvent;
78
+ min: number;
79
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
80
+
81
+ declare type __VLS_Props = IBaseDateProps;
82
+
83
+ declare type __VLS_Props_2 = IBaseDateRangeAndSelectGroupProps;
84
+
85
+ declare type __VLS_Props_3 = IGroupSelectInputAttrs & {
86
+ on?: TEvent & Partial<InputEmits>;
87
+ modelValue: [string?, string?];
88
+ };
89
+
90
+ declare type __VLS_PublicProps = {
91
+ "dynamicExpression"?: TUndefinable<IDynamicExpression>;
92
+ } & __VLS_Props;
93
+
94
+ declare type __VLS_PublicProps_2 = {
95
+ "dynamicExpression"?: TUndefinable<IDynamicExpression>;
96
+ } & __VLS_Props_2;
97
+
98
+ declare function __VLS_template(): {
99
+ attrs: Partial<{}>;
100
+ slots: Partial<Record<string, (_: {}) => any>>;
101
+ refs: {};
102
+ rootEl: any;
103
+ };
104
+
105
+ declare function __VLS_template_2(): {
106
+ attrs: Partial<{}>;
107
+ slots: {
108
+ suffix?(_: {}): any;
109
+ };
110
+ refs: {};
111
+ rootEl: HTMLDivElement;
112
+ };
113
+
114
+ declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
115
+
116
+ declare type __VLS_TemplateResult_2 = ReturnType<typeof __VLS_template_2>;
117
+
118
+ declare type __VLS_WithTemplateSlots<T, S> = T & {
119
+ new (): {
120
+ $slots: S;
121
+ };
122
+ };
123
+
124
+ declare type __VLS_WithTemplateSlots_2<T, S> = T & {
125
+ new (): {
126
+ $slots: S;
127
+ };
128
+ };
129
+
130
+ declare namespace allComponents {
131
+ export {
132
+ installer_2 as ZAutoTooltip,
133
+ installer_3 as ZClassifyTitle,
134
+ installer_4 as ZEmpty,
135
+ installer_5 as ZForm,
136
+ installer_6 as ZTable,
137
+ installer_7 as ZTableLinkButton
138
+ }
139
+ }
140
+
141
+ export declare const BaseCascader: DefineComponent<IBaseCascaderProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
142
+ "update:modelValue": (value: any) => any;
143
+ change: (value?: CascaderValue | undefined) => any;
144
+ }, string, PublicProps, Readonly<IBaseCascaderProps> & Readonly<{
145
+ "onUpdate:modelValue"?: ((value: any) => any) | undefined;
146
+ onChange?: ((value?: CascaderValue | undefined) => any) | undefined;
147
+ }>, {
148
+ props: CascaderProps;
149
+ persistent: EpPropMergeType<BooleanConstructor, unknown, unknown>;
150
+ validateEvent: EpPropMergeType<BooleanConstructor, unknown, unknown>;
151
+ on: Partial<CascaderEmits>;
152
+ showAllLevels: EpPropMergeType<BooleanConstructor, unknown, unknown>;
153
+ options: TOptionsReturn_2;
154
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
155
+
156
+ export declare const BaseDate: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
157
+ "update:dynamicExpression": (value: TUndefinable<IDynamicExpression>) => any;
158
+ } & {
159
+ "update:modelValue": (value: any) => any;
160
+ change: (value?: string | string[] | undefined) => any;
161
+ }, string, PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
162
+ "onUpdate:modelValue"?: ((value: any) => any) | undefined;
163
+ onChange?: ((value?: string | string[] | undefined) => any) | undefined;
164
+ "onUpdate:dynamicExpression"?: ((value: TUndefinable<IDynamicExpression>) => any) | undefined;
165
+ }>, {
166
+ readonly validateEvent: boolean;
167
+ on: TEvent;
168
+ readonly showNow: boolean;
169
+ autoAddSeconds: boolean;
170
+ useDefaultTimeToDay: boolean;
171
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
172
+
173
+ export declare const BaseDateRangeAndSelectGroup: DefineComponent<__VLS_PublicProps_2, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
174
+ "update:dynamicExpression": (value: TUndefinable<IDynamicExpression>) => any;
175
+ } & {
176
+ "update:modelValue": (value: any) => any;
177
+ change: (value: TModelValue) => any;
178
+ }, string, PublicProps, Readonly<__VLS_PublicProps_2> & Readonly<{
179
+ "onUpdate:modelValue"?: ((value: any) => any) | undefined;
180
+ onChange?: ((value: TModelValue) => any) | undefined;
181
+ "onUpdate:dynamicExpression"?: ((value: TUndefinable<IDynamicExpression>) => any) | undefined;
182
+ }>, {
183
+ modelValue: TModelValue;
184
+ selectWidth: string;
185
+ disabledSelectByEmptyData: boolean;
186
+ selectToFirst: boolean;
187
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
188
+
189
+ export declare const baseFormComponents: Partial<Record<EFormComponentType, Component>>;
190
+
191
+ declare class BaseFormConfigManagement {
192
+ config: IBaseFormProps;
193
+ get getFormAttrs(): Partial<IBaseFormProps>;
194
+ get getRowAttrs(): Partial<RowProps> & IStyle;
195
+ /**
196
+ * 初始化表单的配置项
197
+ * @param config
198
+ */
199
+ initConfig(config: IBaseFormProps): IBaseFormProps;
200
+ update(value: Partial<IBaseFormProps>): IBaseFormProps;
201
+ }
202
+
203
+ declare class BaseFormDataStore<T extends TObj> {
204
+ formData: T;
205
+ /**
206
+ * 初始化表单数据
207
+ * @param columns
208
+ * @param clearFormData
209
+ */
210
+ initFormData(columns: (BaseFormItem<T> | IBaseFormItem<T>)[], clearFormData?: boolean): void;
211
+ /**
212
+ * 修改formData的值
213
+ * @param key
214
+ * @param value
215
+ */
216
+ updateFormData(key: keyof T | unknown, value: T[keyof T] | unknown): void;
217
+ /**
218
+ * 初始化formData的默认值
219
+ * @param initialFormData
220
+ */
221
+ buildFormData(initialFormData: Partial<T>): void;
222
+ /**
223
+ * 获取格式化数据
224
+ * @param columns
225
+ */
226
+ getFormatData<X extends TObj = T>(columns: BaseFormItem<T>[]): X;
227
+ }
228
+
229
+ declare class BaseFormInstanceManagement<T = TObj> {
230
+ private instance?;
231
+ private componentInstanceRefs?;
232
+ /**
233
+ * 初始化表单的实例
234
+ * @param instance
235
+ * @param componentInstanceRefs
236
+ */
237
+ init(instance: Ref<TUndefinable<InstanceType<typeof ElForm>>>, componentInstanceRefs?: Ref<TObj<string, ComponentPublicInstance>>): void;
238
+ /**
239
+ * 表单的校验
240
+ */
241
+ validate(): Promise<boolean>;
242
+ /**
243
+ * 表单/字段重置
244
+ * @param props
245
+ */
246
+ reset(props?: FormItemProp): void;
247
+ /**
248
+ * 获取某个组件的实例
249
+ * @param prop
250
+ */
251
+ getFormItemByProp<U>(prop: keyof T): TUndefinable<U>;
252
+ }
253
+
254
+ export declare class BaseFormItem<T extends TObj = TObj, U extends TObj = TObj> implements IBaseFormItem<T> {
255
+ readonly id: number;
256
+ private _customTagName?;
257
+ tag: EFormComponentType;
258
+ label: string;
259
+ attrs?: Partial<U>;
260
+ changeEvent?: string;
261
+ className?: string;
262
+ formItemAttrs?: Partial<FormItemProps> & IStyle;
263
+ elColAttrs?: Partial<ColProps>;
264
+ hidden?: ((formData: TObj, field: IBaseFormItem<T>) => boolean) | boolean;
265
+ on?: TEvent;
266
+ prop: keyof T | string;
267
+ span?: number;
268
+ style?: Partial<CSSStyleDeclaration> | string;
269
+ format?: (data: T[keyof T], formData: T, column: IBaseFormItem<T>) => TNullableUndefinable<TObj>;
270
+ visible: boolean;
271
+ /**
272
+ * 是否展示该列
273
+ */
274
+ show: boolean;
275
+ /**
276
+ * 排序
277
+ */
278
+ sort: number;
279
+ /**
280
+ * 默认值,默认从策略里面获取,也可自定义。如未定义默认为 void 0
281
+ * @see src/components/base-form/core/defaultPraseStrategy.ts
282
+ */
283
+ defaultValue?: TAllType;
284
+ /**
285
+ * 是否默认勾选
286
+ */
287
+ defaultChecked?: boolean;
288
+ /**
289
+ * 分类名称,直接使用分类名称进行区分是否为同一个分类,如果未设置分类名称,则默认为默认分类 `列信息` 分类
290
+ */
291
+ classifyName?: string;
292
+ /**
293
+ * 是否不可更改/不可排序/不可删除
294
+ */
295
+ readonly?: boolean;
296
+ /**
297
+ * 是否不可配置
298
+ */
299
+ unconfigurable?: boolean;
300
+ /**
301
+ * 当前对象的销毁函数
302
+ * @private
303
+ */
304
+ private stopStacks;
305
+ get getFormComponent(): EFormComponentType | Raw<TObj<string, any>>;
306
+ constructor(props?: Partial<IBaseFormItem<T>>);
307
+ /**
308
+ * 初始化属性
309
+ * @param props
310
+ */
311
+ initProps(props: Partial<IBaseFormItem<T>>): void;
312
+ update(props: Partial<IBaseFormItem<T>>): void;
313
+ /**
314
+ * 校验当前是否可见。
315
+ * @param formData
316
+ */
317
+ validateIsHidden<F extends TObj>(formData: F): boolean;
318
+ parseColumn(hiddenProps: Set<string>): void;
319
+ /**
320
+ * 处理事件处理函数,为了统一触发 change 事件。
321
+ * @param changeCallBack
322
+ */
323
+ parseColumnEvent(changeCallBack: (...args: TAllType[]) => void): {
324
+ [x: string]: ((event: TAllType) => void) | ((event: TAllType<string | number | boolean | object | null | undefined>) => void);
325
+ DOMContentLoaded?: ((event: TAllType) => void) | undefined;
326
+ fullscreenchange?: ((event: TAllType) => void) | undefined;
327
+ fullscreenerror?: ((event: TAllType) => void) | undefined;
328
+ pointerlockchange?: ((event: TAllType) => void) | undefined;
329
+ pointerlockerror?: ((event: TAllType) => void) | undefined;
330
+ readystatechange?: ((event: TAllType) => void) | undefined;
331
+ visibilitychange?: ((event: TAllType) => void) | undefined;
332
+ abort?: ((event: TAllType) => void) | undefined;
333
+ animationcancel?: ((event: TAllType) => void) | undefined;
334
+ animationend?: ((event: TAllType) => void) | undefined;
335
+ animationiteration?: ((event: TAllType) => void) | undefined;
336
+ animationstart?: ((event: TAllType) => void) | undefined;
337
+ auxclick?: ((event: TAllType) => void) | undefined;
338
+ beforeinput?: ((event: TAllType) => void) | undefined;
339
+ beforetoggle?: ((event: TAllType) => void) | undefined;
340
+ blur?: ((event: TAllType) => void) | undefined;
341
+ cancel?: ((event: TAllType) => void) | undefined;
342
+ canplay?: ((event: TAllType) => void) | undefined;
343
+ canplaythrough?: ((event: TAllType) => void) | undefined;
344
+ change?: ((event: TAllType) => void) | undefined;
345
+ click?: ((event: TAllType) => void) | undefined;
346
+ close?: ((event: TAllType) => void) | undefined;
347
+ compositionend?: ((event: TAllType) => void) | undefined;
348
+ compositionstart?: ((event: TAllType) => void) | undefined;
349
+ compositionupdate?: ((event: TAllType) => void) | undefined;
350
+ contextlost?: ((event: TAllType) => void) | undefined;
351
+ contextmenu?: ((event: TAllType) => void) | undefined;
352
+ contextrestored?: ((event: TAllType) => void) | undefined;
353
+ copy?: ((event: TAllType) => void) | undefined;
354
+ cuechange?: ((event: TAllType) => void) | undefined;
355
+ cut?: ((event: TAllType) => void) | undefined;
356
+ dblclick?: ((event: TAllType) => void) | undefined;
357
+ drag?: ((event: TAllType) => void) | undefined;
358
+ dragend?: ((event: TAllType) => void) | undefined;
359
+ dragenter?: ((event: TAllType) => void) | undefined;
360
+ dragleave?: ((event: TAllType) => void) | undefined;
361
+ dragover?: ((event: TAllType) => void) | undefined;
362
+ dragstart?: ((event: TAllType) => void) | undefined;
363
+ drop?: ((event: TAllType) => void) | undefined;
364
+ durationchange?: ((event: TAllType) => void) | undefined;
365
+ emptied?: ((event: TAllType) => void) | undefined;
366
+ ended?: ((event: TAllType) => void) | undefined;
367
+ error?: ((event: TAllType) => void) | undefined;
368
+ focus?: ((event: TAllType) => void) | undefined;
369
+ focusin?: ((event: TAllType) => void) | undefined;
370
+ focusout?: ((event: TAllType) => void) | undefined;
371
+ formdata?: ((event: TAllType) => void) | undefined;
372
+ gotpointercapture?: ((event: TAllType) => void) | undefined;
373
+ input?: ((event: TAllType) => void) | undefined;
374
+ invalid?: ((event: TAllType) => void) | undefined;
375
+ keydown?: ((event: TAllType) => void) | undefined;
376
+ keypress?: ((event: TAllType) => void) | undefined;
377
+ keyup?: ((event: TAllType) => void) | undefined;
378
+ load?: ((event: TAllType) => void) | undefined;
379
+ loadeddata?: ((event: TAllType) => void) | undefined;
380
+ loadedmetadata?: ((event: TAllType) => void) | undefined;
381
+ loadstart?: ((event: TAllType) => void) | undefined;
382
+ lostpointercapture?: ((event: TAllType) => void) | undefined;
383
+ mousedown?: ((event: TAllType) => void) | undefined;
384
+ mouseenter?: ((event: TAllType) => void) | undefined;
385
+ mouseleave?: ((event: TAllType) => void) | undefined;
386
+ mousemove?: ((event: TAllType) => void) | undefined;
387
+ mouseout?: ((event: TAllType) => void) | undefined;
388
+ mouseover?: ((event: TAllType) => void) | undefined;
389
+ mouseup?: ((event: TAllType) => void) | undefined;
390
+ paste?: ((event: TAllType) => void) | undefined;
391
+ pause?: ((event: TAllType) => void) | undefined;
392
+ play?: ((event: TAllType) => void) | undefined;
393
+ playing?: ((event: TAllType) => void) | undefined;
394
+ pointercancel?: ((event: TAllType) => void) | undefined;
395
+ pointerdown?: ((event: TAllType) => void) | undefined;
396
+ pointerenter?: ((event: TAllType) => void) | undefined;
397
+ pointerleave?: ((event: TAllType) => void) | undefined;
398
+ pointermove?: ((event: TAllType) => void) | undefined;
399
+ pointerout?: ((event: TAllType) => void) | undefined;
400
+ pointerover?: ((event: TAllType) => void) | undefined;
401
+ pointerup?: ((event: TAllType) => void) | undefined;
402
+ progress?: ((event: TAllType) => void) | undefined;
403
+ ratechange?: ((event: TAllType) => void) | undefined;
404
+ reset?: ((event: TAllType) => void) | undefined;
405
+ resize?: ((event: TAllType) => void) | undefined;
406
+ scroll?: ((event: TAllType) => void) | undefined;
407
+ scrollend?: ((event: TAllType) => void) | undefined;
408
+ securitypolicyviolation?: ((event: TAllType) => void) | undefined;
409
+ seeked?: ((event: TAllType) => void) | undefined;
410
+ seeking?: ((event: TAllType) => void) | undefined;
411
+ select?: ((event: TAllType) => void) | undefined;
412
+ selectionchange?: ((event: TAllType) => void) | undefined;
413
+ selectstart?: ((event: TAllType) => void) | undefined;
414
+ slotchange?: ((event: TAllType) => void) | undefined;
415
+ stalled?: ((event: TAllType) => void) | undefined;
416
+ submit?: ((event: TAllType) => void) | undefined;
417
+ suspend?: ((event: TAllType) => void) | undefined;
418
+ timeupdate?: ((event: TAllType) => void) | undefined;
419
+ toggle?: ((event: TAllType) => void) | undefined;
420
+ touchcancel?: ((event: TAllType) => void) | undefined;
421
+ touchend?: ((event: TAllType) => void) | undefined;
422
+ touchmove?: ((event: TAllType) => void) | undefined;
423
+ touchstart?: ((event: TAllType) => void) | undefined;
424
+ transitioncancel?: ((event: TAllType) => void) | undefined;
425
+ transitionend?: ((event: TAllType) => void) | undefined;
426
+ transitionrun?: ((event: TAllType) => void) | undefined;
427
+ transitionstart?: ((event: TAllType) => void) | undefined;
428
+ volumechange?: ((event: TAllType) => void) | undefined;
429
+ waiting?: ((event: TAllType) => void) | undefined;
430
+ webkitanimationend?: ((event: TAllType) => void) | undefined;
431
+ webkitanimationiteration?: ((event: TAllType) => void) | undefined;
432
+ webkitanimationstart?: ((event: TAllType) => void) | undefined;
433
+ webkittransitionend?: ((event: TAllType) => void) | undefined;
434
+ wheel?: ((event: TAllType) => void) | undefined;
435
+ suffixClick?: () => void;
436
+ };
437
+ addStopper(fn: () => void): void;
438
+ removeStopper(fn: () => void): void;
439
+ initStatusByColumn(column?: IFormItemGroupItem): void;
440
+ /**
441
+ * 实例销毁
442
+ */
443
+ destroy(): void;
444
+ }
445
+
446
+ declare class BaseFormItemsManagement<T extends TObj> {
447
+ /**
448
+ * 当前激活的分组名称
449
+ */
450
+ activeGroupName: string;
451
+ /**
452
+ * 高级筛选中的分组数据
453
+ */
454
+ advancedFilterGroup: IAdvancedFilterGroup;
455
+ /**
456
+ * 所有的分组
457
+ */
458
+ get groups(): IAdvancedFilterFormItemGroup[];
459
+ /**
460
+ * 新增一个新的分组
461
+ */
462
+ addNewGroup(groupName: string): string;
463
+ /**
464
+ * 高级筛选中选中的数据,与 advancedFilterGroup 的区别为,这个只会存储选中的数据,用于处理选中的数据存储顺序之类的。
465
+ */
466
+ advancedFilterSelectedColumns: IAdvancedFilterFormItemGroup[];
467
+ formItems: BaseFormItem<T>[];
468
+ getFormItemsMap(): Map<string | keyof T, BaseFormItem<T, TObj<string, any>>>;
469
+ /**
470
+ * 初始化分组的数据
471
+ */
472
+ initGroups<F extends TObj>(pageId?: string, formBuilder?: FormBuilder<F>): Promise<void>;
473
+ updateActiveGroup(groupName: string): void;
474
+ /**
475
+ * 获取当前可展示的列数据
476
+ * @param formData
477
+ * @param hiddenProps
478
+ */
479
+ getShowColumns(formData: T, hiddenProps: Set<string>): BaseFormItem<T>[];
480
+ /**
481
+ * 初始化列的信息
482
+ * @param columnProps
483
+ */
484
+ initColumns(columnProps: (IBaseFormItem<T> | BaseFormItem<T>)[]): BaseFormItem<T>[];
485
+ add(columnProp: IBaseFormItem<T> | BaseFormItem<T>, index?: number): BaseFormItem<T>;
486
+ removeByIndex(index: number): TUndefinable<BaseFormItem<T>>;
487
+ removeByProp(prop: keyof T | string): TUndefinable<BaseFormItem<T>>;
488
+ findByProp(prop: keyof T | string): TUndefinable<BaseFormItem<T>>;
489
+ findColumnsByGroupName(groupName: string): TUndefinable<IFormItemGroupItem[]>;
490
+ getColumnsMapByGroupName(groupName: string): Map<string, IFormItemGroupItem>;
491
+ /**
492
+ * 根据分组名称更新列
493
+ * @param groupName
494
+ */
495
+ updateColumnsByGroupName(groupName: string): void;
496
+ /**
497
+ * 如果没有配置pageId,则显示所有的列
498
+ */
499
+ showAllFormItems(): void;
500
+ /**
501
+ * 格式化存储的数据
502
+ */
503
+ getFormatSaveGroups(): IAdvancedFilterGroup;
504
+ /**
505
+ * 构建高级筛选保存的数据
506
+ */
507
+ buildAdvancedFilterColumns(): string;
508
+ destroy(): void;
509
+ }
510
+
511
+ export declare const BaseInput: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
512
+
513
+ export declare const BaseNumberInput: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, __VLS_TemplateResult_2["slots"]>;
514
+
515
+ export declare const BaseNumberRange: DefineComponent<IBaseNumberRangeProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
516
+ "update:modelValue": (value: any) => any;
517
+ change: (value: [(number | undefined)?, (number | undefined)?]) => any;
518
+ }, string, PublicProps, Readonly<IBaseNumberRangeProps> & Readonly<{
519
+ "onUpdate:modelValue"?: ((value: any) => any) | undefined;
520
+ onChange?: ((value: [(number | undefined)?, (number | undefined)?]) => any) | undefined;
521
+ }>, {
522
+ modelValue: [(string | number)?, (string | number)?];
523
+ on: TEvent & Partial<InputEmits>;
524
+ separator: string;
525
+ inputWidth: string;
526
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
527
+
528
+ export declare const BaseSearchInput: DefineComponent<IBaseSearchInputProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
529
+ "update:modelValue": (value: any) => any;
530
+ change: (value: string) => any;
531
+ suffixClick: () => any;
532
+ }, string, PublicProps, Readonly<IBaseSearchInputProps> & Readonly<{
533
+ "onUpdate:modelValue"?: ((value: any) => any) | undefined;
534
+ onChange?: ((value: string) => any) | undefined;
535
+ onSuffixClick?: (() => any) | undefined;
536
+ }>, {
537
+ readonly validateEvent: boolean;
538
+ on: TEvent & Partial<InputEmits>;
539
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
540
+
541
+ export declare const BaseSelect: DefineComponent<IProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
542
+ "update:modelValue": (value: any) => any;
543
+ }, string, PublicProps, Readonly<IProps> & Readonly<{
544
+ "onUpdate:modelValue"?: ((value: any) => any) | undefined;
545
+ }>, {
546
+ reserveKeyword: EpPropMergeType<BooleanConstructor, unknown, unknown>;
547
+ teleported: EpPropMergeType<BooleanConstructor, unknown, unknown>;
548
+ persistent: EpPropMergeType<BooleanConstructor, unknown, unknown>;
549
+ validateEvent: EpPropMergeType<BooleanConstructor, unknown, unknown>;
550
+ showArrow: EpPropMergeType<BooleanConstructor, unknown, unknown>;
551
+ on: TEvent;
552
+ options: TOptionsReturn_2;
553
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
554
+
555
+ /**
556
+ * 为 baseFormColumn 提供一个类型定义的函数
557
+ * 详细 IAttrs 类型请参考 @see: @components/z-form/core/typing
558
+ * FIXME: 不能使用重载,否者会导致类型提示失效!具体原因未知。。
559
+ * @param props 定义基础列的参数。如果该参数是一个函数则会默认开启一个 effect 用于监听,当当前作用域销毁的时候会自动取消监听,或者当前formBuilder实例销毁时也会自动取消监听
560
+ * @example 默认的使用
561
+ * createBaseFormItem({
562
+ * tag: EFormComponentType.GROUP_SELECT_INPUT,
563
+ * label: "test",
564
+ * prop: "searchKey",
565
+ * }),
566
+ *
567
+ * @example 动态props
568
+ * const test = ref(1);
569
+ * createBaseFormItem(() => {
570
+ * return {
571
+ * tag: EFormComponentType.GROUP_SELECT_INPUT,
572
+ * label: "",
573
+ * prop: "searchKey",
574
+ * attrs: {
575
+ * placeholder: 1 === test.value ? "placeholder-a" : "placeholder-b",
576
+ * },
577
+ * }
578
+ * }),
579
+ * @return 根据对应的 tag 返回对应的 BaseFormColumn
580
+ */
581
+ export declare function createBaseFormItem<T extends keyof IComponentProps, U extends TObj>(props: TCreateBaseFormItemParams<T, U> | (() => TCreateBaseFormItemParams<T, U>)): BaseFormItem<U, IAttrs[T]>;
582
+
583
+ /**
584
+ * 用于定义列信息,会处理一些默认值
585
+ * @param props
586
+ */
587
+ export declare const createBaseTableColumn: <T extends TObj = TObj>(props: IBaseTableColumn<T>) => IBaseTableColumn<T>;
588
+
589
+ /**
590
+ * 用于批量定义列信息和处理默认值
591
+ * @param props
592
+ */
593
+ export declare const createBaseTableColumns: <T extends TObj = TObj>(props: IBaseTableColumn<T>[]) => IBaseTableColumn<T>[];
594
+
595
+ /**
596
+ * 新建一个自定义组件项,与createBaseFormItem的区别为:该组件可以新建自定义组件,tag 可以为自定义的组件,并且支持 attrs 的类型自动推导
597
+ * 注意:因为类型推导原因暂不支持 tag 为动态导入。
598
+ * @param props
599
+ * @example
600
+ * // 如果 'test' 已经通过 defineCustomFormComponent 定义
601
+ * createCustomFormItem(() => {
602
+ * tag: 'test',
603
+ * label: "测试-已全局定义的自定义组件",
604
+ * prop: "test",
605
+ * attrs: {
606
+ * // Test 组件定义的类型,
607
+ * test: "test",
608
+ * },
609
+ * // 给自定义组件的 modelValue 设置默认值
610
+ * defaultValue: "test"
611
+ * })
612
+ *
613
+ * // 支持直接传入组件
614
+ * import Test from "src/components/Test.vue";
615
+ * createCustomFormItem({
616
+ * tag: Test,
617
+ * label: "测试",
618
+ * prop: "test",
619
+ * attrs: {
620
+ * // Test 组件定义的类型,
621
+ * test: "test",
622
+ * },
623
+ * // 给自定义组件的 modelValue 设置默认值
624
+ * defaultValue: "test"
625
+ * })
626
+ *
627
+ */
628
+ export declare function createCustomFormItem<T extends TKeyofCustomFormComponentType = TKeyofCustomFormComponentType, U extends TObj = TObj>(props: TCreateCustomFormItemParamsByDefinition<T, U> | (() => TCreateCustomFormItemParamsByDefinition<T, U>)): BaseFormItem<U, ICustomFormComponentType[T]>;
629
+
630
+ export declare function createCustomFormItem<T extends Component, U extends TObj = TObj>(props: TCreateCustomFormItemParams<T, U> | (() => TCreateCustomFormItemParams<T, U>)): BaseFormItem<U, Partial<ExtractPropTypes<PropsOf<T>>>>;
631
+
632
+ export declare const createSortColumn: <T extends TObj = TObj>() => IBaseTableColumn<T>;
633
+
634
+ export declare const DATE_SHORTCUTS: {
635
+ text: string;
636
+ value: () => string[];
637
+ }[];
638
+
639
+ export declare const DEFAULT_FORMAT = "YYYY-MM-DD HH:mm:ss";
640
+
641
+ export declare const DEFAULT_GROUP_CHECKED_ID = "-1";
642
+
643
+ export declare const DEFAULT_GROUP_NAME = "\u5217\u4FE1\u606F";
644
+
645
+ /**
646
+ * 表格默认的分页参数
647
+ */
648
+ export declare const DEFAULT_PAGINATION_PROPS: Partial<PaginationProps> & {
649
+ pageSize: number;
650
+ };
651
+
652
+ /**
653
+ * 定义自定义表单组件,该定义为全局单例,只要定义了任何位置都可用。
654
+ * @param key 自定义组件的 key (需要在 ICustomFormComponentType 中定义)
655
+ * @param defaultPraseStrategy 默认值解析器
656
+ * @param component 自定义组件
657
+ * @example
658
+ * import Test from "src/components/Test.vue";
659
+ * defineCustomFormComponent("test", (field: IBaseFormItem) => {
660
+ * const { label } = field
661
+ * return merge({ placeholder: `请输入${label}` }, field)
662
+ * }, Test);
663
+ */
664
+ export declare function defineCustomFormComponent<T extends Component>(key: TKeyofCustomFormComponentType | Partial<TObj<TKeyofCustomFormComponentType, ICustomComponentDefinition>>, defaultPraseStrategy?: (field: IBaseFormItem) => IBaseFormItem, component?: T): void;
665
+
666
+ /**
667
+ * 所有的动态表达式获取的规则
668
+ */
669
+ declare const DYNAMIC_EXPRESSION_RULES: {
670
+ /**
671
+ * 根据不同的type获取不同的时间范围
672
+ * @param type
673
+ * @param format
674
+ * @param autoAddSeconds
675
+ * @constructor
676
+ */
677
+ GET_DATE_RANGE: (type: string, format: string, autoAddSeconds: boolean) => string[];
678
+ GET_DATE_RANGE_SELECT_GROUP: (type: string, value: string[], format: string, autoAddSeconds: boolean) => string[];
679
+ };
680
+
681
+ export declare enum EBaseFormEvent {
682
+ /**
683
+ * 表单组件值发生变化
684
+ */
685
+ CHANGE = "change",
686
+ /**
687
+ * 打开列编辑的弹框
688
+ */
689
+ OPEN_CONFIG_DIALOG = "openConfigDialog",
690
+ /**
691
+ * 列加载完成
692
+ */
693
+ COLUMNS_LOADED = "columnsLoaded",
694
+ /**
695
+ * 保存列编辑的数据
696
+ */
697
+ SAVE_CONFIG = "saveConfig",
698
+ /**
699
+ * 修改高级筛选当前激活的分组
700
+ */
701
+ UPDATE_ACTIVE_GROUP = "updateActiveGroup"
702
+ }
703
+
704
+ /**
705
+ * 全屏弹框事件
706
+ * NOTICE: 注意如果子组件有相同的事件分发上来也是可以直接关闭弹框的。
707
+ */
708
+ export declare enum EDialogEvent {
709
+ /**
710
+ * 确认
711
+ */
712
+ CONFIRM = "dialog:confirm",
713
+ /**
714
+ * 取消
715
+ */
716
+ CANCEL = "dialog:cancel"
717
+ }
718
+
719
+ export declare enum EFormComponentType {
720
+ /**
721
+ * 输入框
722
+ * @property { import("element-plus").InputProps } type 输入框对应的attrs类型
723
+ */
724
+ INPUT = "el-input",
725
+ /**
726
+ * 下拉框
727
+ * @property { import("src/components/base-form/core/typing/attrs").TBaseSelectAttrs } type 下拉框对应的attrs类型
728
+ */
729
+ SELECT = "base-select",
730
+ /**
731
+ * 日期
732
+ * @property { import("@components/z-form/components/base-components/BaseDate.vue").IBaseDateProps } type 日期框对应的attrs类型
733
+ */
734
+ DATE = "el-date-picker",
735
+ /**
736
+ * 日期范围
737
+ * @property { import("@components/z-form/components/base-components/BaseDate.vue").IBaseDateProps } type 日期范围框对应的attrs类型
738
+ */
739
+ DATE_RANGE = "date-range",
740
+ /**
741
+ * 开关
742
+ * @property { import("element-plus").SwitchProps } type 开关对应的attrs类型
743
+ */
744
+ SWITCH = "el-switch",
745
+ /**
746
+ * 单选
747
+ * @property { import("element-plus").RadioProps } type 单选对应的attrs类型
748
+ */
749
+ RADIO = "el-radio",
750
+ /**
751
+ * 下拉筛选组合
752
+ * @property { import("src/components/base-form/core/typing/attrs").IGroupSelectInputAttrs } type 下拉筛选组合对应的attrs类型
753
+ */
754
+ GROUP_SELECT_INPUT = "group-select-input",
755
+ /**
756
+ * 搜索框
757
+ * @property { import("element-plus").InputProps } type 搜索框对应的attrs类型
758
+ */
759
+ SEARCH_INPUT = "base-search-input",
760
+ /**
761
+ * 级联下拉
762
+ * @property { import("@components/z-form/components/base-components/BaseCascader.vue").IBaseCascaderProps } type 级联下拉对应的attrs类型
763
+ */
764
+ CASCADER = "el-cascader",
765
+ /**
766
+ * 数字区间
767
+ * @property { import("@components/z-form/components/base-components/BaseNumberRange.vue").IBaseNumberRangeProps } type 数字区间对应的attrs类型
768
+ */
769
+ NUMBER_RANGE = "number-range",
770
+ /**
771
+ * 日期时间区间和下拉选择组合组件
772
+ * @property { import("@components/z-form/components/base-components/BaseDateRangeAndSelectGroup.vue").IBaseDateRangeAndSelectGroupProps } type 日期时间区间和下拉选择组合组件对应的attrs类型
773
+ */
774
+ DATE_RANGE_AND_SELECT_GROUP = "date-range-and-select-group",
775
+ /**
776
+ * 数字框
777
+ * @property { import("@components/z-form/core/typing/attrs").TBaseNumberInputAttrs } type 数字框对应的attrs类型
778
+ */
779
+ NUMBER_INPUT = "number-input"
780
+ }
781
+
782
+ /**
783
+ * 返回一个format方法用于将数据转换为对应的key的对象
784
+ * @example
785
+ * createBaseFormItem({
786
+ * tag: EFormComponentType.DATE_RANGE,
787
+ * label: "分配时间",
788
+ * prop: "time",
789
+ * format: formatArrayKeyToObjectValue(["distributeTimeStart", "distributeTimeEnd"]),
790
+ * }),
791
+ *
792
+ * // 结果
793
+ * {
794
+ * distributeTimeStart: "2022-01-01 00:00",
795
+ * distributeTimeEnd: "2022-01-02 00:59",
796
+ * }
797
+ */
798
+ export declare const formatArrayKeyToObjectValue: <T extends TObj>(arrayFormatKey: (keyof T | string)[]) => (value: unknown[]) => TObj<string, any>;
799
+
800
+ /**
801
+ * 将秒数格式化为mm:ss。小于1秒的部分算1秒
802
+ * @param second
803
+ */
804
+ export declare function formatSecond(second: string | number): string;
805
+
806
+ /**
807
+ * 将时间转换为 时:分:秒
808
+ * @param seconds
809
+ * @param format
810
+ */
811
+ export declare const formatSeconds: (seconds: number, format?: string) => string;
812
+
813
+ /**
814
+ * 通用的处理 select-input-group 组件的值
815
+ * @param value
816
+ */
817
+ export declare const formatSelectAndInputGroupValue: (value: string[]) => {
818
+ [x: string]: string;
819
+ } | undefined;
820
+
821
+ export declare class FormBuilder<T extends TObj = TObj> {
822
+ private readonly emitter;
823
+ /**
824
+ * 是否加载成功
825
+ * 使用 mitt 可能会出现 事件 emit 的时候还未注册监听,导致无法触发。
826
+ * @private
827
+ */
828
+ private isLoaded;
829
+ columnManagement: BaseFormItemsManagement<T>;
830
+ formDataStore: BaseFormDataStore<T>;
831
+ configManagement: BaseFormConfigManagement;
832
+ formInstanceManagement: BaseFormInstanceManagement<T>;
833
+ hiddenProps: Set<string>;
834
+ /**
835
+ * 用于存储获取原始列的信息
836
+ */
837
+ baseColumnsGetter: TUndefinable<(formBuilder: FormBuilder<T>) => (IBaseFormItem<T> | BaseFormItem<T>)[]>;
838
+ get columns(): BaseFormItem<T>[];
839
+ get formData(): T;
840
+ get config(): IBaseFormProps;
841
+ get getShowColumns(): BaseFormItem<T>[];
842
+ /**
843
+ * 当前激活的分组
844
+ */
845
+ get activeGroupName(): string;
846
+ /**
847
+ * 所有的分组
848
+ */
849
+ get groups(): IAdvancedFilterFormItemGroup_2[];
850
+ /**
851
+ * 当前激活的分组信息
852
+ */
853
+ get activeGroupColumns(): IFormItemGroupItem[];
854
+ constructor(columns?: (IBaseFormItem<T> | BaseFormItem<T>)[], config?: IBaseFormProps);
855
+ /**
856
+ * 初始化列数据
857
+ * @param columns
858
+ * @private
859
+ */
860
+ protected parseColumns(columns: (IBaseFormItem<T> | BaseFormItem<T>)[]): (IBaseFormItem<T> | BaseFormItem<T>)[];
861
+ setBaseColumnsGetter(getter: (formBuilder: FormBuilder<T>) => (IBaseFormItem<T> | BaseFormItem<T>)[]): void;
862
+ init(columns: (IBaseFormItem<T> | BaseFormItem<T>)[], config?: IBaseFormProps): void;
863
+ /**
864
+ * 初始化分组的数据
865
+ */
866
+ initGroups(): Promise<void>;
867
+ updateGroupsByAdvancedFilter(advancedFilterGroup: IAdvancedFilterGroup): void;
868
+ /**
869
+ * 修改激活的分组(表单执行)
870
+ * @param groupName
871
+ */
872
+ updateActiveGroup(groupName: string): void;
873
+ /**
874
+ * 用于给表单项值的增加默认填充内容
875
+ * @param initialFormData
876
+ */
877
+ buildFormData(initialFormData: Partial<T>): FormBuilder<T>;
878
+ updateFormData(key: keyof T | unknown, value: T[keyof T] | unknown): FormBuilder<T>;
879
+ /**
880
+ * 触发表单的校验
881
+ */
882
+ validate(): Promise<boolean>;
883
+ /**
884
+ * 表单/字段重置
885
+ * @param props
886
+ */
887
+ reset(props?: FormItemProp): void;
888
+ /**
889
+ * 根据当前激活的分组内容重置表单数据
890
+ * 注意:重置过程默认是不会触发 `onChange` 的
891
+ */
892
+ resetFormDataByActiveGroup(): void;
893
+ /**
894
+ * 获取格式化之后的数据
895
+ */
896
+ getFormatData<X extends TObj = T>(): X;
897
+ emit(event: EBaseFormEvent): FormBuilder<T>;
898
+ on(event: EBaseFormEvent, callback: () => void): FormBuilder<T>;
899
+ /**
900
+ * 表单change事件触发
901
+ * @param callBack
902
+ */
903
+ onChange(callBack: (formData: T) => void): void;
904
+ /**
905
+ * 列加载完成,默认值也初始化完成
906
+ * @param callBack
907
+ */
908
+ onColumnsLoaded(callBack: () => void): void;
909
+ openConfigDialog(activeGroupName?: string): void;
910
+ /**
911
+ * 保存高级筛选数据
912
+ */
913
+ saveAdvancedFilterData(): Promise<void>;
914
+ /**
915
+ * 销毁
916
+ */
917
+ destroy(): void;
918
+ }
919
+
920
+ /**
921
+ * 获取指定时间的一天的开始/结束时间
922
+ * @param date
923
+ * @param format
924
+ */
925
+ export declare const getAppointDateRange: (date: TUndefinable<string>, format?: string) => string[];
926
+
927
+ /**
928
+ * 获取今天的一天的开始/结束时间
929
+ * @param format
930
+ */
931
+ export declare const getCurrentDateRange: (format?: string) => string[];
932
+
933
+ /**
934
+ * 获取距离当前几天的时间
935
+ * @param days
936
+ * @param format
937
+ * @param type
938
+ * @return Array<string>
939
+ */
940
+ export declare const getDaysRange: (days: number, format?: string, type?: ManipulateType) => string[];
941
+
942
+ export declare const GroupSelectInput: DefineComponent<__VLS_Props_3, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
943
+ "update:modelValue": (args_0: string[]) => any;
944
+ change: (args_0: [(string | undefined)?, (string | undefined)?]) => any;
945
+ suffixClick: (args_0: string) => any;
946
+ }, string, PublicProps, Readonly<__VLS_Props_3> & Readonly<{
947
+ "onUpdate:modelValue"?: ((args_0: string[]) => any) | undefined;
948
+ onChange?: ((args_0: [(string | undefined)?, (string | undefined)?]) => any) | undefined;
949
+ onSuffixClick?: ((args_0: string) => any) | undefined;
950
+ }>, {
951
+ modelValue: [string?, string?];
952
+ readonly validateEvent: boolean;
953
+ on: TEvent & Partial<InputEmits>;
954
+ selectWidth: string;
955
+ changeOnSelect: boolean;
956
+ defaultSelectFirst: boolean;
957
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
958
+
959
+ declare interface IAdvancedFilterFormItemGroup {
960
+ /**
961
+ * 分组名称(不能重复,所以可以作为唯一标识)
962
+ */
963
+ groupName: string;
964
+ /**
965
+ * 当前分组的列的数据
966
+ */
967
+ columns: IFormItemGroupItem[];
968
+ }
969
+
970
+ /**
971
+ * 高级筛选中的分组数据
972
+ */
973
+ declare interface IAdvancedFilterGroup {
974
+ /**
975
+ * 分组数据
976
+ */
977
+ groups: IAdvancedFilterFormItemGroup[];
978
+ /**
979
+ * 当前使用的分组名称
980
+ */
981
+ useGroup: string;
982
+ }
983
+
984
+ export declare interface IAttrs {
985
+ [EFormComponentType.INPUT]: TObj;
986
+ [EFormComponentType.SELECT]: TBaseSelectAttrs;
987
+ [EFormComponentType.DATE]: TBaseDateAttrs;
988
+ [EFormComponentType.DATE_RANGE]: TBaseDateAttrs;
989
+ [EFormComponentType.SWITCH]: TObj;
990
+ [EFormComponentType.RADIO]: TObj;
991
+ [EFormComponentType.GROUP_SELECT_INPUT]: IGroupSelectInputAttrs;
992
+ [EFormComponentType.SEARCH_INPUT]: TObj;
993
+ [EFormComponentType.CASCADER]: TBaseCascaderAttrs;
994
+ [EFormComponentType.NUMBER_RANGE]: IBaseNumberRangeAttrs;
995
+ [EFormComponentType.DATE_RANGE_AND_SELECT_GROUP]: TBaseDateRangeAndSelectGroupAttrs;
996
+ [EFormComponentType.NUMBER_INPUT]: TBaseNumberInputAttrs;
997
+ }
998
+
999
+ declare interface IBaseCascaderProps extends TBaseCascaderAttrs, Omit<TExtendedCascaderProps, "options" | "props"> {
1000
+ on?: Partial<CascaderEmits>;
1001
+ props?: CascaderProps;
1002
+ }
1003
+
1004
+ declare interface IBaseDateProps extends TBaseDateAttrs, Partial<DatePickerProps> {
1005
+ on?: TEvent;
1006
+ }
1007
+
1008
+ declare interface IBaseDateRangeAndSelectGroupProps extends TBaseDateRangeAndSelectGroupAttrs, Omit<IBaseDateProps, "modelValue"> {
1009
+ modelValue: TModelValue;
1010
+ }
1011
+
1012
+ export declare interface IBaseFormItem<T extends TObj = TObj> extends IStyle {
1013
+ /**
1014
+ * 组件类型,因为要存储自定义筛选,所以只支持显示定义的,不支持动态组件。
1015
+ */
1016
+ tag: EFormComponentType;
1017
+ /**
1018
+ * label名称
1019
+ */
1020
+ label: string;
1021
+ /**
1022
+ * prop,用于数据绑定
1023
+ */
1024
+ prop: keyof T | string;
1025
+ /**
1026
+ * 在使用row布局的时候的占比
1027
+ */
1028
+ span?: number;
1029
+ /**
1030
+ * 用于传递给组件的属性
1031
+ */
1032
+ attrs?: TObj;
1033
+ /**
1034
+ * 用于定义element-plus组件的属性
1035
+ */
1036
+ componentProps?: TObj;
1037
+ /**
1038
+ * 默认值
1039
+ */
1040
+ defaultValue?: TAllType;
1041
+ /**
1042
+ * form-item 属性
1043
+ */
1044
+ formItemAttrs?: Partial<FormItemProps> & IStyle;
1045
+ /**
1046
+ * el-col 的配置
1047
+ */
1048
+ elColAttrs?: Partial<ColProps>;
1049
+ /**
1050
+ * 事件
1051
+ */
1052
+ on?: TEvent;
1053
+ /**
1054
+ * 是否隐藏
1055
+ */
1056
+ hidden?: ((formData: T, column: IBaseFormItem<T>) => boolean) | boolean;
1057
+ /**
1058
+ * 用于触发 change 事件的 event
1059
+ */
1060
+ changeEvent?: string;
1061
+ /**
1062
+ * 用于format结果
1063
+ * 如果传递了 format 方法并且返回值是个 object类型 会自动去掉原有的值,否则会丢弃返回的值
1064
+ * @example
1065
+ * createBaseFormItem({
1066
+ * tag: EFormComponentType.DATE_RANGE,
1067
+ * label: "分配时间",
1068
+ * prop: "time",
1069
+ * format: (date: [string, string]) => {
1070
+ * const [ start, end ] = date
1071
+ * return {
1072
+ * start,
1073
+ * end
1074
+ * }
1075
+ * }
1076
+ * }),
1077
+ * // 最后得到的 formData 结构
1078
+ * {
1079
+ * start: "2022-01-01",
1080
+ * end: "2022-01-02",
1081
+ * }
1082
+ * // 如果返回的是个非 object
1083
+ * createBaseFormItem({
1084
+ * tag: EFormComponentType.DATE_RANGE,
1085
+ * label: "分配时间",
1086
+ * prop: "time",
1087
+ * format: (date: [string, string]) => 1
1088
+ * }),
1089
+ * // 结果会丢弃 time 字段
1090
+ * { }
1091
+ */
1092
+ format?: (data: T[keyof T] | any, formData: T, column: IBaseFormItem<T>) => TNullableUndefinable<TObj>;
1093
+ /**
1094
+ * 是否默认勾选,默认不勾选。
1095
+ */
1096
+ defaultChecked?: boolean;
1097
+ /**
1098
+ * 分类名称
1099
+ */
1100
+ classifyName?: string;
1101
+ /**
1102
+ * 是否不可更改
1103
+ */
1104
+ readonly?: boolean;
1105
+ /**
1106
+ * 是否不可配置
1107
+ */
1108
+ unconfigurable?: boolean;
1109
+ }
1110
+
1111
+ export declare interface IBaseFormProps extends Partial<Omit<FormProps, "model">> {
1112
+ useRowLayout?: boolean;
1113
+ rowAttrs?: Partial<RowProps> & IStyle;
1114
+ modelValue?: TObj;
1115
+ className?: string;
1116
+ hideExpandBtn?: boolean;
1117
+ /**
1118
+ * 唯一标识
1119
+ */
1120
+ pageId?: string;
1121
+ /**
1122
+ * 是否开启loading,默认开启loading
1123
+ */
1124
+ startLoading?: boolean;
1125
+ /**
1126
+ * 初始化的值
1127
+ */
1128
+ initialFormData?: TObj;
1129
+ }
1130
+
1131
+ export declare interface IBaseFormStoreItem {
1132
+ prop: string | unknown;
1133
+ checked: boolean;
1134
+ }
1135
+
1136
+ declare interface IBaseNumberInputProps extends TBaseNumberInputAttrs, Omit<InputProps, "modelValue"> {
1137
+ on?: TEvent;
1138
+ modelValue: number | string | null | undefined;
1139
+ }
1140
+
1141
+ export declare interface IBaseNumberRangeAttrs {
1142
+ /**
1143
+ * 最小值的参数
1144
+ */
1145
+ minProps?: Partial<InputProps>;
1146
+ /**
1147
+ * 最大值的参数
1148
+ */
1149
+ maxProps?: Partial<InputProps>;
1150
+ /**
1151
+ * 分割字符
1152
+ */
1153
+ separator?: string;
1154
+ /**
1155
+ * 可输入的最大值
1156
+ */
1157
+ max?: number;
1158
+ /**
1159
+ * 可输入的最小值
1160
+ */
1161
+ min?: number;
1162
+ /**
1163
+ * 设置最多支持几位小数
1164
+ */
1165
+ precision?: number;
1166
+ /**
1167
+ * 设置文本框的宽度
1168
+ */
1169
+ inputWidth?: string;
1170
+ }
1171
+
1172
+ declare interface IBaseNumberRangeProps extends IBaseNumberRangeAttrs {
1173
+ on?: TEvent & Partial<InputEmits>;
1174
+ modelValue: [(string | number)?, (string | number)?];
1175
+ }
1176
+
1177
+ declare interface IBaseSearchInputProps extends Partial<InputProps> {
1178
+ on?: TEvent & Partial<InputEmits>;
1179
+ }
1180
+
1181
+ export declare interface IBaseTableColumn<T extends TObj = TObj> extends Partial<Omit<TableColumnCtx<T>, "prop" | "renderHeader" | "type" | "fixed">> {
1182
+ type?: "default" | "selection" | "index" | "expand" | string;
1183
+ _render?: (_: typeof h, params: T & {
1184
+ $index: number;
1185
+ $tableData: T[];
1186
+ }, data: T) => TAllType | VNode | HTMLElement | JSX.Element;
1187
+ /**
1188
+ * 根据 options 渲染对应的数据
1189
+ * _color: 会自动把字体颜色变化
1190
+ * _status:会加上状态颜色
1191
+ */
1192
+ renderToOptions?: {
1193
+ label?: string;
1194
+ value?: TAllType;
1195
+ _color?: string;
1196
+ _status?: string;
1197
+ }[];
1198
+ renderHeader?: (_: typeof h, headerColumn: TAllType, $index: number, column: IBaseTableColumn<T>) => TAllType | VNode | HTMLElement | JSX.Element;
1199
+ hidden?: boolean | ((params: T) => boolean);
1200
+ prop?: keyof T | string;
1201
+ isOperation?: boolean;
1202
+ emptyValue?: TAllType;
1203
+ onClick?: (params: T) => void;
1204
+ emptyClick?: boolean;
1205
+ /**
1206
+ * fixed
1207
+ */
1208
+ fixed?: boolean | "left" | "right";
1209
+ /**
1210
+ * 导出的列的 key ,默认是 prop 的值,在一些特殊的场景下,导出的字段不是 prop 的时候可以通过这个字段设置。
1211
+ */
1212
+ exportProp?: keyof T | string | (keyof T | string)[];
1213
+ /**
1214
+ * 是否在列为空的时候也渲染内容(只有在有_render)方法的情况下生效
1215
+ * @default false
1216
+ */
1217
+ renderToEmpty?: boolean;
1218
+ /**
1219
+ * 是否不可删除不可修改位置
1220
+ */
1221
+ readonly?: boolean;
1222
+ /**
1223
+ * 是否默认选中
1224
+ */
1225
+ defaultChecked?: boolean;
1226
+ /**
1227
+ * 分组名称
1228
+ */
1229
+ groupName?: string;
1230
+ }
1231
+
1232
+ export declare interface IBaseTableInstance {
1233
+ /**
1234
+ * 刷新页面
1235
+ * @param resetPagination {boolean} 是否重置分页
1236
+ * @default true
1237
+ */
1238
+ refresh: (resetPagination?: boolean) => Promise<void>;
1239
+ loadData: (params?: IPagination) => Promise<void>;
1240
+ openConfigColumnDialog: () => void;
1241
+ getPagination: () => IPagination;
1242
+ clearSort: () => void;
1243
+ /**
1244
+ * 获取导出的列定义
1245
+ */
1246
+ getExportColumnsProps: () => string[];
1247
+ /**
1248
+ * 表格实例
1249
+ */
1250
+ elTable: IBaseTableRef;
1251
+ /**
1252
+ * 获取表格数据
1253
+ */
1254
+ getTableData: <T extends TObj>() => T[];
1255
+ }
1256
+
1257
+ export declare interface IBaseTableLoadResult {
1258
+ data?: TObj[];
1259
+ total?: number;
1260
+ count?: string;
1261
+ records?: TObj[];
1262
+ }
1263
+
1264
+ export declare interface IBaseTableProps extends Partial<TableProps<TObj>> {
1265
+ /**
1266
+ * 表格数据
1267
+ */
1268
+ tableData?: TObj[];
1269
+ /**
1270
+ * 列配置项
1271
+ * NOTE: 使用 any 兼容各类型的 formBuilder
1272
+ */
1273
+ columns: IBaseTableColumn<any>[];
1274
+ /**
1275
+ * 用于加载数据
1276
+ */
1277
+ loadMethod?: (params: Omit<IPagination, "total">) => IBaseTableLoadResult | Promise<IBaseTableLoadResult | undefined>;
1278
+ /**
1279
+ * 是否默认加载数据
1280
+ */
1281
+ autoLoad?: boolean;
1282
+ /**
1283
+ * 是否需要默认操作按钮(刷新)
1284
+ */
1285
+ hasDefaultOperation?: boolean;
1286
+ /**
1287
+ * 操作列按钮
1288
+ */
1289
+ operationBtnList?: IOperationBtn["type"] | (IOperationBtn | IOperationBtn["type"])[];
1290
+ /**
1291
+ * 是否需要分页
1292
+ */
1293
+ hasPagination?: boolean;
1294
+ /**
1295
+ * 分页参数
1296
+ */
1297
+ paginationProps?: Omit<Partial<PaginationProps>, "size">;
1298
+ /**
1299
+ * paginationPosition
1300
+ */
1301
+ paginationPosition?: "left" | "right";
1302
+ /**
1303
+ * 分页是否固定
1304
+ */
1305
+ fixedPagination?: boolean;
1306
+ /**
1307
+ * 分组信息
1308
+ */
1309
+ columnConfig?: IColumnConfig;
1310
+ /**
1311
+ * pageId
1312
+ */
1313
+ pageId?: string;
1314
+ /**
1315
+ * 设置sticky的触发元素,如果没有。则默认会从el-main上拿去
1316
+ */
1317
+ stickyTriggerSelector?: ISelector;
1318
+ /**
1319
+ * 是否需要表头固定,默认关闭
1320
+ */
1321
+ stickyHeader?: boolean;
1322
+ /**
1323
+ * 表单的实例,如果需要表单加载完成事件(loaded)则需要传递
1324
+ * NOTE: 使用 any 兼容各类型的 formBuilder
1325
+ */
1326
+ formBuilder?: FormBuilder<any>;
1327
+ /**
1328
+ * 是否开启拖拽,默认不开启,只有设置了拖拽的列id(即prop)才会开启拖拽,可以设置多个
1329
+ */
1330
+ enableDragProps?: string[] | string;
1331
+ /**
1332
+ * draggable 的配置
1333
+ */
1334
+ draggableAttrs?: {
1335
+ /**
1336
+ * 表格唯一id,如果不设置会自动取表格设置的 row-key,最后是 id
1337
+ * @default id
1338
+ */
1339
+ idKey?: string;
1340
+ animation?: number;
1341
+ };
1342
+ /**
1343
+ * 是否开启列搜索
1344
+ * @default false
1345
+ */
1346
+ enableColumnSearch?: boolean;
1347
+ }
1348
+
1349
+ /**
1350
+ * 不使用 elTable 的势力作为类型。否则会导致打包类型报错
1351
+ * error: Exported variable 'useBaseTable' has or is using name 'TableHeader' from external module
1352
+ *
1353
+ */
1354
+ export declare interface IBaseTableRef {
1355
+ $el: HTMLElement;
1356
+ clearSort: () => void;
1357
+ scrollTo: (x: number, y: number) => void;
1358
+ clearSelection: () => void;
1359
+ [key: string]: any;
1360
+ }
1361
+
1362
+ export declare interface ICallBackParams {
1363
+ data: {
1364
+ updateData: IConfigColumnsItem[];
1365
+ groupName: string;
1366
+ isSave: boolean;
1367
+ };
1368
+ close: () => void;
1369
+ }
1370
+
1371
+ export declare interface IColumnConfig {
1372
+ /**
1373
+ * 表格唯一code
1374
+ */
1375
+ pageId: string;
1376
+ /**
1377
+ * 当前选中的id
1378
+ */
1379
+ groupId?: string;
1380
+ /**
1381
+ * 当前页面名称
1382
+ */
1383
+ pageName?: string;
1384
+ /**
1385
+ * 系统分组名称
1386
+ */
1387
+ systemGroupName?: string;
1388
+ }
1389
+
1390
+ declare interface IComponentProps {
1391
+ [EFormComponentType.INPUT]: InputProps;
1392
+ [EFormComponentType.SELECT]: SelectProps;
1393
+ [EFormComponentType.DATE]: DatePickerProps;
1394
+ [EFormComponentType.DATE_RANGE]: DatePickerProps;
1395
+ [EFormComponentType.SWITCH]: SwitchProps;
1396
+ [EFormComponentType.RADIO]: RadioProps;
1397
+ [EFormComponentType.GROUP_SELECT_INPUT]: TObj;
1398
+ [EFormComponentType.SEARCH_INPUT]: InputProps;
1399
+ [EFormComponentType.CASCADER]: TCascaderProps;
1400
+ [EFormComponentType.NUMBER_RANGE]: TObj;
1401
+ [EFormComponentType.DATE_RANGE_AND_SELECT_GROUP]: TObj;
1402
+ [EFormComponentType.NUMBER_INPUT]: InputProps;
1403
+ }
1404
+
1405
+ declare interface IConfigColumnsItem {
1406
+ /**
1407
+ * 唯一标识
1408
+ */
1409
+ prop: string;
1410
+ /**
1411
+ * 文本
1412
+ */
1413
+ label: string;
1414
+ /**
1415
+ * 是否勾选
1416
+ */
1417
+ checked?: boolean;
1418
+ /**
1419
+ * 是否固定
1420
+ */
1421
+ fixed?: TFixed;
1422
+ /**
1423
+ * 是否禁用,如果有所定的列,则会放在固定列上方。禁用列顺序也不可变更
1424
+ */
1425
+ readonly?: boolean;
1426
+ /**
1427
+ * 是否默认选中
1428
+ */
1429
+ defaultChecked?: boolean;
1430
+ }
1431
+
1432
+ export declare interface ICreateFormBuilderConfig extends IBaseFormProps {
1433
+ baseTableRef?: Readonly<ShallowRef<TNullable<IBaseTableInstance>>> | Ref<IBaseTableInstance>;
1434
+ }
1435
+
1436
+ export declare interface ICreateFormBuilderReturn<T extends TObj> {
1437
+ formBuilder: FormBuilder<T>;
1438
+ }
1439
+
1440
+ export declare interface ICustomComponentDefinition {
1441
+ component: Component;
1442
+ defaultPraseStrategy: (field: IBaseFormItem) => IBaseFormItem;
1443
+ }
1444
+
1445
+ /**
1446
+ * EFormComponentType 类型扩展
1447
+ * @example
1448
+ * declare module "module-platform-common" {
1449
+ * export interface ICustomFormComponentType {
1450
+ * // 也可以自定义对应枚举作为相应的 key
1451
+ * 'SELECT_STAFF': {
1452
+ * multiple: boolean
1453
+ * //....
1454
+ * }
1455
+ * }
1456
+ * }
1457
+ */
1458
+ export declare interface ICustomFormComponentType {
1459
+ /**
1460
+ * 自定义表单组件名称和对应的类型
1461
+ * @example
1462
+ */
1463
+ __example__: {
1464
+ exampleProps: boolean;
1465
+ };
1466
+ }
1467
+
1468
+ /**
1469
+ * 弹框事件
1470
+ * NOTICE:不处理多个参数的情况,如果需要传递多个参数,请自行包裹一个object处理
1471
+ * optimize:不使用枚举定义类型,sfc在静态编译类型的时候无法识别,会导致类型警告
1472
+ */
1473
+ export declare interface IDialogEmits<T = unknown, U = unknown> {
1474
+ (e: "dialog:confirm", data?: T): void;
1475
+ (e: "dialog:cancel", data?: U): void;
1476
+ }
1477
+
1478
+ /**
1479
+ * 动态值表达式信息
1480
+ */
1481
+ declare interface IDynamicExpression {
1482
+ /**
1483
+ * 表达式:通常是一个方法名称(DYNAMIC_EXPRESSION_RULES 定义)
1484
+ */
1485
+ expression: IDynamicExpressionRuleKeys;
1486
+ /**
1487
+ * 表达式对应的参数
1488
+ */
1489
+ params?: TExpressionParams;
1490
+ }
1491
+
1492
+ declare type IDynamicExpressionRuleKeys = keyof typeof DYNAMIC_EXPRESSION_RULES;
1493
+
1494
+ /**
1495
+ * 分组的列的数据
1496
+ */
1497
+ declare interface IFormItemGroupItem {
1498
+ /**
1499
+ * 唯一标识
1500
+ */
1501
+ prop: string;
1502
+ /**
1503
+ * 当前选项的值,可以是任何值,存储的时候作为字符串,取出的时候转换
1504
+ */
1505
+ value: any;
1506
+ /**
1507
+ * 是否勾选
1508
+ */
1509
+ checked: boolean;
1510
+ /**
1511
+ * 是否只读(不可更改)
1512
+ */
1513
+ readonly?: boolean;
1514
+ /**
1515
+ * 当前排序
1516
+ */
1517
+ sort?: number;
1518
+ /**
1519
+ * 动态表达式
1520
+ */
1521
+ dynamicExpression?: IDynamicExpression;
1522
+ }
1523
+
1524
+ export declare type IGroupSelectInputAttrs = {
1525
+ selectAttrs?: IGroupSelectInputSelectAttrs;
1526
+ /**
1527
+ * select 的 options
1528
+ */
1529
+ options: TOptionsReturn<{
1530
+ placeholder?: string;
1531
+ }>;
1532
+ /**
1533
+ * select 的内容修改是否不触发 change 事件
1534
+ * @default false
1535
+ */
1536
+ changeOnSelect?: boolean;
1537
+ /**
1538
+ * select 的宽度
1539
+ * @default 100px
1540
+ */
1541
+ selectWidth?: string;
1542
+ /**
1543
+ * 是否默认选中第一个下拉数据
1544
+ * @default: true
1545
+ */
1546
+ defaultSelectFirst?: boolean;
1547
+ } & IStyle & Omit<InputProps, "modelValue">;
1548
+
1549
+ export declare type IGroupSelectInputSelectAttrs = Partial<SelectProps> & IStyle;
1550
+
1551
+ declare interface IInstallConfigTypes {
1552
+ /**
1553
+ * 支持批量自定义注册
1554
+ */
1555
+ components?: TZComponentKey[];
1556
+ /**
1557
+ * 是否注册自定义指令
1558
+ * @default true
1559
+ */
1560
+ injectDirective?: boolean;
1561
+ }
1562
+
1563
+ export declare const initZUiDirectives: Plugin_2;
1564
+
1565
+ declare const installer: {
1566
+ install: (app: App, config?: IInstallConfigTypes) => void;
1567
+ version: string;
1568
+ };
1569
+ export default installer;
1570
+
1571
+ declare const installer_2 = withInstallComponent(ZAutoTooltip, "ZAutoTooltip");
1572
+
1573
+ declare const installer_3 = withInstallComponent(ZClassifyTitle, "ZClassifyTitle");
1574
+
1575
+ declare const installer_4 = withInstallComponent(ZEmpty, "ZEmpty");
1576
+
1577
+ declare const installer_5 = withInstallComponent(ZForm, "ZForm");
1578
+
1579
+ declare const installer_6 = withInstallComponent(ZTable, "ZTable");
1580
+
1581
+ declare const installer_7 = withInstallComponent(ZTableLinkButton, "ZTableLinkButton");
1582
+
1583
+ /**
1584
+ * 操作列配置
1585
+ */
1586
+ export declare interface IOperationBtn {
1587
+ auth?: string;
1588
+ type: "refresh" | "download" | "resetColumnsWidth" | "configColumns";
1589
+ }
1590
+
1591
+ export declare interface IPagination {
1592
+ current: number;
1593
+ size: number;
1594
+ total?: number;
1595
+ }
1596
+
1597
+ declare interface IProps extends TBaseSelectAttrs, Partial<SelectProps> {
1598
+ on?: TEvent;
1599
+ }
1600
+
1601
+ /**
1602
+ * 判断当前时间是否大于现在
1603
+ * @param time
1604
+ */
1605
+ export declare const isAfterNow: (time: Date) => boolean;
1606
+
1607
+ /**
1608
+ * 判断一个值是否为异步组件
1609
+ * @param value
1610
+ */
1611
+ export declare const isAsyncComponent: <T extends Component>(value: unknown) => value is AsyncComponentLoader<T>;
1612
+
1613
+ /**
1614
+ * 判断字符串是否为中文
1615
+ * @param str
1616
+ */
1617
+ export declare const isChinese: (str: string) => boolean;
1618
+
1619
+ export declare type ISelector = string | HTMLElement | (() => HTMLElement) | undefined;
1620
+
1621
+ /**
1622
+ * 判断列的值是否为空
1623
+ * @param value
1624
+ */
1625
+ export declare const isEmptyCellValue: (value: unknown) => value is undefined;
1626
+
1627
+ /**
1628
+ * 判断一个值是否为空数字(包含0)
1629
+ * @param value
1630
+ */
1631
+ export declare const isEmptyNumber: (value: unknown) => boolean;
1632
+
1633
+ /**
1634
+ * 判断一个元素是否隐藏
1635
+ */
1636
+ export declare const isHiddenNode: (element?: HTMLElement) => boolean;
1637
+
1638
+ /**
1639
+ * 判断一个对象是否为 Promise
1640
+ * @param obj
1641
+ */
1642
+ export declare const isPromise: <T>(obj: unknown) => obj is Promise<T>;
1643
+
1644
+ export declare interface IStyle {
1645
+ style?: Partial<CSSStyleDeclaration> | string;
1646
+ className?: string;
1647
+ }
1648
+
1649
+ export declare interface ITableSortData {
1650
+ oldIndex: number;
1651
+ newIndex: number;
1652
+ }
1653
+
1654
+ export declare interface IUiConfig {
1655
+ /**
1656
+ * 获取自定义列/筛选配置
1657
+ */
1658
+ loadViewConfig?: <T extends TObj>(params: IViewConfig, formBuilder?: FormBuilder<T>) => IViewConfigResult[] | Promise<IViewConfigResult[]>;
1659
+ /**
1660
+ * 保存自定义列/筛选配置
1661
+ * @param params
1662
+ * @param formBuilder
1663
+ */
1664
+ saveViewConfig?: <T extends TObj>(params: IViewConfig & {
1665
+ /**
1666
+ * 保存的配置信息
1667
+ */
1668
+ config: string;
1669
+ }, formBuilder?: FormBuilder<T>) => void | Promise<void>;
1670
+ }
1671
+
1672
+ export declare interface IUseTableStickyOptions {
1673
+ stickyTriggerSelector?: ISelector;
1674
+ baseTableOperationElement: Ref<TUndefinable<HTMLElement>>;
1675
+ baseTableRef: Ref<TUndefinable<IBaseTableRef>>;
1676
+ }
1677
+
1678
+ export declare interface IViewConfig {
1679
+ /**
1680
+ * 表单/表格页面id
1681
+ */
1682
+ pageId: string;
1683
+ /**
1684
+ * 配置类型
1685
+ * 1.筛选项 2.列表项
1686
+ */
1687
+ type: 1 | 2;
1688
+ }
1689
+
1690
+ export declare interface IViewConfigResult {
1691
+ /**
1692
+ * 列配置id
1693
+ */
1694
+ id: number;
1695
+ /**
1696
+ * 配置信息
1697
+ */
1698
+ config: string;
1699
+ }
1700
+
1701
+ /**
1702
+ * 金额的最大值。数字框的默认最大值也是这个。
1703
+ */
1704
+ export declare const MAX_MONEY = 99999999;
1705
+
1706
+ declare type PropsOf<T> = T extends Component<infer P> ? P : never;
1707
+
1708
+ declare type PropsOf_2<T> = T extends Component<infer P> ? P : never;
1709
+
1710
+ /**
1711
+ * 特殊的列配置
1712
+ */
1713
+ export declare const specialColumnMap: Record<"index" | "selection" | string, IBaseTableColumn>;
1714
+
1715
+ export declare const STICKY_CONTAINER_CLASS = "__base-table-sticky-container";
1716
+
1717
+ /**
1718
+ * 表格开启拖拽的class
1719
+ */
1720
+ export declare const TABLE_DRAGGABLE_CLASS = "base-table__column__is-draggable";
1721
+
1722
+ /**
1723
+ * 表格默认的空值的dom
1724
+ */
1725
+ export declare const TABLE_EMPTY_NODE: JSX.Element;
1726
+
1727
+ /**
1728
+ * 表格默认的空值
1729
+ */
1730
+ export declare const TABLE_EMPTY_VALUE = "-";
1731
+
1732
+ /**
1733
+ * 表头的默认style
1734
+ */
1735
+ export declare const TABLE_HEADER_CELL_STYLE: {
1736
+ background: string;
1737
+ color: string;
1738
+ };
1739
+
1740
+ export declare interface TBaseCascaderAttrs {
1741
+ options?: TOptionsReturn;
1742
+ /**
1743
+ * 设置 cascader 的宽度
1744
+ */
1745
+ width?: string;
1746
+ }
1747
+
1748
+ export declare interface TBaseDateAttrs {
1749
+ /**
1750
+ * 是否自动加上秒
1751
+ */
1752
+ autoAddSeconds?: boolean;
1753
+ /**
1754
+ * 是否使用一天的开始/结束时间(时/分/秒)作为默认值
1755
+ */
1756
+ useDefaultTimeToDay?: boolean;
1757
+ }
1758
+
1759
+ export declare interface TBaseDateRangeAndSelectGroupAttrs {
1760
+ options?: TOptions;
1761
+ /**
1762
+ * select options
1763
+ */
1764
+ selectWidth?: string;
1765
+ selectOptions?: Partial<SelectProps>;
1766
+ /**
1767
+ * 是否在时间为空的情况下禁用 select
1768
+ * @default true
1769
+ */
1770
+ disabledSelectByEmptyData?: boolean;
1771
+ /**
1772
+ * 是否把select放到前面
1773
+ * @default false
1774
+ */
1775
+ selectToFirst?: boolean;
1776
+ }
1777
+
1778
+ export declare interface TBaseNumberInputAttrs {
1779
+ precision?: number;
1780
+ /**
1781
+ * 最大值
1782
+ */
1783
+ max?: number;
1784
+ /**
1785
+ * 最小值
1786
+ */
1787
+ min?: number;
1788
+ }
1789
+
1790
+ export declare interface TBaseSelectAttrs {
1791
+ /**
1792
+ * select 的 options
1793
+ */
1794
+ options?: TOptionsReturn;
1795
+ /**
1796
+ * 设置 select 的宽度
1797
+ */
1798
+ width?: string;
1799
+ }
1800
+
1801
+ export declare type TBaseTableRequestResult = IBaseTableLoadResult | Promise<IBaseTableLoadResult>;
1802
+
1803
+ declare type TCascaderProps = ExtractPropTypes<typeof cascaderProps>;
1804
+
1805
+ export declare type TCreateBaseFormItemParams<T extends keyof IComponentProps, U extends TObj> = Omit<IBaseFormItem<U>, "tag" | "attrs" | "componentProps"> & {
1806
+ tag: T;
1807
+ /**
1808
+ * @see { src/components/base-form/core/typing/attrs.ts } 用于传递给组件的属性
1809
+ */
1810
+ attrs?: Partial<IAttrs[T]>;
1811
+ /**
1812
+ * @see { src/components/base-form/core/typing/componentProps.ts } 用于定义element-plus组件的属性
1813
+ */
1814
+ componentProps?: Partial<IComponentProps[T]>;
1815
+ };
1816
+
1817
+ declare type TCreateCustomFormItemParams<T extends Component, U extends TObj = TObj> = Omit<IBaseFormItem<U>, "tag" | "attrs" | "componentProps"> & {
1818
+ tag: T;
1819
+ attrs?: Partial<ExtractPropTypes<PropsOf<T>>>;
1820
+ componentProps?: Partial<ExtractPropTypes<PropsOf<T>>>;
1821
+ };
1822
+
1823
+ declare type TCreateCustomFormItemParamsByDefinition<T extends TKeyofCustomFormComponentType, U extends TObj = TObj> = Omit<IBaseFormItem<U>, "tag" | "attrs" | "componentProps"> & {
1824
+ tag: T;
1825
+ attrs?: Partial<ICustomFormComponentType[T]>;
1826
+ componentProps?: Partial<ICustomFormComponentType[T]>;
1827
+ };
1828
+
1829
+ export declare const TEMP_GROUP_ID = "-2";
1830
+
1831
+ export declare type TEvent = {
1832
+ [key in keyof DocumentEventMap]?: (event: TAllType) => void;
1833
+ } & TObj<string, (event: TAllType) => void> & {
1834
+ suffixClick?: () => void;
1835
+ };
1836
+
1837
+ declare type TExpressionParams = (string | boolean | number)[];
1838
+
1839
+ declare type TExtendedCascaderProps = Partial<ExtractPropTypes<typeof cascaderProps>>;
1840
+
1841
+ declare type TFixed = "left" | "right";
1842
+
1843
+ export declare type TKeyofCustomFormComponentType = keyof ICustomFormComponentType;
1844
+
1845
+ declare type TModelValue = [string?, string?, TAllType?];
1846
+
1847
+ export declare type TOptionsReturn<T extends TObj = TObj> = TOptions<T> | (() => TOptions<T> | Promise<TOptions<T>>);
1848
+
1849
+ declare type TZComponentKey = keyof typeof allComponents;
1850
+
1851
+ declare class UiConfigService {
1852
+ private config?;
1853
+ /**
1854
+ * 传入配置
1855
+ * @param config
1856
+ */
1857
+ provide(config: IUiConfig): void;
1858
+ /**
1859
+ * 加载配置
1860
+ * @param params
1861
+ * @param formBuilder
1862
+ */
1863
+ loadViewConfig<T extends TObj>(params: IViewConfig, formBuilder?: FormBuilder<T>): IViewConfigResult_2[] | Promise<IViewConfigResult_2[]> | undefined;
1864
+ /**
1865
+ * 保存配置
1866
+ * @param params
1867
+ * @param formBuilder
1868
+ */
1869
+ saveViewConfig<T extends TObj>(params: IViewConfig & {
1870
+ config: string;
1871
+ }, formBuilder?: FormBuilder<T>): Promise<void>;
1872
+ }
1873
+
1874
+ export declare const uiConfigService: UiConfigService;
1875
+
1876
+ /**
1877
+ * 用于优化异步加载体验
1878
+ * @param isFull 是否为全屏加载
1879
+ */
1880
+ export declare function useAsyncLoader(isFull?: boolean): [Ref<boolean>, (fn: () => Promise<void> | void) => void];
1881
+
1882
+ export declare const useBaseTable: (props: IBaseTableProps) => {
1883
+ baseTableContainerRef: Ref<HTMLElement | undefined, HTMLElement | undefined>;
1884
+ baseTableRef: Ref<IBaseTableRef, IBaseTableRef>;
1885
+ pagination: Ref<IPagination, IPagination>;
1886
+ getPaginationProps: ComputedRef<{
1887
+ popperClass?: string | undefined;
1888
+ small?: boolean | undefined;
1889
+ disabled?: boolean | undefined;
1890
+ teleported?: boolean | undefined;
1891
+ background?: boolean | undefined;
1892
+ pageSize: number;
1893
+ defaultPageSize?: number | undefined;
1894
+ total?: number | undefined;
1895
+ pageCount?: number | undefined;
1896
+ pagerCount?: number | undefined;
1897
+ currentPage?: number | undefined;
1898
+ defaultCurrentPage?: number | undefined;
1899
+ layout?: string | undefined;
1900
+ pageSizes?: number[] | undefined;
1901
+ prevText?: string | undefined;
1902
+ prevIcon?: (string | Component) | undefined;
1903
+ nextText?: string | undefined;
1904
+ nextIcon?: (string | Component) | undefined;
1905
+ hideOnSinglePage?: boolean | undefined;
1906
+ appendSizeTo?: string | undefined;
1907
+ size?: ("" | "small" | "default" | "large") | undefined;
1908
+ }>;
1909
+ paginationWidth: Ref<string, string>;
1910
+ tableData: Ref<TObj<string, any>[], TObj<string, any>[]>;
1911
+ getTableAttrs: ComputedRef<Partial<IBaseTableProps> & default_2.Omit<IBaseTableProps, "columns" | "tableData" | "loadMethod" | "autoLoad" | "hasDefaultOperation" | "hasPagination" | "paginationProps">>;
1912
+ getColumnAttrs: ComputedRef<(column: IBaseTableColumn) => default_2.Omit<IBaseTableColumn<TObj<string, any>>, "hidden" | "className" | "renderHeader" | "_render" | "isOperation">>;
1913
+ specialColumnMap: Record<string, IBaseTableColumn<TObj<string, any>>>;
1914
+ getTableRenderColumns: ComputedRef<IBaseTableColumn<TObj<string, any>>[]>;
1915
+ isOperationColumn: ComputedRef<(column: IBaseTableColumn, index: number) => boolean | undefined>;
1916
+ configColumnsDialogRef: Ref<CreateComponentPublicInstanceWithMixins<Readonly<{
1917
+ columnConfig?: IColumnConfig;
1918
+ }> & Readonly<{}>, {
1919
+ openDialog: (groupInfo: {
1920
+ groupName: string;
1921
+ groupData: TConfigGroup;
1922
+ }, saveData: IBaseTableColumnStoreItem[]) => Promise<ICallBackParams_2>;
1923
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
1924
+ P: {};
1925
+ B: {};
1926
+ D: {};
1927
+ C: {};
1928
+ M: {};
1929
+ Defaults: {};
1930
+ }, Readonly<{
1931
+ columnConfig?: IColumnConfig;
1932
+ }> & Readonly<{}>, {
1933
+ openDialog: (groupInfo: {
1934
+ groupName: string;
1935
+ groupData: TConfigGroup;
1936
+ }, saveData: IBaseTableColumnStoreItem[]) => Promise<ICallBackParams_2>;
1937
+ }, {}, {}, {}, {}> | undefined, CreateComponentPublicInstanceWithMixins<Readonly<{
1938
+ columnConfig?: IColumnConfig;
1939
+ }> & Readonly<{}>, {
1940
+ openDialog: (groupInfo: {
1941
+ groupName: string;
1942
+ groupData: TConfigGroup;
1943
+ }, saveData: IBaseTableColumnStoreItem[]) => Promise<ICallBackParams_2>;
1944
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
1945
+ P: {};
1946
+ B: {};
1947
+ D: {};
1948
+ C: {};
1949
+ M: {};
1950
+ Defaults: {};
1951
+ }, Readonly<{
1952
+ columnConfig?: IColumnConfig;
1953
+ }> & Readonly<{}>, {
1954
+ openDialog: (groupInfo: {
1955
+ groupName: string;
1956
+ groupData: TConfigGroup;
1957
+ }, saveData: IBaseTableColumnStoreItem[]) => Promise<ICallBackParams_2>;
1958
+ }, {}, {}, {}, {}> | undefined>;
1959
+ getParseOperationBtnList: ComputedRef<IOperationBtn[]>;
1960
+ loadingConfigColumns: Ref<boolean, boolean>;
1961
+ loadDataLoading: Ref<boolean, boolean>;
1962
+ groupId: Ref<string, string>;
1963
+ resetKey: Ref<number, number>;
1964
+ columnGroups: Ref<{
1965
+ groupName: string;
1966
+ id: string;
1967
+ columns: {
1968
+ prop: string;
1969
+ checked: boolean;
1970
+ fixed?: "left" | "right" | undefined;
1971
+ }[];
1972
+ }[], IBaseTableColumnStoreRow[] | {
1973
+ groupName: string;
1974
+ id: string;
1975
+ columns: {
1976
+ prop: string;
1977
+ checked: boolean;
1978
+ fixed?: "left" | "right" | undefined;
1979
+ }[];
1980
+ }[]>;
1981
+ changeGroupId: (id: string, updateColumns?: IBaseTableColumnStoreItem[]) => void;
1982
+ loadData: (currentPagination?: IPagination) => Promise<void>;
1983
+ openConfigColumnDialog: (id: string) => void;
1984
+ resetColumnsWidth: () => void;
1985
+ editGroupByGroupId: (id: string) => void;
1986
+ deleteGroupByGroupId: (id: string) => Promise<void>;
1987
+ };
1988
+
1989
+ /**
1990
+ * 创建一个formBuilder
1991
+ * @param fields
1992
+ * @param config
1993
+ * @example 泛形必须要传递,否者无法推导类型
1994
+ * const { formBuilder } = useCreateFormBuilder<{ searchKey: [string, string]; test: string; }>(
1995
+ * [
1996
+ * createBaseFormItem({
1997
+ * tag: EFormComponentType.GROUP_SELECT_INPUT,
1998
+ * label: "test",
1999
+ * prop: "searchKey",
2000
+ * }),
2001
+ * createBaseFormItem({
2002
+ * tag: EFormComponentType.SELECT,
2003
+ * label: "test",
2004
+ * prop: "searchKey",
2005
+ * }),
2006
+ * ]
2007
+ * );
2008
+ */
2009
+ export declare const useCreateFormBuilder: <T extends TObj>(fields?: (IBaseFormItem<T> | BaseFormItem<T>)[], config?: ICreateFormBuilderConfig) => ICreateFormBuilderReturn<T>;
2010
+
2011
+ /**
2012
+ * 创建一个动态的builder。
2013
+ * 注意:如果动态列中需要使用formData的数据,不能直接使用本方法返回的 formBuilder 对象,因为动态列会在函数返回之前被调用
2014
+ * @example 如果动态列中没有使用 formBuilder 相关内容请使用下列方法
2015
+ * const test = ref(1);
2016
+ * const { formBuilder } = useDynamicCreateFormBuilder<{ searchKey: [string, string] }>(() => {
2017
+ * return [
2018
+ * createBaseFormItem(() => {
2019
+ * return {
2020
+ * tag: EFormComponentType.GROUP_SELECT_INPUT,
2021
+ * label: "test",
2022
+ * prop: "searchKey",
2023
+ * attrs: {
2024
+ * placeholder: 1 === test.value ? "placeholder-a" : "placeholder-b",
2025
+ * },
2026
+ * }
2027
+ * }),
2028
+ * ]
2029
+ * });
2030
+ *
2031
+ * @example 如果动态列中使用了 formBuilder 相关内容请使用下列方法。(不能在初始化之前直接使用 formBuilder 实例)
2032
+ * const { formBuilder } = useDynamicCreateFormBuilder<{ searchKey: [string, string] }>(({ formData }) => {
2033
+ * return [
2034
+ * createBaseFormItem(() => {
2035
+ * return {
2036
+ * tag: EFormComponentType.GROUP_SELECT_INPUT,
2037
+ * label: "test",
2038
+ * prop: "searchKey",
2039
+ * attrs: {
2040
+ * placeholder: ESearchType.FRIEND_SEARCH_FIELD === formData.searchKey?.[1] ? "placeholder-a" : "placeholder-b",
2041
+ * },
2042
+ * }
2043
+ * }),
2044
+ * ]
2045
+ * });
2046
+ * @param getDynamicFields
2047
+ * @param config
2048
+ * */
2049
+ export declare const useDynamicCreateFormBuilder: <T extends TObj = TObj>(getDynamicFields?: (formBuilder: FormBuilder<T>) => (IBaseFormItem<T> | BaseFormItem<T>)[], config?: ICreateFormBuilderConfig) => ICreateFormBuilderReturn<T>;
2050
+
2051
+ /**
2052
+ * 创建一个监听事件
2053
+ */
2054
+ export declare const useListenEvent: <T extends HTMLElement>() => {
2055
+ stop: () => void;
2056
+ on: <K extends keyof HTMLElementEventMap>(event: K, fn: (_: HTMLElementEventMap[K]) => void, options?: boolean | AddEventListenerOptions) => void;
2057
+ listenElementRef: Readonly<ShallowRef<T | null>>;
2058
+ };
2059
+
2060
+ export declare const useOpenDialog: () => {
2061
+ openDialog: <V = TAllType<string | number | boolean | object | null | undefined>, T extends Component = Component>(loader: AsyncComponentLoader<T> | T, props?: Partial<ExtractPropTypes<PropsOf_2<T>>>, closeId?: number) => Promise<V>;
2062
+ createDialog: <V = TAllType<string | number | boolean | object | null | undefined>, T extends Component = Component>(loader: AsyncComponentLoader<T> | T, props?: Partial<ExtractPropTypes<PropsOf_2<T>>>) => {
2063
+ confirm: (callBack: (data: V) => void) => /*elided*/ any;
2064
+ cancel: (callBack: (data: V) => void) => /*elided*/ any;
2065
+ finally: (callBack: () => void) => /*elided*/ any;
2066
+ close: () => /*elided*/ any;
2067
+ };
2068
+ closeDialog: (id?: number, notCloseBeforeAllInstance?: boolean) => void;
2069
+ };
2070
+
2071
+ export declare const useOptions: <T extends {
2072
+ options: TOptionsReturn;
2073
+ }>(props: T, initOptionsSuccessCallBack?: () => void) => {
2074
+ parseOptions: Ref< {
2075
+ [x: string]: any;
2076
+ value?: any;
2077
+ label?: string | undefined;
2078
+ disabled?: boolean | undefined;
2079
+ leaf?: boolean | undefined;
2080
+ children?: /*elided*/ any[] | undefined;
2081
+ }[], TOptions<TObj<string, any>> | {
2082
+ [x: string]: any;
2083
+ value?: any;
2084
+ label?: string | undefined;
2085
+ disabled?: boolean | undefined;
2086
+ leaf?: boolean | undefined;
2087
+ children?: /*elided*/ any[] | undefined;
2088
+ }[]>;
2089
+ loadingOptions: Ref<boolean, boolean>;
2090
+ };
2091
+
2092
+ /**
2093
+ * 监听元素的宽高变化
2094
+ */
2095
+ export declare const useResizeObserver: () => {
2096
+ onResize: <T extends HTMLElement>(target: T | Ref<T> | (() => T | Ref<T>), callBack: (entry: ResizeObserverEntry) => void) => void;
2097
+ stopResize: () => void;
2098
+ };
2099
+
2100
+ /**
2101
+ * 处理表格开启表头固定的逻辑
2102
+ */
2103
+ export declare const useTableSticky: (options: IUseTableStickyOptions) => {
2104
+ start: () => void;
2105
+ reset: () => Promise<void>;
2106
+ };
2107
+
2108
+ export declare const ZAutoTooltip: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
2109
+
2110
+ export declare const ZClassifyTitle: {
2111
+ new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly<{
2112
+ title?: string;
2113
+ mb?: number | string;
2114
+ mt?: number | string;
2115
+ required?: boolean;
2116
+ tips?: string;
2117
+ showLine?: boolean;
2118
+ }> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, HTMLDivElement, ComponentProvideOptions, {
2119
+ P: {};
2120
+ B: {};
2121
+ D: {};
2122
+ C: {};
2123
+ M: {};
2124
+ Defaults: {};
2125
+ }, Readonly<{
2126
+ title?: string;
2127
+ mb?: number | string;
2128
+ mt?: number | string;
2129
+ required?: boolean;
2130
+ tips?: string;
2131
+ showLine?: boolean;
2132
+ }> & Readonly<{}>, {}, {}, {}, {}, {}>;
2133
+ __isFragment?: never;
2134
+ __isTeleport?: never;
2135
+ __isSuspense?: never;
2136
+ } & ComponentOptionsBase<Readonly<{
2137
+ title?: string;
2138
+ mb?: number | string;
2139
+ mt?: number | string;
2140
+ required?: boolean;
2141
+ tips?: string;
2142
+ showLine?: boolean;
2143
+ }> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
2144
+ $slots: Readonly<{
2145
+ default: () => void;
2146
+ tips?: () => void;
2147
+ }> & {
2148
+ default: () => void;
2149
+ tips?: () => void;
2150
+ };
2151
+ });
2152
+
2153
+ export declare const ZEmpty: DefineComponent< {
2154
+ image?: string;
2155
+ imageSize?: number;
2156
+ description?: string;
2157
+ }, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{
2158
+ image?: string;
2159
+ imageSize?: number;
2160
+ description?: string;
2161
+ }> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
2162
+
2163
+ export declare const ZForm: DefineComponent< {
2164
+ formBuilder: FormBuilder_2<any>;
2165
+ }, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
2166
+ change: ((...args: unknown[]) => any) | (() => any);
2167
+ }, string, PublicProps, Readonly<{
2168
+ formBuilder: FormBuilder_2<any>;
2169
+ }> & Readonly<{
2170
+ onChange?: ((...args: unknown[] & []) => any) | undefined;
2171
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
2172
+ baseFormRef: unknown;
2173
+ colRefs: unknown;
2174
+ }, any>;
2175
+
2176
+ export declare const ZTable: {
2177
+ new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly<{
2178
+ selectList?: TAllType[];
2179
+ } & IBaseTableProps_2> & Readonly<{
2180
+ onSelect?: ((...args: any[]) => any) | undefined;
2181
+ onDrag?: ((...args: any[]) => any) | undefined;
2182
+ "onExpand-change"?: ((...args: any[]) => any) | undefined;
2183
+ "onCurrent-change"?: ((...args: any[]) => any) | undefined;
2184
+ "onSelect-all"?: ((...args: any[]) => any) | undefined;
2185
+ "onSelection-change"?: ((...args: any[]) => any) | undefined;
2186
+ "onCell-mouse-enter"?: ((...args: any[]) => any) | undefined;
2187
+ "onCell-mouse-leave"?: ((...args: any[]) => any) | undefined;
2188
+ "onCell-contextmenu"?: ((...args: any[]) => any) | undefined;
2189
+ "onCell-click"?: ((...args: any[]) => any) | undefined;
2190
+ "onCell-dblclick"?: ((...args: any[]) => any) | undefined;
2191
+ "onRow-click"?: ((...args: any[]) => any) | undefined;
2192
+ "onRow-contextmenu"?: ((...args: any[]) => any) | undefined;
2193
+ "onRow-dblclick"?: ((...args: any[]) => any) | undefined;
2194
+ "onHeader-click"?: ((...args: any[]) => any) | undefined;
2195
+ "onHeader-contextmenu"?: ((...args: any[]) => any) | undefined;
2196
+ "onSort-change"?: ((...args: any[]) => any) | undefined;
2197
+ "onFilter-change"?: ((...args: any[]) => any) | undefined;
2198
+ "onHeader-dragend"?: ((...args: any[]) => any) | undefined;
2199
+ onImport?: ((...args: any[]) => any) | undefined;
2200
+ onExport?: ((...args: any[]) => any) | undefined;
2201
+ onRefreshed?: ((...args: any[]) => any) | undefined;
2202
+ onPaginationChange?: ((...args: any[]) => any) | undefined;
2203
+ onLoaded?: ((...args: any[]) => any) | undefined;
2204
+ "onUpdate:tableData"?: ((...args: any[]) => any) | undefined;
2205
+ "onUpdate:selectList"?: ((value: TAllType<string | number | boolean | object | null | undefined>[]) => any) | undefined;
2206
+ }>, {
2207
+ loadData: (currentPagination?: IPagination_2) => Promise<void>;
2208
+ refresh: (resetPagination?: boolean) => Promise<void>;
2209
+ openConfigColumnDialog: (id: string) => void;
2210
+ getPagination: () => IPagination_2;
2211
+ clearSort: () => void;
2212
+ getExportColumnsProps: () => string[];
2213
+ elTable: Ref<IBaseTableRef_2, IBaseTableRef_2>;
2214
+ getTableData: () => TObj<string, any>[];
2215
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
2216
+ select: (...args: any[]) => void;
2217
+ drag: (...args: any[]) => void;
2218
+ "expand-change": (...args: any[]) => void;
2219
+ "current-change": (...args: any[]) => void;
2220
+ "select-all": (...args: any[]) => void;
2221
+ "selection-change": (...args: any[]) => void;
2222
+ "cell-mouse-enter": (...args: any[]) => void;
2223
+ "cell-mouse-leave": (...args: any[]) => void;
2224
+ "cell-contextmenu": (...args: any[]) => void;
2225
+ "cell-click": (...args: any[]) => void;
2226
+ "cell-dblclick": (...args: any[]) => void;
2227
+ "row-click": (...args: any[]) => void;
2228
+ "row-contextmenu": (...args: any[]) => void;
2229
+ "row-dblclick": (...args: any[]) => void;
2230
+ "header-click": (...args: any[]) => void;
2231
+ "header-contextmenu": (...args: any[]) => void;
2232
+ "sort-change": (...args: any[]) => void;
2233
+ "filter-change": (...args: any[]) => void;
2234
+ "header-dragend": (...args: any[]) => void;
2235
+ import: (...args: any[]) => void;
2236
+ export: (...args: any[]) => void;
2237
+ refreshed: (...args: any[]) => void;
2238
+ paginationChange: (...args: any[]) => void;
2239
+ loaded: (...args: any[]) => void;
2240
+ "update:tableData": (...args: any[]) => void;
2241
+ "update:selectList": (value: TAllType<string | number | boolean | object | null | undefined>[]) => void;
2242
+ }, PublicProps, {
2243
+ border: boolean;
2244
+ columns: IBaseTableColumn_2<any>[];
2245
+ fit: boolean;
2246
+ showHeader: boolean;
2247
+ scrollbarAlwaysOn: boolean;
2248
+ tableData: TObj[];
2249
+ autoLoad: boolean;
2250
+ hasDefaultOperation: boolean;
2251
+ operationBtnList: IOperationBtn_2["type"] | (IOperationBtn_2 | IOperationBtn_2["type"])[];
2252
+ hasPagination: boolean;
2253
+ paginationPosition: "left" | "right";
2254
+ fixedPagination: boolean;
2255
+ stickyHeader: boolean;
2256
+ enableColumnSearch: boolean;
2257
+ }, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
2258
+ baseTableContainerRef: HTMLDivElement;
2259
+ baseTableOperationElement: HTMLDivElement;
2260
+ baseTableRef: unknown;
2261
+ configColumnsDialogRef: CreateComponentPublicInstanceWithMixins<Readonly<{
2262
+ columnConfig?: IColumnConfig_2;
2263
+ }> & Readonly<{}>, {
2264
+ openDialog: (groupInfo: {
2265
+ groupName: string;
2266
+ groupData: TConfigGroup_2;
2267
+ }, saveData: IBaseTableColumnStoreItem_2[]) => Promise<ICallBackParams_3>;
2268
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
2269
+ P: {};
2270
+ B: {};
2271
+ D: {};
2272
+ C: {};
2273
+ M: {};
2274
+ Defaults: {};
2275
+ }, Readonly<{
2276
+ columnConfig?: IColumnConfig_2;
2277
+ }> & Readonly<{}>, {
2278
+ openDialog: (groupInfo: {
2279
+ groupName: string;
2280
+ groupData: TConfigGroup_2;
2281
+ }, saveData: IBaseTableColumnStoreItem_2[]) => Promise<ICallBackParams_3>;
2282
+ }, {}, {}, {}, {}> | null;
2283
+ }, any, ComponentProvideOptions, {
2284
+ P: {};
2285
+ B: {};
2286
+ D: {};
2287
+ C: {};
2288
+ M: {};
2289
+ Defaults: {};
2290
+ }, Readonly<{
2291
+ selectList?: TAllType[];
2292
+ } & IBaseTableProps_2> & Readonly<{
2293
+ onSelect?: ((...args: any[]) => any) | undefined;
2294
+ onDrag?: ((...args: any[]) => any) | undefined;
2295
+ "onExpand-change"?: ((...args: any[]) => any) | undefined;
2296
+ "onCurrent-change"?: ((...args: any[]) => any) | undefined;
2297
+ "onSelect-all"?: ((...args: any[]) => any) | undefined;
2298
+ "onSelection-change"?: ((...args: any[]) => any) | undefined;
2299
+ "onCell-mouse-enter"?: ((...args: any[]) => any) | undefined;
2300
+ "onCell-mouse-leave"?: ((...args: any[]) => any) | undefined;
2301
+ "onCell-contextmenu"?: ((...args: any[]) => any) | undefined;
2302
+ "onCell-click"?: ((...args: any[]) => any) | undefined;
2303
+ "onCell-dblclick"?: ((...args: any[]) => any) | undefined;
2304
+ "onRow-click"?: ((...args: any[]) => any) | undefined;
2305
+ "onRow-contextmenu"?: ((...args: any[]) => any) | undefined;
2306
+ "onRow-dblclick"?: ((...args: any[]) => any) | undefined;
2307
+ "onHeader-click"?: ((...args: any[]) => any) | undefined;
2308
+ "onHeader-contextmenu"?: ((...args: any[]) => any) | undefined;
2309
+ "onSort-change"?: ((...args: any[]) => any) | undefined;
2310
+ "onFilter-change"?: ((...args: any[]) => any) | undefined;
2311
+ "onHeader-dragend"?: ((...args: any[]) => any) | undefined;
2312
+ onImport?: ((...args: any[]) => any) | undefined;
2313
+ onExport?: ((...args: any[]) => any) | undefined;
2314
+ onRefreshed?: ((...args: any[]) => any) | undefined;
2315
+ onPaginationChange?: ((...args: any[]) => any) | undefined;
2316
+ onLoaded?: ((...args: any[]) => any) | undefined;
2317
+ "onUpdate:tableData"?: ((...args: any[]) => any) | undefined;
2318
+ "onUpdate:selectList"?: ((value: TAllType<string | number | boolean | object | null | undefined>[]) => any) | undefined;
2319
+ }>, {
2320
+ loadData: (currentPagination?: IPagination_2) => Promise<void>;
2321
+ refresh: (resetPagination?: boolean) => Promise<void>;
2322
+ openConfigColumnDialog: (id: string) => void;
2323
+ getPagination: () => IPagination_2;
2324
+ clearSort: () => void;
2325
+ getExportColumnsProps: () => string[];
2326
+ elTable: Ref<IBaseTableRef_2, IBaseTableRef_2>;
2327
+ getTableData: () => TObj<string, any>[];
2328
+ }, {}, {}, {}, {
2329
+ border: boolean;
2330
+ columns: IBaseTableColumn_2<any>[];
2331
+ fit: boolean;
2332
+ showHeader: boolean;
2333
+ scrollbarAlwaysOn: boolean;
2334
+ tableData: TObj[];
2335
+ autoLoad: boolean;
2336
+ hasDefaultOperation: boolean;
2337
+ operationBtnList: IOperationBtn_2["type"] | (IOperationBtn_2 | IOperationBtn_2["type"])[];
2338
+ hasPagination: boolean;
2339
+ paginationPosition: "left" | "right";
2340
+ fixedPagination: boolean;
2341
+ stickyHeader: boolean;
2342
+ enableColumnSearch: boolean;
2343
+ }>;
2344
+ __isFragment?: never;
2345
+ __isTeleport?: never;
2346
+ __isSuspense?: never;
2347
+ } & ComponentOptionsBase<Readonly<{
2348
+ selectList?: TAllType[];
2349
+ } & IBaseTableProps_2> & Readonly<{
2350
+ onSelect?: ((...args: any[]) => any) | undefined;
2351
+ onDrag?: ((...args: any[]) => any) | undefined;
2352
+ "onExpand-change"?: ((...args: any[]) => any) | undefined;
2353
+ "onCurrent-change"?: ((...args: any[]) => any) | undefined;
2354
+ "onSelect-all"?: ((...args: any[]) => any) | undefined;
2355
+ "onSelection-change"?: ((...args: any[]) => any) | undefined;
2356
+ "onCell-mouse-enter"?: ((...args: any[]) => any) | undefined;
2357
+ "onCell-mouse-leave"?: ((...args: any[]) => any) | undefined;
2358
+ "onCell-contextmenu"?: ((...args: any[]) => any) | undefined;
2359
+ "onCell-click"?: ((...args: any[]) => any) | undefined;
2360
+ "onCell-dblclick"?: ((...args: any[]) => any) | undefined;
2361
+ "onRow-click"?: ((...args: any[]) => any) | undefined;
2362
+ "onRow-contextmenu"?: ((...args: any[]) => any) | undefined;
2363
+ "onRow-dblclick"?: ((...args: any[]) => any) | undefined;
2364
+ "onHeader-click"?: ((...args: any[]) => any) | undefined;
2365
+ "onHeader-contextmenu"?: ((...args: any[]) => any) | undefined;
2366
+ "onSort-change"?: ((...args: any[]) => any) | undefined;
2367
+ "onFilter-change"?: ((...args: any[]) => any) | undefined;
2368
+ "onHeader-dragend"?: ((...args: any[]) => any) | undefined;
2369
+ onImport?: ((...args: any[]) => any) | undefined;
2370
+ onExport?: ((...args: any[]) => any) | undefined;
2371
+ onRefreshed?: ((...args: any[]) => any) | undefined;
2372
+ onPaginationChange?: ((...args: any[]) => any) | undefined;
2373
+ onLoaded?: ((...args: any[]) => any) | undefined;
2374
+ "onUpdate:tableData"?: ((...args: any[]) => any) | undefined;
2375
+ "onUpdate:selectList"?: ((value: TAllType<string | number | boolean | object | null | undefined>[]) => any) | undefined;
2376
+ }>, {
2377
+ loadData: (currentPagination?: IPagination_2) => Promise<void>;
2378
+ refresh: (resetPagination?: boolean) => Promise<void>;
2379
+ openConfigColumnDialog: (id: string) => void;
2380
+ getPagination: () => IPagination_2;
2381
+ clearSort: () => void;
2382
+ getExportColumnsProps: () => string[];
2383
+ elTable: Ref<IBaseTableRef_2, IBaseTableRef_2>;
2384
+ getTableData: () => TObj<string, any>[];
2385
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
2386
+ select: (...args: any[]) => void;
2387
+ drag: (...args: any[]) => void;
2388
+ "expand-change": (...args: any[]) => void;
2389
+ "current-change": (...args: any[]) => void;
2390
+ "select-all": (...args: any[]) => void;
2391
+ "selection-change": (...args: any[]) => void;
2392
+ "cell-mouse-enter": (...args: any[]) => void;
2393
+ "cell-mouse-leave": (...args: any[]) => void;
2394
+ "cell-contextmenu": (...args: any[]) => void;
2395
+ "cell-click": (...args: any[]) => void;
2396
+ "cell-dblclick": (...args: any[]) => void;
2397
+ "row-click": (...args: any[]) => void;
2398
+ "row-contextmenu": (...args: any[]) => void;
2399
+ "row-dblclick": (...args: any[]) => void;
2400
+ "header-click": (...args: any[]) => void;
2401
+ "header-contextmenu": (...args: any[]) => void;
2402
+ "sort-change": (...args: any[]) => void;
2403
+ "filter-change": (...args: any[]) => void;
2404
+ "header-dragend": (...args: any[]) => void;
2405
+ import: (...args: any[]) => void;
2406
+ export: (...args: any[]) => void;
2407
+ refreshed: (...args: any[]) => void;
2408
+ paginationChange: (...args: any[]) => void;
2409
+ loaded: (...args: any[]) => void;
2410
+ "update:tableData": (...args: any[]) => void;
2411
+ "update:selectList": (value: TAllType<string | number | boolean | object | null | undefined>[]) => void;
2412
+ }, string, {
2413
+ border: boolean;
2414
+ columns: IBaseTableColumn_2<any>[];
2415
+ fit: boolean;
2416
+ showHeader: boolean;
2417
+ scrollbarAlwaysOn: boolean;
2418
+ tableData: TObj[];
2419
+ autoLoad: boolean;
2420
+ hasDefaultOperation: boolean;
2421
+ operationBtnList: IOperationBtn_2["type"] | (IOperationBtn_2 | IOperationBtn_2["type"])[];
2422
+ hasPagination: boolean;
2423
+ paginationPosition: "left" | "right";
2424
+ fixedPagination: boolean;
2425
+ stickyHeader: boolean;
2426
+ enableColumnSearch: boolean;
2427
+ }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
2428
+ $slots: Readonly<{
2429
+ header: (_props: {
2430
+ pagination: IPagination_2;
2431
+ }) => void;
2432
+ operation: (_props: {
2433
+ pagination: IPagination_2;
2434
+ }) => void;
2435
+ selectSlot: () => void;
2436
+ empty: () => void;
2437
+ }> & {
2438
+ header: (_props: {
2439
+ pagination: IPagination_2;
2440
+ }) => void;
2441
+ operation: (_props: {
2442
+ pagination: IPagination_2;
2443
+ }) => void;
2444
+ selectSlot: () => void;
2445
+ empty: () => void;
2446
+ };
2447
+ });
2448
+
2449
+ export declare const ZTableLinkButton: {
2450
+ new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{
2451
+ onClick?: ((args_0: MouseEvent) => any) | undefined;
2452
+ }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
2453
+ click: (args_0: MouseEvent) => any;
2454
+ }, PublicProps, {}, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, HTMLDivElement, ComponentProvideOptions, {
2455
+ P: {};
2456
+ B: {};
2457
+ D: {};
2458
+ C: {};
2459
+ M: {};
2460
+ Defaults: {};
2461
+ }, Readonly<{}> & Readonly<{
2462
+ onClick?: ((args_0: MouseEvent) => any) | undefined;
2463
+ }>, {}, {}, {}, {}, {}>;
2464
+ __isFragment?: never;
2465
+ __isTeleport?: never;
2466
+ __isSuspense?: never;
2467
+ } & ComponentOptionsBase<Readonly<{}> & Readonly<{
2468
+ onClick?: ((args_0: MouseEvent) => any) | undefined;
2469
+ }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
2470
+ click: (args_0: MouseEvent) => any;
2471
+ }, string, {}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
2472
+ $slots: {
2473
+ default?(_: {}): any;
2474
+ };
2475
+ });
2476
+
2477
+ declare type TAllType<T = string | number | boolean | object | null | undefined> = T | T[];
2478
+ declare type TUndefinable<T> = T | undefined;
2479
+ declare type TNullable<T> = T | null;
2480
+ declare type TNullableUndefinable<T> = T | null | undefined;
2481
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2482
+ declare type TObj<K extends keyof any = string, T = any> = Record<K, T>;
2483
+ declare type TNumberOrString = number | string;
2484
+
2485
+ declare type TOptions<T extends TObj = TObj> = ({
2486
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2487
+ value?: any;
2488
+ label?: string;
2489
+ disabled?: boolean;
2490
+ leaf?: boolean;
2491
+ children?: TOptions<T>;
2492
+ } & T)[];
2493
+
2494
+ export { }