@zat-design/sisyphus-react 3.6.5-beta.1 → 3.6.5-beta.11
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/es/ProAction/index.js +4 -4
- package/es/ProDownload/index.d.ts +1 -1
- package/es/ProEditTable/components/ActionButton/index.d.ts +1 -1
- package/es/ProEditTable/components/RcTable/BaseTable.d.ts +6 -0
- package/es/ProEditTable/components/RcTable/BaseTable.js +75 -0
- package/es/ProEditTable/components/RcTable/DraggableTable.d.ts +7 -0
- package/es/ProEditTable/components/RcTable/DraggableTable.js +90 -0
- package/es/ProEditTable/components/RcTable/VirtualTable1.d.ts +6 -0
- package/es/ProEditTable/components/RcTable/VirtualTable1.js +86 -0
- package/es/ProEditTable/components/RcTable/index.d.ts +6 -0
- package/es/ProEditTable/components/RcTable/index.js +6 -0
- package/es/ProEditTable/components/RenderField/index.d.ts +1 -1
- package/es/ProEditTable/components/RenderField/index.js +26 -18
- package/es/ProEditTable/components/RenderToolbar/index.d.ts +3 -2
- package/es/ProEditTable/components/RenderToolbar/index.js +2 -2
- package/es/ProEditTable/components/Summary/index.d.ts +1 -1
- package/es/ProEditTable/index.js +33 -55
- package/es/ProEditTable/propsType.d.ts +6 -0
- package/es/ProEditTable/utils/config.d.ts +1 -1
- package/es/ProEditTable/utils/config.js +2 -2
- package/es/ProEditTable/utils/tools.js +3 -3
- package/es/ProEnum/components/Group.d.ts +1 -1
- package/es/ProEnum/components/Tag.d.ts +1 -1
- package/es/ProEnum/index.d.ts +2 -2
- package/es/ProEnum/utils/eventCenter.js +1 -2
- package/es/ProEnum/utils/getEnumLabel.d.ts +1 -1
- package/es/ProForm/components/base/Input/index.d.ts +1 -1
- package/es/ProForm/components/combination/ProCascader/index.d.ts +1 -1
- package/es/ProForm/components/combination/ProCascader/index.js +7 -7
- package/es/ProForm/components/old/InputRange/index.d.ts +1 -1
- package/es/ProForm/components/old/InputWithSuffix/index.d.ts +1 -1
- package/es/ProForm/components/old/ProAddress/index.d.ts +1 -2
- package/es/ProForm/components/old/ProRangeBox/index.d.ts +1 -2
- package/es/ProForm/index.d.ts +3 -2
- package/es/ProForm/index.js +3 -17
- package/es/ProForm/utils/index.js +14 -10
- package/es/ProForm/utils/useShouldUpdate.js +9 -1
- package/es/ProForm/utils/useWatch.d.ts +7 -0
- package/es/ProForm/utils/useWatch.js +77 -0
- package/es/ProIcon/utils/index.js +4 -3
- package/es/ProLayout/components/Layout/Menu/OpenMenu/index.d.ts +1 -1
- package/es/ProLayout/components/Layout/Menu/OpenMenu/index.js +3 -3
- package/es/ProLayout/components/ProCollapse/index.d.ts +1 -1
- package/es/ProLayout/components/ProFooter/index.d.ts +1 -1
- package/es/ProLayout/components/ProHeader/components/Copy/index.d.ts +1 -1
- package/es/ProLayout/components/ProHeader/index.d.ts +1 -1
- package/es/ProLayout/index.d.ts +4 -4
- package/es/ProLayout/utils/index.js +9 -9
- package/es/ProSelect/components/AdaptiveTooltip.d.ts +1 -1
- package/es/ProSelect/index.d.ts +1 -1
- package/es/ProStep/components/Anchor/index.d.ts +1 -1
- package/es/ProStep/components/Item/index.d.ts +1 -1
- package/es/ProStep/components/Step/index.d.ts +1 -1
- package/es/ProStep/index.d.ts +2 -2
- package/es/ProTable/components/ResizableLine/index.d.ts +1 -1
- package/es/ProTable/components/TableResizable/index.d.ts +1 -1
- package/es/ProTable/index.d.ts +1 -1
- package/es/ProTable/utils.js +4 -4
- package/es/ProTabs/components/Card/index.d.ts +1 -1
- package/es/ProThemeTools/component/PrdTools/index.d.ts +1 -1
- package/es/ProThemeTools/index.d.ts +1 -1
- package/es/ProTooltip/index.d.ts +1 -1
- package/es/ProTree/components/CloseIcon.d.ts +1 -2
- package/es/ProTree/components/List.d.ts +1 -1
- package/es/ProTree/components/ProTree.d.ts +1 -1
- package/es/ProTree/components/ProTreeSelect/index.d.ts +1 -1
- package/es/ProTree/components/ProTreeSelect/index.js +33 -22
- package/es/ProTree/components/SearchTitle.d.ts +1 -1
- package/es/ProTree/components/Tree.d.ts +1 -1
- package/es/ProTree/components/Tree.js +3 -3
- package/es/ProTree/index.d.ts +1 -1
- package/es/ProTree/utils.js +12 -11
- package/es/ProTreeModal/components/Cascader.d.ts +1 -1
- package/es/ProTreeModal/components/CloseIcon.d.ts +1 -2
- package/es/ProTreeModal/components/SearchTitle.d.ts +1 -1
- package/es/ProTreeModal/components/Tree.js +6 -6
- package/es/ProTreeModal/components/Trigger.d.ts +1 -1
- package/es/ProTreeModal/index.d.ts +1 -1
- package/es/ProTreeModal/utils.js +12 -11
- package/es/ProUpload/components/DraggableUploadListItem.d.ts +1 -1
- package/lib/ProAction/index.js +4 -4
- package/lib/ProDownload/index.d.ts +1 -1
- package/lib/ProEditTable/components/ActionButton/index.d.ts +1 -1
- package/lib/ProEditTable/components/RcTable/BaseTable.d.ts +6 -0
- package/lib/ProEditTable/components/RcTable/BaseTable.js +81 -0
- package/lib/ProEditTable/components/RcTable/DraggableTable.d.ts +7 -0
- package/lib/ProEditTable/components/RcTable/DraggableTable.js +96 -0
- package/lib/ProEditTable/components/RcTable/VirtualTable1.d.ts +6 -0
- package/lib/ProEditTable/components/RcTable/VirtualTable1.js +93 -0
- package/lib/ProEditTable/components/RcTable/index.d.ts +6 -0
- package/lib/ProEditTable/components/RcTable/index.js +27 -0
- package/lib/ProEditTable/components/RenderField/index.d.ts +1 -1
- package/lib/ProEditTable/components/RenderField/index.js +26 -18
- package/lib/ProEditTable/components/RenderToolbar/index.d.ts +3 -2
- package/lib/ProEditTable/components/RenderToolbar/index.js +3 -2
- package/lib/ProEditTable/components/Summary/index.d.ts +1 -1
- package/lib/ProEditTable/index.js +32 -52
- package/lib/ProEditTable/propsType.d.ts +6 -0
- package/lib/ProEditTable/utils/config.d.ts +1 -1
- package/lib/ProEditTable/utils/config.js +2 -2
- package/lib/ProEditTable/utils/tools.js +3 -3
- package/lib/ProEnum/components/Group.d.ts +1 -1
- package/lib/ProEnum/components/Tag.d.ts +1 -1
- package/lib/ProEnum/index.d.ts +2 -2
- package/lib/ProEnum/utils/eventCenter.js +1 -2
- package/lib/ProEnum/utils/getEnumLabel.d.ts +1 -1
- package/lib/ProForm/components/base/Input/index.d.ts +1 -1
- package/lib/ProForm/components/combination/ProCascader/index.d.ts +1 -1
- package/lib/ProForm/components/combination/ProCascader/index.js +7 -7
- package/lib/ProForm/components/old/InputRange/index.d.ts +1 -1
- package/lib/ProForm/components/old/InputWithSuffix/index.d.ts +1 -1
- package/lib/ProForm/components/old/ProAddress/index.d.ts +1 -2
- package/lib/ProForm/components/old/ProRangeBox/index.d.ts +1 -2
- package/lib/ProForm/index.d.ts +3 -2
- package/lib/ProForm/index.js +2 -16
- package/lib/ProForm/utils/index.js +10 -10
- package/lib/ProForm/utils/useShouldUpdate.js +9 -1
- package/lib/ProForm/utils/useWatch.d.ts +7 -0
- package/lib/ProForm/utils/useWatch.js +87 -0
- package/lib/ProIcon/utils/index.js +3 -3
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.d.ts +1 -1
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.js +3 -3
- package/lib/ProLayout/components/ProCollapse/index.d.ts +1 -1
- package/lib/ProLayout/components/ProFooter/index.d.ts +1 -1
- package/lib/ProLayout/components/ProHeader/components/Copy/index.d.ts +1 -1
- package/lib/ProLayout/components/ProHeader/index.d.ts +1 -1
- package/lib/ProLayout/index.d.ts +4 -4
- package/lib/ProLayout/utils/index.js +9 -9
- package/lib/ProSelect/components/AdaptiveTooltip.d.ts +1 -1
- package/lib/ProSelect/index.d.ts +1 -1
- package/lib/ProStep/components/Anchor/index.d.ts +1 -1
- package/lib/ProStep/components/Item/index.d.ts +1 -1
- package/lib/ProStep/components/Step/index.d.ts +1 -1
- package/lib/ProStep/index.d.ts +2 -2
- package/lib/ProTable/components/ResizableLine/index.d.ts +1 -1
- package/lib/ProTable/components/TableResizable/index.d.ts +1 -1
- package/lib/ProTable/index.d.ts +1 -1
- package/lib/ProTable/utils.js +4 -4
- package/lib/ProTabs/components/Card/index.d.ts +1 -1
- package/lib/ProThemeTools/component/PrdTools/index.d.ts +1 -1
- package/lib/ProThemeTools/index.d.ts +1 -1
- package/lib/ProTooltip/index.d.ts +1 -1
- package/lib/ProTree/components/CloseIcon.d.ts +1 -2
- package/lib/ProTree/components/List.d.ts +1 -1
- package/lib/ProTree/components/ProTree.d.ts +1 -1
- package/lib/ProTree/components/ProTreeSelect/index.d.ts +1 -1
- package/lib/ProTree/components/ProTreeSelect/index.js +33 -22
- package/lib/ProTree/components/SearchTitle.d.ts +1 -1
- package/lib/ProTree/components/Tree.d.ts +1 -1
- package/lib/ProTree/components/Tree.js +3 -3
- package/lib/ProTree/index.d.ts +1 -1
- package/lib/ProTree/utils.js +11 -11
- package/lib/ProTreeModal/components/Cascader.d.ts +1 -1
- package/lib/ProTreeModal/components/CloseIcon.d.ts +1 -2
- package/lib/ProTreeModal/components/SearchTitle.d.ts +1 -1
- package/lib/ProTreeModal/components/Tree.js +6 -6
- package/lib/ProTreeModal/components/Trigger.d.ts +1 -1
- package/lib/ProTreeModal/index.d.ts +1 -1
- package/lib/ProTreeModal/utils.js +11 -11
- package/lib/ProUpload/components/DraggableUploadListItem.d.ts +1 -1
- package/package.json +3 -2
package/es/ProAction/index.js
CHANGED
|
@@ -39,7 +39,7 @@ var ProAction = function ProAction(props) {
|
|
|
39
39
|
var index = state.index,
|
|
40
40
|
servicesArray = state.servicesArray;
|
|
41
41
|
var length = config.length;
|
|
42
|
-
var
|
|
42
|
+
var _onActionRun = /*#__PURE__*/function () {
|
|
43
43
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(currentIndex, array) {
|
|
44
44
|
var _actionProps$useReque, _options$onSuccess, _newServicesArray$cur, _newServicesArray$cur2, _newServicesArray$cur3, _actionProps$onAction, _actionProps$continue;
|
|
45
45
|
var actionProps, newServicesArray, _ref2, service, options, transformResponse, res, data, open, _newServicesArray$cur4, _newServicesArray$cur5, _newServicesArray$cur6, list, errorTitle, isContinue;
|
|
@@ -136,7 +136,7 @@ var ProAction = function ProAction(props) {
|
|
|
136
136
|
return _context.abrupt("return", false);
|
|
137
137
|
case 44:
|
|
138
138
|
if (currentIndex + 1 < length) {
|
|
139
|
-
|
|
139
|
+
_onActionRun(currentIndex + 1, newServicesArray);
|
|
140
140
|
} else {
|
|
141
141
|
setState({
|
|
142
142
|
loading: false
|
|
@@ -154,7 +154,7 @@ var ProAction = function ProAction(props) {
|
|
|
154
154
|
}();
|
|
155
155
|
var ChildContent = /*#__PURE__*/React.cloneElement(children, {
|
|
156
156
|
onClick: function onClick() {
|
|
157
|
-
|
|
157
|
+
_onActionRun(0, []);
|
|
158
158
|
},
|
|
159
159
|
loading: state.loading
|
|
160
160
|
});
|
|
@@ -166,7 +166,7 @@ var ProAction = function ProAction(props) {
|
|
|
166
166
|
return _jsxs(_Fragment, {
|
|
167
167
|
children: [((_config$ = config[0]) === null || _config$ === void 0 ? void 0 : _config$.mode) === 'confirm' ? _jsx(_Popconfirm, {
|
|
168
168
|
onConfirm: function onConfirm() {
|
|
169
|
-
return
|
|
169
|
+
return _onActionRun(0, []);
|
|
170
170
|
},
|
|
171
171
|
title: ((_config$2 = config[0]) === null || _config$2 === void 0 ? void 0 : _config$2.title) || (locale === null || locale === void 0 ? void 0 : (_locale$ProAction2 = locale.ProAction) === null || _locale$ProAction2 === void 0 ? void 0 : _locale$ProAction2.defaultTitle),
|
|
172
172
|
children: children
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IProDownloadProps } from './propsType';
|
|
2
2
|
declare const ProDownload: {
|
|
3
|
-
(props: IProDownloadProps): JSX.Element;
|
|
3
|
+
(props: IProDownloadProps): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
downLoadRequest: import("./utils").DownloadRequestProps;
|
|
5
5
|
};
|
|
6
6
|
export default ProDownload;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const ActionButton: ({ record, index, config, btnConfig }: any) => JSX.Element;
|
|
1
|
+
declare const ActionButton: ({ record, index, config, btnConfig }: any) => import("react/jsx-runtime").JSX.Element;
|
|
2
2
|
export default ActionButton;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import "antd/es/table/style";
|
|
3
|
+
import _Table from "antd/es/table";
|
|
4
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
+
var _excluded = ["tableProps"];
|
|
6
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { memo } from 'react';
|
|
8
|
+
var BaseTable = function BaseTable(_ref) {
|
|
9
|
+
var _value$;
|
|
10
|
+
var tableProps = _ref.tableProps,
|
|
11
|
+
resetProps = _objectWithoutProperties(_ref, _excluded);
|
|
12
|
+
var value = tableProps.value,
|
|
13
|
+
headerRender = tableProps.headerRender,
|
|
14
|
+
tableRef = tableProps.tableRef,
|
|
15
|
+
className = tableProps.className,
|
|
16
|
+
columns = tableProps.columns,
|
|
17
|
+
renderRowSelection = tableProps.renderRowSelection,
|
|
18
|
+
rowClassName = tableProps.rowClassName,
|
|
19
|
+
disabled = tableProps.disabled,
|
|
20
|
+
virtualKey = tableProps.virtualKey,
|
|
21
|
+
editingKeys = tableProps.editingKeys,
|
|
22
|
+
isHideCheckBox = tableProps.isHideCheckBox,
|
|
23
|
+
rowDraggable = tableProps.rowDraggable,
|
|
24
|
+
pagination = tableProps.pagination,
|
|
25
|
+
scroll = tableProps.scroll,
|
|
26
|
+
summary = tableProps.summary,
|
|
27
|
+
page = tableProps.page,
|
|
28
|
+
formatMessage = tableProps.formatMessage,
|
|
29
|
+
locale = tableProps.locale,
|
|
30
|
+
handlePageChange = tableProps.handlePageChange;
|
|
31
|
+
return _jsxs(_Fragment, {
|
|
32
|
+
children: [headerRender ? _jsx("div", {
|
|
33
|
+
className: "pro-edit-table-header",
|
|
34
|
+
children: typeof headerRender === 'function' ? headerRender() : headerRender
|
|
35
|
+
}) : null, _jsx(_Table, _objectSpread(_objectSpread({
|
|
36
|
+
ref: tableRef,
|
|
37
|
+
className: className,
|
|
38
|
+
dataSource: (value === null || value === void 0 ? void 0 : (_value$ = value[0]) === null || _value$ === void 0 ? void 0 : _value$.rowKey) ? value : undefined,
|
|
39
|
+
columns: columns,
|
|
40
|
+
rowSelection: renderRowSelection(),
|
|
41
|
+
rowClassName: rowClassName,
|
|
42
|
+
onRow: function onRow() {
|
|
43
|
+
return {
|
|
44
|
+
disabled: disabled || virtualKey && !!editingKeys.length,
|
|
45
|
+
'data-hide': isHideCheckBox,
|
|
46
|
+
onClick: function onClick() {},
|
|
47
|
+
rowDraggable: rowDraggable
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
}, resetProps), {}, {
|
|
51
|
+
pagination: pagination ? _objectSpread({
|
|
52
|
+
current: page.pageNum,
|
|
53
|
+
pageSize: page.pageSize,
|
|
54
|
+
showSizeChanger: false,
|
|
55
|
+
showQuickJumper: true,
|
|
56
|
+
total: value === null || value === void 0 ? void 0 : value.length,
|
|
57
|
+
showTotal: function showTotal(total) {
|
|
58
|
+
var _locale$ProEditTable;
|
|
59
|
+
if (!total) return;
|
|
60
|
+
return formatMessage(locale === null || locale === void 0 ? void 0 : (_locale$ProEditTable = locale.ProEditTable) === null || _locale$ProEditTable === void 0 ? void 0 : _locale$ProEditTable.total, {
|
|
61
|
+
total: total
|
|
62
|
+
});
|
|
63
|
+
},
|
|
64
|
+
onChange: handlePageChange
|
|
65
|
+
}, pagination) : false,
|
|
66
|
+
rowKey: "rowKey",
|
|
67
|
+
scroll: {
|
|
68
|
+
x: scroll === null || scroll === void 0 ? void 0 : scroll.x,
|
|
69
|
+
y: (value === null || value === void 0 ? void 0 : value.length) ? scroll === null || scroll === void 0 ? void 0 : scroll.y : undefined
|
|
70
|
+
},
|
|
71
|
+
summary: summary
|
|
72
|
+
}))]
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
export default /*#__PURE__*/memo(BaseTable);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const _default: import("react").MemoExoticComponent<({ tableProps, draggableProps, ...resetProps }: {
|
|
3
|
+
[x: string]: any;
|
|
4
|
+
tableProps: any;
|
|
5
|
+
draggableProps: any;
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import "antd/es/table/style";
|
|
3
|
+
import _Table from "antd/es/table";
|
|
4
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
+
var _excluded = ["tableProps", "draggableProps"];
|
|
6
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { memo } from 'react';
|
|
8
|
+
import { DndWrapper, Row } from '../index';
|
|
9
|
+
var DraggableTable = function DraggableTable(_ref) {
|
|
10
|
+
var _value$;
|
|
11
|
+
var tableProps = _ref.tableProps,
|
|
12
|
+
draggableProps = _ref.draggableProps,
|
|
13
|
+
resetProps = _objectWithoutProperties(_ref, _excluded);
|
|
14
|
+
var value = tableProps.value,
|
|
15
|
+
headerRender = tableProps.headerRender,
|
|
16
|
+
tableRef = tableProps.tableRef,
|
|
17
|
+
className = tableProps.className,
|
|
18
|
+
columns = tableProps.columns,
|
|
19
|
+
renderRowSelection = tableProps.renderRowSelection,
|
|
20
|
+
rowClassName = tableProps.rowClassName,
|
|
21
|
+
disabled = tableProps.disabled,
|
|
22
|
+
virtualKey = tableProps.virtualKey,
|
|
23
|
+
editingKeys = tableProps.editingKeys,
|
|
24
|
+
isHideCheckBox = tableProps.isHideCheckBox,
|
|
25
|
+
rowDraggable = tableProps.rowDraggable,
|
|
26
|
+
pagination = tableProps.pagination,
|
|
27
|
+
scroll = tableProps.scroll,
|
|
28
|
+
summary = tableProps.summary,
|
|
29
|
+
page = tableProps.page,
|
|
30
|
+
formatMessage = tableProps.formatMessage,
|
|
31
|
+
locale = tableProps.locale,
|
|
32
|
+
handlePageChange = tableProps.handlePageChange;
|
|
33
|
+
var onChange = draggableProps.onChange,
|
|
34
|
+
onDrag = draggableProps.onDrag,
|
|
35
|
+
draggable = draggableProps.draggable;
|
|
36
|
+
return _jsxs(DndWrapper, {
|
|
37
|
+
value: value,
|
|
38
|
+
onChange: onChange,
|
|
39
|
+
onDrag: onDrag,
|
|
40
|
+
disabled: disabled,
|
|
41
|
+
draggable: draggable,
|
|
42
|
+
children: [headerRender ? _jsx("div", {
|
|
43
|
+
className: "pro-edit-table-header",
|
|
44
|
+
children: typeof headerRender === 'function' ? headerRender() : headerRender
|
|
45
|
+
}) : null, _jsx(_Table, _objectSpread(_objectSpread({
|
|
46
|
+
ref: tableRef,
|
|
47
|
+
className: className,
|
|
48
|
+
dataSource: (value === null || value === void 0 ? void 0 : (_value$ = value[0]) === null || _value$ === void 0 ? void 0 : _value$.rowKey) ? value : undefined,
|
|
49
|
+
columns: columns,
|
|
50
|
+
rowSelection: renderRowSelection(),
|
|
51
|
+
rowClassName: rowClassName,
|
|
52
|
+
components: {
|
|
53
|
+
body: {
|
|
54
|
+
row: Row
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
onRow: function onRow() {
|
|
58
|
+
return {
|
|
59
|
+
disabled: disabled || virtualKey && !!editingKeys.length,
|
|
60
|
+
'data-hide': isHideCheckBox,
|
|
61
|
+
onClick: function onClick() {},
|
|
62
|
+
rowDraggable: rowDraggable
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
}, resetProps), {}, {
|
|
66
|
+
pagination: pagination ? _objectSpread({
|
|
67
|
+
current: page.pageNum,
|
|
68
|
+
pageSize: page.pageSize,
|
|
69
|
+
showSizeChanger: false,
|
|
70
|
+
showQuickJumper: true,
|
|
71
|
+
total: value === null || value === void 0 ? void 0 : value.length,
|
|
72
|
+
showTotal: function showTotal(total) {
|
|
73
|
+
var _locale$ProEditTable;
|
|
74
|
+
if (!total) return;
|
|
75
|
+
return formatMessage(locale === null || locale === void 0 ? void 0 : (_locale$ProEditTable = locale.ProEditTable) === null || _locale$ProEditTable === void 0 ? void 0 : _locale$ProEditTable.total, {
|
|
76
|
+
total: total
|
|
77
|
+
});
|
|
78
|
+
},
|
|
79
|
+
onChange: handlePageChange
|
|
80
|
+
}, pagination) : false,
|
|
81
|
+
rowKey: "rowKey",
|
|
82
|
+
scroll: {
|
|
83
|
+
x: scroll === null || scroll === void 0 ? void 0 : scroll.x,
|
|
84
|
+
y: (value === null || value === void 0 ? void 0 : value.length) ? scroll === null || scroll === void 0 ? void 0 : scroll.y : undefined
|
|
85
|
+
},
|
|
86
|
+
summary: summary
|
|
87
|
+
}))]
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
export default /*#__PURE__*/memo(DraggableTable);
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["tableProps"];
|
|
4
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { Table, ConfigProvider } from 'antd5';
|
|
6
|
+
import { memo } from 'react';
|
|
7
|
+
var VirtualTable1 = function VirtualTable1(_ref) {
|
|
8
|
+
var _value$;
|
|
9
|
+
var tableProps = _ref.tableProps,
|
|
10
|
+
resetProps = _objectWithoutProperties(_ref, _excluded);
|
|
11
|
+
var value = tableProps.value,
|
|
12
|
+
headerRender = tableProps.headerRender,
|
|
13
|
+
tableRef = tableProps.tableRef,
|
|
14
|
+
className = tableProps.className,
|
|
15
|
+
columns = tableProps.columns,
|
|
16
|
+
renderRowSelection = tableProps.renderRowSelection,
|
|
17
|
+
rowClassName = tableProps.rowClassName,
|
|
18
|
+
disabled = tableProps.disabled,
|
|
19
|
+
virtualKey = tableProps.virtualKey,
|
|
20
|
+
editingKeys = tableProps.editingKeys,
|
|
21
|
+
isHideCheckBox = tableProps.isHideCheckBox,
|
|
22
|
+
rowDraggable = tableProps.rowDraggable,
|
|
23
|
+
pagination = tableProps.pagination,
|
|
24
|
+
scroll = tableProps.scroll,
|
|
25
|
+
summary = tableProps.summary,
|
|
26
|
+
page = tableProps.page,
|
|
27
|
+
formatMessage = tableProps.formatMessage,
|
|
28
|
+
locale = tableProps.locale,
|
|
29
|
+
handlePageChange = tableProps.handlePageChange,
|
|
30
|
+
empty = tableProps.empty;
|
|
31
|
+
return _jsxs(ConfigProvider, {
|
|
32
|
+
renderEmpty: (value === null || value === void 0 ? void 0 : value.length) ? undefined : empty,
|
|
33
|
+
children: [headerRender ? _jsx("div", {
|
|
34
|
+
className: "pro-edit-table-header",
|
|
35
|
+
children: typeof headerRender === 'function' ? headerRender() : headerRender
|
|
36
|
+
}) : null, _jsx(Table, _objectSpread(_objectSpread({
|
|
37
|
+
virtual: true,
|
|
38
|
+
ref: tableRef,
|
|
39
|
+
className: className,
|
|
40
|
+
dataSource: (value === null || value === void 0 ? void 0 : (_value$ = value[0]) === null || _value$ === void 0 ? void 0 : _value$.rowKey) ? value : undefined,
|
|
41
|
+
columns: columns.map(function (item) {
|
|
42
|
+
if (!(item === null || item === void 0 ? void 0 : item.width) || typeof item.width === 'number') {
|
|
43
|
+
return item;
|
|
44
|
+
}
|
|
45
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
|
46
|
+
width: parseInt(item === null || item === void 0 ? void 0 : item.width, 10)
|
|
47
|
+
});
|
|
48
|
+
}),
|
|
49
|
+
rowSelection: _objectSpread(_objectSpread({}, renderRowSelection()), {}, {
|
|
50
|
+
columnWidth: 40
|
|
51
|
+
}),
|
|
52
|
+
rowClassName: rowClassName,
|
|
53
|
+
onRow: function onRow() {
|
|
54
|
+
return {
|
|
55
|
+
disabled: disabled || virtualKey && !!editingKeys.length,
|
|
56
|
+
'data-hide': isHideCheckBox,
|
|
57
|
+
onClick: function onClick() {},
|
|
58
|
+
rowDraggable: rowDraggable
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
}, resetProps), {}, {
|
|
62
|
+
pagination: pagination ? _objectSpread({
|
|
63
|
+
current: page.pageNum,
|
|
64
|
+
pageSize: page.pageSize,
|
|
65
|
+
showSizeChanger: false,
|
|
66
|
+
showQuickJumper: true,
|
|
67
|
+
total: value === null || value === void 0 ? void 0 : value.length,
|
|
68
|
+
showTotal: function showTotal(total) {
|
|
69
|
+
var _locale$ProEditTable;
|
|
70
|
+
if (!total) return;
|
|
71
|
+
return formatMessage(locale === null || locale === void 0 ? void 0 : (_locale$ProEditTable = locale.ProEditTable) === null || _locale$ProEditTable === void 0 ? void 0 : _locale$ProEditTable.total, {
|
|
72
|
+
total: total
|
|
73
|
+
});
|
|
74
|
+
},
|
|
75
|
+
onChange: handlePageChange
|
|
76
|
+
}, pagination) : false,
|
|
77
|
+
rowKey: "rowKey",
|
|
78
|
+
scroll: {
|
|
79
|
+
x: scroll === null || scroll === void 0 ? void 0 : scroll.x,
|
|
80
|
+
y: (value === null || value === void 0 ? void 0 : value.length) ? scroll === null || scroll === void 0 ? void 0 : scroll.y : undefined
|
|
81
|
+
},
|
|
82
|
+
summary: summary
|
|
83
|
+
}))]
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
export default /*#__PURE__*/memo(VirtualTable1);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const RenderField: ({ text: value, record, index, column, config }: any) => JSX.Element;
|
|
1
|
+
declare const RenderField: ({ text: value, record, index, column, config }: any) => import("react/jsx-runtime").JSX.Element;
|
|
2
2
|
export default RenderField;
|
|
@@ -11,7 +11,7 @@ import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
|
11
11
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
12
12
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
13
13
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
14
|
-
var _excluded = ["type", "valueType", "names", "fieldProps", "labelRequired", "editRender", "component", "viewRender", "title", "originTitle", "label", "dataIndex", "formItemProps", "isEditable", "required", "rules", "equalWith", "className", "trim", "confirm"];
|
|
14
|
+
var _excluded = ["type", "valueType", "names", "fieldProps", "labelRequired", "editRender", "component", "viewRender", "title", "originTitle", "label", "dataIndex", "formItemProps", "isEditable", "required", "rules", "equalWith", "className", "trim", "confirm", "validateTrigger"];
|
|
15
15
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
16
|
/* eslint-disable prefer-destructuring */
|
|
17
17
|
/* eslint-disable prefer-const */
|
|
@@ -60,6 +60,8 @@ var RenderField = function RenderField(_ref) {
|
|
|
60
60
|
className = column.className,
|
|
61
61
|
trim = column.trim,
|
|
62
62
|
confirm = column.confirm,
|
|
63
|
+
_column$validateTrigg = column.validateTrigger,
|
|
64
|
+
validateTrigger = _column$validateTrigg === void 0 ? ['onChange', 'onBlur', 'onSumbit'] : _column$validateTrigg,
|
|
63
65
|
resetProps = _objectWithoutProperties(column, _excluded);
|
|
64
66
|
// editRender弃用使用component同ProForm
|
|
65
67
|
var _editRender = component || editRender;
|
|
@@ -158,7 +160,9 @@ var RenderField = function RenderField(_ref) {
|
|
|
158
160
|
// 分离form item参数,防止对于参数透传(如onChange,防止重复触发)并优先级高于 _fieldProps 内部参数
|
|
159
161
|
var formItemChildProps = _objectSpread({}, _fieldProps);
|
|
160
162
|
// 允许formItem的属性放在column最外层
|
|
161
|
-
var _formItemProps = _objectSpread(_objectSpread({}, resetProps), internalRule)
|
|
163
|
+
var _formItemProps = _objectSpread(_objectSpread(_objectSpread({}, resetProps), internalRule), {}, {
|
|
164
|
+
validateTrigger: validateTrigger
|
|
165
|
+
});
|
|
162
166
|
if (['Switch', 'SwitchCheckbox'].includes(type)) {
|
|
163
167
|
_formItemProps.valuePropName = 'checked';
|
|
164
168
|
valueType = 'switch';
|
|
@@ -375,15 +379,17 @@ var RenderField = function RenderField(_ref) {
|
|
|
375
379
|
case 29:
|
|
376
380
|
// 判断属性是否变动
|
|
377
381
|
form.setFieldValue(rowPath, row);
|
|
378
|
-
if (
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
382
|
+
if (validateTrigger && validateTrigger.includes('onChange')) {
|
|
383
|
+
if (!isEqual(orgRow, row)) {
|
|
384
|
+
diff = difference(row, orgRow) || {};
|
|
385
|
+
validateFieldKeys = (_Object$keys = Object.keys(diff)) === null || _Object$keys === void 0 ? void 0 : (_Object$keys$map = _Object$keys.map) === null || _Object$keys$map === void 0 ? void 0 : _Object$keys$map.call(_Object$keys, function (key) {
|
|
386
|
+
return [].concat(_toConsumableArray(rowPath), [key]);
|
|
387
|
+
});
|
|
388
|
+
if (validateFieldKeys === null || validateFieldKeys === void 0 ? void 0 : validateFieldKeys.length) {
|
|
389
|
+
setTimeout(function () {
|
|
390
|
+
form.validateFields(validateFieldKeys);
|
|
391
|
+
}, 100);
|
|
392
|
+
}
|
|
387
393
|
}
|
|
388
394
|
}
|
|
389
395
|
setState({
|
|
@@ -447,13 +453,15 @@ var RenderField = function RenderField(_ref) {
|
|
|
447
453
|
case 16:
|
|
448
454
|
// 判断属性是否变动
|
|
449
455
|
form.setFieldValue(rowPath, row);
|
|
450
|
-
if (
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
456
|
+
if (validateTrigger && validateTrigger.includes('onBlur')) {
|
|
457
|
+
if (!isEqual(orgRow, row)) {
|
|
458
|
+
diff = difference(row, orgRow) || {};
|
|
459
|
+
validateFieldKeys = (_Object$keys2 = Object.keys(diff)) === null || _Object$keys2 === void 0 ? void 0 : (_Object$keys2$map = _Object$keys2.map) === null || _Object$keys2$map === void 0 ? void 0 : _Object$keys2$map.call(_Object$keys2, function (key) {
|
|
460
|
+
return [].concat(_toConsumableArray(rowPath), [key]);
|
|
461
|
+
});
|
|
462
|
+
if (validateFieldKeys === null || validateFieldKeys === void 0 ? void 0 : validateFieldKeys.length) {
|
|
463
|
+
debounceValidate(validateFieldKeys);
|
|
464
|
+
}
|
|
457
465
|
}
|
|
458
466
|
}
|
|
459
467
|
if (!isCell) {
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const _default: React.MemoExoticComponent<(config: any) => import("react/jsx-runtime").JSX.Element>;
|
|
3
|
+
export default _default;
|
|
@@ -7,7 +7,7 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
|
7
7
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
8
8
|
var _excluded = ["type", "label", "show", "onHandle", "needConfirm", "onClick"];
|
|
9
9
|
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
10
|
-
import React from 'react';
|
|
10
|
+
import React, { memo } from 'react';
|
|
11
11
|
import { actions, defaultBtnNameMap, defaultToolbarKeys } from '../../utils/config';
|
|
12
12
|
import ActionButton from '../ActionButton';
|
|
13
13
|
import { getNamePath } from '../../utils/tools';
|
|
@@ -134,4 +134,4 @@ var RenderToolbar = function RenderToolbar(config) {
|
|
|
134
134
|
}) : renderToolbarBtns()
|
|
135
135
|
});
|
|
136
136
|
};
|
|
137
|
-
export default RenderToolbar;
|
|
137
|
+
export default /*#__PURE__*/memo(RenderToolbar);
|
|
@@ -8,5 +8,5 @@ interface SummaryProps<T = any> {
|
|
|
8
8
|
};
|
|
9
9
|
rowSelection: any;
|
|
10
10
|
}
|
|
11
|
-
declare const Summary: ({ data, summary, rowSelection, }: SummaryProps) => JSX.Element;
|
|
11
|
+
declare const Summary: ({ data, summary, rowSelection, }: SummaryProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
export default Summary;
|
package/es/ProEditTable/index.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import "antd/es/affix/style";
|
|
2
2
|
import _Affix from "antd/es/affix";
|
|
3
|
-
import "antd/es/table/style";
|
|
4
|
-
import _Table from "antd/es/table";
|
|
5
3
|
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
|
6
4
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
7
5
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
@@ -11,7 +9,7 @@ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
|
11
9
|
import "antd/es/form/style";
|
|
12
10
|
import _Form from "antd/es/form";
|
|
13
11
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
14
|
-
var _excluded = ["value", "onChange", "onDrag", "className", "columns", "type", "mode", "stripe", "draggable", "disabled", "insertType", "emptyBtnText", "actionWidth", "actionProps", "toolbarProps", "toolbarSticky", "rowSelection", "onlyOneLineMsg", "deletePoConfirmMsg", "mulDeletePoConfirmMsg", "requiredAlign", "summary", "max", "headerRender", "pagination", "originalValues", "originalDiffTip", "rowKey", "rowDisabled", "rowDraggable", "footerRender", "scroll", "actionDirection"];
|
|
12
|
+
var _excluded = ["value", "onChange", "onDrag", "className", "columns", "type", "mode", "stripe", "draggable", "virtual", "disabled", "insertType", "emptyBtnText", "actionWidth", "actionProps", "toolbarProps", "toolbarSticky", "rowSelection", "onlyOneLineMsg", "deletePoConfirmMsg", "mulDeletePoConfirmMsg", "requiredAlign", "summary", "max", "headerRender", "pagination", "originalValues", "originalDiffTip", "rowKey", "rowDisabled", "rowDraggable", "footerRender", "scroll", "actionDirection"];
|
|
15
13
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
14
|
import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useMemo, useRef } from 'react';
|
|
17
15
|
import { get, isArray, isBoolean } from 'lodash';
|
|
@@ -19,12 +17,13 @@ import { useDeepCompareEffect, useLocalStorageState, useSetState } from 'ahooks'
|
|
|
19
17
|
import classnames from 'classnames';
|
|
20
18
|
import { transformColumns } from './utils';
|
|
21
19
|
import { getRandom, getNamePath } from './utils/tools';
|
|
22
|
-
import {
|
|
20
|
+
import { Validator, Summary, RenderToolbar } from './components';
|
|
23
21
|
import ProForm from '../ProForm';
|
|
24
22
|
import Empty from '../assets/empty.png';
|
|
25
23
|
import locale, { formatMessage } from '../locale';
|
|
24
|
+
import { BaseTable, DraggableTable, VirtualTable1 } from './components/RcTable';
|
|
26
25
|
var ProEditTable = function ProEditTable(_ref, ref) {
|
|
27
|
-
var _resetProps$id, _resetProps$id$split, _themeConfig$data2
|
|
26
|
+
var _resetProps$id, _resetProps$id$split, _themeConfig$data2;
|
|
28
27
|
var value = _ref.value,
|
|
29
28
|
onChange = _ref.onChange,
|
|
30
29
|
onDrag = _ref.onDrag,
|
|
@@ -34,6 +33,7 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
|
34
33
|
mode = _ref.mode,
|
|
35
34
|
stripe = _ref.stripe,
|
|
36
35
|
draggable = _ref.draggable,
|
|
36
|
+
virtual = _ref.virtual,
|
|
37
37
|
disabled = _ref.disabled,
|
|
38
38
|
insertType = _ref.insertType,
|
|
39
39
|
emptyBtnText = _ref.emptyBtnText,
|
|
@@ -326,62 +326,39 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
|
326
326
|
rowSelection: renderRowSelection()
|
|
327
327
|
});
|
|
328
328
|
} : summary;
|
|
329
|
+
var TableComponent = draggable ? DraggableTable : virtual ? VirtualTable1 : BaseTable;
|
|
329
330
|
return _jsxs(_Fragment, {
|
|
330
331
|
children: [_jsxs(_ConfigProvider, {
|
|
331
332
|
renderEmpty: (value === null || value === void 0 ? void 0 : value.length) ? undefined : empty,
|
|
332
|
-
children: [
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
ref: tableRef,
|
|
333
|
+
children: [_jsx(TableComponent, _objectSpread(_objectSpread({}, resetProps), {}, {
|
|
334
|
+
draggableProps: {
|
|
335
|
+
onChange: onChange,
|
|
336
|
+
onDrag: onDrag,
|
|
337
|
+
draggable: draggable
|
|
338
|
+
},
|
|
339
|
+
tableProps: {
|
|
340
|
+
value: value,
|
|
341
|
+
headerRender: headerRender,
|
|
342
|
+
tableRef: tableRef,
|
|
343
343
|
className: _className,
|
|
344
|
-
dataSource: (value === null || value === void 0 ? void 0 : (_value$ = value[0]) === null || _value$ === void 0 ? void 0 : _value$.rowKey) ? value : undefined,
|
|
345
344
|
columns: _columns,
|
|
346
|
-
|
|
345
|
+
renderRowSelection: renderRowSelection,
|
|
347
346
|
rowClassName: _rowClassName,
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
current: page.pageNum,
|
|
364
|
-
pageSize: page.pageSize,
|
|
365
|
-
showSizeChanger: false,
|
|
366
|
-
showQuickJumper: true,
|
|
367
|
-
total: value === null || value === void 0 ? void 0 : value.length,
|
|
368
|
-
showTotal: function showTotal(total) {
|
|
369
|
-
var _locale$ProEditTable;
|
|
370
|
-
if (!total) return;
|
|
371
|
-
return formatMessage(locale === null || locale === void 0 ? void 0 : (_locale$ProEditTable = locale.ProEditTable) === null || _locale$ProEditTable === void 0 ? void 0 : _locale$ProEditTable.total, {
|
|
372
|
-
total: total
|
|
373
|
-
});
|
|
374
|
-
},
|
|
375
|
-
onChange: handlePageChange
|
|
376
|
-
}, pagination) : false,
|
|
377
|
-
rowKey: "rowKey",
|
|
378
|
-
scroll: {
|
|
379
|
-
x: scroll === null || scroll === void 0 ? void 0 : scroll.x,
|
|
380
|
-
y: (value === null || value === void 0 ? void 0 : value.length) ? scroll === null || scroll === void 0 ? void 0 : scroll.y : undefined
|
|
381
|
-
},
|
|
382
|
-
summary: _summary
|
|
383
|
-
}))]
|
|
384
|
-
}), !isView && (value === null || value === void 0 ? void 0 : value.length) ? toolbarSticky ? _jsx(_Affix, _objectSpread(_objectSpread({
|
|
347
|
+
disabled: disabled,
|
|
348
|
+
virtualKey: virtualKey,
|
|
349
|
+
editingKeys: editingKeys,
|
|
350
|
+
isHideCheckBox: isHideCheckBox,
|
|
351
|
+
rowDraggable: rowDraggable,
|
|
352
|
+
pagination: pagination,
|
|
353
|
+
scroll: scroll,
|
|
354
|
+
summary: _summary,
|
|
355
|
+
page: page,
|
|
356
|
+
formatMessage: formatMessage,
|
|
357
|
+
locale: locale,
|
|
358
|
+
handlePageChange: handlePageChange,
|
|
359
|
+
empty: empty
|
|
360
|
+
}
|
|
361
|
+
})), !isView && (value === null || value === void 0 ? void 0 : value.length) ? toolbarSticky ? _jsx(_Affix, _objectSpread(_objectSpread({
|
|
385
362
|
ref: affixRef
|
|
386
363
|
}, _toolbarSticky), {}, {
|
|
387
364
|
children: _jsx("div", {
|
|
@@ -414,6 +391,7 @@ ForwardProEditTable.defaultProps = {
|
|
|
414
391
|
toolbarProps: [],
|
|
415
392
|
disabled: false,
|
|
416
393
|
draggable: false,
|
|
394
|
+
virtual: false,
|
|
417
395
|
stripe: true,
|
|
418
396
|
emptyBtnText: locale.ProEditTable.clickAdd,
|
|
419
397
|
onlyOneLineMsg: locale.ProEditTable.onlyOneLineMsg,
|
|
@@ -100,6 +100,7 @@ export interface ProColumnsProps<Values = any, T = any> extends Omit<FormItemPro
|
|
|
100
100
|
hiddenNames?: NamePath[] | NamePath[][];
|
|
101
101
|
rules?: ProRule[] | RulesFn<T>;
|
|
102
102
|
confirm?: boolean | ModalFuncProps | FunctionArgs<Values, boolean | ModalFuncProps | void>;
|
|
103
|
+
validateTrigger?: string | string[];
|
|
103
104
|
[key: string]: any;
|
|
104
105
|
}
|
|
105
106
|
export type ProEditTableColumnsProps<K = any> = ProColumnsProps & ColumnPropsMap<K, 'ProEditTable'>;
|
|
@@ -191,6 +192,11 @@ export interface ProEditTableProps<T = any> extends Omit<TableProps<T>, 'onChang
|
|
|
191
192
|
* @default -
|
|
192
193
|
*/
|
|
193
194
|
draggable?: boolean;
|
|
195
|
+
/**
|
|
196
|
+
* @description 是否开启虚拟列表(scroll,x,y必须为固定值)
|
|
197
|
+
* @default -
|
|
198
|
+
*/
|
|
199
|
+
virtual?: boolean;
|
|
194
200
|
/**
|
|
195
201
|
* @description 空列表状态时,自定义添加按钮
|
|
196
202
|
* @default 点击添加
|
|
@@ -9,7 +9,7 @@ export declare const defaultBtnNameMap: {
|
|
|
9
9
|
custom: any;
|
|
10
10
|
};
|
|
11
11
|
export declare const iconMap: {
|
|
12
|
-
add: JSX.Element;
|
|
12
|
+
add: import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
};
|
|
14
14
|
export declare const defaultSingleActionKeys: string[];
|
|
15
15
|
export declare const defaultMultipleActionKeys: string[];
|