@shaonq/vue 1.0.15 → 1.1.4

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/lib/index.d.ts ADDED
@@ -0,0 +1,1146 @@
1
+ import { App } from 'vue';
2
+ import { ComponentOptionsMixin } from 'vue';
3
+ import { DefineComponent } from 'vue';
4
+ import { ExtractPropTypes } from 'vue';
5
+ import { PropType } from 'vue';
6
+ import { PublicProps } from 'vue';
7
+ import { Ref } from 'vue';
8
+ import { VxeColumnPropTypes } from 'vxe-table';
9
+ import { VxeTableDataRow } from 'vxe-table';
10
+ import { VxeTableDefines } from 'vxe-table';
11
+ import { VxeTablePropTypes } from 'vxe-table';
12
+ import { VxeToolbarConstructor } from 'vxe-table';
13
+ import { VxeToolbarInstance } from 'vxe-table';
14
+
15
+ declare type __VLS_WithTemplateSlots<T, S> = T & {
16
+ new (): {
17
+ $slots: S;
18
+ };
19
+ };
20
+
21
+ declare type __VLS_WithTemplateSlots_2<T, S> = T & {
22
+ new (): {
23
+ $slots: S;
24
+ };
25
+ };
26
+
27
+ declare interface CssType extends Partial<CSSStyleDeclaration>, RecordAny_2 {
28
+ }
29
+
30
+ export declare const deepClone: <T = RecordAny | RecordAny[]>(origin: T) => T;
31
+
32
+ declare const _default: {
33
+ install(Vue: App): void;
34
+ };
35
+ export default _default;
36
+
37
+ export declare const download: (url: string, fileName?: string) => boolean;
38
+
39
+ /**
40
+ * @param name 下载名称
41
+ * @param element HTMLElement
42
+ * @param {Object} option html2canvas|jsPDF 详见对应插件文档
43
+ * @param {string} option.letterRendering 打印方向 landscape 横向
44
+ * @param {string} option.className 例 class = 'one-page-pdf' ,大量打印必填
45
+ * @param {string} option.success successCallback worker:any => void
46
+ */
47
+ export declare function downLoadPdf(name: string, element: HTMLElement, option?: RecordAny): Promise<void>;
48
+
49
+ export declare function findObject<T extends RecordAny>(obj: T, keys?: string | string[]): T;
50
+
51
+ /** 行数据格式化 千分位|日期 */
52
+ export declare const formatTable: {
53
+ /** 千分位|保留小数 */
54
+ tf: (val: any, digits?: any) => any;
55
+ /** 快捷格式化日期 */
56
+ t: (val: any) => string;
57
+ /** 完整格式化日期 yyyy-MM-dd HH:mm:ss */
58
+ time: (val: any, f?: string) => string;
59
+ /** percent 格式化百分比 */
60
+ p: (val: any, digits?: any, percent?: string) => string;
61
+ };
62
+
63
+ /** 生成二维码 base64 */
64
+ export declare function generateQRcodeBase64(options: RecordAny): string;
65
+
66
+ /**
67
+ * get path object
68
+ * @example
69
+ * ```
70
+ * getData({a:{b:1}},'a.b')
71
+ * // 1
72
+ * ```
73
+ */
74
+ export declare function getData(object: RecordAny, path: string, defaultValue?: any): any;
75
+
76
+ export declare const getUniqueId: () => string;
77
+
78
+ /** isArray */
79
+ export declare function isArray(obj: any): obj is any[];
80
+
81
+ /** 是否是空数组 */
82
+ export declare function isEmptyArray(obj: any): boolean;
83
+
84
+ /** 是否是空对象 */
85
+ export declare function isEmptyObject(obj: any): boolean;
86
+
87
+ /** isNumber */
88
+ export declare function isNumber(obj: any): obj is number;
89
+
90
+ /** isObject */
91
+ export declare function isObject(value: unknown): value is Record<string, any>;
92
+
93
+ export declare const locale: {
94
+ enUS: {
95
+ fe: {
96
+ panel: {
97
+ title: string;
98
+ model: string;
99
+ bcid: string;
100
+ padding: string;
101
+ name: string;
102
+ width: string;
103
+ height: string;
104
+ size: string;
105
+ labelWidth: string;
106
+ labelAlign: string;
107
+ custom: string;
108
+ placeholder: string;
109
+ layout: string;
110
+ block: string;
111
+ inline: string;
112
+ contentPosition: string;
113
+ left: string;
114
+ right: string;
115
+ center: string;
116
+ showInput: string;
117
+ min: string;
118
+ max: string;
119
+ step: string;
120
+ multiple: string;
121
+ filterable: string;
122
+ allowHalf: string;
123
+ showAlpha: string;
124
+ showLabel: string;
125
+ option: string;
126
+ staticData: string;
127
+ remoteData: string;
128
+ remoteFunc: string;
129
+ value: string;
130
+ label: string;
131
+ childrenOption: string;
132
+ defaultValue: string;
133
+ showType: string;
134
+ isRange: string;
135
+ isTimestamp: string;
136
+ startPlaceholder: string;
137
+ endPlaceholder: string;
138
+ format: string;
139
+ limit: string;
140
+ imageAction: string;
141
+ tip: string;
142
+ action: string;
143
+ defaultType: string;
144
+ string: string;
145
+ object: string;
146
+ array: string;
147
+ number: string;
148
+ boolean: string;
149
+ integer: string;
150
+ float: string;
151
+ url: string;
152
+ email: string;
153
+ hex: string;
154
+ gutter: string;
155
+ columnOption: string;
156
+ span: string;
157
+ justify: string;
158
+ justifyStart: string;
159
+ justifyEnd: string;
160
+ justifyCenter: string;
161
+ justifySpaceAround: string;
162
+ justifySpaceBetween: string;
163
+ align: string;
164
+ alignTop: string;
165
+ alignMiddle: string;
166
+ alignBottom: string;
167
+ type: string;
168
+ default: string;
169
+ card: string;
170
+ borderCard: string;
171
+ tabPosition: string;
172
+ top: string;
173
+ bottom: string;
174
+ tabOption: string;
175
+ tabName: string;
176
+ customClass: string;
177
+ attribute: string;
178
+ dataBind: string;
179
+ hidden: string;
180
+ readonly: string;
181
+ disabled: string;
182
+ editable: string;
183
+ clearable: string;
184
+ arrowControl: string;
185
+ isDelete: string;
186
+ isEdit: string;
187
+ showPassword: string;
188
+ validate: string;
189
+ required: string;
190
+ patternPlaceholder: string;
191
+ newOption: string;
192
+ tab: string;
193
+ validatorRequired: string;
194
+ validatorType: string;
195
+ validatorPattern: string;
196
+ showWordLimit: string;
197
+ maxLength: string;
198
+ };
199
+ side: {
200
+ fields: {
201
+ input: string;
202
+ textarea: string;
203
+ number: string;
204
+ radio: string;
205
+ checkbox: string;
206
+ time: string;
207
+ date: string;
208
+ rate: string;
209
+ color: string;
210
+ select: string;
211
+ switch: string;
212
+ slider: string;
213
+ text: string;
214
+ blank: string;
215
+ fileupload: string;
216
+ imgupload: string;
217
+ editor: string;
218
+ cascader: string;
219
+ table: string;
220
+ grid: string;
221
+ tabs: string;
222
+ divider: string;
223
+ };
224
+ basic: {
225
+ title: string;
226
+ };
227
+ advance: {
228
+ title: string;
229
+ };
230
+ layout: {
231
+ title: string;
232
+ };
233
+ };
234
+ description: {
235
+ containerEmpty: string;
236
+ configEmpty: string;
237
+ tableEmpty: string;
238
+ uploadJsonInfo: string;
239
+ };
240
+ message: {
241
+ copySuccess: string;
242
+ validError: string;
243
+ };
244
+ actions: {
245
+ import: string;
246
+ clear: string;
247
+ preview: string;
248
+ json: string;
249
+ code: string;
250
+ getData: string;
251
+ reset: string;
252
+ copyData: string;
253
+ cancel: string;
254
+ confirm: string;
255
+ addOption: string;
256
+ addColumn: string;
257
+ addTab: string;
258
+ upload: string;
259
+ add: string;
260
+ enabledEdit: string;
261
+ disabledEdit: string;
262
+ };
263
+ config: {
264
+ width: string;
265
+ height: string;
266
+ title: string;
267
+ labelWidth: string;
268
+ labelAlign: string;
269
+ labelAlignLeft: string;
270
+ labelAlignRight: string;
271
+ labelAlignTop: string;
272
+ size: string;
273
+ customClass: string;
274
+ };
275
+ };
276
+ };
277
+ zhCN: {
278
+ fe: {
279
+ panel: {
280
+ title: string;
281
+ model: string;
282
+ bcid: string;
283
+ padding: string;
284
+ name: string;
285
+ width: string;
286
+ height: string;
287
+ size: string;
288
+ labelWidth: string;
289
+ labelAlign: string;
290
+ custom: string;
291
+ placeholder: string;
292
+ layout: string;
293
+ block: string;
294
+ inline: string;
295
+ contentPosition: string;
296
+ left: string;
297
+ right: string;
298
+ center: string;
299
+ showInput: string;
300
+ min: string;
301
+ max: string;
302
+ step: string;
303
+ multiple: string;
304
+ filterable: string;
305
+ allowHalf: string;
306
+ showAlpha: string;
307
+ showLabel: string;
308
+ option: string;
309
+ staticData: string;
310
+ remoteData: string;
311
+ remoteFunc: string;
312
+ value: string;
313
+ label: string;
314
+ childrenOption: string;
315
+ defaultValue: string;
316
+ showType: string;
317
+ isRange: string;
318
+ isTimestamp: string;
319
+ startPlaceholder: string;
320
+ endPlaceholder: string;
321
+ format: string;
322
+ limit: string;
323
+ imageAction: string;
324
+ tip: string;
325
+ action: string;
326
+ defaultType: string;
327
+ string: string;
328
+ object: string;
329
+ array: string;
330
+ number: string;
331
+ boolean: string;
332
+ integer: string;
333
+ float: string;
334
+ url: string;
335
+ email: string;
336
+ hex: string;
337
+ gutter: string;
338
+ columnOption: string;
339
+ span: string;
340
+ justify: string;
341
+ justifyStart: string;
342
+ justifyEnd: string;
343
+ justifyCenter: string;
344
+ justifySpaceAround: string;
345
+ justifySpaceBetween: string;
346
+ align: string;
347
+ alignTop: string;
348
+ alignMiddle: string;
349
+ alignBottom: string;
350
+ type: string;
351
+ default: string;
352
+ card: string;
353
+ borderCard: string;
354
+ tabPosition: string;
355
+ top: string;
356
+ bottom: string;
357
+ tabOption: string;
358
+ tabName: string;
359
+ customClass: string;
360
+ attribute: string;
361
+ dataBind: string;
362
+ hidden: string;
363
+ readonly: string;
364
+ disabled: string;
365
+ editable: string;
366
+ clearable: string;
367
+ arrowControl: string;
368
+ isDelete: string;
369
+ isEdit: string;
370
+ showPassword: string;
371
+ validate: string;
372
+ required: string;
373
+ patternPlaceholder: string;
374
+ newOption: string;
375
+ tab: string;
376
+ validatorRequired: string;
377
+ validatorType: string;
378
+ validatorPattern: string;
379
+ showWordLimit: string;
380
+ maxLength: string;
381
+ };
382
+ side: {
383
+ fields: {
384
+ input: string;
385
+ textarea: string;
386
+ number: string;
387
+ radio: string;
388
+ checkbox: string;
389
+ time: string;
390
+ date: string;
391
+ rate: string;
392
+ color: string;
393
+ select: string;
394
+ switch: string;
395
+ slider: string;
396
+ text: string;
397
+ blank: string;
398
+ fileupload: string;
399
+ imgupload: string;
400
+ editor: string;
401
+ cascader: string;
402
+ table: string;
403
+ grid: string;
404
+ tabs: string;
405
+ divider: string;
406
+ };
407
+ basic: {
408
+ title: string;
409
+ };
410
+ advance: {
411
+ title: string;
412
+ };
413
+ layout: {
414
+ title: string;
415
+ };
416
+ };
417
+ description: {
418
+ containerEmpty: string;
419
+ configEmpty: string;
420
+ tableEmpty: string;
421
+ uploadJsonInfo: string;
422
+ };
423
+ message: {
424
+ copySuccess: string;
425
+ validError: string;
426
+ };
427
+ actions: {
428
+ import: string;
429
+ clear: string;
430
+ preview: string;
431
+ json: string;
432
+ code: string;
433
+ getData: string;
434
+ reset: string;
435
+ copyData: string;
436
+ cancel: string;
437
+ confirm: string;
438
+ addOption: string;
439
+ addColumn: string;
440
+ addTab: string;
441
+ upload: string;
442
+ add: string;
443
+ enabledEdit: string;
444
+ disabledEdit: string;
445
+ };
446
+ config: {
447
+ width: string;
448
+ height: string;
449
+ title: string;
450
+ labelWidth: string;
451
+ labelAlign: string;
452
+ labelAlignLeft: string;
453
+ labelAlignRight: string;
454
+ labelAlignTop: string;
455
+ size: string;
456
+ customClass: string;
457
+ };
458
+ };
459
+ };
460
+ };
461
+
462
+ /** 日志 */
463
+ export declare function log(...args: any[]): void;
464
+
465
+ export declare function mergeConfig(defaults: RecordAny, overrides: RecordAny, isRoot?: boolean): RecordAny;
466
+
467
+ /** omit object */
468
+ export declare function omitObject<T extends RecordAny>(obj: T, keys?: string | string[]): T;
469
+
470
+ export declare const OrchiskyPrint: DefineComponent<{
471
+ data: {
472
+ type: ObjectConstructor;
473
+ };
474
+ }, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
475
+ data: {
476
+ type: ObjectConstructor;
477
+ };
478
+ }>>, {}, {}>;
479
+
480
+ export declare const OrchiskySearch: __VLS_WithTemplateSlots_2< DefineComponent<{
481
+ loading: BooleanConstructor;
482
+ readonly: BooleanConstructor;
483
+ options: {
484
+ type: PropType<TypeSearchItem[]>;
485
+ default(): never[];
486
+ };
487
+ modelValue: {
488
+ type: ObjectConstructor;
489
+ default(): {};
490
+ };
491
+ size: {
492
+ type: StringConstructor;
493
+ default: string;
494
+ };
495
+ labelWidth: {
496
+ type: StringConstructor;
497
+ default: string;
498
+ };
499
+ inputWidth: {
500
+ type: StringConstructor;
501
+ default: string;
502
+ };
503
+ }, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
504
+ "update:model-value": (...args: any[]) => void;
505
+ onSearch: (...args: any[]) => void;
506
+ }, string, PublicProps, Readonly< ExtractPropTypes<{
507
+ loading: BooleanConstructor;
508
+ readonly: BooleanConstructor;
509
+ options: {
510
+ type: PropType<TypeSearchItem[]>;
511
+ default(): never[];
512
+ };
513
+ modelValue: {
514
+ type: ObjectConstructor;
515
+ default(): {};
516
+ };
517
+ size: {
518
+ type: StringConstructor;
519
+ default: string;
520
+ };
521
+ labelWidth: {
522
+ type: StringConstructor;
523
+ default: string;
524
+ };
525
+ inputWidth: {
526
+ type: StringConstructor;
527
+ default: string;
528
+ };
529
+ }>> & {
530
+ "onUpdate:model-value"?: ((...args: any[]) => any) | undefined;
531
+ onOnSearch?: ((...args: any[]) => any) | undefined;
532
+ }, {
533
+ options: TypeSearchItem[];
534
+ labelWidth: string;
535
+ size: string;
536
+ modelValue: Record<string, any>;
537
+ loading: boolean;
538
+ readonly: boolean;
539
+ inputWidth: string;
540
+ }, {}>, {
541
+ head?(_: {}): any;
542
+ default?(_: {}): any;
543
+ }>;
544
+
545
+ export declare const OrchiskyTable: __VLS_WithTemplateSlots< DefineComponent<{
546
+ title: StringConstructor;
547
+ /** auto(铺满父容器,必须确保存在父节点且不允许存在相邻元素 ,), %, px */
548
+ height: (StringConstructor | NumberConstructor)[];
549
+ /** 隐藏工具栏 */
550
+ hideToolbar: BooleanConstructor;
551
+ hidePagination: BooleanConstructor;
552
+ size: {
553
+ type: PropType<"small" | "mini" | "medium">;
554
+ default: string;
555
+ };
556
+ /** 用户选择列表 */
557
+ selectedKeys: {
558
+ type: ArrayConstructor;
559
+ default: () => never[];
560
+ };
561
+ /** 与 loadData 行为一致 */
562
+ data: {
563
+ type: ArrayConstructor;
564
+ default: () => never[];
565
+ };
566
+ /** 配置文件 */
567
+ option: {
568
+ type: PropType<TableOptionType>;
569
+ default: () => {
570
+ columns: never[];
571
+ };
572
+ };
573
+ /** 用户保存数据钩子函数 */
574
+ hook: PropType<{
575
+ getColumn: () => Promise<[boolean, RecordAny_2[]]>;
576
+ setColumn: (list: RecordAny_2[]) => void;
577
+ }>;
578
+ }, {
579
+ getRowKey(): string;
580
+ getTableData(): RecordAny_2[];
581
+ getSelection(): RecordAny_2[];
582
+ getCheckboxKeySelection(keys?: string[] | undefined): RecordAny_2[];
583
+ getReserveSelection(): RecordAny_2[];
584
+ clearSelection(): void;
585
+ insertRow(record: RecordAny_2, row?: number | RecordAny_2 | undefined, isNext?: boolean | undefined): Promise<{
586
+ row: any;
587
+ rows: any;
588
+ }>;
589
+ removeRows(): void;
590
+ checkRows(list?: RecordAny_2[] | undefined): Promise<[string, RecordAny_2[]]>;
591
+ getRowSeq(row: any): string | number;
592
+ getRowIndex(row: any): number;
593
+ removerRowIndex(rowIndex: number): void; /** 未修改之前的数据 */
594
+ loading: Ref<boolean>;
595
+ setLoading: typeof setLoading;
596
+ /** 执行搜索 ,是否返回第一页 */
597
+ dataInit(isFirst?: boolean | undefined): Promise<void>;
598
+ /** 加载数据 */
599
+ loadData(list: any[]): void;
600
+ }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
601
+ onReset: (...args: any[]) => void;
602
+ change: (...args: any[]) => void;
603
+ "update:selectedKeys": (...args: any[]) => void;
604
+ cellClick: (...args: any[]) => void;
605
+ confirm: (...args: any[]) => void;
606
+ }, string, PublicProps, Readonly< ExtractPropTypes<{
607
+ title: StringConstructor;
608
+ /** auto(铺满父容器,必须确保存在父节点且不允许存在相邻元素 ,), %, px */
609
+ height: (StringConstructor | NumberConstructor)[];
610
+ /** 隐藏工具栏 */
611
+ hideToolbar: BooleanConstructor;
612
+ hidePagination: BooleanConstructor;
613
+ size: {
614
+ type: PropType<"small" | "mini" | "medium">;
615
+ default: string;
616
+ };
617
+ /** 用户选择列表 */
618
+ selectedKeys: {
619
+ type: ArrayConstructor;
620
+ default: () => never[];
621
+ };
622
+ /** 与 loadData 行为一致 */
623
+ data: {
624
+ type: ArrayConstructor;
625
+ default: () => never[];
626
+ };
627
+ /** 配置文件 */
628
+ option: {
629
+ type: PropType<TableOptionType>;
630
+ default: () => {
631
+ columns: never[];
632
+ };
633
+ };
634
+ /** 用户保存数据钩子函数 */
635
+ hook: PropType<{
636
+ getColumn: () => Promise<[boolean, RecordAny_2[]]>;
637
+ setColumn: (list: RecordAny_2[]) => void;
638
+ }>;
639
+ }>> & {
640
+ onChange?: ((...args: any[]) => any) | undefined;
641
+ onOnReset?: ((...args: any[]) => any) | undefined;
642
+ "onUpdate:selectedKeys"?: ((...args: any[]) => any) | undefined;
643
+ onCellClick?: ((...args: any[]) => any) | undefined;
644
+ onConfirm?: ((...args: any[]) => any) | undefined;
645
+ }, {
646
+ data: unknown[];
647
+ option: TableOptionType;
648
+ size: "small" | "mini" | "medium";
649
+ hideToolbar: boolean;
650
+ hidePagination: boolean;
651
+ selectedKeys: unknown[];
652
+ }, {}>, {
653
+ default?(_: {}): any;
654
+ tools?(_: {}): any;
655
+ cell?(_: {
656
+ record: any;
657
+ dataIndex: string;
658
+ rowIndex: number;
659
+ columnIndex: number;
660
+ value: any;
661
+ updateValue: (value: any) => void;
662
+ formatValue: any;
663
+ }): any;
664
+ footer?(_: {}): any;
665
+ }>;
666
+
667
+ export declare type RecordAny = Record<string, any>;
668
+
669
+ declare type RecordAny_2 = Record<string, any>;
670
+
671
+ /**
672
+ * set path object
673
+ * @example
674
+ * ```
675
+ * var b = {a:{b:1}}
676
+ * setData(b,'a.b',2)
677
+ * // {a:{b:2}}
678
+ * ```
679
+ */
680
+ export declare function setData(object: RecordAny, path: string, defaultValue?: any): RecordAny;
681
+
682
+ declare function setLoading(val?: boolean): void;
683
+
684
+ /** column type */
685
+ declare interface TableColumnType extends RecordAny_2 {
686
+ show?: boolean;
687
+ dataIndex: string;
688
+ title?: string;
689
+ width?: number;
690
+ sort?: boolean;
691
+ /** 开启编辑 */
692
+ cell?: boolean;
693
+ /** 影响性能 cell = true 有效 只显示编辑内容 */
694
+ div?: boolean;
695
+ /** 没内容时候得提示 */
696
+ placeholder?: string;
697
+ tooltip?: boolean;
698
+ ellipsis?: boolean;
699
+ align?: VxeColumnPropTypes.Align;
700
+ headerAlign?: VxeColumnPropTypes.HeaderAlign;
701
+ footerAlign?: VxeColumnPropTypes.FooterAlign;
702
+ format?: (val: any, record?: RecordAny_2) => string;
703
+ style?: CssType | ((record: RecordAny_2) => CssType);
704
+ /** 同 :title-prefix "{ content: '必填', icon: 'vxe-cell--required-icon' }" */
705
+ help?: VxeColumnPropTypes.TitlePrefix;
706
+ filters?: VxeColumnPropTypes.Filter[];
707
+ filterMultiple?: VxeColumnPropTypes.FilterMultiple;
708
+ filterMethod?: VxeColumnPropTypes.FilterMethod;
709
+ }
710
+
711
+ /**
712
+ * table option type
713
+ * @example
714
+ * ```ts
715
+ * {
716
+ * scrollX: { enabled: true },
717
+ * scrollY: { enabled: true },
718
+ * columns: [
719
+ * { dataIndex: 'index', title: '序', width: 26 },
720
+ * ]
721
+ * }
722
+ * ```
723
+ */
724
+ export declare interface TableOptionType extends RecordAny_2 {
725
+ /** 请求地址 */
726
+ useErrData?: <T = RecordAny_2>(config: RecordAny_2) => Promise<[boolean, T]>;
727
+ url?: string;
728
+ /** 请求类型 */
729
+ method?: 'GET' | 'POST' | 'PUT' | 'DELETE';
730
+ /** 是否保留多选状态 */
731
+ reserve?: boolean;
732
+ /** 原 checkbox-config.checkField 在行中存储 bool 值,不存在则无效 */
733
+ checkKey?: string;
734
+ /** 行主键[自动生成] */
735
+ rowKey?: string;
736
+ /** 多选时 同kay选择 */
737
+ checkboxKey?: string;
738
+ /** 自定义列 同 resolveColumns() */
739
+ columns: TableColumnType[];
740
+ /** 默认分页条数 */
741
+ pageSize?: number;
742
+ /** 默认分页列表 */
743
+ pageSizeOptions?: number[];
744
+ /** 开启行选中 */
745
+ selectedType?: 'checkbox' | 'radio';
746
+ /** 行必填数据 指定 [dataIndex] */
747
+ requiredKeys?: string[];
748
+ /** 表单组件第一次自动请求接口 */
749
+ firstLoad?: boolean;
750
+ /** 原来 show-overflow ellipsis(只显示省略号), title(并且显示为原生 title), tooltip(并且显示为 tooltip 提示) */
751
+ tooltip?: ('ellipsis' | 'title' | 'tooltip') | boolean;
752
+ /** 原来 show-footer-overflow ellipsis(只显示省略号), title(并且显示为原生 title), tooltip(并且显示为 tooltip 提示) */
753
+ footerTooltip?: ('ellipsis' | 'title' | 'tooltip') | boolean;
754
+ /** 给表头单元添加 style : ({ column, columnIndex })=> {} , dataIndex as column.property */
755
+ headerStyle?: (record: RecordAny_2 & {
756
+ column: {
757
+ property: string;
758
+ } & RecordAny_2;
759
+ }) => CssType;
760
+ /** 给表尾单元添加 style : any | (({ $rowIndex, column, columnIndex, $columnIndex }) => any) */
761
+ footerStyle?: (record: RecordAny_2 & {
762
+ column: {
763
+ property: string;
764
+ } & RecordAny_2;
765
+ }) => CssType;
766
+ /** 表尾的数据获取方法,返回一个二维数组 (columns, data) => string[][] */
767
+ footerMethod?: VxeTablePropTypes.FooterMethod;
768
+ /** 同 merge-footer-items 临时合并表尾 (不能用于展开行,不建议用于固定列、树形结构) */
769
+ mergeFooter?: VxeTablePropTypes.MergeFooterItems;
770
+ /** 自定义列 同 columns */
771
+ resolveColumns?: (columns?: TableColumnType[]) => TableColumnType[];
772
+ /** 请求超时时间 */
773
+ timeout?: number;
774
+ /** 静态参数 */
775
+ data?: RecordAny_2;
776
+ /** 自定义分页 */
777
+ resolvePage?: (page?: RecordAny_2) => any;
778
+ /** 自定义数据 */
779
+ resolveData?: (data: RecordAny_2, page?: RecordAny_2) => RecordAny_2[];
780
+ /** 数据请求成功 */
781
+ success?: (data?: any) => void;
782
+ /** 数据请求失败 */
783
+ error?: (data?: any) => void;
784
+ /** 开启重复行省略 group by */
785
+ skinRow?: string;
786
+ /** 非重复行且未被跳过的样式 */
787
+ skinRowStyle?: CssType;
788
+ /** 重复行显示内容 */
789
+ skinRowText?: string;
790
+ /** 同 edit-rules , demo : { sex: [ { required: true, message: '性别必须填写' } ] } */
791
+ rules?: VxeTablePropTypes.EditRules;
792
+ /** 数据筛选 {remote:服务器筛选 ,filterMethod :({ options, values, cellValue, row, column }) => boolean } */
793
+ filterConfig?: VxeTablePropTypes.FilterConfig;
794
+ /** 横向虚拟滚动配置 { enabled, gt } */
795
+ scrollX?: VxeTablePropTypes.ScrollX;
796
+ /** 纵向虚拟滚动配置 { enabled, gt } */
797
+ scrollY?: VxeTablePropTypes.ScrollY;
798
+ }
799
+
800
+ /** array */
801
+ export declare function toArray<T>(target: T | T[]): T[];
802
+
803
+ /** 读取数据类型 */
804
+ export declare function typeName(o: unknown): string;
805
+
806
+ declare interface TypeSearchItem extends RecordAny {
807
+ /** input 类型 */
808
+ type?: string;
809
+ /** 同form [name] */
810
+ name: string;
811
+ /** 标签名称 */
812
+ label: string;
813
+ /** 初始值 */
814
+ defaultValue?: string | boolean | number | string[];
815
+ /** 默认是显示 */
816
+ show?: boolean;
817
+ /** type =number 最小值 */
818
+ min?: number;
819
+ /** type =number 最大值 */
820
+ max?: number;
821
+ /** type=select | type=date */
822
+ multiple?: boolean;
823
+ /** type=select */
824
+ options?: {
825
+ label: string;
826
+ value: string;
827
+ disabled?: boolean;
828
+ }[];
829
+ /** type=date */
830
+ format?: string;
831
+ /** type=date */
832
+ showTime?: boolean;
833
+ /** 必填 */
834
+ required?: boolean;
835
+ /** 表单验证 */
836
+ rules?: RecordAny | RecordAny[];
837
+ }
838
+
839
+ /**
840
+ * @example
841
+ * ```
842
+ * {type:'input', name: 'name', label: '角色名称' },
843
+ * {
844
+ * type: 'select',
845
+ * name: 'select1',
846
+ * defaultValue: '1',
847
+ * label: '下垃框1',
848
+ * required,
849
+ * options: [
850
+ * { label: '下拉1', value: '1' },
851
+ * { label: '下拉2', value: '2' },
852
+ * { label: '下拉3', value: '3' },
853
+ * ],
854
+ * },
855
+ * { type: 'date', name: 'd2', label: '日期范围', multiple: true, defaultValue: '2024-07-01,2024-08-07' },
856
+ * ```
857
+ */
858
+ export declare function useOrchiskySearch(list: TypeSearchItem[]): readonly [ Ref<{
859
+ [x: string]: any;
860
+ type?: string | undefined;
861
+ name: string;
862
+ label: string;
863
+ defaultValue?: string | number | boolean | string[] | undefined;
864
+ show?: boolean | undefined;
865
+ min?: number | undefined;
866
+ max?: number | undefined;
867
+ multiple?: boolean | undefined;
868
+ options?: {
869
+ label: string;
870
+ value: string;
871
+ disabled?: boolean | undefined;
872
+ }[] | undefined;
873
+ format?: string | undefined;
874
+ showTime?: boolean | undefined;
875
+ required?: boolean | undefined;
876
+ rules?: RecordAny | RecordAny[] | undefined;
877
+ }[]>, Ref<RecordAny>];
878
+
879
+ export declare const useOrchiskyVxe: (option: TableOptionType) => {
880
+ tableRef: Ref<{
881
+ [x: string]: any;
882
+ loading: boolean;
883
+ setLoading: (loading?: boolean | undefined) => void;
884
+ dataInit: () => Promise<void>;
885
+ loadData: (list: RecordAny_2[]) => void;
886
+ getRowKey: () => string;
887
+ getTableData: () => RecordAny_2[];
888
+ getSelection: () => RecordAny_2[];
889
+ getCheckboxKeySelection: (keys?: string[] | undefined) => RecordAny_2[];
890
+ getReserveSelection: () => RecordAny_2[];
891
+ clearSelection: () => void;
892
+ insertRow: (record: RecordAny_2, row?: number | RecordAny_2 | undefined, isNext?: boolean | undefined) => Promise<{
893
+ row: any;
894
+ rows: any;
895
+ }>;
896
+ removeRows: () => void;
897
+ checkRows: (list?: RecordAny_2[] | undefined) => Promise<[string, RecordAny_2[]]>;
898
+ getRowSeq: (row: any) => string | number;
899
+ getRowIndex: (row: any) => number;
900
+ removerRowIndex: (rowIndex: number) => void;
901
+ }>;
902
+ tableOptions: {
903
+ ref: (el: any) => void;
904
+ useErrData?: (<T = RecordAny_2>(config: RecordAny_2) => Promise<[boolean, T]>) | undefined;
905
+ url?: string | undefined;
906
+ method?: "GET" | "POST" | "PUT" | "DELETE" | undefined;
907
+ reserve?: boolean | undefined;
908
+ checkKey?: string | undefined;
909
+ rowKey?: string | undefined;
910
+ checkboxKey?: string | undefined;
911
+ columns: TableColumnType[];
912
+ pageSize?: number | undefined;
913
+ pageSizeOptions?: number[] | undefined;
914
+ selectedType?: "radio" | "checkbox" | undefined;
915
+ requiredKeys?: string[] | undefined;
916
+ firstLoad?: boolean | undefined;
917
+ tooltip?: boolean | "title" | "tooltip" | "ellipsis" | undefined;
918
+ footerTooltip?: boolean | "title" | "tooltip" | "ellipsis" | undefined;
919
+ headerStyle?: ((record: RecordAny_2 & {
920
+ column: {
921
+ property: string;
922
+ } & RecordAny_2;
923
+ }) => CssType) | undefined;
924
+ footerStyle?: ((record: RecordAny_2 & {
925
+ column: {
926
+ property: string;
927
+ } & RecordAny_2;
928
+ }) => CssType) | undefined;
929
+ footerMethod?: VxeTablePropTypes<VxeTableDataRow> | undefined;
930
+ mergeFooter?: VxeTablePropTypes<VxeTableDataRow> | undefined;
931
+ resolveColumns?: ((columns?: TableColumnType[] | undefined) => TableColumnType[]) | undefined;
932
+ timeout?: number | undefined;
933
+ data?: RecordAny_2 | undefined;
934
+ resolvePage?: ((page?: RecordAny_2 | undefined) => any) | undefined;
935
+ resolveData?: ((data: RecordAny_2, page?: RecordAny_2 | undefined) => RecordAny_2[]) | undefined;
936
+ success?: ((data?: any) => void) | undefined;
937
+ error?: ((data?: any) => void) | undefined;
938
+ skinRow?: string | undefined;
939
+ skinRowStyle?: CssType | undefined;
940
+ skinRowText?: string | undefined;
941
+ rules?: VxeTablePropTypes<VxeTableDataRow> | undefined;
942
+ filterConfig?: VxeTablePropTypes<VxeTableDataRow> | undefined;
943
+ scrollX?: VxeTablePropTypes | undefined;
944
+ scrollY?: VxeTablePropTypes | undefined;
945
+ };
946
+ tableUtils: {
947
+ getRowKey(): string;
948
+ getTableData(): RecordAny_2[];
949
+ getSelection(): RecordAny_2[];
950
+ getCheckboxKeySelection(keys?: string[] | undefined): RecordAny_2[];
951
+ getReserveSelection(): RecordAny_2[];
952
+ clearSelection(): void;
953
+ insertRow(record: RecordAny_2, row?: number | RecordAny_2 | undefined, isNext?: boolean | undefined): Promise<{
954
+ row: any;
955
+ rows: any;
956
+ }>;
957
+ removeRows(): void;
958
+ checkRows(list?: RecordAny_2[] | undefined): Promise<[string, RecordAny_2[]]>;
959
+ getRowSeq(row: any): string | number;
960
+ getRowIndex(row: any): number;
961
+ removerRowIndex(rowIndex: number): void;
962
+ rowKey: string;
963
+ addKey(rowIndex: number): void;
964
+ setTableData(list: RecordAny_2[]): void;
965
+ setTableRow(rowIndex: number, dataIndex: string | RecordAny_2, value?: any): void;
966
+ };
967
+ $grid: Ref<{
968
+ [x: string]: any;
969
+ clearAll: () => Promise<void>;
970
+ syncData: () => Promise<void>;
971
+ updateData: () => Promise<void>;
972
+ loadData: (data: any[]) => Promise<any>;
973
+ reloadData: (data: any[]) => Promise<void>;
974
+ reloadRow: (rows: any, record?: any, field?: string | undefined) => Promise<void>;
975
+ loadTreeChildren: (row: any, children: any[]) => Promise<any[]>;
976
+ loadColumn: (columns: (VxeTableDefines.ColumnInfo<any> | VxeTableDefines.ColumnOptions<any>)[]) => Promise<any>;
977
+ reloadColumn: (columns: (VxeTableDefines.ColumnInfo<any> | VxeTableDefines.ColumnOptions<any>)[]) => Promise<any>;
978
+ getRowNode: (trElem: HTMLElement) => {
979
+ rowid: string;
980
+ item: any;
981
+ items: any[];
982
+ index: number;
983
+ parent?: any;
984
+ } | null;
985
+ getColumnNode: (cellElem: HTMLElement) => {
986
+ colid: string;
987
+ item: VxeTableDefines.ColumnInfo<VxeTableDataRow>;
988
+ items: VxeTableDefines.ColumnInfo<VxeTableDataRow>[];
989
+ index: number;
990
+ parent?: VxeTableDefines.ColumnInfo<VxeTableDataRow> | undefined;
991
+ } | null;
992
+ getRowSeq: (row: any) => string | number;
993
+ getRowIndex: (row: any) => number;
994
+ getVTRowIndex: (row: any) => number;
995
+ getVMRowIndex: (row: any) => number;
996
+ getColumnIndex: (column: VxeTableDefines.ColumnInfo<any>) => number;
997
+ getVTColumnIndex: (column: VxeTableDefines.ColumnInfo<any>) => number;
998
+ getVMColumnIndex: (column: VxeTableDefines.ColumnInfo<any>) => number;
999
+ createData: (records: any[]) => Promise<any[]>;
1000
+ createRow: (records: any) => Promise<any>;
1001
+ revertData: (rows?: any, field?: string | undefined) => Promise<any>;
1002
+ clearData: (rows?: any, field?: string | undefined) => Promise<any>;
1003
+ isInsertByRow: (row: any) => boolean;
1004
+ removeInsertRow: () => Promise<{
1005
+ row: any;
1006
+ rows: any[];
1007
+ }>;
1008
+ isUpdateByRow: (row: any, field?: string | null | undefined) => boolean;
1009
+ getColumns: {
1010
+ (): VxeTableDefines.ColumnInfo<VxeTableDataRow>[];
1011
+ (columnIndex?: number | undefined): VxeTableDefines.ColumnInfo<VxeTableDataRow>;
1012
+ };
1013
+ getColumnById: (colid: string | null) => VxeTableDefines.ColumnInfo<VxeTableDataRow> | null;
1014
+ getColumnByField: (field: string | null) => VxeTableDefines.ColumnInfo<VxeTableDataRow> | null;
1015
+ getTableColumn: () => {
1016
+ collectColumn: VxeTableDefines.ColumnInfo<VxeTableDataRow>[];
1017
+ fullColumn: VxeTableDefines.ColumnInfo<VxeTableDataRow>[];
1018
+ visibleColumn: VxeTableDefines.ColumnInfo<VxeTableDataRow>[];
1019
+ tableColumn: VxeTableDefines.ColumnInfo<VxeTableDataRow>[];
1020
+ };
1021
+ getData: {
1022
+ (): VxeTableDataRow[];
1023
+ (rowIndex: number): VxeTableDataRow;
1024
+ };
1025
+ getCheckboxRecords: (isFull?: boolean | undefined) => VxeTableDataRow[];
1026
+ getParentRow: (rowOrRowid: any) => VxeTableDataRow | null;
1027
+ getRowById: (rowid: string | number | null) => VxeTableDataRow | null;
1028
+ getRowid: (row: any) => string;
1029
+ getTableData: () => {
1030
+ fullData: VxeTableDataRow[];
1031
+ visibleData: VxeTableDataRow[];
1032
+ tableData: VxeTableDataRow[];
1033
+ footerData: VxeTableDataRow[][];
1034
+ };
1035
+ setColumnFixed: (fieldOrColumn: string | VxeTableDefines.ColumnInfo<any>, fixed: VxeColumnPropTypes) => Promise<void>;
1036
+ clearColumnFixed: (fieldOrColumn: string | VxeTableDefines.ColumnInfo<any>) => Promise<void>;
1037
+ hideColumn: (fieldOrColumn: string | VxeTableDefines.ColumnInfo<any>) => Promise<void>;
1038
+ showColumn: (fieldOrColumn: string | VxeTableDefines.ColumnInfo<any>) => Promise<void>;
1039
+ setColumnWidth: (fieldOrColumn: string | VxeTableDefines.ColumnInfo<any>, width: string | number) => Promise<void>;
1040
+ getColumnWidth: (fieldOrColumn: string | VxeTableDefines.ColumnInfo<any>) => number;
1041
+ resetColumn: (options?: boolean | {
1042
+ visible?: boolean | undefined;
1043
+ resizable?: boolean | undefined;
1044
+ fixed?: boolean | undefined;
1045
+ order?: boolean | undefined;
1046
+ } | undefined) => Promise<void>;
1047
+ refreshColumn: (resiveOrder?: boolean | undefined) => Promise<void>;
1048
+ refreshScroll: () => Promise<void>;
1049
+ recalculate: (refull?: boolean | undefined) => Promise<void>;
1050
+ openTooltip: (target: HTMLElement, content: string | number) => Promise<any>;
1051
+ closeTooltip: () => Promise<any>;
1052
+ setCheckboxRow: (rows: any, checked: boolean) => Promise<any>;
1053
+ isAllCheckboxChecked: () => boolean;
1054
+ isAllCheckboxIndeterminate: () => boolean;
1055
+ isCheckedByCheckboxRow: (row: any) => boolean;
1056
+ isIndeterminateByCheckboxRow: (row: any) => boolean;
1057
+ toggleCheckboxRow: (row: any) => Promise<any>;
1058
+ setAllCheckboxRow: (checked: boolean) => Promise<any>;
1059
+ getRadioReserveRecord: (isFull?: boolean | undefined) => any[];
1060
+ clearRadioReserve: () => Promise<any>;
1061
+ getCheckboxReserveRecords: (isFull?: boolean | undefined) => any[];
1062
+ getCheckboxIndeterminateRecords: (isFull?: boolean | undefined) => any[];
1063
+ clearCheckboxReserve: () => Promise<any>;
1064
+ toggleAllCheckboxRow: () => Promise<any>;
1065
+ clearCheckboxRow: () => Promise<any>;
1066
+ setCurrentRow: (row: any) => Promise<any>;
1067
+ isCheckedByRadioRow: (row: any) => boolean;
1068
+ setRadioRow: (row: any) => Promise<any>;
1069
+ setPendingRow: (rows: any, status: boolean) => Promise<any>;
1070
+ togglePendingRow: (rows: any) => Promise<any>;
1071
+ getPendingRecords: () => VxeTableDataRow[];
1072
+ hasPendingByRow: (row: any) => boolean;
1073
+ clearPendingRow: () => Promise<any>;
1074
+ clearMergeCells: () => Promise<any>;
1075
+ clearMergeFooterItems: () => Promise<any>;
1076
+ clearCurrentRow: () => Promise<any>;
1077
+ clearRadioRow: () => Promise<any>;
1078
+ getMergeCells: () => VxeTableDefines.MergeInfo[];
1079
+ getMergeFooterItems: () => VxeTableDefines.MergeInfo[];
1080
+ getCurrentColumn: () => VxeTableDefines.ColumnInfo<VxeTableDataRow> | null;
1081
+ getCurrentRecord: () => VxeTableDataRow | null;
1082
+ getRadioRecord: (isFull?: boolean | undefined) => VxeTableDataRow | null;
1083
+ setCurrentColumn: (fieldOrColumn: string | VxeTableDefines.ColumnInfo<any>) => Promise<void>;
1084
+ clearCurrentColumn: () => Promise<void>;
1085
+ sort: {
1086
+ (field: string, order?: VxeTablePropTypes | undefined): Promise<void>;
1087
+ (sortConfs: VxeTableDefines.SortConfs, order?: VxeTablePropTypes | undefined): Promise<void>;
1088
+ (sortConfs: VxeTableDefines.SortConfs[], order?: VxeTablePropTypes | undefined): Promise<void>;
1089
+ };
1090
+ clearSort: (fieldOrColumn?: string | VxeTableDefines.ColumnInfo<any> | null | undefined) => Promise<void>;
1091
+ isSort: (fieldOrColumn: string | VxeTableDefines.ColumnInfo<any>) => boolean;
1092
+ getSortColumns: () => VxeTableDefines.SortCheckedParams<VxeTableDataRow>[];
1093
+ closeFilter: () => Promise<any>;
1094
+ isFilter: (fieldOrColumn: string | VxeTableDefines.ColumnInfo<any> | null) => boolean;
1095
+ isActiveFilterByColumn: (fieldOrColumn: string | VxeTableDefines.ColumnInfo<any> | null) => boolean;
1096
+ isRowExpandLoaded: (row: any) => boolean;
1097
+ clearRowExpandLoaded: (row: any) => Promise<void>;
1098
+ reloadRowExpand: (row: any) => Promise<void>;
1099
+ reloadExpandContent: (row: any) => Promise<void>;
1100
+ toggleRowExpand: (row: any) => Promise<void>;
1101
+ setAllRowExpand: (checked: boolean) => Promise<void>;
1102
+ setRowExpand: (rows: any, checked: boolean) => Promise<void>;
1103
+ isRowExpandByRow: (row: any) => boolean;
1104
+ isExpandByRow: (row: any) => boolean;
1105
+ clearRowExpand: () => Promise<void>;
1106
+ clearRowExpandReserve: () => Promise<void>;
1107
+ getRowExpandRecords: () => VxeTableDataRow[];
1108
+ getTreeExpandRecords: () => VxeTableDataRow[];
1109
+ isTreeExpandLoaded: (row: any) => boolean;
1110
+ clearTreeExpandLoaded: (row: any) => Promise<any>;
1111
+ reloadTreeExpand: (row: any) => Promise<any>;
1112
+ reloadTreeChilds: (row: any) => Promise<any>;
1113
+ toggleTreeExpand: (row: any) => Promise<any>;
1114
+ setAllTreeExpand: (checked: boolean) => Promise<void>;
1115
+ setTreeExpand: (rows: any, checked: boolean) => Promise<void>;
1116
+ isTreeExpandByRow: (row: any) => boolean;
1117
+ clearTreeExpand: () => Promise<void>;
1118
+ clearTreeExpandReserve: () => Promise<void>;
1119
+ getScroll: () => {
1120
+ virtualX: boolean;
1121
+ virtualY: boolean;
1122
+ scrollTop: number;
1123
+ scrollLeft: number;
1124
+ };
1125
+ scrollTo: (scrollLeft: number | null, scrollTop?: number | null | undefined) => Promise<void>;
1126
+ scrollToRow: (row: any, fieldOrColumn?: string | VxeTableDefines.ColumnInfo<any> | undefined) => Promise<any>;
1127
+ scrollToColumn: (fieldOrColumn: string | VxeTableDefines.ColumnInfo<any>) => Promise<any>;
1128
+ clearScroll: () => Promise<any>;
1129
+ updateFooter: () => Promise<any>;
1130
+ updateStatus: (params: {
1131
+ row: VxeTableDataRow;
1132
+ column: VxeTableDefines.ColumnInfo<VxeTableDataRow>;
1133
+ }, cellValue?: any) => Promise<any>;
1134
+ removeMergeCells: (merges: VxeTableDefines.MergeOptions<any> | VxeTableDefines.MergeOptions<any>[]) => Promise<VxeTableDefines.MergeInfo[]>;
1135
+ removeMergeFooterItems: (merges: VxeTableDefines.MergeOptions<any> | VxeTableDefines.MergeOptions<any>[]) => Promise<VxeTableDefines.MergeInfo[]>;
1136
+ setMergeCells: (merges: VxeTableDefines.MergeOptions<any> | VxeTableDefines.MergeOptions<any>[]) => Promise<any>;
1137
+ setMergeFooterItems: (merges: VxeTableDefines.MergeOptions<any> | VxeTableDefines.MergeOptions<any>[]) => Promise<any>;
1138
+ updateCellAreas: () => Promise<void>;
1139
+ connect: (toolbar: VxeToolbarConstructor | VxeToolbarInstance) => Promise<void>;
1140
+ focus: () => Promise<void>;
1141
+ blur: () => Promise<void>;
1142
+ }>;
1143
+ selectedKeys: Ref<string[]>;
1144
+ };
1145
+
1146
+ export { }