-
Notifications
You must be signed in to change notification settings - Fork 383
Expand file tree
/
Copy pathtype.ts
More file actions
958 lines (918 loc) · 21.6 KB
/
type.ts
File metadata and controls
958 lines (918 loc) · 21.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
/* eslint-disable */
/**
* 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
* */
import { GlobalIconConfig } from 'tdesign-icons-vue';
import { CalendarController } from '../calendar';
import { ButtonProps } from '../button';
import { FormErrorMessage } from '../form';
import { MessageOptions } from '../message';
import { ImageProps } from '../image';
import { TNode, SizeEnum, AttachNode } from '../common';
export interface GlobalConfigProvider {
/**
* 警告全局配置
*/
alert?: AlertConfig;
/**
* 锚点全局配置
*/
anchor?: AnchorConfig;
/**
* 动画效果控制,`ripple` 指波纹动画, `expand` 指展开动画,`fade` 指渐变动画。默认为 `{ include: ['ripple','expand','fade'], exclude: [] }`
*/
animation?: Partial<Record<'include' | 'exclude', Array<AnimationType>>>;
/**
* null
*/
attach?: AttachNode | { imageViewer?: AttachNode; popup?: AttachNode; dialog?: AttachNode; drawer?: AttachNode };
/**
* 日历组件全局配置
*/
calendar?: CalendarConfig;
/**
* 级联选择器全局配置
*/
cascader?: CascaderConfig;
/**
* CSS 类名前缀
* @default t
*/
classPrefix?: string;
/**
* 颜色选择器全局配置
*/
colorPicker?: ColorPickerConfig;
/**
* 日期选择器全局配置
*/
datePicker?: DatePickerConfig;
/**
* 描述全局配置
*/
descriptions?: DescriptionsConfig;
/**
* 对话框全局配置
*/
dialog?: DialogConfig;
/**
* 抽屉全局配置
*/
drawer?: DrawerConfig;
/**
* 空状态全局配置
*/
empty?: EmptyConfig;
/**
* 表单组件全局配置
*/
form?: FormConfig;
/**
* 引导全局配置
*/
guide?: GuideConfig;
/**
* 图标全局配置
*/
icon?: IconConfig;
/**
* 图片全局配置
*/
image?: ImageConfig;
/**
* 图片预览器全局配置
*/
imageViewer?: ImageViewerConfig;
/**
* 输入框组件全局配置
*/
input?: InputConfig;
/**
* 列表组件全局配置
*/
list?: ListConfig;
/**
* 消息组件全局配置
*/
message?: MessageConfig;
/**
* 分页组件全局配置
*/
pagination?: PaginationConfig;
/**
* 气泡确认框全局配置
*/
popconfirm?: PopconfirmConfig;
/**
* 评分全局配置
*/
rate?: RateConfig;
/**
* 选择器组件全局配置
*/
select?: SelectConfig;
/**
* 步骤条组件全局配置
*/
steps?: StepsConfig;
/**
* 表格组件全局配置
*/
table?: TableConfig;
/**
* 标签全局配置
*/
tag?: TagConfig;
/**
* 时间选择器全局配置
*/
timePicker?: TimePickerConfig;
/**
* 穿梭框全局配置
*/
transfer?: TransferConfig;
/**
* 树组件全局配置
*/
tree?: TreeConfig;
/**
* 树选择器组件全局配置
*/
treeSelect?: TreeSelectConfig;
/**
* 上传组件全局配置
*/
upload?: UploadConfig;
}
export interface InputConfig {
/**
* 是否开启自动填充功能
* @default ''
*/
autocomplete?: string;
/**
* 语言配置,“请输入”占位符描述文本
* @default ''
*/
placeholder?: string;
}
export interface PaginationConfig {
/**
* 语言配置,每页条数文本,示例:`'{size} 条/页'`
* @default ''
*/
itemsPerPage?: string;
/**
* 语言配置,页码跳转文本,示例:'跳至'
* @default ''
*/
jumpTo?: string;
/**
* 语言配置,“页”描述文本
* @default ''
*/
page?: string;
/**
* 语言配置,数据总条数文本,示例:`'共 {total} 项数据'`
* @default ''
*/
total?: string;
}
export interface CalendarConfig {
/**
* 语言配置,月份描述文本,示例:'一月,二月,三月,四月,五月,六月,七月,八月,九月,十月,十一月,十二月'
* @default ''
*/
cellMonth?: string;
/**
* 日历右上角控制器按钮配置
*/
controllerConfig?: CalendarController;
/**
* 当日期数字小于 10 时,是否使用 '0' 填充
* @default true
*/
fillWithZero?: boolean;
/**
* 第一天从星期几开始
* @default 1
*/
firstDayOfWeek?: number;
/**
* 语言配置,“隐藏周末”描述文本
* @default ''
*/
hideWeekend?: string;
/**
* 语言配置,模式切换时的“月”描述文本
* @default ''
*/
monthRadio?: string;
/**
* 语言配置,\"月\"选择描述文本。示例:`'{month} 月'`
* @default ''
*/
monthSelection?: string;
/**
* 语言配置,“显示周末”描述文本
* @default ''
*/
showWeekend?: string;
/**
* 语言配置,“本月”描述文本
* @default ''
*/
thisMonth?: string;
/**
* 语言配置,“今天”描述文本
* @default ''
*/
today?: string;
/**
* 语言配置,星期描述文本,示例:`'周一,周二,周三,周四,周五,周六,周日'`
* @default ''
*/
week?: string;
/**
* 语言配置,模式切换时的“年”描述文本
* @default ''
*/
yearRadio?: string;
/**
* 语言配置,“年”选择描述文本,示例:`'{year} 年'`
* @default ''
*/
yearSelection?: string;
}
export interface CascaderConfig {
/**
* 语言配置,“暂无数据”描述文本
* @default ''
*/
empty?: string;
/**
* 语言配置,“加载中”描述文本
* @default ''
*/
loadingText?: string;
/**
* 语言配置,“请选择”占位描述文本
* @default ''
*/
placeholder?: string;
}
export interface ColorPickerConfig {
/**
* 语言配置,“确定清空最近使用的颜色吗?”清空颜色确认文案
* @default ''
*/
clearConfirmText?: string;
/**
* 语言配置,“最近使用颜色” 区域标题文本
* @default ''
*/
recentColorTitle?: string;
/**
* 语言配置,\"系统预设颜色\" 区域标题文本
* @default ''
*/
swatchColorTitle?: string;
}
export interface TransferConfig {
/**
* 语言配置,“暂无数据”空数据描述文本
* @default ''
*/
empty?: string;
/**
* 语言配置,“请输入关键词搜索”占位符描述文本
* @default ''
*/
placeholder?: string;
/**
* 语言配置,穿梭框标题描述文本,示例:“{checked} / {total} 项”
* @default ''
*/
title?: string;
}
export interface TimePickerConfig {
/**
* 语言配置,“上午”描述文本
* @default ''
*/
anteMeridiem?: string;
/**
* 语言配置,“确定”描述文本
* @default ''
*/
confirm?: string;
/**
* 语言配置,“此刻”描述文本
* @default ''
*/
now?: string;
/**
* 语言配置,\"请选择时间\"占位符描述文本
* @default ''
*/
placeholder?: string;
/**
* 语言配置,“下午”描述文本
* @default ''
*/
postMeridiem?: string;
}
export interface DatePickerConfig {
/**
* 语言配置,“确定” 描述文本
* @default ''
*/
confirm?: string;
/**
* 语言配置,“日” 描述文本
* @default ''
*/
dayAriaLabel?: string;
/**
* dayjs 语言国际化配置
* @default ''
*/
dayjsLocale?: string;
/**
* 日期方向,'ltr' 表示从左往右
* @default 'ltr'
*/
direction?: string;
/**
* 第一天从星期几开始
* @default 7
*/
firstDayOfWeek?: number;
/**
* 日期格式化规则
* @default 'YYYY-MM-DD'
*/
format?: string;
/**
* 语言配置,“月” 描述文本
* @default ''
*/
monthAriaLabel?: string;
/**
* 星期文本描述,默认值:['1 月', '2 月', '3 月', '4 月', '5 月', '6 月', '7 月', '8 月', '9 月', '10 月', '11 月', '12 月']
*/
months?: string[];
/**
* 语言配置,“下个十年” 描述文本
* @default ''
*/
nextDecade?: string;
/**
* 语言配置,“下个月” 描述文本
* @default ''
*/
nextMonth?: string;
/**
* 语言配置,“下一年” 描述文本
* @default ''
*/
nextYear?: string;
/**
* 语言配置,“此刻” 描述文本
* @default ''
*/
now?: string;
/**
* 占位符文本提示,默认值:`{ date: '请选择日期', month: '请选择月份', year: '请选择年份' }`
*/
placeholder?: { date?: string; month?: string; year?: string };
/**
* 语言配置,“上个十年” 描述文本
* @default ''
*/
preDecade?: string;
/**
* 语言配置,“上个月” 描述文本
* @default ''
*/
preMonth?: string;
/**
* 语言配置,“上一年” 描述文本
* @default ''
*/
preYear?: string;
/**
* 【暂不支持,讨论确认中】预设快捷日期选择,示例:`{ '元旦': '2021-01-01', '昨天': dayjs().subtract(1, 'day').format('YYYY-MM-DD'), '特定日期': () => ['2021-02-01'] }`
*/
presets?: ConfigPresetDate;
/**
* 季度文本描述,默认值:['1 季度', '2 季度', '3 季度', '4 季度']
*/
quarters?: string[];
/**
* 语言配置,“ 至 ” 范围分隔符描述文本,示例:' ~ '
* @default ''
*/
rangeSeparator?: string;
/**
* 语言配置,“选择日期” 描述文本
* @default ''
*/
selectDate?: string;
/**
* 语言配置,“选择时间” 描述文本
* @default ''
*/
selectTime?: string;
/**
* 语言配置,“周” 描述文本
* @default ''
*/
weekAbbreviation?: string;
/**
* 星期文本描述,默认值:['日', '一', '二', '三', '四', '五', '六']
*/
weekdays?: string[];
/**
* 语言配置,“年” 描述文本
* @default ''
*/
yearAriaLabel?: string;
}
export interface DialogConfig {
/**
* 取消按钮风格
*/
cancel?: string | ButtonProps;
/**
* 按下 ESC 时是否触发对话框关闭事件
* @default true
*/
closeOnEscKeydown?: boolean;
/**
* 点击蒙层时是否触发关闭事件
* @default true
*/
closeOnOverlayClick?: boolean;
/**
* 确认按钮风格
*/
confirm?: string | ButtonProps;
/**
* 确认按钮主题色,即 Dialog 的 `theme` 和 确认按钮的 `theme` 映射关系。示例:{ danger: 'danger' }
*/
confirmBtnTheme?: { default: string; info: string; warning: string; danger: string; success: string };
}
export interface DrawerConfig {
/**
* 语言配置,“取消”描述文本
* @default ''
*/
cancel?: string | ButtonProps;
/**
* 按下 ESC 时是否触发抽屉关闭事件
* @default true
*/
closeOnEscKeydown?: boolean;
/**
* 点击蒙层时是否触发关闭事件
* @default true
*/
closeOnOverlayClick?: boolean;
/**
* 语言配置,“确认”描述文本
* @default ''
*/
confirm?: string | ButtonProps;
/**
* 尺寸配置,配置Drawer尺寸
* @default 'small'
*/
size?: string;
}
export interface PopconfirmConfig {
/**
* 语言配置,“取消”描述文本
*/
cancel?: string | ButtonProps;
/**
* 语言配置,“确定”描述文本
*/
confirm?: string | ButtonProps;
/**
* 确认按钮主题色,即 Popconfirm 的 `theme` 和 确认按钮的 `theme` 映射关系。示例:{ danger: 'danger' }
*/
confirmBtnTheme?: { default: string; warning: string; danger: string };
}
export interface TableConfig {
/**
* 语言配置,“取消” 描述文本
* @default ''
*/
cancelText?: string;
/**
* 语言配置,过滤功能中,“清空筛选” 描述文本
* @default ''
*/
clearFilterResultButtonText?: string;
/**
* 语言配置,列配置功能中,“列配置” 按钮描述文本
* @default ''
*/
columnConfigButtonText?: string;
/**
* 语言配置,“请选择需要在表格中显示的数据列” 描述文本,列配置功能中弹框顶部描述
* @default ''
*/
columnConfigDescriptionText?: string;
/**
* 语言配置,“表格列配置” 描述文本,列配置功能中弹框的标题
* @default ''
*/
columnConfigTitleText?: string;
/**
* 语言配置,“确认” 描述文本
* @default ''
*/
confirmText?: string;
/**
* 语言配置,“暂无数据” 描述文本
*/
empty?: string | TNode;
/**
* 展开和收起图标(配置传入收起图标即可),如果没有配置,会使用组件内置的默认图标
*/
expandIcon?: TNode;
/**
* 过滤图标,如果没有配置,会使用组件内置的默认图标
*/
filterIcon?: TNode;
/**
* 隐藏排序文本提示
* @default false
*/
hideSortTips?: boolean;
/**
* 语言配置,“点击加载更多” 描述文本
* @default ''
*/
loadingMoreText?: string;
/**
* 语言配置,“正在加载中,请稍后” 描述文本
* @default ''
*/
loadingText?: string;
/**
* 语言配置,“重置” 描述文本
* @default ''
*/
resetText?: string;
/**
* 语言配置,过滤功能中,过滤条件和结果描述文本,示例:'搜索“{result}”,找到 {count} 条结果'
* @default ''
*/
searchResultText?: string;
/**
* 语言配置,'全选' 描述文本
* @default ''
*/
selectAllText?: string;
/**
* 全局表格尺寸配置
* @default medium
*/
size?: SizeEnum;
/**
* 语言配置,'点击升序' 描述文本
* @default ''
*/
sortAscendingOperationText?: string;
/**
* 语言配置,'点击取消排序' 描述文本
* @default ''
*/
sortCancelOperationText?: string;
/**
* 语言配置,'点击降序' 描述文本
* @default ''
*/
sortDescendingOperationText?: string;
/**
* 排序图标(配置传入降序图标即可),如果没有配置,会使用组件内置的默认图标
*/
sortIcon?: TNode;
/**
* 树形结构,展开和折叠图标。如果没有配置,会使用组件内置的默认图标
*/
treeExpandAndFoldIcon?: TNode<{ type: 'expand' | 'fold' }>;
}
export interface SelectConfig {
/**
* 清除图标,【注意】使用渲染函数输出图标组件
*/
clearIcon?: TNode;
/**
* 语言配置,“暂无数据”描述文本
* @default ''
*/
empty?: string;
/**
* 全局配置是否可筛选
* @default false
*/
filterable?: boolean;
/**
* 语言配置,“加载中”描述文本
* @default ''
*/
loadingText?: string;
/**
* 语言配置,“请选择”占位符描述文本
* @default ''
*/
placeholder?: string;
}
export interface TreeConfig {
/**
* 语言配置,“暂无数据”描述文本
* @default ''
*/
empty?: string;
/**
* 目录层级图标,传入收起状态图标即可。【注意】使用渲染函数输出图标组件
*/
folderIcon?: TNode;
}
export interface TreeSelectConfig {
/**
* 语言配置,“暂无数据”描述文本
* @default ''
*/
empty?: string;
/**
* 语言配置,“加载中”描述文本
* @default ''
*/
loadingText?: string;
/**
* 语言配置,“请选择”占位符描述文本
* @default ''
*/
placeholder?: string;
}
export interface ListConfig {
/**
* 语言配置,'点击加载更多' 描述文本
* @default ''
*/
loadingMoreText?: string;
/**
* 语言配置,'正在加载中,请稍后' 描述文本
* @default ''
*/
loadingText?: string;
}
export interface UploadConfig {
/**
* 语言配置,“取消上传” 描述文本
* @default ''
*/
cancelUploadText?: string;
/**
* 语言配置,拖拽相关。示例:{ dragDropText: '释放图标', draggingText: '拖拽到此区域', clickAndDragText: '点击上方“选择文件”或将文件拖到此区域' }
*/
dragger?: UploadConfigDragger;
/**
* 语言配置,文件信息相关。示例:{ fileNameText: '文件名', fileSizeText: '文件尺寸', fileStatusText: '状态', fileOperationText: '操作', fileOperationDateText: '上传日期' }
*/
file?: UploadConfigFileList;
/**
* 语言配置,上传进度相关。示例:{ uploadText: '上传中', waitingText: '待上传', 'failText': '上传失败', successText: '上传成功' }
*/
progress?: UploadConfigProgress;
/**
* 语言配置,文件大小超出限制时提醒文本。示例:`'文件大小不能超过 {sizeLimit}'`
* @default ''
*/
sizeLimitMessage?: string;
/**
* 语言配置,上传功能触发文案。示例:{ image: '点击上传图片', normal: '点击上传', fileInput: '选择文件', reupload: '重新上传', delete: '删除', continueUpload?: '继续选择' }
*/
triggerUploadText?: UploadTriggerUploadText;
}
export interface UploadConfigProgress {
/**
* 语言配置,“上传失败”文本描述
* @default ''
*/
failText?: string;
/**
* 语言配置,“上传成功”文本描述
* @default ''
*/
successText?: string;
/**
* 语言配置,“上传中”文本描述
* @default ''
*/
uploadingText?: string;
/**
* 语言配置,“待上传”文本描述
* @default ''
*/
waitingText?: string;
}
export interface UploadConfigDragger {
/**
* 语言配置,“ 点击上方“选择文件”或将文件拖到此区域 ” 描述文本
* @default ''
*/
clickAndDragText?: string;
/**
* 语言配置,“释放图标” 描述文本
* @default ''
*/
dragDropText?: string;
/**
* 语言配置,'拖拽到此区域' 描述文本
* @default ''
*/
draggingText?: string;
}
export interface UploadConfigFileList {
/**
* 语言配置,“文件名” 描述文本
* @default ''
*/
fileNameText?: string;
/**
* 语言配置,“上传日期” 描述文本
* @default ''
*/
fileOperationDateText?: string;
/**
* 语言配置,“操作” 描述文本
* @default ''
*/
fileOperationText?: string;
/**
* 语言配置,“文件尺寸” 描述文本
* @default ''
*/
fileSizeText?: string;
/**
* 语言配置,“状态” 描述文本
* @default ''
*/
fileStatusText?: string;
}
export interface FormConfig {
/**
* 字段旁边的冒号,中文为“:”
* @default ''
*/
colonText?: string;
/**
* 表单错误信息配置,示例:`{ idcard: '请输入正确的身份证号码', max: '字符长度不能超过 ${max}' }`
*/
errorMessage?: FormErrorMessage;
/**
* 是否显示必填符号(*),默认显示
* @default true
*/
requiredMark?: boolean;
}
export interface TagConfig {
/**
* 关闭图标,【注意】使用渲染函数输出图标组件
*/
closeIcon?: TNode;
}
export interface StepsConfig {
/**
* 已完成步骤图标,【注意】使用渲染函数输出图标组件
*/
checkIcon?: TNode;
/**
* 错误步骤图标,【注意】使用渲染函数输出图标组件
*/
errorIcon?: TNode;
}
export interface AlertConfig {
/**
* 语言配置,“收起”描述文本
* @default ''
*/
collapseText?: string;
/**
* 语言配置,“展开更多”描述文本
* @default ''
*/
expandText?: string;
}
export interface DescriptionsConfig {
/**
* 字段旁边的冒号,中文为“:”
* @default ''
*/
colonText?: string;
}
export interface AnchorConfig {
/**
* 语言配置,“链接复制成功”描述文本
* @default ''
*/
copySuccessText?: string;
/**
* 语言配置,“复制链接” 描述文本
* @default ''
*/
copyText?: string;
}
export interface MessageConfig extends MessageOptions {}
export interface ImageConfig {
/**
* 图片加载失败显示的文本,中文默认为“图片无法显示”
* @default ''
*/
errorText?: string;
/**
* 图片加载中显示的文本,中文默认为“图片加载中”
* @default ''
*/
loadingText?: string;
/**
* 统一替换图片 `src` 地址,参数为组件的全部属性,返回值为新的图片地址
*/
replaceImageSrc?: (params: ImageProps) => string;
}
export interface ImageViewerConfig {
/**
* 全局语言配置,默认为 “图片加载失败,可尝试重新加载”
* @default ''
*/
errorText?: string;
/**
* 全局语言配置,默认为 “镜像”
* @default ''
*/
mirrorTipText?: string;
/**
* 全局语言配置,默认为 “原始大小”
* @default ''
*/
originalSizeTipText?: string;
/**
* 全局语言配置,默认为 “旋转”
* @default ''
*/
rotateTipText?: string;
}
export interface GuideConfig {
/**
* 最后一步中的完成按钮,示例:`{ content: '完成', theme: 'primary' }`
*/
finishButtonProps?: ButtonProps;
/**
* 下一步按钮,示例:`{ content: '下一步', theme: 'primary' }`
*/
nextButtonProps?: ButtonProps;
/**
* 上一步按钮,示例:`{ content: '上一步', theme: 'default' }`
*/
prevButtonProps?: ButtonProps;
/**
* 跳过按钮,示例:`{ content: '跳过', theme: 'default' }`
*/
skipButtonProps?: ButtonProps;
}
export interface RateConfig {
/**
* 评分描述,默认值:['极差', '失望', '一般', '满意', '惊喜']
*/
rateText?: string[];
}
export interface EmptyConfig {
/**
* 空状态组件各类型的图片配置
*/
image?: { maintenance: TNode; success: TNode; fail: TNode; empty: TNode; networkError: TNode };
/**
* 空状态组件各类型的标题文本配置
*/
titleText?: { maintenance: string; success: string; fail: string; empty: string; networkError: string };
}
export type AnimationType = 'ripple' | 'expand' | 'fade';
export type IconConfig = GlobalIconConfig;
export interface ConfigPresetDate {
[name: string]: DateConfigValue | (() => DateConfigValue);
}
export type DateConfigValue = string | Date | Array<DateConfigValue>;
export interface UploadTriggerUploadText {
image?: string;
normal?: string;
fileInput?: string;
reupload?: string;
continueUpload?: string;
delete?: string;
}