@teamix/pro 1.1.4 → 1.1.8
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/README.md +97 -0
- package/dist/212.js +2 -2
- package/dist/pro.css +1 -1
- package/dist/pro.js +3147 -1872
- package/dist/pro.min.css +1 -1
- package/dist/pro.min.js +1 -1
- package/dist/pro.min.js.LICENSE.txt +1 -1
- package/es/actions/dialog-form.d.ts +3 -3
- package/es/actions/dialog-table.d.ts +6 -1
- package/es/actions/dialog-table.js +10 -1
- package/es/actions/drawer-table.d.ts +4 -0
- package/es/actions/drawer-table.js +7 -1
- package/es/actions/index.d.ts +6 -11
- package/es/actions/index.js +41 -21
- package/es/actions/index.scss +1 -1
- package/es/card/index.d.ts +17 -0
- package/es/form/Components/ProField/index.d.ts +8 -0
- package/es/form/ProForm/index.d.ts +2 -2
- package/es/form/ProForm/index.js +9 -2
- package/es/form/ProForm/index.scss +40 -7
- package/es/form/SchemaForm/adapterType.js +3 -3
- package/es/form/SchemaForm/index.d.ts +2 -2
- package/es/form/SchemaForm/index.js +9 -5
- package/es/form/SchemaForm/initializeArrayCards.js +10 -55
- package/es/form/SchemaForm/initializeArrayCollapse.js +10 -64
- package/es/form/SchemaForm/initializeArrayIcon.js +19 -7
- package/es/form/SchemaForm/initializeArrayItems.js +16 -75
- package/es/form/SchemaForm/initializeArrayTable.js +23 -33
- package/es/form/SchemaForm/initializeFormButton.js +35 -38
- package/es/form/SchemaForm/initializeFormGroup.d.ts +2 -2
- package/es/form/SchemaForm/initializeFormStep.d.ts +4 -2
- package/es/form/SchemaForm/initializeFormStep.js +21 -7
- package/es/form/SchemaForm/initializeFormTab.d.ts +2 -2
- package/es/form/SchemaForm/initializeProField.js +3 -3
- package/es/form/SchemaForm/reactions.d.ts +1 -1
- package/es/form/SchemaForm/reactions.js +2 -2
- package/es/form/index.d.ts +17 -9
- package/es/form/index.js +21 -9
- package/es/form/typing.d.ts +13 -22
- package/es/form/warning.js +2 -6
- package/es/index.d.ts +4 -3
- package/es/index.js +4 -3
- package/es/info/components/FormItem/index.js +4 -4
- package/es/info/components/FormItem/index.scss +11 -0
- package/es/info/components/InfoGroup/index.js +37 -6
- package/es/info/components/InfoGroup/index.scss +6 -0
- package/es/info/components/InfoValueItem/index.js +14 -2
- package/es/info/components/baseInfo/index.js +10 -9
- package/es/info/components/headerInfo/index.js +10 -9
- package/es/info/components/tableInfo/index.js +7 -4
- package/es/info/components/tableInfo/index.scss +1 -1
- package/es/info/index.d.ts +1 -0
- package/es/info/index.js +9 -7
- package/es/info/index.scss +4 -0
- package/es/info/typing.d.ts +17 -3
- package/es/info/utils/index.d.ts +11 -2
- package/es/info/utils/index.js +21 -0
- package/es/nocode/configurators/PageHeader.js +49 -43
- package/es/nocode/configurators/ProTable.js +12 -9
- package/es/nocode/configurators/common.d.ts +117 -105
- package/es/nocode/configurators/common.js +38 -34
- package/es/nocode/index.scss +1 -4
- package/es/page-header/index.d.ts +3 -0
- package/es/page-header/index.js +40 -13
- package/es/page-header/index.scss +6 -4
- package/es/table/components/Filter/index.js +8 -16
- package/es/table/components/Layout/index.js +2 -1
- package/es/table/components/Layout/index.scss +1 -1
- package/es/table/components/ToolBar/FilterColumnIcon.js +77 -17
- package/es/table/components/ToolBar/index.scss +10 -0
- package/es/table/index.d.ts +0 -1
- package/es/table/index.js +75 -56
- package/es/table/index.scss +0 -1
- package/es/table/typing.d.ts +3 -1
- package/lib/actions/dialog-form.d.ts +3 -3
- package/lib/actions/dialog-table.d.ts +6 -1
- package/lib/actions/dialog-table.js +20 -1
- package/lib/actions/drawer-table.d.ts +4 -0
- package/lib/actions/drawer-table.js +14 -1
- package/lib/actions/index.d.ts +6 -11
- package/lib/actions/index.js +44 -20
- package/lib/actions/index.scss +1 -1
- package/lib/card/index.d.ts +17 -0
- package/lib/form/Components/ProField/index.d.ts +8 -0
- package/lib/form/ProForm/index.d.ts +2 -2
- package/lib/form/ProForm/index.js +10 -2
- package/lib/form/ProForm/index.scss +40 -7
- package/lib/form/SchemaForm/adapterType.js +3 -3
- package/lib/form/SchemaForm/index.d.ts +2 -2
- package/lib/form/SchemaForm/index.js +10 -5
- package/lib/form/SchemaForm/initializeArrayCards.js +10 -54
- package/lib/form/SchemaForm/initializeArrayCollapse.js +10 -63
- package/lib/form/SchemaForm/initializeArrayIcon.js +19 -7
- package/lib/form/SchemaForm/initializeArrayItems.js +16 -74
- package/lib/form/SchemaForm/initializeArrayTable.js +23 -33
- package/lib/form/SchemaForm/initializeFormButton.js +35 -38
- package/lib/form/SchemaForm/initializeFormGroup.d.ts +2 -2
- package/lib/form/SchemaForm/initializeFormStep.d.ts +4 -2
- package/lib/form/SchemaForm/initializeFormStep.js +21 -7
- package/lib/form/SchemaForm/initializeFormTab.d.ts +2 -2
- package/lib/form/SchemaForm/initializeProField.js +3 -3
- package/lib/form/SchemaForm/reactions.d.ts +1 -1
- package/lib/form/SchemaForm/reactions.js +2 -2
- package/lib/form/index.d.ts +17 -9
- package/lib/form/index.js +81 -56
- package/lib/form/typing.d.ts +13 -22
- package/lib/form/warning.js +2 -6
- package/lib/index.d.ts +4 -3
- package/lib/index.js +16 -4
- package/lib/info/components/FormItem/index.js +4 -4
- package/lib/info/components/FormItem/index.scss +11 -0
- package/lib/info/components/InfoGroup/index.js +46 -6
- package/lib/info/components/InfoGroup/index.scss +6 -0
- package/lib/info/components/InfoValueItem/index.js +15 -3
- package/lib/info/components/baseInfo/index.js +10 -9
- package/lib/info/components/headerInfo/index.js +11 -10
- package/lib/info/components/tableInfo/index.js +7 -3
- package/lib/info/components/tableInfo/index.scss +1 -1
- package/lib/info/index.d.ts +1 -0
- package/lib/info/index.js +8 -6
- package/lib/info/index.scss +4 -0
- package/lib/info/typing.d.ts +17 -3
- package/lib/info/utils/index.d.ts +11 -2
- package/lib/info/utils/index.js +31 -0
- package/lib/nocode/configurators/PageHeader.js +49 -43
- package/lib/nocode/configurators/ProTable.js +12 -9
- package/lib/nocode/configurators/common.d.ts +117 -105
- package/lib/nocode/configurators/common.js +38 -34
- package/lib/nocode/index.scss +1 -4
- package/lib/page-header/index.d.ts +3 -0
- package/lib/page-header/index.js +42 -13
- package/lib/page-header/index.scss +6 -4
- package/lib/table/components/Filter/index.js +7 -15
- package/lib/table/components/Layout/index.js +2 -1
- package/lib/table/components/Layout/index.scss +1 -1
- package/lib/table/components/ToolBar/FilterColumnIcon.js +75 -16
- package/lib/table/components/ToolBar/index.scss +10 -0
- package/lib/table/index.d.ts +0 -1
- package/lib/table/index.js +76 -65
- package/lib/table/index.scss +0 -1
- package/lib/table/typing.d.ts +3 -1
- package/package.json +5 -5
package/lib/table/index.js
CHANGED
@@ -3,15 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
var _exportNames = {
|
7
|
-
ActionButton: true
|
8
|
-
};
|
9
|
-
Object.defineProperty(exports, "ActionButton", {
|
10
|
-
enumerable: true,
|
11
|
-
get: function get() {
|
12
|
-
return _actions.default;
|
13
|
-
}
|
14
|
-
});
|
6
|
+
var _exportNames = {};
|
15
7
|
exports.default = void 0;
|
16
8
|
|
17
9
|
var _react = _interopRequireWildcard(require("react"));
|
@@ -40,7 +32,7 @@ var _Fullscreen = _interopRequireDefault(require("./components/ToolBar/Fullscree
|
|
40
32
|
|
41
33
|
var _form = require("../form");
|
42
34
|
|
43
|
-
var _actions =
|
35
|
+
var _actions = require("../actions");
|
44
36
|
|
45
37
|
Object.keys(_actions).forEach(function (key) {
|
46
38
|
if (key === "default" || key === "__esModule") return;
|
@@ -71,10 +63,7 @@ Object.keys(_typing).forEach(function (key) {
|
|
71
63
|
}
|
72
64
|
});
|
73
65
|
});
|
74
|
-
|
75
|
-
var _ahooks = require("ahooks");
|
76
|
-
|
77
|
-
var _excluded = ["header", "className", "tableClassName", "mainAction", "quickAction", "dataFilter", "toolBar", "columns", "useRowSelection", "rowSelection", "onChangeRowSelection", "getRowSelection", "primaryKey", "footerAction", "url", "pageKey", "pageSizeKey", "method", "params", "formatSort", "formatParams", "formatResult", "requestWhenMount", "showPagination", "pageSizeList", "showSkeleton", "skeletonSize", "actionRef", "dataSource", "filterDebounce", "footerSuction"];
|
66
|
+
var _excluded = ["header", "className", "tableClassName", "mainAction", "quickAction", "dataFilter", "toolBar", "columns", "useRowSelection", "rowSelection", "onChangeRowSelection", "getRowSelection", "primaryKey", "footerAction", "url", "pageKey", "pageSizeKey", "method", "params", "formatSort", "formatParams", "formatResult", "requestWhenMount", "showPagination", "pageSizeList", "showSkeleton", "skeletonSize", "actionRef", "dataSource", "filterDebounce", "footerSuction", "autoRefresh"];
|
78
67
|
|
79
68
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
80
69
|
|
@@ -114,7 +103,9 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
114
103
|
|
115
104
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
116
105
|
|
106
|
+
// import { useSize } from 'ahooks';
|
117
107
|
var cls = (0, _utils.baseClass)('teamix-pro-table');
|
108
|
+
var toJS = _form.formilyReactive.toJS;
|
118
109
|
/**
|
119
110
|
* 处理原生传入的 columns 以便于 选择列 方便处理
|
120
111
|
* @param columns 原生传入的 columns
|
@@ -163,7 +154,7 @@ var ProTable = function ProTable(props) {
|
|
163
154
|
pageKey = props.pageKey,
|
164
155
|
pageSizeKey = props.pageSizeKey,
|
165
156
|
_props$method = props.method,
|
166
|
-
method = _props$method === void 0 ? '
|
157
|
+
method = _props$method === void 0 ? 'get' : _props$method,
|
167
158
|
_props$params = props.params,
|
168
159
|
propsParams = _props$params === void 0 ? {} : _props$params,
|
169
160
|
formatSort = props.formatSort,
|
@@ -188,6 +179,10 @@ var ProTable = function ProTable(props) {
|
|
188
179
|
filterDebounce = _props$filterDebounce === void 0 ? 300 : _props$filterDebounce,
|
189
180
|
_props$footerSuction = props.footerSuction,
|
190
181
|
footerSuction = _props$footerSuction === void 0 ? false : _props$footerSuction,
|
182
|
+
_props$autoRefresh = props.autoRefresh,
|
183
|
+
autoRefresh = _props$autoRefresh === void 0 ? function () {
|
184
|
+
return false;
|
185
|
+
} : _props$autoRefresh,
|
191
186
|
otherProps = _objectWithoutProperties(props, _excluded);
|
192
187
|
|
193
188
|
var targetPageKey = pageKey || globalPageKey;
|
@@ -238,9 +233,16 @@ var ProTable = function ProTable(props) {
|
|
238
233
|
var _useState15 = (0, _react.useState)('medium'),
|
239
234
|
_useState16 = _slicedToArray(_useState15, 2),
|
240
235
|
size = _useState16[0],
|
241
|
-
_setSize = _useState16[1];
|
236
|
+
_setSize = _useState16[1];
|
237
|
+
|
238
|
+
var _useState17 = (0, _react.useState)(true),
|
239
|
+
_useState18 = _slicedToArray(_useState17, 2),
|
240
|
+
showLoading = _useState18[0],
|
241
|
+
setShowLoading = _useState18[1]; // 存储定时器 id
|
242
242
|
|
243
243
|
|
244
|
+
var autoRefreshTimerRef = (0, _react.useRef)(); // 获取header高度,用作全屏吸底吸顶高度计算
|
245
|
+
|
244
246
|
var getHeaderHeight = function getHeaderHeight() {
|
245
247
|
var _tableDom$getElements, _tableDom$getElements2;
|
246
248
|
|
@@ -260,30 +262,30 @@ var ProTable = function ProTable(props) {
|
|
260
262
|
}; // header 区域高度。用作全屏计算吸顶吸底高度。默认不做计算
|
261
263
|
|
262
264
|
|
263
|
-
var
|
264
|
-
_useState18 = _slicedToArray(_useState17, 2),
|
265
|
-
headerHeight = _useState18[0],
|
266
|
-
setHeaderHeight = _useState18[1]; // 全屏显示 className
|
267
|
-
|
268
|
-
|
269
|
-
var _useState19 = (0, _react.useState)(false),
|
265
|
+
var _useState19 = (0, _react.useState)(0),
|
270
266
|
_useState20 = _slicedToArray(_useState19, 2),
|
271
|
-
|
272
|
-
|
267
|
+
headerHeight = _useState20[0],
|
268
|
+
setHeaderHeight = _useState20[1]; // 全屏显示 className
|
273
269
|
|
274
270
|
|
275
|
-
var _useState21 = (0, _react.useState)(),
|
271
|
+
var _useState21 = (0, _react.useState)(false),
|
276
272
|
_useState22 = _slicedToArray(_useState21, 2),
|
277
|
-
|
278
|
-
|
273
|
+
fullscreenState = _useState22[0],
|
274
|
+
setFullscreenState = _useState22[1]; // 父元素位置。用作非全屏模式下的吸底
|
275
|
+
|
276
|
+
|
277
|
+
var _useState23 = (0, _react.useState)(),
|
278
|
+
_useState24 = _slicedToArray(_useState23, 2),
|
279
|
+
parentPosition = _useState24[0],
|
280
|
+
setParentPosition = _useState24[1];
|
279
281
|
/** 筛选区域 form */
|
280
282
|
|
281
283
|
|
282
284
|
var dataFilterForm = (0, _react.useMemo)(function () {
|
283
285
|
return (0, _form.createForm)();
|
284
286
|
}, []); // 获取表格大小
|
285
|
-
|
286
|
-
|
287
|
+
// const tableSize = useSize(tableRef);
|
288
|
+
// 获取父元素位置
|
287
289
|
|
288
290
|
var getParentPosition = function getParentPosition() {
|
289
291
|
// 暂时仅支持使用全家桶
|
@@ -297,12 +299,12 @@ var ProTable = function ProTable(props) {
|
|
297
299
|
});
|
298
300
|
}
|
299
301
|
}; // 监听表格大小动态改变吸底footer大小
|
302
|
+
// useEffect(() => {
|
303
|
+
// getParentPosition();
|
304
|
+
// }, [tableSize]);
|
305
|
+
// rowSelection 相关
|
300
306
|
|
301
307
|
|
302
|
-
(0, _react.useEffect)(function () {
|
303
|
-
getParentPosition();
|
304
|
-
}, [tableSize]); // rowSelection 相关
|
305
|
-
|
306
308
|
var rowSelectionHook = (0, _useTableSelection.default)(_objectSpread(_objectSpread({}, propsRowSelection), {}, {
|
307
309
|
onChange: onChangeRowSelection
|
308
310
|
}), primaryKey);
|
@@ -414,6 +416,25 @@ var ProTable = function ProTable(props) {
|
|
414
416
|
|
415
417
|
if (propsActionRef) {
|
416
418
|
propsActionRef.current = actionRef.current;
|
419
|
+
}
|
420
|
+
|
421
|
+
function onFormatResult(next) {
|
422
|
+
var _next$data;
|
423
|
+
|
424
|
+
props.onFormatResult && props.onFormatResult(next);
|
425
|
+
var time = autoRefresh ? autoRefresh(next.data) : false;
|
426
|
+
|
427
|
+
if (Number.isInteger(time) && time >= 1000) {
|
428
|
+
autoRefreshTimerRef.current = setTimeout(function () {
|
429
|
+
// 自动刷新不显示 loading
|
430
|
+
_request({}, true);
|
431
|
+
}, Number(time));
|
432
|
+
} // 设置 dataSource、total
|
433
|
+
|
434
|
+
|
435
|
+
setData(next.data || []);
|
436
|
+
setTotal(next.total || ((_next$data = next.data) === null || _next$data === void 0 ? void 0 : _next$data.length));
|
437
|
+
setShowSkeleton(false);
|
417
438
|
} // 请求表格数据工具函数
|
418
439
|
|
419
440
|
|
@@ -444,16 +465,6 @@ var ProTable = function ProTable(props) {
|
|
444
465
|
}
|
445
466
|
}
|
446
467
|
|
447
|
-
function onFormatResult(next) {
|
448
|
-
var _next$data;
|
449
|
-
|
450
|
-
props.onFormatResult && props.onFormatResult(next); // 设置 dataSource、total
|
451
|
-
|
452
|
-
setData(next.data || []);
|
453
|
-
setTotal(next.total || ((_next$data = next.data) === null || _next$data === void 0 ? void 0 : _next$data.length));
|
454
|
-
setShowSkeleton(false);
|
455
|
-
}
|
456
|
-
|
457
468
|
if (nextData instanceof Promise) {
|
458
469
|
nextData.then(function (res) {
|
459
470
|
onFormatResult(res);
|
@@ -475,19 +486,25 @@ var ProTable = function ProTable(props) {
|
|
475
486
|
}
|
476
487
|
}); // 请求函数
|
477
488
|
|
478
|
-
function _request(params) {
|
489
|
+
function _request(params, noLoading) {
|
479
490
|
var _actionRef$current, _actionRef$current$se, _objectSpread2;
|
480
491
|
|
481
|
-
|
492
|
+
var nextShowLoading = !noLoading;
|
493
|
+
nextShowLoading !== showLoading && setShowLoading(nextShowLoading); // 请求前需要优先清空列过滤条件
|
494
|
+
|
482
495
|
(_actionRef$current = actionRef.current) === null || _actionRef$current === void 0 ? void 0 : (_actionRef$current$se = _actionRef$current.setFilterRules) === null || _actionRef$current$se === void 0 ? void 0 : _actionRef$current$se.call(_actionRef$current, {});
|
483
496
|
var sortParams = targetFormatSort(sort); // 筛选区请求参数
|
484
497
|
|
485
|
-
var dataFilterParams =
|
498
|
+
var dataFilterParams = toJS(dataFilterForm.values); // 格式化后的请求参数
|
486
499
|
|
487
500
|
var requestData = formatParams(_objectSpread(_objectSpread({}, !showPagination ? _objectSpread(_objectSpread(_objectSpread({}, dataFilterParams), propsParams), sortParams) : _objectSpread(_objectSpread(_objectSpread((_objectSpread2 = {}, _defineProperty(_objectSpread2, targetPageKey, currentPage), _defineProperty(_objectSpread2, targetPageSizeKey, pageSize), _objectSpread2), dataFilterParams), propsParams), sortParams)), params));
|
488
501
|
|
489
502
|
if (requestData) {
|
490
|
-
|
503
|
+
if (autoRefreshTimerRef.current) {
|
504
|
+
clearTimeout(autoRefreshTimerRef.current);
|
505
|
+
autoRefreshTimerRef.current = null;
|
506
|
+
}
|
507
|
+
|
491
508
|
getData.run(requestData);
|
492
509
|
}
|
493
510
|
}
|
@@ -496,6 +513,12 @@ var ProTable = function ProTable(props) {
|
|
496
513
|
if (requestWhenMount) {
|
497
514
|
_request();
|
498
515
|
}
|
516
|
+
|
517
|
+
return function () {
|
518
|
+
if (autoRefreshTimerRef.current) {
|
519
|
+
clearTimeout(autoRefreshTimerRef.current);
|
520
|
+
}
|
521
|
+
};
|
499
522
|
}, []);
|
500
523
|
|
501
524
|
function onSort(dataIndex, order) {
|
@@ -509,7 +532,7 @@ var ProTable = function ProTable(props) {
|
|
509
532
|
|
510
533
|
var dataFilter = _objectSpread(_objectSpread({}, propsDataFilter), {}, {
|
511
534
|
onFilter: (0, _lodash.default)(function () {
|
512
|
-
(propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onFilter) && (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onFilter(_objectSpread({},
|
535
|
+
(propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onFilter) && (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onFilter(_objectSpread({}, toJS(dataFilterForm.values))));
|
513
536
|
setCurrentPage(1);
|
514
537
|
|
515
538
|
_request(_defineProperty({}, targetPageKey, 1));
|
@@ -541,7 +564,7 @@ var ProTable = function ProTable(props) {
|
|
541
564
|
hasBorder: false,
|
542
565
|
dataSource: showSkeleton ? skeletonDataSource : data || props.dataSource,
|
543
566
|
columns: (0, _genProColumnToColumn.default)(filteredColumns, showSkeleton, actionRef),
|
544
|
-
loading: !showSkeleton && (getData.loading || props.loading),
|
567
|
+
loading: showLoading && !showSkeleton && (getData.loading || props.loading),
|
545
568
|
className: (0, _classnames.default)('teamix-pro-table', tableClassName, {
|
546
569
|
'with-row-select': rowSelection
|
547
570
|
}),
|
@@ -622,8 +645,8 @@ var ProTable = function ProTable(props) {
|
|
622
645
|
'footer-has-rowSelection': rowSelection
|
623
646
|
}),
|
624
647
|
style: {
|
625
|
-
left: "".concat((_parentPosition$offse = parentPosition === null || parentPosition === void 0 ? void 0 : parentPosition.offsetLeft) !== null && _parentPosition$offse !== void 0 ? _parentPosition$offse : 0, "px"),
|
626
|
-
right: "".concat((_parentPosition$offse2 = parentPosition === null || parentPosition === void 0 ? void 0 : parentPosition.offsetRight) !== null && _parentPosition$offse2 !== void 0 ? _parentPosition$offse2 : 0, "px")
|
648
|
+
left: "".concat(fullscreenState ? 0 : (_parentPosition$offse = parentPosition === null || parentPosition === void 0 ? void 0 : parentPosition.offsetLeft) !== null && _parentPosition$offse !== void 0 ? _parentPosition$offse : 0, "px"),
|
649
|
+
right: "".concat(fullscreenState ? 0 : (_parentPosition$offse2 = parentPosition === null || parentPosition === void 0 ? void 0 : parentPosition.offsetRight) !== null && _parentPosition$offse2 !== void 0 ? _parentPosition$offse2 : 0, "px")
|
627
650
|
}
|
628
651
|
}, renderRowSelection(), /*#__PURE__*/_react.default.createElement("div", {
|
629
652
|
className: cls('footer-right-wrapper')
|
@@ -663,19 +686,7 @@ var ProTable = function ProTable(props) {
|
|
663
686
|
}),
|
664
687
|
ref: tableRef
|
665
688
|
}, renderTable(), renderFooter()));
|
666
|
-
};
|
667
|
-
|
689
|
+
};
|
668
690
|
|
669
|
-
(0, _actions.registerActionHandler)('dialog-table', 'dialog', {
|
670
|
-
component: ProTable,
|
671
|
-
closeable: true,
|
672
|
-
size: 'medium'
|
673
|
-
});
|
674
|
-
(0, _actions.registerActionHandler)('drawer-table', 'dialog', {
|
675
|
-
component: ProTable,
|
676
|
-
closeable: true,
|
677
|
-
dialogType: 'drawer',
|
678
|
-
size: 'medium'
|
679
|
-
});
|
680
691
|
var _default = ProTable;
|
681
692
|
exports.default = _default;
|
package/lib/table/index.scss
CHANGED
package/lib/table/typing.d.ts
CHANGED
@@ -103,8 +103,10 @@ export declare type ProTableProps = {
|
|
103
103
|
skeletonSize?: number;
|
104
104
|
/** 表格主题 className */
|
105
105
|
tableClassName?: string;
|
106
|
-
/** 非全屏模式下是否吸底 默认状态下取用 ProPageContainer 作为参照物。如果传入了Dom,则取用Dom作为参照物 */
|
106
|
+
/** 非全屏模式下是否吸底 默认状态下取用 ProPageContainer 作为参照物。如果传入了 Dom,则取用 Dom 作为参照物 */
|
107
107
|
footerSuction?: boolean | Element;
|
108
|
+
/** 当满足条件时开启自动刷新,返回值为自动刷新间隔时间,如果返回 0 或 false 则停止自动刷新,每次触发翻页、搜索都将重置时间 */
|
109
|
+
autoRefresh?: (dataSource: any[]) => number | boolean;
|
108
110
|
} & Omit<TableProps, 'columns'> & ProTableTopAreaProps;
|
109
111
|
export declare type rowSelectionType = {
|
110
112
|
getProps?: (record: any, index: number) => any;
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@teamix/pro",
|
3
|
-
"version": "1.1.
|
4
|
-
"description": "
|
3
|
+
"version": "1.1.8",
|
4
|
+
"description": "TeamixPro大包",
|
5
5
|
"repository": "http://gitlab.alibaba-inc.com/teamix/pro",
|
6
6
|
"author": "Velociraptor(迅猛龙)",
|
7
7
|
"license": "MIT",
|
@@ -36,14 +36,14 @@
|
|
36
36
|
"lodash.clonedeep": "^4.5.0",
|
37
37
|
"lodash.debounce": "^4.0.8",
|
38
38
|
"lodash.isempty": "^4.4.0",
|
39
|
-
"react-helmet": "^6.1.0"
|
40
|
-
"react-router-dom": "^5.3.0"
|
39
|
+
"react-helmet": "^6.1.0"
|
41
40
|
},
|
42
41
|
"devDependencies": {
|
43
42
|
"@types/lodash.clonedeep": "^4.4.6",
|
44
43
|
"@types/lodash.debounce": "^4.0.6",
|
45
44
|
"@types/lodash.isempty": "^4.4.6",
|
46
|
-
"@types/react-helmet": "^6.1.4"
|
45
|
+
"@types/react-helmet": "^6.1.4",
|
46
|
+
"react-router-dom": "^5.3.0"
|
47
47
|
},
|
48
48
|
"peerDependencies": {
|
49
49
|
"@alicloudfe/components": "^1.1.94",
|