@para-ui/core 2.2.40 → 2.2.41
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/AutoBox/index.d.ts +34 -34
- package/AutoTips/index.d.ts +27 -27
- package/Breadcrumbs/index.d.ts +39 -39
- package/Button/SplitButton.d.ts +61 -61
- package/Button/index.d.ts +56 -56
- package/Button/lang/en_US.d.ts +4 -4
- package/Button/lang/index.d.ts +9 -9
- package/Button/lang/zh_CN.d.ts +4 -4
- package/ButtonGroup/index.d.ts +33 -33
- package/ButtonGroup/index.js +2 -2
- package/Carousel/index.d.ts +30 -30
- package/Cascader/index.d.ts +54 -54
- package/Cascader/lang/en_US.d.ts +4 -4
- package/Cascader/lang/index.d.ts +9 -9
- package/Cascader/lang/zh_CN.d.ts +4 -4
- package/Checkbox/index.d.ts +40 -40
- package/CheckboxGroup/index.d.ts +46 -46
- package/CheckboxGroup/index.js +2 -2
- package/Collapse/collapsePanel.d.ts +30 -30
- package/Collapse/index.d.ts +57 -57
- package/Collapse/motion.d.ts +5 -5
- package/Collapse/util.d.ts +11 -11
- package/CollapseBox/index.d.ts +27 -27
- package/CollapseBox/util.d.ts +5 -5
- package/CollapseLayout/index.d.ts +51 -51
- package/ColorPicker/index.d.ts +4 -4
- package/ComboSelect/WithTabsCombo/index.d.ts +11 -11
- package/ComboSelect/WithTabsCombo/interface.d.ts +141 -141
- package/ComboSelect/index.d.ts +11 -11
- package/ComboSelect/interface.d.ts +149 -149
- package/ComboSelect/lang/en_US.d.ts +9 -9
- package/ComboSelect/lang/index.d.ts +19 -19
- package/ComboSelect/lang/zh_CN.d.ts +9 -9
- package/ComboSelect/utils.d.ts +12 -12
- package/Container/index.d.ts +77 -77
- package/DatePicker/PickerButton.d.ts +3 -3
- package/DatePicker/PickerTag.d.ts +3 -3
- package/DatePicker/generatePicker/generateRangePicker.d.ts +4 -4
- package/DatePicker/generatePicker/generateSinglePicker.d.ts +11 -11
- package/DatePicker/generatePicker/index.d.ts +77 -77
- package/DatePicker/index.d.ts +18 -18
- package/DatePicker/lang/en_US.d.ts +3 -3
- package/DatePicker/lang/index.d.ts +7 -7
- package/DatePicker/lang/zh_CN.d.ts +3 -3
- package/DatePicker/util.d.ts +20 -20
- package/Desktop/index.d.ts +55 -55
- package/Drawer/index.d.ts +11 -11
- package/Drawer/interface.d.ts +83 -83
- package/Drawer/lang/en_US.d.ts +5 -5
- package/Drawer/lang/index.d.ts +11 -11
- package/Drawer/lang/zh_CN.d.ts +5 -5
- package/Dropdown/index.d.ts +39 -39
- package/DynamicMultiBox/formItem.d.ts +13 -13
- package/DynamicMultiBox/index.d.ts +4 -4
- package/DynamicMultiBox/index.js +2 -2
- package/DynamicMultiBox/interface.d.ts +161 -161
- package/DynamicMultiBox/rowForm.d.ts +24 -24
- package/Empty/images/index.d.ts +2 -2
- package/Empty/index.d.ts +30 -30
- package/Empty/lang/en_US.d.ts +6 -6
- package/Empty/lang/index.d.ts +13 -13
- package/Empty/lang/zh_CN.d.ts +6 -6
- package/Form/index.d.ts +181 -181
- package/Form/index.js +2 -2
- package/FormItem/compoments/defaultCompoments/index.d.ts +19 -19
- package/FormItem/compoments/formCheckboxGroup/index.d.ts +8 -8
- package/FormItem/compoments/formFile/index.d.ts +38 -38
- package/FormItem/compoments/formRadioGroup/index.d.ts +8 -8
- package/FormItem/compoments/formSelect/index.d.ts +18 -18
- package/FormItem/errorTips.d.ts +12 -12
- package/FormItem/index.d.ts +152 -152
- package/FormItem/index.js +2 -2
- package/FormItem/itemType.d.ts +42 -42
- package/FormItem/validateFunction.d.ts +15 -15
- package/FunctionModal/dialog.d.ts +58 -58
- package/FunctionModal/index.d.ts +8 -8
- package/FunctionModal/modalContext.d.ts +14 -14
- package/GlobalContext/componentsProps.d.ts +21 -21
- package/GlobalContext/confirmLocale.d.ts +7 -7
- package/GlobalContext/constant.d.ts +7 -7
- package/GlobalContext/index.d.ts +28 -28
- package/GlobalContext/intl.d.ts +34 -34
- package/GlobalContext/useFormatMessage.d.ts +3 -3
- package/Help/index.d.ts +20 -20
- package/HelperText/index.d.ts +19 -19
- package/Hooks/useGlobalProps.d.ts +1 -1
- package/InputLang/index.d.ts +49 -49
- package/InputNumber/index.d.ts +74 -74
- package/Label/index.d.ts +35 -35
- package/Loading/index.d.ts +17 -17
- package/Menu/footerExpansion.d.ts +9 -9
- package/Menu/index.d.ts +10 -10
- package/Menu/interface.d.ts +139 -139
- package/Menu/logo.d.ts +9 -9
- package/Menu/verticalMenuList.d.ts +14 -14
- package/Message/index.d.ts +73 -73
- package/Modal/Confirm/index.d.ts +66 -66
- package/Modal/index.d.ts +61 -61
- package/Modal/lang/en_US.d.ts +5 -5
- package/Modal/lang/index.d.ts +11 -11
- package/Modal/lang/zh_CN.d.ts +5 -5
- package/MultiBox/index.d.ts +54 -54
- package/Notification/index.d.ts +52 -52
- package/OperateBtn/index.d.ts +59 -59
- package/OperateBtn/lang/en_US.d.ts +4 -4
- package/OperateBtn/lang/index.d.ts +9 -9
- package/OperateBtn/lang/zh_CN.d.ts +4 -4
- package/PageHeader/horizontalMeun.d.ts +9 -9
- package/PageHeader/horizontalMeunRight.d.ts +9 -9
- package/PageHeader/index.d.ts +10 -10
- package/PageHeader/interface.d.ts +167 -167
- package/Pagination/index.d.ts +33 -33
- package/Pagination/lang/en_US.d.ts +8 -8
- package/Pagination/lang/index.d.ts +17 -17
- package/Pagination/lang/zh_CN.d.ts +8 -8
- package/ParauiProvider/index.d.ts +12 -12
- package/PasswordRules/index.d.ts +46 -46
- package/PopConfirm/index.d.ts +56 -56
- package/PopConfirm/lang/en_US.d.ts +5 -5
- package/PopConfirm/lang/index.d.ts +11 -11
- package/PopConfirm/lang/zh_CN.d.ts +5 -5
- package/Popover/index.d.ts +14 -14
- package/PopoverNew/TooltipNew/index.d.ts +11 -11
- package/PopoverNew/TooltipNew/interface.d.ts +31 -31
- package/PopoverNew/TooltipNew/utils.d.ts +18 -18
- package/PopoverNew/index.d.ts +16 -16
- package/Popper/index.d.ts +13 -13
- package/Progress/Line.d.ts +47 -47
- package/Progress/Steps.d.ts +17 -17
- package/Progress/index.d.ts +81 -81
- package/Progress/utils.d.ts +6 -6
- package/Querying/images/index.d.ts +2 -2
- package/Querying/index.d.ts +26 -26
- package/Querying/lang/en_US.d.ts +4 -4
- package/Querying/lang/index.d.ts +9 -9
- package/Querying/lang/zh_CN.d.ts +4 -4
- package/README.md +744 -739
- package/Radio/index.d.ts +38 -38
- package/RadioGroup/index.d.ts +47 -47
- package/RadioGroup/index.js +2 -2
- package/Search/index.d.ts +56 -56
- package/Select/index.d.ts +96 -96
- package/Select/lang/en_US.d.ts +5 -5
- package/Select/lang/index.d.ts +11 -11
- package/Select/lang/zh_CN.d.ts +5 -5
- package/SelectInput/index.d.ts +11 -11
- package/Selector/index.d.ts +11 -11
- package/Selector/index.js +2 -2
- package/Selector/interface.d.ts +428 -428
- package/Selector/lang/en_US.d.ts +11 -11
- package/Selector/lang/index.d.ts +23 -23
- package/Selector/lang/zh_CN.d.ts +11 -11
- package/Selector/selectorData/index.d.ts +10 -10
- package/Selector/selectorMain/index.d.ts +10 -10
- package/Selector/selectorNode/index.d.ts +10 -10
- package/Selector/util.d.ts +15 -15
- package/SelectorPicker/index.d.ts +53 -53
- package/SelectorPicker/index.js +2 -2
- package/SingleBox/index.d.ts +42 -42
- package/Slider/index.d.ts +14 -14
- package/Slider/interface.d.ts +102 -102
- package/Split/index.d.ts +7 -7
- package/Stepper/icons.d.ts +5 -5
- package/Stepper/index.d.ts +39 -39
- package/Switch/index.d.ts +78 -78
- package/Table/index.d.ts +10 -10
- package/Table/interface.d.ts +271 -271
- package/Table/lang/en_US.d.ts +8 -8
- package/Table/lang/index.d.ts +17 -17
- package/Table/lang/zh_CN.d.ts +8 -8
- package/Table/tableBody.d.ts +9 -9
- package/Table/tableBodyElement/index.d.ts +15 -15
- package/Table/tableBodyInterface.d.ts +67 -67
- package/Table/tableContainer/index.d.ts +16 -16
- package/Table/tableElement/index.d.ts +15 -15
- package/Table/tableHead.d.ts +9 -9
- package/Table/tableHeadElement/index.d.ts +15 -15
- package/Table/tableHeadInterface.d.ts +30 -30
- package/Table/tablePagination.d.ts +9 -9
- package/Table/tablePaginationInterFace.d.ts +24 -24
- package/Table/tdElement/index.d.ts +15 -15
- package/Table/thElement/index.d.ts +15 -15
- package/Table/trElement/index.d.ts +15 -15
- package/Table/util.d.ts +28 -28
- package/Tabs/index.d.ts +48 -48
- package/Tag/TagGroup.d.ts +66 -66
- package/Tag/index.d.ts +34 -34
- package/TextField/index.d.ts +95 -95
- package/TimePicker/index.d.ts +22 -22
- package/TimePicker/locale/en_US.d.ts +3 -3
- package/TimePicker/locale/zh_CN.d.ts +3 -3
- package/TimePicker/style/index.d.ts +1 -1
- package/Timeline/index.d.ts +22 -22
- package/Title/index.d.ts +30 -30
- package/ToggleButton/ToggleButtonGroup.d.ts +49 -49
- package/ToggleButton/index.d.ts +49 -49
- package/Tooltip/index.d.ts +14 -14
- package/Transfer/index.d.ts +37 -37
- package/Transfer/lang/en_US.d.ts +8 -8
- package/Transfer/lang/index.d.ts +17 -17
- package/Transfer/lang/zh_CN.d.ts +8 -8
- package/Tree/OperateBar/index.d.ts +13 -13
- package/Tree/Tree.d.ts +4 -4
- package/Tree/index.d.ts +5 -5
- package/Tree/interface.d.ts +207 -207
- package/Tree/lang/en_US.d.ts +8 -8
- package/Tree/lang/index.d.ts +17 -17
- package/Tree/lang/zh_CN.d.ts +8 -8
- package/Tree/utils/tools.d.ts +26 -26
- package/Tree/utils/treeUtil.d.ts +15 -15
- package/Upload/Dragger/index.d.ts +10 -10
- package/Upload/ErroTip/index.d.ts +13 -13
- package/Upload/ImageUpload/index.d.ts +14 -14
- package/Upload/ImgCrop/EasyCrop.d.ts +17 -17
- package/Upload/ImgCrop/constants.d.ts +7 -7
- package/Upload/ImgCrop/index.d.ts +6 -6
- package/Upload/ImgCrop/interface.d.ts +48 -48
- package/Upload/UploadList/index.d.ts +5 -5
- package/Upload/index.d.ts +15 -15
- package/Upload/interface.d.ts +134 -134
- package/Upload/lang/en_US.d.ts +12 -12
- package/Upload/lang/index.d.ts +25 -25
- package/Upload/lang/zh_CN.d.ts +12 -12
- package/cdn/ButtonGroup/index.js +2 -2
- package/cdn/Cascader/index.js +6 -6
- package/cdn/CheckboxGroup/index.js +2 -2
- package/cdn/ColorPicker/index.js +1 -1
- package/cdn/ComboSelect/index.js +1 -1
- package/cdn/DatePicker/index.js +8 -8
- package/cdn/Dropdown/index.js +3 -3
- package/cdn/DynamicMultiBox/index.js +7 -7
- package/cdn/Form/index.js +3 -3
- package/cdn/FormItem/index.js +3 -3
- package/cdn/Pagination/index.js +1 -1
- package/cdn/PopoverNew/index.js +3 -3
- package/cdn/RadioGroup/index.js +2 -2
- package/cdn/Select/index.js +1 -1
- package/cdn/SelectInput/index.js +1 -1
- package/cdn/Selector/index.js +10 -10
- package/cdn/SelectorPicker/index.js +10 -10
- package/cdn/Slider/index.js +3 -3
- package/cdn/Table/index.js +1 -1
- package/cdn/Tabs/index.js +1 -1
- package/cdn/TimePicker/index.js +10 -10
- package/cdn/Upload/index.js +10 -10
- package/index.d.ts +142 -142
- package/index.js +2 -2
- package/package.json +131 -131
package/Table/interface.d.ts
CHANGED
|
@@ -1,271 +1,271 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author linhd
|
|
3
|
-
* @date 2021/8/6 11:05
|
|
4
|
-
* @description 表格
|
|
5
|
-
*/
|
|
6
|
-
import React, { ReactNode } from 'react';
|
|
7
|
-
import { EmptyProps } from "../Empty";
|
|
8
|
-
import { OperateBtnProps } from "../OperateBtn";
|
|
9
|
-
/** 任意类型 */
|
|
10
|
-
export interface Anyjson {
|
|
11
|
-
[name: string]: any;
|
|
12
|
-
}
|
|
13
|
-
/** 请求方式枚举 */
|
|
14
|
-
export type MethodType = 'Post' | 'Get';
|
|
15
|
-
/** 排序方式枚举 asc 升序 desc 降序 not 没有 */
|
|
16
|
-
export type OrderType = 'asc' | 'desc' | undefined;
|
|
17
|
-
/** 表格头部复选框选中状态 全选 / 半选 / 不选 */
|
|
18
|
-
export type SelectStatus = 'all' | 'half' | 'not';
|
|
19
|
-
/** 嵌套表格状态 */
|
|
20
|
-
export type ExpandableStatus = 'develop' | 'retract' | undefined;
|
|
21
|
-
/** 对齐方式 */
|
|
22
|
-
export type AlignType = 'left' | 'center' | 'right';
|
|
23
|
-
/** 渲染数据参数 */
|
|
24
|
-
export interface HeadDataProps {
|
|
25
|
-
/** 样式class */
|
|
26
|
-
className?: string;
|
|
27
|
-
/** 数据属性 */
|
|
28
|
-
name?: string;
|
|
29
|
-
/** 显示名 */
|
|
30
|
-
label?: string;
|
|
31
|
-
/** 是否排序 */
|
|
32
|
-
sort?: boolean;
|
|
33
|
-
/** 渲染函数 (跟表格tableCell参数互斥) */
|
|
34
|
-
render?: (row: any, item?: any, val?: any, index?: number, rowIndex?: number) => ReactNode;
|
|
35
|
-
/** 渲染操作列按钮 */
|
|
36
|
-
operateBtnRender?: (item: any) => OperateBtnProps;
|
|
37
|
-
/** 对齐方式 */
|
|
38
|
-
align?: any;
|
|
39
|
-
/** 是否过滤 */
|
|
40
|
-
filter?: boolean;
|
|
41
|
-
/** 过滤单选,还是多选 */
|
|
42
|
-
filterRadio?: boolean;
|
|
43
|
-
/** 枚举 */
|
|
44
|
-
enums?: any[];
|
|
45
|
-
/** 是否显示字段 */
|
|
46
|
-
selected?: boolean;
|
|
47
|
-
/** 滚动定位方向, 必须配合width使用 */
|
|
48
|
-
fixed?: 'left' | 'right';
|
|
49
|
-
/** 宽度 */
|
|
50
|
-
width?: string | number;
|
|
51
|
-
/** 超出内容显示文字还是dom */
|
|
52
|
-
beyondText?: boolean;
|
|
53
|
-
/** 超出不显示... */
|
|
54
|
-
autoTips?: boolean;
|
|
55
|
-
/** 排序,请求才有 */
|
|
56
|
-
orderNum?: number;
|
|
57
|
-
[name: string]: any;
|
|
58
|
-
}
|
|
59
|
-
/** 远程数据的表头显示列 */
|
|
60
|
-
export interface HeadDataReqProps {
|
|
61
|
-
/** 宽度 */
|
|
62
|
-
width?: string | number;
|
|
63
|
-
/** 显示名 */
|
|
64
|
-
displayName?: string;
|
|
65
|
-
/** 是否显示过滤 */
|
|
66
|
-
filterFlag?: boolean;
|
|
67
|
-
/** 过滤是否单选 */
|
|
68
|
-
filterRadioFlag?: boolean;
|
|
69
|
-
/** 是否排序 */
|
|
70
|
-
orderFlag?: boolean;
|
|
71
|
-
/** 表头是否显示该字段 */
|
|
72
|
-
selectedFlag?: boolean;
|
|
73
|
-
[name: string]: any;
|
|
74
|
-
}
|
|
75
|
-
/** 固定列位置信息 */
|
|
76
|
-
export interface PosFixedProps {
|
|
77
|
-
/** 是否存在左边定位 */
|
|
78
|
-
leftBol?: boolean;
|
|
79
|
-
/** 是否存在右边定位 */
|
|
80
|
-
rightBol?: boolean;
|
|
81
|
-
}
|
|
82
|
-
/** 表格头部跟表格主题 文件公用参数 */
|
|
83
|
-
export interface TableHeadBodyPublicProps {
|
|
84
|
-
/** 指定每行key */
|
|
85
|
-
rowKey?: string;
|
|
86
|
-
/** 表头数据 */
|
|
87
|
-
headData?: HeadDataProps[];
|
|
88
|
-
/** 是否嵌套 */
|
|
89
|
-
expandable?: Function;
|
|
90
|
-
/** 是否开启复选宽 */
|
|
91
|
-
check?: boolean;
|
|
92
|
-
/** 是否开启单选 */
|
|
93
|
-
radio?: boolean;
|
|
94
|
-
/** 对齐方式 */
|
|
95
|
-
align?: AlignType;
|
|
96
|
-
/** 操作栏 */
|
|
97
|
-
operate?: HeadDataProps;
|
|
98
|
-
/** 是否显示列 外 里面 不显示 */
|
|
99
|
-
showColumns?: 'outside' | 'inside' | false;
|
|
100
|
-
/** 是否等分表格,出滚动条 */
|
|
101
|
-
fixedTable?: boolean;
|
|
102
|
-
/** 是否具有固定列 */
|
|
103
|
-
fixedColumn?: boolean;
|
|
104
|
-
/** 排序字段 */
|
|
105
|
-
orderFieldArr?: string[];
|
|
106
|
-
/** 排序方式 */
|
|
107
|
-
orderTypeArr?: OrderType[];
|
|
108
|
-
/** 是否排序 */
|
|
109
|
-
sortTable?: boolean;
|
|
110
|
-
/** 定位位置 */
|
|
111
|
-
posFixed?: PosFixedProps;
|
|
112
|
-
/** 超出内容显示文字还是dom */
|
|
113
|
-
beyondText?: boolean;
|
|
114
|
-
}
|
|
115
|
-
/** 表格参数 */
|
|
116
|
-
export interface TableProps extends TableHeadBodyPublicProps {
|
|
117
|
-
/** 样式class */
|
|
118
|
-
className?: string;
|
|
119
|
-
/** style */
|
|
120
|
-
style?: React.CSSProperties;
|
|
121
|
-
/** 表格唯一id,用来存储数据做索引 */
|
|
122
|
-
tableKey?: string;
|
|
123
|
-
/** 过期时间/ 单位天 默认7天 */
|
|
124
|
-
expirationTime?: number;
|
|
125
|
-
/** 记住列,默认记住 */
|
|
126
|
-
rememberColumns?: boolean;
|
|
127
|
-
/** 空状态属性 */
|
|
128
|
-
emptyProps?: EmptyProps;
|
|
129
|
-
/** 刷新表格 */
|
|
130
|
-
refresh?: any;
|
|
131
|
-
/** 请求地址 */
|
|
132
|
-
url?: string;
|
|
133
|
-
/** 请求上下文 */
|
|
134
|
-
ctx?: string;
|
|
135
|
-
/** 请求方式 */
|
|
136
|
-
method?: MethodType;
|
|
137
|
-
/** 本地数据源 */
|
|
138
|
-
data?: Anyjson | [];
|
|
139
|
-
/** 页数 */
|
|
140
|
-
page?: number;
|
|
141
|
-
/** 一页条数 */
|
|
142
|
-
size?: number;
|
|
143
|
-
/** 搜索条件 */
|
|
144
|
-
search?: Anyjson | string;
|
|
145
|
-
/** searchKey匹配字段,用来本地搜索 */
|
|
146
|
-
searchKeyName?: string[];
|
|
147
|
-
/** 每页显示的条数选择 */
|
|
148
|
-
sizeArr?: number[];
|
|
149
|
-
/** 是否分页 */
|
|
150
|
-
pagination?: boolean;
|
|
151
|
-
/** 分页模式 */
|
|
152
|
-
paginationType?: 'simple' | 'complex';
|
|
153
|
-
/** 自适应分页,根据外容器大小,改变分页模式 */
|
|
154
|
-
autoPagination?: boolean;
|
|
155
|
-
/** 渲染表格一行数据 (跟表格头部head里面的render参数互斥) */
|
|
156
|
-
tableCell?: (row: any, params: any) => ReactNode;
|
|
157
|
-
/** 请求回调参数 requestCallback(data, cb) cb(data) 需要回调数据回来 */
|
|
158
|
-
requestCallback?: (data: any, cb: (data: any) => void) => void;
|
|
159
|
-
/** 默认复选框选中值 */
|
|
160
|
-
checkDefaultValue?: any[];
|
|
161
|
-
/** 设置复选框选中值 */
|
|
162
|
-
setCheck?: (arr: any, data: any) => void;
|
|
163
|
-
/** 默认单选选中值 */
|
|
164
|
-
radioDefaultValue?: string | number;
|
|
165
|
-
/** 设置单选框选中值 */
|
|
166
|
-
setRadio?: (val: any, data: any) => void;
|
|
167
|
-
/** 多选记住分页数据 */
|
|
168
|
-
checkRememberPage?: boolean;
|
|
169
|
-
/** 选择框禁用 */
|
|
170
|
-
disabledArr?: Array<string | number>;
|
|
171
|
-
/** 选择框禁用时的状态 true 选中, false不选中, null 不显示 */
|
|
172
|
-
disabledArrStatus?: {
|
|
173
|
-
[name: string]: true | false | null;
|
|
174
|
-
};
|
|
175
|
-
/** 超出内容显示文字还是dom */
|
|
176
|
-
beyondText?: boolean;
|
|
177
|
-
/** 是否显示序号 true显示 HeadDataProps配置详情,跟配置列一样 */
|
|
178
|
-
serialNumber?: boolean | HeadDataProps;
|
|
179
|
-
/** 是否过滤 */
|
|
180
|
-
filter?: boolean;
|
|
181
|
-
/** 排序 多个/单个 */
|
|
182
|
-
sortTableRadio?: boolean;
|
|
183
|
-
/** 默认排序值 */
|
|
184
|
-
defaultSortValue?: {
|
|
185
|
-
[name: string]: OrderType;
|
|
186
|
-
};
|
|
187
|
-
/** 默认过滤值 */
|
|
188
|
-
defaultFilterValue?: {
|
|
189
|
-
[name: string]: any[];
|
|
190
|
-
};
|
|
191
|
-
/** 处理请求参数 */
|
|
192
|
-
paramsCallback?: (data: any, cb: (handObj: ReqProps) => void) => void;
|
|
193
|
-
/** 用来格式化内容 */
|
|
194
|
-
formatter?: (row: any, item: any, val: any, index: number, rowIndex: number) => ReactNode;
|
|
195
|
-
/** 用来计算表格行数 */
|
|
196
|
-
lineHeight?: number;
|
|
197
|
-
/** 表格每列没设置宽度的默认宽度, 默认80 */
|
|
198
|
-
lineWidth?: number;
|
|
199
|
-
/** 是否自动计算表格函数 */
|
|
200
|
-
autoSize?: boolean;
|
|
201
|
-
/** 是否loading */
|
|
202
|
-
loading?: boolean;
|
|
203
|
-
/** 加载更多 */
|
|
204
|
-
loadMore?: boolean;
|
|
205
|
-
/** 加载更多自定义 */
|
|
206
|
-
loadMoreRender?: ReactNode;
|
|
207
|
-
/** 点击加载更多 */
|
|
208
|
-
onClickMore?: () => void;
|
|
209
|
-
/** 默认展开项 */
|
|
210
|
-
expandValue?: string[];
|
|
211
|
-
/** 展开多个 */
|
|
212
|
-
expandMultiple?: boolean;
|
|
213
|
-
/** 禁用展开项 */
|
|
214
|
-
disabledExpand?: string[];
|
|
215
|
-
/** 展开事件 */
|
|
216
|
-
onExpand?: (row: any, status: ExpandableStatus) => void;
|
|
217
|
-
/** 是否展开所有行 */
|
|
218
|
-
defaultExpandAllRows?: boolean;
|
|
219
|
-
/** 勾选列事件 a当前显示列 b当前点击项数据 */
|
|
220
|
-
onClickColumns?: (a: any[], b?: any) => void;
|
|
221
|
-
/**
|
|
222
|
-
* 本地搜索过滤事件回调 true符合条件,false过滤数据
|
|
223
|
-
* item当前行数据
|
|
224
|
-
* condition条件
|
|
225
|
-
* search: 查询条件
|
|
226
|
-
* filter: 过滤条件
|
|
227
|
-
*/
|
|
228
|
-
filterSearchCallback?: (item: any, condition: {
|
|
229
|
-
search?: any;
|
|
230
|
-
filter?: any;
|
|
231
|
-
}) => boolean;
|
|
232
|
-
[key: string]: any;
|
|
233
|
-
}
|
|
234
|
-
export interface ExpandableRowItem {
|
|
235
|
-
/** 当前嵌套行id */
|
|
236
|
-
id?: string;
|
|
237
|
-
/** develop | retract 当前嵌套行状态 (develop 展开) */
|
|
238
|
-
status?: ExpandableStatus;
|
|
239
|
-
}
|
|
240
|
-
/** 存放展开嵌套表格数据 */
|
|
241
|
-
export interface ExpandableRow {
|
|
242
|
-
[name: string]: ExpandableRowItem;
|
|
243
|
-
}
|
|
244
|
-
/** 请求接口 */
|
|
245
|
-
export interface ReqProps {
|
|
246
|
-
/** 请求方式 */
|
|
247
|
-
method: MethodType;
|
|
248
|
-
/** 请求地址 */
|
|
249
|
-
url: string;
|
|
250
|
-
/** 请求上下文 */
|
|
251
|
-
ctx?: string;
|
|
252
|
-
/** 请求参数 */
|
|
253
|
-
data?: any;
|
|
254
|
-
[name: string]: any;
|
|
255
|
-
}
|
|
256
|
-
/** 显示列LocalStorage item */
|
|
257
|
-
export interface HeadLocalStorageItem {
|
|
258
|
-
/** 记住的列 */
|
|
259
|
-
headName: {
|
|
260
|
-
/** true显示,false在下拉里面 */
|
|
261
|
-
[name: string]: boolean;
|
|
262
|
-
};
|
|
263
|
-
/** 存储时间 */
|
|
264
|
-
storageTime: number;
|
|
265
|
-
/** 过期时间 */
|
|
266
|
-
validity: number;
|
|
267
|
-
}
|
|
268
|
-
/** 显示列LocalStorage */
|
|
269
|
-
export interface HeadLocalStorage {
|
|
270
|
-
[name: string]: HeadLocalStorageItem;
|
|
271
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @author linhd
|
|
3
|
+
* @date 2021/8/6 11:05
|
|
4
|
+
* @description 表格
|
|
5
|
+
*/
|
|
6
|
+
import React, { ReactNode } from 'react';
|
|
7
|
+
import { EmptyProps } from "../Empty";
|
|
8
|
+
import { OperateBtnProps } from "../OperateBtn";
|
|
9
|
+
/** 任意类型 */
|
|
10
|
+
export interface Anyjson {
|
|
11
|
+
[name: string]: any;
|
|
12
|
+
}
|
|
13
|
+
/** 请求方式枚举 */
|
|
14
|
+
export type MethodType = 'Post' | 'Get';
|
|
15
|
+
/** 排序方式枚举 asc 升序 desc 降序 not 没有 */
|
|
16
|
+
export type OrderType = 'asc' | 'desc' | undefined;
|
|
17
|
+
/** 表格头部复选框选中状态 全选 / 半选 / 不选 */
|
|
18
|
+
export type SelectStatus = 'all' | 'half' | 'not';
|
|
19
|
+
/** 嵌套表格状态 */
|
|
20
|
+
export type ExpandableStatus = 'develop' | 'retract' | undefined;
|
|
21
|
+
/** 对齐方式 */
|
|
22
|
+
export type AlignType = 'left' | 'center' | 'right';
|
|
23
|
+
/** 渲染数据参数 */
|
|
24
|
+
export interface HeadDataProps {
|
|
25
|
+
/** 样式class */
|
|
26
|
+
className?: string;
|
|
27
|
+
/** 数据属性 */
|
|
28
|
+
name?: string;
|
|
29
|
+
/** 显示名 */
|
|
30
|
+
label?: string;
|
|
31
|
+
/** 是否排序 */
|
|
32
|
+
sort?: boolean;
|
|
33
|
+
/** 渲染函数 (跟表格tableCell参数互斥) */
|
|
34
|
+
render?: (row: any, item?: any, val?: any, index?: number, rowIndex?: number) => ReactNode;
|
|
35
|
+
/** 渲染操作列按钮 */
|
|
36
|
+
operateBtnRender?: (item: any) => OperateBtnProps;
|
|
37
|
+
/** 对齐方式 */
|
|
38
|
+
align?: any;
|
|
39
|
+
/** 是否过滤 */
|
|
40
|
+
filter?: boolean;
|
|
41
|
+
/** 过滤单选,还是多选 */
|
|
42
|
+
filterRadio?: boolean;
|
|
43
|
+
/** 枚举 */
|
|
44
|
+
enums?: any[];
|
|
45
|
+
/** 是否显示字段 */
|
|
46
|
+
selected?: boolean;
|
|
47
|
+
/** 滚动定位方向, 必须配合width使用 */
|
|
48
|
+
fixed?: 'left' | 'right';
|
|
49
|
+
/** 宽度 */
|
|
50
|
+
width?: string | number;
|
|
51
|
+
/** 超出内容显示文字还是dom */
|
|
52
|
+
beyondText?: boolean;
|
|
53
|
+
/** 超出不显示... */
|
|
54
|
+
autoTips?: boolean;
|
|
55
|
+
/** 排序,请求才有 */
|
|
56
|
+
orderNum?: number;
|
|
57
|
+
[name: string]: any;
|
|
58
|
+
}
|
|
59
|
+
/** 远程数据的表头显示列 */
|
|
60
|
+
export interface HeadDataReqProps {
|
|
61
|
+
/** 宽度 */
|
|
62
|
+
width?: string | number;
|
|
63
|
+
/** 显示名 */
|
|
64
|
+
displayName?: string;
|
|
65
|
+
/** 是否显示过滤 */
|
|
66
|
+
filterFlag?: boolean;
|
|
67
|
+
/** 过滤是否单选 */
|
|
68
|
+
filterRadioFlag?: boolean;
|
|
69
|
+
/** 是否排序 */
|
|
70
|
+
orderFlag?: boolean;
|
|
71
|
+
/** 表头是否显示该字段 */
|
|
72
|
+
selectedFlag?: boolean;
|
|
73
|
+
[name: string]: any;
|
|
74
|
+
}
|
|
75
|
+
/** 固定列位置信息 */
|
|
76
|
+
export interface PosFixedProps {
|
|
77
|
+
/** 是否存在左边定位 */
|
|
78
|
+
leftBol?: boolean;
|
|
79
|
+
/** 是否存在右边定位 */
|
|
80
|
+
rightBol?: boolean;
|
|
81
|
+
}
|
|
82
|
+
/** 表格头部跟表格主题 文件公用参数 */
|
|
83
|
+
export interface TableHeadBodyPublicProps {
|
|
84
|
+
/** 指定每行key */
|
|
85
|
+
rowKey?: string;
|
|
86
|
+
/** 表头数据 */
|
|
87
|
+
headData?: HeadDataProps[];
|
|
88
|
+
/** 是否嵌套 */
|
|
89
|
+
expandable?: Function;
|
|
90
|
+
/** 是否开启复选宽 */
|
|
91
|
+
check?: boolean;
|
|
92
|
+
/** 是否开启单选 */
|
|
93
|
+
radio?: boolean;
|
|
94
|
+
/** 对齐方式 */
|
|
95
|
+
align?: AlignType;
|
|
96
|
+
/** 操作栏 */
|
|
97
|
+
operate?: HeadDataProps;
|
|
98
|
+
/** 是否显示列 外 里面 不显示 */
|
|
99
|
+
showColumns?: 'outside' | 'inside' | false;
|
|
100
|
+
/** 是否等分表格,出滚动条 */
|
|
101
|
+
fixedTable?: boolean;
|
|
102
|
+
/** 是否具有固定列 */
|
|
103
|
+
fixedColumn?: boolean;
|
|
104
|
+
/** 排序字段 */
|
|
105
|
+
orderFieldArr?: string[];
|
|
106
|
+
/** 排序方式 */
|
|
107
|
+
orderTypeArr?: OrderType[];
|
|
108
|
+
/** 是否排序 */
|
|
109
|
+
sortTable?: boolean;
|
|
110
|
+
/** 定位位置 */
|
|
111
|
+
posFixed?: PosFixedProps;
|
|
112
|
+
/** 超出内容显示文字还是dom */
|
|
113
|
+
beyondText?: boolean;
|
|
114
|
+
}
|
|
115
|
+
/** 表格参数 */
|
|
116
|
+
export interface TableProps extends TableHeadBodyPublicProps {
|
|
117
|
+
/** 样式class */
|
|
118
|
+
className?: string;
|
|
119
|
+
/** style */
|
|
120
|
+
style?: React.CSSProperties;
|
|
121
|
+
/** 表格唯一id,用来存储数据做索引 */
|
|
122
|
+
tableKey?: string;
|
|
123
|
+
/** 过期时间/ 单位天 默认7天 */
|
|
124
|
+
expirationTime?: number;
|
|
125
|
+
/** 记住列,默认记住 */
|
|
126
|
+
rememberColumns?: boolean;
|
|
127
|
+
/** 空状态属性 */
|
|
128
|
+
emptyProps?: EmptyProps;
|
|
129
|
+
/** 刷新表格 */
|
|
130
|
+
refresh?: any;
|
|
131
|
+
/** 请求地址 */
|
|
132
|
+
url?: string;
|
|
133
|
+
/** 请求上下文 */
|
|
134
|
+
ctx?: string;
|
|
135
|
+
/** 请求方式 */
|
|
136
|
+
method?: MethodType;
|
|
137
|
+
/** 本地数据源 */
|
|
138
|
+
data?: Anyjson | [];
|
|
139
|
+
/** 页数 */
|
|
140
|
+
page?: number;
|
|
141
|
+
/** 一页条数 */
|
|
142
|
+
size?: number;
|
|
143
|
+
/** 搜索条件 */
|
|
144
|
+
search?: Anyjson | string;
|
|
145
|
+
/** searchKey匹配字段,用来本地搜索 */
|
|
146
|
+
searchKeyName?: string[];
|
|
147
|
+
/** 每页显示的条数选择 */
|
|
148
|
+
sizeArr?: number[];
|
|
149
|
+
/** 是否分页 */
|
|
150
|
+
pagination?: boolean;
|
|
151
|
+
/** 分页模式 */
|
|
152
|
+
paginationType?: 'simple' | 'complex';
|
|
153
|
+
/** 自适应分页,根据外容器大小,改变分页模式 */
|
|
154
|
+
autoPagination?: boolean;
|
|
155
|
+
/** 渲染表格一行数据 (跟表格头部head里面的render参数互斥) */
|
|
156
|
+
tableCell?: (row: any, params: any) => ReactNode;
|
|
157
|
+
/** 请求回调参数 requestCallback(data, cb) cb(data) 需要回调数据回来 */
|
|
158
|
+
requestCallback?: (data: any, cb: (data: any) => void) => void;
|
|
159
|
+
/** 默认复选框选中值 */
|
|
160
|
+
checkDefaultValue?: any[];
|
|
161
|
+
/** 设置复选框选中值 */
|
|
162
|
+
setCheck?: (arr: any, data: any) => void;
|
|
163
|
+
/** 默认单选选中值 */
|
|
164
|
+
radioDefaultValue?: string | number;
|
|
165
|
+
/** 设置单选框选中值 */
|
|
166
|
+
setRadio?: (val: any, data: any) => void;
|
|
167
|
+
/** 多选记住分页数据 */
|
|
168
|
+
checkRememberPage?: boolean;
|
|
169
|
+
/** 选择框禁用 */
|
|
170
|
+
disabledArr?: Array<string | number>;
|
|
171
|
+
/** 选择框禁用时的状态 true 选中, false不选中, null 不显示 */
|
|
172
|
+
disabledArrStatus?: {
|
|
173
|
+
[name: string]: true | false | null;
|
|
174
|
+
};
|
|
175
|
+
/** 超出内容显示文字还是dom */
|
|
176
|
+
beyondText?: boolean;
|
|
177
|
+
/** 是否显示序号 true显示 HeadDataProps配置详情,跟配置列一样 */
|
|
178
|
+
serialNumber?: boolean | HeadDataProps;
|
|
179
|
+
/** 是否过滤 */
|
|
180
|
+
filter?: boolean;
|
|
181
|
+
/** 排序 多个/单个 */
|
|
182
|
+
sortTableRadio?: boolean;
|
|
183
|
+
/** 默认排序值 */
|
|
184
|
+
defaultSortValue?: {
|
|
185
|
+
[name: string]: OrderType;
|
|
186
|
+
};
|
|
187
|
+
/** 默认过滤值 */
|
|
188
|
+
defaultFilterValue?: {
|
|
189
|
+
[name: string]: any[];
|
|
190
|
+
};
|
|
191
|
+
/** 处理请求参数 */
|
|
192
|
+
paramsCallback?: (data: any, cb: (handObj: ReqProps) => void) => void;
|
|
193
|
+
/** 用来格式化内容 */
|
|
194
|
+
formatter?: (row: any, item: any, val: any, index: number, rowIndex: number) => ReactNode;
|
|
195
|
+
/** 用来计算表格行数 */
|
|
196
|
+
lineHeight?: number;
|
|
197
|
+
/** 表格每列没设置宽度的默认宽度, 默认80 */
|
|
198
|
+
lineWidth?: number;
|
|
199
|
+
/** 是否自动计算表格函数 */
|
|
200
|
+
autoSize?: boolean;
|
|
201
|
+
/** 是否loading */
|
|
202
|
+
loading?: boolean;
|
|
203
|
+
/** 加载更多 */
|
|
204
|
+
loadMore?: boolean;
|
|
205
|
+
/** 加载更多自定义 */
|
|
206
|
+
loadMoreRender?: ReactNode;
|
|
207
|
+
/** 点击加载更多 */
|
|
208
|
+
onClickMore?: () => void;
|
|
209
|
+
/** 默认展开项 */
|
|
210
|
+
expandValue?: string[];
|
|
211
|
+
/** 展开多个 */
|
|
212
|
+
expandMultiple?: boolean;
|
|
213
|
+
/** 禁用展开项 */
|
|
214
|
+
disabledExpand?: string[];
|
|
215
|
+
/** 展开事件 */
|
|
216
|
+
onExpand?: (row: any, status: ExpandableStatus) => void;
|
|
217
|
+
/** 是否展开所有行 */
|
|
218
|
+
defaultExpandAllRows?: boolean;
|
|
219
|
+
/** 勾选列事件 a当前显示列 b当前点击项数据 */
|
|
220
|
+
onClickColumns?: (a: any[], b?: any) => void;
|
|
221
|
+
/**
|
|
222
|
+
* 本地搜索过滤事件回调 true符合条件,false过滤数据
|
|
223
|
+
* item当前行数据
|
|
224
|
+
* condition条件
|
|
225
|
+
* search: 查询条件
|
|
226
|
+
* filter: 过滤条件
|
|
227
|
+
*/
|
|
228
|
+
filterSearchCallback?: (item: any, condition: {
|
|
229
|
+
search?: any;
|
|
230
|
+
filter?: any;
|
|
231
|
+
}) => boolean;
|
|
232
|
+
[key: string]: any;
|
|
233
|
+
}
|
|
234
|
+
export interface ExpandableRowItem {
|
|
235
|
+
/** 当前嵌套行id */
|
|
236
|
+
id?: string;
|
|
237
|
+
/** develop | retract 当前嵌套行状态 (develop 展开) */
|
|
238
|
+
status?: ExpandableStatus;
|
|
239
|
+
}
|
|
240
|
+
/** 存放展开嵌套表格数据 */
|
|
241
|
+
export interface ExpandableRow {
|
|
242
|
+
[name: string]: ExpandableRowItem;
|
|
243
|
+
}
|
|
244
|
+
/** 请求接口 */
|
|
245
|
+
export interface ReqProps {
|
|
246
|
+
/** 请求方式 */
|
|
247
|
+
method: MethodType;
|
|
248
|
+
/** 请求地址 */
|
|
249
|
+
url: string;
|
|
250
|
+
/** 请求上下文 */
|
|
251
|
+
ctx?: string;
|
|
252
|
+
/** 请求参数 */
|
|
253
|
+
data?: any;
|
|
254
|
+
[name: string]: any;
|
|
255
|
+
}
|
|
256
|
+
/** 显示列LocalStorage item */
|
|
257
|
+
export interface HeadLocalStorageItem {
|
|
258
|
+
/** 记住的列 */
|
|
259
|
+
headName: {
|
|
260
|
+
/** true显示,false在下拉里面 */
|
|
261
|
+
[name: string]: boolean;
|
|
262
|
+
};
|
|
263
|
+
/** 存储时间 */
|
|
264
|
+
storageTime: number;
|
|
265
|
+
/** 过期时间 */
|
|
266
|
+
validity: number;
|
|
267
|
+
}
|
|
268
|
+
/** 显示列LocalStorage */
|
|
269
|
+
export interface HeadLocalStorage {
|
|
270
|
+
[name: string]: HeadLocalStorageItem;
|
|
271
|
+
}
|
package/Table/lang/en_US.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
empty: string;
|
|
3
|
-
determine: string;
|
|
4
|
-
restoreDefault: string;
|
|
5
|
-
serial: string;
|
|
6
|
-
loadMore: string;
|
|
7
|
-
};
|
|
8
|
-
export default _default;
|
|
1
|
+
declare const _default: {
|
|
2
|
+
empty: string;
|
|
3
|
+
determine: string;
|
|
4
|
+
restoreDefault: string;
|
|
5
|
+
serial: string;
|
|
6
|
+
loadMore: string;
|
|
7
|
+
};
|
|
8
|
+
export default _default;
|
package/Table/lang/index.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
zh: {
|
|
3
|
-
empty: string;
|
|
4
|
-
determine: string;
|
|
5
|
-
restoreDefault: string;
|
|
6
|
-
serial: string;
|
|
7
|
-
loadMore: string;
|
|
8
|
-
};
|
|
9
|
-
en: {
|
|
10
|
-
empty: string;
|
|
11
|
-
determine: string;
|
|
12
|
-
restoreDefault: string;
|
|
13
|
-
serial: string;
|
|
14
|
-
loadMore: string;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
export default _default;
|
|
1
|
+
declare const _default: {
|
|
2
|
+
zh: {
|
|
3
|
+
empty: string;
|
|
4
|
+
determine: string;
|
|
5
|
+
restoreDefault: string;
|
|
6
|
+
serial: string;
|
|
7
|
+
loadMore: string;
|
|
8
|
+
};
|
|
9
|
+
en: {
|
|
10
|
+
empty: string;
|
|
11
|
+
determine: string;
|
|
12
|
+
restoreDefault: string;
|
|
13
|
+
serial: string;
|
|
14
|
+
loadMore: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export default _default;
|
package/Table/lang/zh_CN.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
empty: string;
|
|
3
|
-
determine: string;
|
|
4
|
-
restoreDefault: string;
|
|
5
|
-
serial: string;
|
|
6
|
-
loadMore: string;
|
|
7
|
-
};
|
|
8
|
-
export default _default;
|
|
1
|
+
declare const _default: {
|
|
2
|
+
empty: string;
|
|
3
|
+
determine: string;
|
|
4
|
+
restoreDefault: string;
|
|
5
|
+
serial: string;
|
|
6
|
+
loadMore: string;
|
|
7
|
+
};
|
|
8
|
+
export default _default;
|
package/Table/tableBody.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author linhd
|
|
3
|
-
* @date 2021/8/6 11:06
|
|
4
|
-
* @description 表格内容
|
|
5
|
-
*/
|
|
6
|
-
import { FunctionComponent } from 'react';
|
|
7
|
-
import { TableBodyProps } from './tableBodyInterface';
|
|
8
|
-
export declare const TableBody: FunctionComponent<TableBodyProps>;
|
|
9
|
-
export default TableBody;
|
|
1
|
+
/**
|
|
2
|
+
* @author linhd
|
|
3
|
+
* @date 2021/8/6 11:06
|
|
4
|
+
* @description 表格内容
|
|
5
|
+
*/
|
|
6
|
+
import { FunctionComponent } from 'react';
|
|
7
|
+
import { TableBodyProps } from './tableBodyInterface';
|
|
8
|
+
export declare const TableBody: FunctionComponent<TableBodyProps>;
|
|
9
|
+
export default TableBody;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author linhd
|
|
3
|
-
* @date 2022/4/26 11:00 AM
|
|
4
|
-
* @description 表格body元素
|
|
5
|
-
*/
|
|
6
|
-
import React, { FunctionComponent } from "react";
|
|
7
|
-
import './index.scss';
|
|
8
|
-
export interface TableBodyElementProps {
|
|
9
|
-
className?: string;
|
|
10
|
-
style?: React.CSSProperties;
|
|
11
|
-
children?: any;
|
|
12
|
-
[name: string]: any;
|
|
13
|
-
}
|
|
14
|
-
export declare const TableBodyElement: FunctionComponent<TableBodyElementProps>;
|
|
15
|
-
export default TableBodyElement;
|
|
1
|
+
/**
|
|
2
|
+
* @author linhd
|
|
3
|
+
* @date 2022/4/26 11:00 AM
|
|
4
|
+
* @description 表格body元素
|
|
5
|
+
*/
|
|
6
|
+
import React, { FunctionComponent } from "react";
|
|
7
|
+
import './index.scss';
|
|
8
|
+
export interface TableBodyElementProps {
|
|
9
|
+
className?: string;
|
|
10
|
+
style?: React.CSSProperties;
|
|
11
|
+
children?: any;
|
|
12
|
+
[name: string]: any;
|
|
13
|
+
}
|
|
14
|
+
export declare const TableBodyElement: FunctionComponent<TableBodyElementProps>;
|
|
15
|
+
export default TableBodyElement;
|