ztxkui 4.3.26 → 4.3.27
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/dist/UI/Modal/hooks.d.ts +15 -0
- package/dist/UI/Modal/hooks.js +170 -0
- package/dist/UI/Modal/index.d.ts +3 -0
- package/dist/UI/Modal/index.js +46 -0
- package/dist/UI/Table/EditTable.js +39 -16
- package/dist/UI/Table/data.js +1 -1
- package/dist/UI/index.js +5 -1
- package/dist/components/ProModal/ModalForm.d.ts +8 -0
- package/dist/components/ProModal/ModalForm.js +32 -0
- package/dist/components/ProModal/ModalTable.d.ts +8 -0
- package/dist/components/ProModal/ModalTable.js +32 -0
- package/dist/components/ProModal/hooks.d.ts +33 -0
- package/dist/components/ProModal/hooks.js +193 -0
- package/dist/components/ProModal/index.d.ts +17 -0
- package/dist/components/ProModal/index.js +81 -0
- package/dist/components/ProModal/interface.d.ts +47 -0
- package/dist/components/ProModal/interface.js +1 -0
- package/dist/components/ProTable/hooks.d.ts +11 -1
- package/dist/components/ProTable/hooks.js +60 -8
- package/dist/components/ProTable/index.js +13 -3
- package/dist/components/ProTable/interface.d.ts +8 -0
- package/dist/components/business/Footer/index.d.ts +1 -0
- package/dist/components/business/Footer/index.js +18 -4
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import dayjs from 'dayjs';
|
|
2
|
+
export declare const RANGEPICKER_RANGES: any;
|
|
3
|
+
export declare function useForm(): {
|
|
4
|
+
items: any[];
|
|
5
|
+
outsideParams: {
|
|
6
|
+
test1: string;
|
|
7
|
+
test2: number;
|
|
8
|
+
createTime: dayjs.Dayjs[];
|
|
9
|
+
};
|
|
10
|
+
dateTransformToString: any;
|
|
11
|
+
};
|
|
12
|
+
export declare function useTable(): {
|
|
13
|
+
columns: any;
|
|
14
|
+
tablePropsReset: any;
|
|
15
|
+
};
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import React, { useMemo } from 'react';
|
|
13
|
+
import { Input, EnhanceSelect, DatePicker } from '../../index';
|
|
14
|
+
import { Select } from 'antd';
|
|
15
|
+
import dayjs from 'dayjs';
|
|
16
|
+
var getLastMonth = function () {
|
|
17
|
+
var date = [];
|
|
18
|
+
var start = dayjs().subtract(1, 'month').format('YYYY-MM') + '-01';
|
|
19
|
+
var end = dayjs(start)
|
|
20
|
+
.subtract(-1, 'month')
|
|
21
|
+
.add(-1, 'days')
|
|
22
|
+
.format('YYYY-MM-DD');
|
|
23
|
+
date.push(dayjs(start));
|
|
24
|
+
date.push(dayjs(end));
|
|
25
|
+
return date;
|
|
26
|
+
};
|
|
27
|
+
export var RANGEPICKER_RANGES = {
|
|
28
|
+
此刻: [dayjs(), dayjs()],
|
|
29
|
+
最近7天: [dayjs().subtract(6, 'days'), dayjs().subtract(0, 'days')],
|
|
30
|
+
最近30天: [dayjs().subtract(29, 'days'), dayjs().subtract(0, 'days')],
|
|
31
|
+
上月: getLastMonth(),
|
|
32
|
+
本月: [dayjs().startOf('month'), dayjs().endOf('month')],
|
|
33
|
+
上季度: [
|
|
34
|
+
dayjs()
|
|
35
|
+
.quarter(dayjs().quarter() - 1)
|
|
36
|
+
.startOf('quarter'),
|
|
37
|
+
dayjs()
|
|
38
|
+
.quarter(dayjs().quarter() - 1)
|
|
39
|
+
.endOf('quarter'),
|
|
40
|
+
],
|
|
41
|
+
本季度: [dayjs().startOf('quarter'), dayjs().endOf('quarter')],
|
|
42
|
+
上一年: [
|
|
43
|
+
dayjs()
|
|
44
|
+
.year(dayjs().year() - 1)
|
|
45
|
+
.startOf('year'),
|
|
46
|
+
dayjs()
|
|
47
|
+
.year(dayjs().year() - 1)
|
|
48
|
+
.endOf('year'),
|
|
49
|
+
],
|
|
50
|
+
本年: [dayjs().startOf('year'), dayjs().endOf('year')],
|
|
51
|
+
};
|
|
52
|
+
export function useForm() {
|
|
53
|
+
var items = useMemo(function () {
|
|
54
|
+
return [
|
|
55
|
+
{
|
|
56
|
+
name: 'test1',
|
|
57
|
+
label: '测试1',
|
|
58
|
+
render: function (itemProps) { return React.createElement(Input, __assign({}, itemProps, { allowClear: true })); },
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: 'test2',
|
|
62
|
+
label: '测试2',
|
|
63
|
+
render: function (itemProps) { return (React.createElement(Select, __assign({}, itemProps, { allowClear: true }),
|
|
64
|
+
React.createElement(Select.Option, { value: 1 }, "1"),
|
|
65
|
+
React.createElement(Select.Option, { value: 2 }, "2"))); },
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
name: 'companyId',
|
|
69
|
+
label: '公司',
|
|
70
|
+
render: function (itemProps) { return (React.createElement(EnhanceSelect, __assign({}, itemProps, { list: [
|
|
71
|
+
{ id: '1', name: '小明' },
|
|
72
|
+
{ id: '2', name: '小虎' },
|
|
73
|
+
], allowClear: true }))); },
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: 'depId',
|
|
77
|
+
label: '部门',
|
|
78
|
+
render: function (itemProps) { return (React.createElement(EnhanceSelect, __assign({}, itemProps, { list: [
|
|
79
|
+
{ id: '1', name: '小明' },
|
|
80
|
+
{ id: '2', name: '小虎' },
|
|
81
|
+
], allowClear: true }))); },
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: 'createTime',
|
|
85
|
+
label: '时间',
|
|
86
|
+
render: function (itemProps) { return (React.createElement(DatePicker.RangePicker, __assign({}, itemProps, { ranges: RANGEPICKER_RANGES }))); },
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
name: 'oneTime',
|
|
90
|
+
label: '时间1',
|
|
91
|
+
render: function (itemProps) { return React.createElement(DatePicker, __assign({}, itemProps)); },
|
|
92
|
+
},
|
|
93
|
+
];
|
|
94
|
+
}, []);
|
|
95
|
+
// 时间转换
|
|
96
|
+
var dateTransformToString = useMemo(function () {
|
|
97
|
+
return {
|
|
98
|
+
fromKey: ['createTime', 'oneTime'],
|
|
99
|
+
toKey: [['startTime', 'endTime'], 'oneTimeEnd'],
|
|
100
|
+
format: ['YYYY-MM-DD HH:mm:ss', 'YYYY-MM-DD'],
|
|
101
|
+
type: 'string',
|
|
102
|
+
};
|
|
103
|
+
}, []);
|
|
104
|
+
// 外部初始值
|
|
105
|
+
var outsideParams = useMemo(function () {
|
|
106
|
+
return {
|
|
107
|
+
test1: '22',
|
|
108
|
+
test2: 1,
|
|
109
|
+
createTime: [dayjs().subtract(30, 'days'), dayjs().subtract(0, 'days')],
|
|
110
|
+
};
|
|
111
|
+
}, []);
|
|
112
|
+
return {
|
|
113
|
+
items: items,
|
|
114
|
+
outsideParams: outsideParams,
|
|
115
|
+
dateTransformToString: dateTransformToString,
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
export function useTable() {
|
|
119
|
+
var columns = [
|
|
120
|
+
{
|
|
121
|
+
title: '测试列3',
|
|
122
|
+
width: 100,
|
|
123
|
+
dataIndex: 'test3',
|
|
124
|
+
key: 'test3',
|
|
125
|
+
// 普通输入框配置
|
|
126
|
+
editable: true,
|
|
127
|
+
// 配置列的验证规则,这种是最普通的非空校验
|
|
128
|
+
validate: {},
|
|
129
|
+
shouldCellUpdate: function (record, preRecord) {
|
|
130
|
+
return record.test3 !== preRecord.test3;
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
title: '测试列2',
|
|
135
|
+
width: 100,
|
|
136
|
+
dataIndex: 'test2',
|
|
137
|
+
key: 'test2',
|
|
138
|
+
// 普通输入框配置
|
|
139
|
+
editable: true,
|
|
140
|
+
// 配置列的验证规则,这种是最普通的非空校验
|
|
141
|
+
validate: {},
|
|
142
|
+
shouldCellUpdate: function (record, preRecord) {
|
|
143
|
+
return record.test2 !== preRecord.test2;
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
title: '测试列1',
|
|
148
|
+
width: 100,
|
|
149
|
+
dataIndex: 'test1',
|
|
150
|
+
key: 'test1',
|
|
151
|
+
// 普通输入框配置
|
|
152
|
+
editable: true,
|
|
153
|
+
// 配置列的验证规则,这种是最普通的非空校验
|
|
154
|
+
validate: {},
|
|
155
|
+
shouldCellUpdate: function (record, preRecord) {
|
|
156
|
+
return record.test1 !== preRecord.test1;
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
];
|
|
160
|
+
var tablePropsReset = useMemo(function () {
|
|
161
|
+
return {
|
|
162
|
+
isEdit: true,
|
|
163
|
+
scroll: { x: 1000, y: 500 },
|
|
164
|
+
};
|
|
165
|
+
}, []);
|
|
166
|
+
return {
|
|
167
|
+
columns: columns,
|
|
168
|
+
tablePropsReset: tablePropsReset,
|
|
169
|
+
};
|
|
170
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React, { useState, useCallback } from 'react';
|
|
2
|
+
import ProModal, { useVisible } from 'components/ProModal';
|
|
3
|
+
import { Button } from '../../index';
|
|
4
|
+
import { data2 } from '../Table/data';
|
|
5
|
+
import { useForm, useTable } from './hooks';
|
|
6
|
+
function request(params) {
|
|
7
|
+
return new Promise(function (resolve) {
|
|
8
|
+
setTimeout(function () {
|
|
9
|
+
resolve(data2);
|
|
10
|
+
}, 2000);
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
var Modal = function () {
|
|
14
|
+
var _a = useVisible(), visible = _a.visible, onClose = _a.onClose, onOpen = _a.onOpen;
|
|
15
|
+
// 表单配置相关信息
|
|
16
|
+
var _b = useForm(), items = _b.items, outsideParams = _b.outsideParams, dateTransformToString = _b.dateTransformToString;
|
|
17
|
+
// 已选中的选择项
|
|
18
|
+
var _c = useState(), selectedRowKeys = _c[0], setSelectedRowKeys = _c[1];
|
|
19
|
+
var _d = useState(), selectedRows = _d[0], setSelectedRows = _d[1];
|
|
20
|
+
var tablePropsChoiceFilterHandle = useCallback(function (record, selectedRowKeys, selectedRows) {
|
|
21
|
+
return {};
|
|
22
|
+
}, []);
|
|
23
|
+
// 选中后点击确认选择回调
|
|
24
|
+
var tablePropsOnSelectedRowChange = useCallback(function (selectedRowKeys, selectedRows) {
|
|
25
|
+
setSelectedRowKeys(selectedRowKeys);
|
|
26
|
+
setSelectedRows(selectedRows);
|
|
27
|
+
}, []);
|
|
28
|
+
// 当前选中项回调
|
|
29
|
+
var _e = useState(), childContent = _e[0], setChildContent = _e[1];
|
|
30
|
+
var tablePropsOnSelect = useCallback(function (record, selected, selectedRows) {
|
|
31
|
+
console.log(record, selected, selectedRows);
|
|
32
|
+
setChildContent(record);
|
|
33
|
+
}, []);
|
|
34
|
+
// 表格配置相关信息
|
|
35
|
+
var _f = useTable(), columns = _f.columns, tablePropsReset = _f.tablePropsReset;
|
|
36
|
+
return (React.createElement(React.Fragment, null,
|
|
37
|
+
React.createElement(Button, { onClick: function () { return onOpen(); } }, "\u5F00\u542F\u5F39\u6846"),
|
|
38
|
+
React.createElement(Button, { onClick: function () {
|
|
39
|
+
console.log(selectedRowKeys, selectedRows);
|
|
40
|
+
} }, "\u83B7\u53D6\u6570\u636E"),
|
|
41
|
+
React.createElement(ProModal, { title: "\u8BF7\u9009\u62E9", visible: visible, onClose: onClose, request: request, outsideParams: outsideParams, formPropsItems: items, formPropsDateTransform: dateTransformToString, tablePropsColumns: columns, tablePropsRowKey: "id", tablePropsReset: tablePropsReset, tablePropsIsChoice: true, tablePropsIsChoiceFilter: true, tablePropsSelectedRowKeys: selectedRowKeys, tablePropsSelectedRows: selectedRows, tablePropsChoiceFilterHandle: tablePropsChoiceFilterHandle, tablePropsOnSelectedRowChange: tablePropsOnSelectedRowChange, tablePropsOnSelect: tablePropsOnSelect, tablePropsIsRepeatChoice: true },
|
|
42
|
+
React.createElement("div", null,
|
|
43
|
+
"\u6211\u662F\u5B50\u8868",
|
|
44
|
+
JSON.stringify(childContent)))));
|
|
45
|
+
};
|
|
46
|
+
export default Modal;
|
|
@@ -34,8 +34,19 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
34
34
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
38
|
+
var t = {};
|
|
39
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
40
|
+
t[p] = s[p];
|
|
41
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
42
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
43
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
44
|
+
t[p[i]] = s[p[i]];
|
|
45
|
+
}
|
|
46
|
+
return t;
|
|
47
|
+
};
|
|
37
48
|
// 带编辑属性的表格使用
|
|
38
|
-
import { useState, useCallback, useRef } from 'react';
|
|
49
|
+
import { useState, useEffect, useCallback, useRef } from 'react';
|
|
39
50
|
import { data2 } from './data';
|
|
40
51
|
import ProEditTable from 'components/ProTable';
|
|
41
52
|
import { Button, message, EnhanceSelect } from '../../index';
|
|
@@ -47,7 +58,7 @@ import { Button, message, EnhanceSelect } from '../../index';
|
|
|
47
58
|
// 3. 可以通过配置校验规则 验证表格
|
|
48
59
|
// 4. 自定义render 需要调用表格提供的修改数据方法
|
|
49
60
|
function useColumns(tableHandleRef) {
|
|
50
|
-
var _a = useState(
|
|
61
|
+
var _a = useState([]), data = _a[0], setData = _a[1];
|
|
51
62
|
var columns = [
|
|
52
63
|
{
|
|
53
64
|
title: '序号',
|
|
@@ -159,38 +170,45 @@ function useColumns(tableHandleRef) {
|
|
|
159
170
|
name: '小李',
|
|
160
171
|
},
|
|
161
172
|
], onChange: function (value, option, fullData) {
|
|
162
|
-
var _a
|
|
173
|
+
var _a;
|
|
163
174
|
var newRecord = {
|
|
164
175
|
test6: value,
|
|
165
176
|
test6Name: fullData.name,
|
|
166
177
|
};
|
|
167
|
-
|
|
168
|
-
(_c = tableHandleRef.current) === null || _c === void 0 ? void 0 : _c.onEditableSaveHandle(newRecord, realyIndex);
|
|
178
|
+
(_a = tableHandleRef.current) === null || _a === void 0 ? void 0 : _a.onEditableSaveHandle(newRecord, index);
|
|
169
179
|
} }));
|
|
170
180
|
},
|
|
171
181
|
},
|
|
172
182
|
];
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
183
|
+
useEffect(function () {
|
|
184
|
+
setTimeout(function () {
|
|
185
|
+
setData(data2);
|
|
186
|
+
}, 300);
|
|
187
|
+
}, []);
|
|
178
188
|
return { columns: columns, data: data, setData: setData };
|
|
179
189
|
}
|
|
180
190
|
export default function EditTable() {
|
|
181
191
|
var _this = this;
|
|
182
|
-
console.log('table render');
|
|
183
192
|
var tableHandleRef = useRef({});
|
|
184
193
|
var _a = useColumns(tableHandleRef), columns = _a.columns, data = _a.data, setData = _a.setData;
|
|
185
194
|
var _b = useState(1), num = _b[0], setNum = _b[1];
|
|
195
|
+
useEffect(function () {
|
|
196
|
+
setNum(2);
|
|
197
|
+
}, []);
|
|
186
198
|
// 触发onChange事件
|
|
187
|
-
var onChange = useCallback(function (dataSource) {
|
|
199
|
+
var onChange = useCallback(function (dataSource, info) {
|
|
188
200
|
setData(dataSource);
|
|
189
|
-
setNum(function (n) { return n + 1; });
|
|
190
201
|
}, [setData]);
|
|
202
|
+
// 选中相关
|
|
203
|
+
var _c = useState(), selectedRowKeys = _c[0], setSelectedRowKeys = _c[1];
|
|
204
|
+
var _d = useState(), setSelectedRows = _d[1];
|
|
205
|
+
var onSelectedRowChange = useCallback(function (selectedRowKeys, selectedRows) {
|
|
206
|
+
setSelectedRowKeys(selectedRowKeys);
|
|
207
|
+
setSelectedRows(selectedRows);
|
|
208
|
+
}, []);
|
|
191
209
|
return (React.createElement("div", null,
|
|
192
210
|
React.createElement(Button, { onClick: function () {
|
|
193
|
-
console.log(data);
|
|
211
|
+
console.log(data, selectedRowKeys);
|
|
194
212
|
} },
|
|
195
213
|
"\u83B7\u53D6\u6570\u636E",
|
|
196
214
|
num),
|
|
@@ -228,9 +246,14 @@ export default function EditTable() {
|
|
|
228
246
|
// 是否开启增减行
|
|
229
247
|
showDelIcon: true, showAddIcon: true,
|
|
230
248
|
// 增加数据的规则 是增加空白行 还是 复制一行
|
|
231
|
-
addDataMode: "blank",
|
|
249
|
+
addDataMode: "blank", addDataReturnRecord: useCallback(function (record) {
|
|
250
|
+
var id = record.id, resetRecord = __rest(record, ["id"]);
|
|
251
|
+
return resetRecord;
|
|
252
|
+
}, []),
|
|
232
253
|
// 是否记录列宽,但是又不要显示那个按钮
|
|
233
254
|
showColumnDynamic: true, showColumnDynamicKey: "single-110011", hiddenColumnDynamicIcon: true,
|
|
234
255
|
// 开启内部分页
|
|
235
|
-
showInnerPagination: true, defaultInnerPageSize:
|
|
256
|
+
showInnerPagination: true, defaultInnerPageSize: 10,
|
|
257
|
+
// 是否选择
|
|
258
|
+
isChoice: true, selectedRowKeys: selectedRowKeys, onSelectedRowChange: onSelectedRowChange, onChange: onChange })));
|
|
236
259
|
}
|
package/dist/UI/Table/data.js
CHANGED
|
@@ -5,7 +5,7 @@ export var data1 = new Array(50).fill(1).map(function (item, index) {
|
|
|
5
5
|
test2: index + 100,
|
|
6
6
|
};
|
|
7
7
|
});
|
|
8
|
-
export var data2 = new Array(
|
|
8
|
+
export var data2 = new Array(40).fill(1).map(function (item, index) {
|
|
9
9
|
return {
|
|
10
10
|
id: "id-" + index,
|
|
11
11
|
test1: "test1-" + index,
|
package/dist/UI/index.js
CHANGED
|
@@ -3,16 +3,20 @@ import { Link, Switch, Route } from 'react-router-dom';
|
|
|
3
3
|
import DefaultTable from './Table/DefaultTable';
|
|
4
4
|
import EditTable from './Table/EditTable';
|
|
5
5
|
import Form from './Form';
|
|
6
|
+
import Modal from './Modal';
|
|
6
7
|
export default function UIComponent() {
|
|
7
8
|
return (React.createElement("div", { style: { padding: '10px' } },
|
|
8
9
|
React.createElement(Link, { to: "/ui/default-table", style: { marginRight: '10px' } }, "\u7B80\u5355\u8868\u683C"),
|
|
9
10
|
React.createElement(Link, { to: "/ui/edit-table", style: { marginRight: '10px' } }, "\u53EF\u7F16\u8F91\u8868\u683C"),
|
|
10
11
|
React.createElement(Link, { to: "/ui/form", style: { marginRight: '10px' } }, "\u8868\u5355"),
|
|
12
|
+
React.createElement(Link, { to: "/ui/modal", style: { marginRight: '10px' } }, "\u5F39\u6846"),
|
|
11
13
|
React.createElement(Switch, null,
|
|
12
14
|
React.createElement(Route, { path: "/ui/default-table" },
|
|
13
15
|
React.createElement(DefaultTable, null)),
|
|
14
16
|
React.createElement(Route, { path: "/ui/edit-table" },
|
|
15
17
|
React.createElement(EditTable, null)),
|
|
16
18
|
React.createElement(Route, { path: "/ui/form" },
|
|
17
|
-
React.createElement(Form, null))
|
|
19
|
+
React.createElement(Form, null)),
|
|
20
|
+
React.createElement(Route, { path: "/ui/modal" },
|
|
21
|
+
React.createElement(Modal, null)))));
|
|
18
22
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 弹出框基本布局
|
|
3
|
+
*/
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { IProModalFormProps } from './interface';
|
|
6
|
+
declare function ModalForm(props: IProModalFormProps): JSX.Element;
|
|
7
|
+
declare const _default: React.MemoExoticComponent<typeof ModalForm>;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* 弹出框基本布局
|
|
25
|
+
*/
|
|
26
|
+
import React, { memo } from 'react';
|
|
27
|
+
import ProForm from '../ProForm';
|
|
28
|
+
function ModalForm(props) {
|
|
29
|
+
var formReset = __rest(props, []);
|
|
30
|
+
return React.createElement(ProForm, __assign({ rightWrapVisible: true }, formReset));
|
|
31
|
+
}
|
|
32
|
+
export default memo(ModalForm);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 表格
|
|
3
|
+
*/
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { IProModalTableProps } from './interface';
|
|
6
|
+
declare function ModalTable(props: IProModalTableProps): JSX.Element;
|
|
7
|
+
declare const _default: React.MemoExoticComponent<typeof ModalTable>;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* 表格
|
|
25
|
+
*/
|
|
26
|
+
import React, { memo } from 'react';
|
|
27
|
+
import ProTable from '../ProTable';
|
|
28
|
+
function ModalTable(props) {
|
|
29
|
+
var tableReset = __rest(props, []);
|
|
30
|
+
return React.createElement(ProTable, __assign({}, tableReset));
|
|
31
|
+
}
|
|
32
|
+
export default memo(ModalTable);
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IProModalProps } from './interface';
|
|
3
|
+
import { IFooterDom } from '../business/Footer';
|
|
4
|
+
interface IUseData {
|
|
5
|
+
visible?: boolean;
|
|
6
|
+
request?: IProModalProps['request'];
|
|
7
|
+
}
|
|
8
|
+
export declare function useData({ visible, request }: IUseData, fetchParams: any): {
|
|
9
|
+
loading: boolean;
|
|
10
|
+
data: any;
|
|
11
|
+
setData: import("react").Dispatch<any>;
|
|
12
|
+
};
|
|
13
|
+
export declare function useModalForm(outsideParams?: any, formPropsDateTransform?: any, visible?: boolean): {
|
|
14
|
+
form: import("antd").FormInstance<any>;
|
|
15
|
+
initialValues: any;
|
|
16
|
+
fetchParams: any;
|
|
17
|
+
onSearchHandle: () => void;
|
|
18
|
+
onResetHandle: () => void;
|
|
19
|
+
};
|
|
20
|
+
export declare function useModalTable(choiceOptions: any, setData: any): {
|
|
21
|
+
innerSelectedRowKeys: any;
|
|
22
|
+
setInnerSelectedRowKeys: import("react").Dispatch<any>;
|
|
23
|
+
innerSelectedRows: any;
|
|
24
|
+
setInnerSelectedRows: import("react").Dispatch<any>;
|
|
25
|
+
onSelectedRowChange: (selectedRowKeys: React.Key[], selectedRows: any[]) => void;
|
|
26
|
+
choiceFilterHandle: (record: any, selectedRowKeys: React.Key[], selectedRows: any[]) => any;
|
|
27
|
+
onTableChange: (newData: any) => void;
|
|
28
|
+
};
|
|
29
|
+
export declare function useFooter(onClose: any, choiceOptions: any, data: any): {
|
|
30
|
+
footerDom: IFooterDom[];
|
|
31
|
+
onCloseHandle: () => void;
|
|
32
|
+
};
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { useState, useEffect, useCallback, useMemo } from 'react';
|
|
13
|
+
import { unstable_batchedUpdates } from 'react-dom';
|
|
14
|
+
import { message } from '../../index';
|
|
15
|
+
import { useForm } from '../ProForm';
|
|
16
|
+
import { timeTransfrom } from 'ztxkutils/dist/tools';
|
|
17
|
+
// 数据获取相关逻辑
|
|
18
|
+
var initData = [];
|
|
19
|
+
export function useData(_a, fetchParams) {
|
|
20
|
+
var visible = _a.visible, request = _a.request;
|
|
21
|
+
var _b = useState(false), loading = _b[0], setLoading = _b[1];
|
|
22
|
+
var _c = useState(initData), data = _c[0], setData = _c[1];
|
|
23
|
+
// 只有当模态框被打开时,才发送数据请求
|
|
24
|
+
useEffect(function () {
|
|
25
|
+
if (visible) {
|
|
26
|
+
setLoading(true);
|
|
27
|
+
if (request) {
|
|
28
|
+
request(fetchParams)
|
|
29
|
+
.then(function (data) {
|
|
30
|
+
unstable_batchedUpdates(function () {
|
|
31
|
+
setLoading(false);
|
|
32
|
+
setData(data);
|
|
33
|
+
});
|
|
34
|
+
})
|
|
35
|
+
.catch(function () {
|
|
36
|
+
unstable_batchedUpdates(function () {
|
|
37
|
+
setLoading(false);
|
|
38
|
+
setData(initData);
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}, [visible, request, fetchParams]);
|
|
44
|
+
return {
|
|
45
|
+
loading: loading,
|
|
46
|
+
data: data,
|
|
47
|
+
setData: setData,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
// 弹出框表单逻辑
|
|
51
|
+
export function useModalForm(outsideParams, formPropsDateTransform, visible) {
|
|
52
|
+
if (outsideParams === void 0) { outsideParams = {}; }
|
|
53
|
+
if (formPropsDateTransform === void 0) { formPropsDateTransform = {}; }
|
|
54
|
+
var form = useForm()[0];
|
|
55
|
+
var _a = useState(outsideParams), fetchParams = _a[0], setFetchParams = _a[1];
|
|
56
|
+
// 初始化表单赋值
|
|
57
|
+
var initialValues = useMemo(function () {
|
|
58
|
+
return outsideParams;
|
|
59
|
+
}, [outsideParams]);
|
|
60
|
+
useEffect(function () {
|
|
61
|
+
if (visible) {
|
|
62
|
+
form.resetFields();
|
|
63
|
+
}
|
|
64
|
+
}, [visible, form]);
|
|
65
|
+
// 查询事件
|
|
66
|
+
var onSearchHandle = useCallback(function () {
|
|
67
|
+
var formParams = form.getFieldsValue(); // 表单数据
|
|
68
|
+
var currentParams = __assign(__assign({}, outsideParams), formParams);
|
|
69
|
+
// 将日期格式转换成数据查询时 所需要的格式
|
|
70
|
+
var newParams = timeTransfrom(__assign({ params: currentParams }, formPropsDateTransform));
|
|
71
|
+
setFetchParams(newParams);
|
|
72
|
+
}, [form, outsideParams, formPropsDateTransform]);
|
|
73
|
+
// 重置事件
|
|
74
|
+
var onResetHandle = useCallback(function () {
|
|
75
|
+
form.resetFields();
|
|
76
|
+
}, [form]);
|
|
77
|
+
return {
|
|
78
|
+
form: form,
|
|
79
|
+
initialValues: initialValues,
|
|
80
|
+
fetchParams: fetchParams,
|
|
81
|
+
onSearchHandle: onSearchHandle,
|
|
82
|
+
onResetHandle: onResetHandle,
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
// 模态表格相关逻辑
|
|
86
|
+
var initSelectedRowKeys = [];
|
|
87
|
+
var initSelectedRows = [];
|
|
88
|
+
export function useModalTable(choiceOptions, setData) {
|
|
89
|
+
var tablePropsChoiceFilterHandle = choiceOptions.tablePropsChoiceFilterHandle, tablePropsSelectedRowKeys = choiceOptions.tablePropsSelectedRowKeys, tablePropsSelectedRows = choiceOptions.tablePropsSelectedRows, tablePropsIsRepeatChoice = choiceOptions.tablePropsIsRepeatChoice, visible = choiceOptions.visible;
|
|
90
|
+
// 内部管理已选中行
|
|
91
|
+
var _a = useState(initSelectedRowKeys), innerSelectedRowKeys = _a[0], setInnerSelectedRowKeys = _a[1];
|
|
92
|
+
var _b = useState(initSelectedRows), innerSelectedRows = _b[0], setInnerSelectedRows = _b[1];
|
|
93
|
+
// 是否要默认选中,如果设置了默认选中,那么模态框展示的时候 需要默认选中
|
|
94
|
+
useEffect(function () {
|
|
95
|
+
if (visible) {
|
|
96
|
+
if (tablePropsIsRepeatChoice) {
|
|
97
|
+
setInnerSelectedRowKeys(tablePropsSelectedRowKeys);
|
|
98
|
+
setInnerSelectedRows(tablePropsSelectedRows);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}, [
|
|
102
|
+
visible,
|
|
103
|
+
tablePropsIsRepeatChoice,
|
|
104
|
+
tablePropsSelectedRowKeys,
|
|
105
|
+
tablePropsSelectedRows,
|
|
106
|
+
]);
|
|
107
|
+
// 选中行 触发事件
|
|
108
|
+
var onSelectedRowChange = useCallback(function (selectedRowKeys, selectedRows) {
|
|
109
|
+
setInnerSelectedRowKeys(selectedRowKeys);
|
|
110
|
+
setInnerSelectedRows(selectedRows);
|
|
111
|
+
}, []);
|
|
112
|
+
// 过滤规则
|
|
113
|
+
var choiceFilterHandle = useCallback(function (record, selectedRowKeys, selectedRows) {
|
|
114
|
+
if (tablePropsChoiceFilterHandle) {
|
|
115
|
+
return tablePropsChoiceFilterHandle(record, selectedRowKeys, selectedRows);
|
|
116
|
+
}
|
|
117
|
+
return {};
|
|
118
|
+
}, [tablePropsChoiceFilterHandle]);
|
|
119
|
+
// 表格onChange事件
|
|
120
|
+
var onTableChange = useCallback(function (newData) {
|
|
121
|
+
setData(newData);
|
|
122
|
+
}, [setData]);
|
|
123
|
+
return {
|
|
124
|
+
innerSelectedRowKeys: innerSelectedRowKeys,
|
|
125
|
+
setInnerSelectedRowKeys: setInnerSelectedRowKeys,
|
|
126
|
+
innerSelectedRows: innerSelectedRows,
|
|
127
|
+
setInnerSelectedRows: setInnerSelectedRows,
|
|
128
|
+
onSelectedRowChange: onSelectedRowChange,
|
|
129
|
+
choiceFilterHandle: choiceFilterHandle,
|
|
130
|
+
onTableChange: onTableChange,
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
// 底部按钮相关
|
|
134
|
+
export function useFooter(onClose, choiceOptions, data) {
|
|
135
|
+
var innerSelectedRowKeys = choiceOptions.innerSelectedRowKeys, setInnerSelectedRowKeys = choiceOptions.setInnerSelectedRowKeys, setInnerSelectedRows = choiceOptions.setInnerSelectedRows, tablePropsOnSelectedRowChange = choiceOptions.tablePropsOnSelectedRowChange, tablePropsRowKey = choiceOptions.tablePropsRowKey; // 内部选中项
|
|
136
|
+
// 点击确认选择 触发回调 清空内部选中项
|
|
137
|
+
// 重置值为最新值
|
|
138
|
+
var onSureHandle = useCallback(function () {
|
|
139
|
+
if (!Array.isArray(innerSelectedRowKeys) ||
|
|
140
|
+
innerSelectedRowKeys.length === 0) {
|
|
141
|
+
message.info('请选择数据!');
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
// 找到真实得数据
|
|
145
|
+
var newInnerSelectedRows = [];
|
|
146
|
+
if (Array.isArray(data)) {
|
|
147
|
+
innerSelectedRowKeys.forEach(function (rowKey) {
|
|
148
|
+
var item = data.find(function (dataItem) { return dataItem[tablePropsRowKey] === rowKey; });
|
|
149
|
+
if (item) {
|
|
150
|
+
newInnerSelectedRows.push(item);
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
tablePropsOnSelectedRowChange &&
|
|
155
|
+
tablePropsOnSelectedRowChange(innerSelectedRowKeys, newInnerSelectedRows);
|
|
156
|
+
setInnerSelectedRowKeys(initSelectedRowKeys);
|
|
157
|
+
setInnerSelectedRows(initSelectedRows);
|
|
158
|
+
onClose && onClose();
|
|
159
|
+
}, [
|
|
160
|
+
innerSelectedRowKeys,
|
|
161
|
+
setInnerSelectedRowKeys,
|
|
162
|
+
setInnerSelectedRows,
|
|
163
|
+
tablePropsOnSelectedRowChange,
|
|
164
|
+
onClose,
|
|
165
|
+
data,
|
|
166
|
+
tablePropsRowKey,
|
|
167
|
+
]);
|
|
168
|
+
var onCloseHandle = useCallback(function () {
|
|
169
|
+
setInnerSelectedRowKeys(initSelectedRowKeys);
|
|
170
|
+
setInnerSelectedRows(initSelectedRows);
|
|
171
|
+
onClose && onClose();
|
|
172
|
+
}, [onClose, setInnerSelectedRowKeys, setInnerSelectedRows]);
|
|
173
|
+
var footerDom = useMemo(function () {
|
|
174
|
+
return [
|
|
175
|
+
{
|
|
176
|
+
DOMType: 'button',
|
|
177
|
+
type: 'default',
|
|
178
|
+
text: '取消',
|
|
179
|
+
onClick: onCloseHandle,
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
DOMType: 'button',
|
|
183
|
+
type: 'primary',
|
|
184
|
+
text: '确认选择',
|
|
185
|
+
onClick: onSureHandle,
|
|
186
|
+
},
|
|
187
|
+
];
|
|
188
|
+
}, [onCloseHandle, onSureHandle]);
|
|
189
|
+
return {
|
|
190
|
+
footerDom: footerDom,
|
|
191
|
+
onCloseHandle: onCloseHandle,
|
|
192
|
+
};
|
|
193
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 模态框封装
|
|
3
|
+
* 是否需要每次打开模态框都是初始状态
|
|
4
|
+
* 1. 表单部分
|
|
5
|
+
* 2. 表格部分
|
|
6
|
+
* 3. 子表部分
|
|
7
|
+
*/
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import { IProModalProps } from './interface';
|
|
10
|
+
declare function ProModal(props: IProModalProps): JSX.Element;
|
|
11
|
+
export declare function useVisible(): {
|
|
12
|
+
visible: boolean;
|
|
13
|
+
onClose: () => void;
|
|
14
|
+
onOpen: () => void;
|
|
15
|
+
};
|
|
16
|
+
declare const _default: React.MemoExoticComponent<typeof ProModal>;
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* 模态框封装
|
|
25
|
+
* 是否需要每次打开模态框都是初始状态
|
|
26
|
+
* 1. 表单部分
|
|
27
|
+
* 2. 表格部分
|
|
28
|
+
* 3. 子表部分
|
|
29
|
+
*/
|
|
30
|
+
import React, { memo, useState, useCallback } from 'react';
|
|
31
|
+
import Modal from '../Modal';
|
|
32
|
+
import ModalForm from './ModalForm';
|
|
33
|
+
import ModalTable from './ModalTable';
|
|
34
|
+
import Footer from '../business/Footer';
|
|
35
|
+
import { useData, useModalForm, useModalTable, useFooter } from './hooks';
|
|
36
|
+
function ProModal(props) {
|
|
37
|
+
console.log('ProModal render');
|
|
38
|
+
// 属性提取
|
|
39
|
+
var children = props.children, request = props.request, visible = props.visible, onClose = props.onClose, value = props.value, onChange = props.onChange, outsideParams = props.outsideParams, formPropsItems = props.formPropsItems, formPropsShowDynamic = props.formPropsShowDynamic, formPropsShowDynamicKey = props.formPropsShowDynamicKey, formPropsDateTransform = props.formPropsDateTransform, formPropsReset = props.formPropsReset, tablePropsColumns = props.tablePropsColumns, tablePropsRowKey = props.tablePropsRowKey, tablePropsShowColumnDynamic = props.tablePropsShowColumnDynamic, tablePropsShowColumnDynamicKey = props.tablePropsShowColumnDynamicKey, tablePropsReset = props.tablePropsReset, tablePropsIsChoice = props.tablePropsIsChoice, tablePropsIsChoiceMode = props.tablePropsIsChoiceMode, tablePropsIsChoiceFilter = props.tablePropsIsChoiceFilter, tablePropsChoiceFilterHandle = props.tablePropsChoiceFilterHandle, tablePropsSelectedRowKeys = props.tablePropsSelectedRowKeys, tablePropsSelectedRows = props.tablePropsSelectedRows, tablePropsOnSelectedRowChange = props.tablePropsOnSelectedRowChange, tablePropsOnSelect = props.tablePropsOnSelect, tablePropsIsRepeatChoice = props.tablePropsIsRepeatChoice, modalReset = __rest(props, ["children", "request", "visible", "onClose", "value", "onChange", "outsideParams", "formPropsItems", "formPropsShowDynamic", "formPropsShowDynamicKey", "formPropsDateTransform", "formPropsReset", "tablePropsColumns", "tablePropsRowKey", "tablePropsShowColumnDynamic", "tablePropsShowColumnDynamicKey", "tablePropsReset", "tablePropsIsChoice", "tablePropsIsChoiceMode", "tablePropsIsChoiceFilter", "tablePropsChoiceFilterHandle", "tablePropsSelectedRowKeys", "tablePropsSelectedRows", "tablePropsOnSelectedRowChange", "tablePropsOnSelect", "tablePropsIsRepeatChoice"]);
|
|
40
|
+
// 获取表单相关信息
|
|
41
|
+
var _a = useModalForm(outsideParams, formPropsDateTransform, visible), form = _a.form, initialValues = _a.initialValues, fetchParams = _a.fetchParams, onSearchHandle = _a.onSearchHandle, onResetHandle = _a.onResetHandle;
|
|
42
|
+
// 弹出框内部获取数据相关逻辑
|
|
43
|
+
var _b = useData({ visible: visible, request: request }, fetchParams), loading = _b.loading, data = _b.data, setData = _b.setData;
|
|
44
|
+
// 弹出表格选中事件处理
|
|
45
|
+
var _c = useModalTable({
|
|
46
|
+
tablePropsChoiceFilterHandle: tablePropsChoiceFilterHandle,
|
|
47
|
+
tablePropsSelectedRowKeys: tablePropsSelectedRowKeys,
|
|
48
|
+
tablePropsSelectedRows: tablePropsSelectedRows,
|
|
49
|
+
tablePropsIsRepeatChoice: tablePropsIsRepeatChoice,
|
|
50
|
+
visible: visible,
|
|
51
|
+
}, setData), innerSelectedRowKeys = _c.innerSelectedRowKeys, setInnerSelectedRowKeys = _c.setInnerSelectedRowKeys, innerSelectedRows = _c.innerSelectedRows, setInnerSelectedRows = _c.setInnerSelectedRows, choiceFilterHandle = _c.choiceFilterHandle, onSelectedRowChange = _c.onSelectedRowChange, onTableChange = _c.onTableChange;
|
|
52
|
+
// 确定 取消相关事件
|
|
53
|
+
var _d = useFooter(onClose, {
|
|
54
|
+
innerSelectedRowKeys: innerSelectedRowKeys,
|
|
55
|
+
setInnerSelectedRowKeys: setInnerSelectedRowKeys,
|
|
56
|
+
innerSelectedRows: innerSelectedRows,
|
|
57
|
+
setInnerSelectedRows: setInnerSelectedRows,
|
|
58
|
+
tablePropsOnSelectedRowChange: tablePropsOnSelectedRowChange,
|
|
59
|
+
tablePropsRowKey: tablePropsRowKey,
|
|
60
|
+
}, data), footerDom = _d.footerDom, onCloseHandle = _d.onCloseHandle;
|
|
61
|
+
return (React.createElement(Modal, __assign({ loading: loading, visible: visible, onCancel: onCloseHandle, width: "80%", destroyOnClose: true, footer: null }, modalReset),
|
|
62
|
+
React.createElement(ModalForm, __assign({ items: formPropsItems, form: form, showDynamic: formPropsShowDynamic, showDynamicKey: formPropsShowDynamicKey, onSearchHandle: onSearchHandle, onResetHandle: onResetHandle, initialValues: initialValues }, formPropsReset)),
|
|
63
|
+
React.createElement(ModalTable, __assign({ columns: tablePropsColumns, rowKey: tablePropsRowKey, showColumnDynamic: tablePropsShowColumnDynamic, showColumnDynamicKey: tablePropsShowColumnDynamicKey, dataSource: data, isChoice: tablePropsIsChoice, choiceMode: tablePropsIsChoiceMode, isChoiceFilter: tablePropsIsChoiceFilter, selectedRowKeys: innerSelectedRowKeys, selectedRows: innerSelectedRows, choiceFilterHandle: choiceFilterHandle, onSelectedRowChange: onSelectedRowChange, onSelect: tablePropsOnSelect, onChange: onTableChange }, tablePropsReset)),
|
|
64
|
+
children,
|
|
65
|
+
React.createElement(Footer, { footerDom: footerDom, style: { marginTop: '10px' }, align: "right" })));
|
|
66
|
+
}
|
|
67
|
+
export function useVisible() {
|
|
68
|
+
var _a = useState(false), visible = _a[0], setVisible = _a[1];
|
|
69
|
+
var onClose = useCallback(function () {
|
|
70
|
+
setVisible(false);
|
|
71
|
+
}, []);
|
|
72
|
+
var onOpen = useCallback(function () {
|
|
73
|
+
setVisible(true);
|
|
74
|
+
}, []);
|
|
75
|
+
return {
|
|
76
|
+
visible: visible,
|
|
77
|
+
onClose: onClose,
|
|
78
|
+
onOpen: onOpen,
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
export default memo(ProModal);
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IProFormProps } from '../ProForm/interface';
|
|
3
|
+
import { ColumnsType } from '../Table';
|
|
4
|
+
import { IProps as IProTableProps } from '../ProTable/interface';
|
|
5
|
+
import { ModalProps } from 'antd/lib/modal';
|
|
6
|
+
export interface IDateTransform {
|
|
7
|
+
fromKey: (string | string[])[];
|
|
8
|
+
toKey: (string | string[])[];
|
|
9
|
+
type?: 'string' | 'object';
|
|
10
|
+
format?: string | string[];
|
|
11
|
+
}
|
|
12
|
+
export interface IProModalProps extends ModalProps {
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
request?: (params: any) => Promise<any>;
|
|
15
|
+
visible?: boolean;
|
|
16
|
+
onClose?: () => void;
|
|
17
|
+
value?: any;
|
|
18
|
+
onChange?: (value: any) => void;
|
|
19
|
+
/** 外部的查询参数 */
|
|
20
|
+
outsideParams?: any;
|
|
21
|
+
/** 表单配置 */
|
|
22
|
+
formPropsItems: IProFormProps['items'];
|
|
23
|
+
formPropsShowDynamic?: boolean;
|
|
24
|
+
formPropsShowDynamicKey?: string;
|
|
25
|
+
formPropsReset?: Partial<IProFormProps>;
|
|
26
|
+
formPropsDateTransform?: IDateTransform;
|
|
27
|
+
/** 表格配置 */
|
|
28
|
+
tablePropsColumns: ColumnsType<any>;
|
|
29
|
+
tablePropsRowKey: string;
|
|
30
|
+
tablePropsShowColumnDynamic?: boolean;
|
|
31
|
+
tablePropsShowColumnDynamicKey?: string;
|
|
32
|
+
tablePropsReset?: Partial<IProTableProps<any>>;
|
|
33
|
+
tablePropsIsChoice?: boolean;
|
|
34
|
+
tablePropsIsChoiceMode?: IProTableProps<any>['choiceMode'];
|
|
35
|
+
tablePropsIsChoiceFilter?: boolean;
|
|
36
|
+
tablePropsChoiceFilterHandle?: IProTableProps<any>['choiceFilterHandle'];
|
|
37
|
+
tablePropsSelectedRowKeys?: IProTableProps<any>['selectedRowKeys'];
|
|
38
|
+
tablePropsSelectedRows?: IProTableProps<any>['selectedRows'];
|
|
39
|
+
tablePropsOnSelectedRowChange?: IProTableProps<any>['onSelectedRowChange'];
|
|
40
|
+
tablePropsOnSelect?: IProTableProps<any>['onSelect'];
|
|
41
|
+
/** 模态框是否可以重复选择 */
|
|
42
|
+
tablePropsIsRepeatChoice?: boolean;
|
|
43
|
+
}
|
|
44
|
+
export interface IProModalFormProps extends IProFormProps {
|
|
45
|
+
}
|
|
46
|
+
export interface IProModalTableProps extends IProTableProps<any> {
|
|
47
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { IProps } from './interface';
|
|
3
|
+
import { TableRowSelection } from '../../components/Table/index';
|
|
2
4
|
export declare function useDataSourceRef<D>(dataSource: D[]): import("react").MutableRefObject<D[]>;
|
|
3
5
|
export declare function useAddAndDelRow(showAddIcon: any, showDelIcon: any, dataSourceRef: any, addDataMode: any, addDataReturnRecord: any, onChange: any, rowKey: any, refreshScuCell: any): {
|
|
4
6
|
needAddAndDel: any;
|
|
@@ -9,10 +11,18 @@ export declare function useEditRow(onChange: any, dataSourceRef: any, innerTable
|
|
|
9
11
|
onBatchPastePre: any;
|
|
10
12
|
onBatchPastePost: any;
|
|
11
13
|
}): {
|
|
12
|
-
onEditableSaveHandle: (record: any, index: number | undefined, _dataIndex?: string) => void;
|
|
14
|
+
onEditableSaveHandle: (record: any, index: number | undefined, _dataIndex?: string, otherConfig?: any) => void;
|
|
13
15
|
onBatchPasteHandle: (records: any, startIndex: any) => void;
|
|
14
16
|
};
|
|
15
17
|
export declare function useScuRfresh(): {
|
|
16
18
|
refreshScuCell: () => void;
|
|
17
19
|
getRefreshScuCell: () => boolean;
|
|
18
20
|
};
|
|
21
|
+
export declare function useChoice(choiceMode: IProps<any>['choiceMode'], filterOptions: any, selectedRowOptions: {
|
|
22
|
+
selectedRowKeys: IProps<any>['selectedRowKeys'];
|
|
23
|
+
selectedRows: IProps<any>['selectedRows'];
|
|
24
|
+
onSelectedRowChange: IProps<any>['onSelectedRowChange'];
|
|
25
|
+
onSelect: IProps<any>['onSelect'];
|
|
26
|
+
}): {
|
|
27
|
+
rowSelection: TableRowSelection<any>;
|
|
28
|
+
};
|
|
@@ -104,24 +104,35 @@ export function useMoveRow(onChange, dataSourceRef, refreshScuCell) {
|
|
|
104
104
|
}
|
|
105
105
|
// 编辑行相关
|
|
106
106
|
function objIsEqual(newObj, oldObj) {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
var
|
|
110
|
-
if (
|
|
107
|
+
try {
|
|
108
|
+
var keys = Object.keys(newObj);
|
|
109
|
+
var oldKeys = Object.keys(oldObj);
|
|
110
|
+
if (keys.length !== oldKeys.length) {
|
|
111
111
|
return false;
|
|
112
112
|
}
|
|
113
|
+
for (var i = 0; i < keys.length; i++) {
|
|
114
|
+
var key = keys[i];
|
|
115
|
+
if (oldObj[key] !== newObj[key]) {
|
|
116
|
+
return false;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
return true;
|
|
120
|
+
}
|
|
121
|
+
catch (err) {
|
|
122
|
+
return false;
|
|
113
123
|
}
|
|
114
|
-
return true;
|
|
115
124
|
}
|
|
116
125
|
export function useEditRow(onChange, dataSourceRef, innerTableHandleRef, _a) {
|
|
117
126
|
var onBatchPastePre = _a.onBatchPastePre, onBatchPastePost = _a.onBatchPastePost;
|
|
118
|
-
var onEditableSaveHandle = useCallback(function (record, index, _dataIndex) {
|
|
127
|
+
var onEditableSaveHandle = useCallback(function (record, index, _dataIndex, otherConfig) {
|
|
119
128
|
var _a;
|
|
120
129
|
var _b, _c, _d, _e;
|
|
121
130
|
if (_dataIndex === void 0) { _dataIndex = ''; }
|
|
122
131
|
if (typeof index === 'number') {
|
|
123
132
|
// TODO:帮助找到真实的index,如果开启内部分页 需要这么做
|
|
124
|
-
var realyIndex =
|
|
133
|
+
var realyIndex = otherConfig && otherConfig.isInner
|
|
134
|
+
? index
|
|
135
|
+
: (_c = (_b = innerTableHandleRef.current) === null || _b === void 0 ? void 0 : _b.getRealyIndex) === null || _c === void 0 ? void 0 : _c.call(_b, index);
|
|
125
136
|
var newDataSource = __spreadArray([], dataSourceRef.current);
|
|
126
137
|
var oldRecord = newDataSource[realyIndex];
|
|
127
138
|
// 如果新的record里面的值 老的Record里面有 那么不需要触发onChange
|
|
@@ -130,7 +141,9 @@ export function useEditRow(onChange, dataSourceRef, innerTableHandleRef, _a) {
|
|
|
130
141
|
return;
|
|
131
142
|
}
|
|
132
143
|
// TODO:清楚错误样式
|
|
133
|
-
|
|
144
|
+
if (!otherConfig || (otherConfig && !otherConfig.isInner)) {
|
|
145
|
+
(_e = (_d = innerTableHandleRef === null || innerTableHandleRef === void 0 ? void 0 : innerTableHandleRef.current) === null || _d === void 0 ? void 0 : _d.clearErrorClass) === null || _e === void 0 ? void 0 : _e.call(_d, index);
|
|
146
|
+
}
|
|
134
147
|
var newRecord = _dataIndex
|
|
135
148
|
? __assign(__assign(__assign({}, record), oldRecord), (_a = {}, _a[_dataIndex] = record[_dataIndex], _a)) : __assign(__assign({}, oldRecord), record);
|
|
136
149
|
newDataSource.splice(realyIndex, 1, newRecord);
|
|
@@ -218,3 +231,42 @@ export function useScuRfresh() {
|
|
|
218
231
|
getRefreshScuCell: getRefreshScuCell,
|
|
219
232
|
};
|
|
220
233
|
}
|
|
234
|
+
// 选择相关控制
|
|
235
|
+
export function useChoice(choiceMode, filterOptions, selectedRowOptions) {
|
|
236
|
+
if (choiceMode === void 0) { choiceMode = 'checkbox'; }
|
|
237
|
+
var isChoiceFilter = filterOptions.isChoiceFilter, choiceFilterHandle = filterOptions.choiceFilterHandle;
|
|
238
|
+
var selectedRowKeys = selectedRowOptions.selectedRowKeys, selectedRows = selectedRowOptions.selectedRows, onSelectedRowChange = selectedRowOptions.onSelectedRowChange, onSelect = selectedRowOptions.onSelect;
|
|
239
|
+
var rowSelection = useMemo(function () {
|
|
240
|
+
return {
|
|
241
|
+
type: choiceMode,
|
|
242
|
+
selectedRowKeys: selectedRowKeys,
|
|
243
|
+
onChange: function (selectedRowKeys, selectedRows) {
|
|
244
|
+
onSelectedRowChange &&
|
|
245
|
+
onSelectedRowChange(selectedRowKeys, selectedRows);
|
|
246
|
+
},
|
|
247
|
+
onSelect: function (record, selected, selectedRows) {
|
|
248
|
+
onSelect && onSelect(record, selected, selectedRows);
|
|
249
|
+
},
|
|
250
|
+
// 过滤规则设置
|
|
251
|
+
getCheckboxProps: function (record) {
|
|
252
|
+
// 如果不开启过滤 那么全都可以选
|
|
253
|
+
if (!isChoiceFilter) {
|
|
254
|
+
return {};
|
|
255
|
+
}
|
|
256
|
+
// 如果传入了过滤函数,那么如何过滤用户自定义
|
|
257
|
+
if (choiceFilterHandle) {
|
|
258
|
+
return choiceFilterHandle(record, selectedRowKeys, selectedRows);
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
};
|
|
262
|
+
}, [
|
|
263
|
+
choiceMode,
|
|
264
|
+
isChoiceFilter,
|
|
265
|
+
choiceFilterHandle,
|
|
266
|
+
selectedRowKeys,
|
|
267
|
+
selectedRows,
|
|
268
|
+
onSelectedRowChange,
|
|
269
|
+
onSelect,
|
|
270
|
+
]);
|
|
271
|
+
return { rowSelection: rowSelection };
|
|
272
|
+
}
|
|
@@ -25,9 +25,9 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
25
25
|
*/
|
|
26
26
|
import React, { memo, useRef, useImperativeHandle } from 'react';
|
|
27
27
|
import { Table } from '../../index';
|
|
28
|
-
import { useDataSourceRef, useAddAndDelRow, useScuRfresh, useMoveRow, useEditRow, } from './hooks';
|
|
28
|
+
import { useDataSourceRef, useAddAndDelRow, useScuRfresh, useMoveRow, useEditRow, useChoice, } from './hooks';
|
|
29
29
|
function ProEditTable(props) {
|
|
30
|
-
var rowKey = props.rowKey, dataSource = props.dataSource, columns = props.columns, onChange = props.onChange, showAddIcon = props.showAddIcon, showDelIcon = props.showDelIcon, _a = props.addDataMode, addDataMode = _a === void 0 ? 'blank' : _a, addDataReturnRecord = props.addDataReturnRecord, isMove = props.isMove, isEdit = props.isEdit, isPaste = props.isPaste, tableHandleRef = props.tableHandleRef, onBatchPastePre = props.onBatchPastePre, onBatchPastePost = props.onBatchPastePost, restProps = __rest(props, ["rowKey", "dataSource", "columns", "onChange", "showAddIcon", "showDelIcon", "addDataMode", "addDataReturnRecord", "isMove", "isEdit", "isPaste", "tableHandleRef", "onBatchPastePre", "onBatchPastePost"]);
|
|
30
|
+
var rowKey = props.rowKey, dataSource = props.dataSource, columns = props.columns, onChange = props.onChange, showAddIcon = props.showAddIcon, showDelIcon = props.showDelIcon, _a = props.addDataMode, addDataMode = _a === void 0 ? 'blank' : _a, addDataReturnRecord = props.addDataReturnRecord, isMove = props.isMove, isEdit = props.isEdit, isPaste = props.isPaste, tableHandleRef = props.tableHandleRef, onBatchPastePre = props.onBatchPastePre, onBatchPastePost = props.onBatchPastePost, isChoice = props.isChoice, choiceMode = props.choiceMode, isChoiceFilter = props.isChoiceFilter, choiceFilterHandle = props.choiceFilterHandle, selectedRowKeys = props.selectedRowKeys, selectedRows = props.selectedRows, onSelectedRowChange = props.onSelectedRowChange, onSelect = props.onSelect, restProps = __rest(props, ["rowKey", "dataSource", "columns", "onChange", "showAddIcon", "showDelIcon", "addDataMode", "addDataReturnRecord", "isMove", "isEdit", "isPaste", "tableHandleRef", "onBatchPastePre", "onBatchPastePost", "isChoice", "choiceMode", "isChoiceFilter", "choiceFilterHandle", "selectedRowKeys", "selectedRows", "onSelectedRowChange", "onSelect"]);
|
|
31
31
|
var innerTableHandleRef = useRef();
|
|
32
32
|
var tableColumns = columns.map(function (item) {
|
|
33
33
|
if (item.shouldCellUpdate) {
|
|
@@ -54,6 +54,16 @@ function ProEditTable(props) {
|
|
|
54
54
|
onBatchPastePre: onBatchPastePre,
|
|
55
55
|
onBatchPastePost: onBatchPastePost,
|
|
56
56
|
}), onEditableSaveHandle = _d.onEditableSaveHandle, onBatchPasteHandle = _d.onBatchPasteHandle;
|
|
57
|
+
// 选择行相关hook
|
|
58
|
+
var rowSelection = useChoice(choiceMode, {
|
|
59
|
+
isChoiceFilter: isChoiceFilter,
|
|
60
|
+
choiceFilterHandle: choiceFilterHandle,
|
|
61
|
+
}, {
|
|
62
|
+
selectedRowKeys: selectedRowKeys,
|
|
63
|
+
selectedRows: selectedRows,
|
|
64
|
+
onSelectedRowChange: onSelectedRowChange,
|
|
65
|
+
onSelect: onSelect,
|
|
66
|
+
}).rowSelection;
|
|
57
67
|
useImperativeHandle(tableHandleRef, function () { return ({
|
|
58
68
|
validate: innerTableHandleRef.current.validate,
|
|
59
69
|
clearErrorClass: innerTableHandleRef.current.clearErrorClass,
|
|
@@ -61,6 +71,6 @@ function ProEditTable(props) {
|
|
|
61
71
|
getRealyIndex: innerTableHandleRef.current.getRealyIndex,
|
|
62
72
|
onEditableSaveHandle: onEditableSaveHandle,
|
|
63
73
|
}); });
|
|
64
|
-
return (React.createElement(Table, __assign({ rowKey: rowKey, dataSource: dataSource, columns: tableColumns, hideAddIcon: !showAddIcon, hideDelIcon: !showDelIcon, onAddAndDelHandle: needAddAndDel ? onAddAndDelHandle : undefined, onMoveRow: isMove ? onMoveRowHandle : undefined, onEditableSave: isEdit ? onEditableSaveHandle : undefined, tableHandleRef: innerTableHandleRef, onTableChange: isPaste ? onBatchPasteHandle : undefined }, restProps)));
|
|
74
|
+
return (React.createElement(Table, __assign({ rowKey: rowKey, dataSource: dataSource, columns: tableColumns, hideAddIcon: !showAddIcon, hideDelIcon: !showDelIcon, onAddAndDelHandle: needAddAndDel ? onAddAndDelHandle : undefined, onMoveRow: isMove ? onMoveRowHandle : undefined, onEditableSave: isEdit ? onEditableSaveHandle : undefined, tableHandleRef: innerTableHandleRef, onTableChange: isPaste ? onBatchPasteHandle : undefined, rowSelection: isChoice ? rowSelection : undefined }, restProps)));
|
|
65
75
|
}
|
|
66
76
|
export default memo(ProEditTable);
|
|
@@ -29,6 +29,14 @@ export interface IProps<RecordType> extends Omit<TableIProps<RecordType>, 'colum
|
|
|
29
29
|
currentIndex: number;
|
|
30
30
|
endIndex?: number;
|
|
31
31
|
}) => any[];
|
|
32
|
+
isChoice?: boolean;
|
|
33
|
+
choiceMode?: 'radio' | 'checkbox';
|
|
34
|
+
isChoiceFilter?: boolean;
|
|
35
|
+
choiceFilterHandle?: (record: any, selectedRowKeys: React.Key[], selectedRows: any[]) => any;
|
|
36
|
+
selectedRowKeys?: React.Key[];
|
|
37
|
+
selectedRows?: any[];
|
|
38
|
+
onSelectedRowChange?: (selectedRowKeys: React.Key[], selectedRows: any[]) => void;
|
|
39
|
+
onSelect?: (record: any, selected: boolean, selectedRows: any) => void;
|
|
32
40
|
tableHandleRef?: React.Ref<{
|
|
33
41
|
validate: () => Promise<any>;
|
|
34
42
|
clearErrorClass: (index: number) => void;
|
|
@@ -1,12 +1,26 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
1
12
|
import React, { memo } from 'react';
|
|
2
13
|
import { Pagination, Button, Layout, Dropdown } from '../../../index';
|
|
3
14
|
var pageSizeOptions = ['10', '20', '30', '100'];
|
|
4
|
-
var ZtFooter = Layout.Footer;
|
|
5
15
|
var Footer = function (_a) {
|
|
6
|
-
var footerDom = _a.footerDom,
|
|
7
|
-
return (React.createElement(
|
|
16
|
+
var footerDom = _a.footerDom, _b = _a.style, style = _b === void 0 ? {} : _b, className = _a.className, _c = _a.align, align = _c === void 0 ? 'left' : _c;
|
|
17
|
+
return (React.createElement(Layout.Footer, { className: className
|
|
8
18
|
? "footer hidden-print-footer " + className
|
|
9
|
-
: 'footer hidden-print-footer', style:
|
|
19
|
+
: 'footer hidden-print-footer', style: __assign({ justifyContent: align === 'left'
|
|
20
|
+
? 'flex-start'
|
|
21
|
+
: align === 'center'
|
|
22
|
+
? 'center'
|
|
23
|
+
: 'flex-end' }, style) }, footerDom ? (React.createElement("div", { className: "footer__btn-group" }, footerDom.map(function (item, index) {
|
|
10
24
|
if (item.DOMType === 'button') {
|
|
11
25
|
var type = item.type, loading = item.loading, disabled = item.disabled, onClick = item.onClick;
|
|
12
26
|
return (React.createElement(Button, { key: index, type: type, loading: loading, disabled: disabled, onClick: onClick }, item.text));
|
package/dist/index.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export { default as Menu } from './components/Menu';
|
|
|
15
15
|
export { default as Layout } from './components/Layout';
|
|
16
16
|
export { default as Tabs } from './components/Tabs';
|
|
17
17
|
export { default as Modal } from './components/Modal';
|
|
18
|
+
export { default as ProModal } from './components/ProModal';
|
|
18
19
|
export { default as Pagination } from './components/Pagination';
|
|
19
20
|
export { default as Table } from './components/Table';
|
|
20
21
|
export { default as ProTable } from './components/ProTable';
|
package/dist/index.js
CHANGED
|
@@ -143,6 +143,7 @@ export { default as Menu } from './components/Menu';
|
|
|
143
143
|
export { default as Layout } from './components/Layout';
|
|
144
144
|
export { default as Tabs } from './components/Tabs';
|
|
145
145
|
export { default as Modal } from './components/Modal';
|
|
146
|
+
export { default as ProModal } from './components/ProModal';
|
|
146
147
|
export { default as Pagination } from './components/Pagination';
|
|
147
148
|
export { default as Table } from './components/Table';
|
|
148
149
|
export { default as ProTable } from './components/ProTable';
|