@teamix/pro 1.5.3 → 1.5.4-beta.1
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/pro.css +1 -1
- package/dist/pro.js +20319 -19813
- package/dist/pro.min.css +1 -1
- package/dist/pro.min.js +1 -1
- package/dist/pro.min.js.LICENSE.txt +2 -6
- package/es/actions/base.js +8 -21
- package/es/actions/dialog-component.js +2 -9
- package/es/actions/dialog-form.js +37 -75
- package/es/actions/dialog-info.js +1 -5
- package/es/actions/dialog.js +57 -95
- package/es/actions/index.d.ts +2 -0
- package/es/actions/index.js +70 -156
- package/es/actions/link.js +3 -5
- package/es/actions/quick.js +0 -6
- package/es/actions/request.js +12 -27
- package/es/actions/utils.js +1 -9
- package/es/card/card-container.js +0 -5
- package/es/card/divider.js +0 -5
- package/es/card/index.js +56 -95
- package/es/card/selectable.js +4 -13
- package/es/card/tab.js +1 -10
- package/es/card/utils.js +0 -2
- package/es/form/Components/Editable/index.js +16 -55
- package/es/form/Components/FormGroup/index.d.ts +1 -0
- package/es/form/Components/FormGroup/index.js +7 -22
- package/es/form/Components/LightFilter/index.js +15 -35
- package/es/form/Components/ProField/index.js +2 -14
- package/es/form/Components/ProField/mapDateFormat.js +2 -28
- package/es/form/Components/Text/index.d.ts +1 -0
- package/es/form/Components/Text/index.js +2 -11
- package/es/form/Filter/AdvancedFilter.js +11 -26
- package/es/form/Filter/Layout.js +11 -24
- package/es/form/Filter/LightFilter.js +13 -24
- package/es/form/Filter/SimpleFilter.js +7 -21
- package/es/form/Filter/index.js +106 -171
- package/es/form/Filter/index2.js +11 -28
- package/es/form/Filter/useBindUrl.js +18 -46
- package/es/form/Filter/useSpecialProps.js +8 -13
- package/es/form/ProForm/addCascadeEffect.js +10 -32
- package/es/form/ProForm/customComponent.js +0 -5
- package/es/form/ProForm/index.js +23 -34
- package/es/form/ProForm/useAutoLayout.js +21 -42
- package/es/form/ProForm/useAutoSubmit.js +3 -8
- package/es/form/ProForm/useFieldRequest.js +0 -5
- package/es/form/ProForm/useFormDisplayValues.js +12 -28
- package/es/form/ProForm/useInitialRequest.js +0 -5
- package/es/form/SchemaForm/adapterComponent.js +0 -3
- package/es/form/SchemaForm/adapterDecorator.d.ts +1 -1
- package/es/form/SchemaForm/adapterDecorator.js +0 -8
- package/es/form/SchemaForm/adapterType.js +0 -2
- package/es/form/SchemaForm/index.js +78 -114
- package/es/form/SchemaForm/initializeArrayCards.js +0 -6
- package/es/form/SchemaForm/initializeArrayCollapse.js +0 -6
- package/es/form/SchemaForm/initializeArrayItems.js +2 -9
- package/es/form/SchemaForm/initializeArrayTable.js +21 -34
- package/es/form/SchemaForm/initializeDataSource.js +2 -6
- package/es/form/SchemaForm/initializeFormButton.js +14 -31
- package/es/form/SchemaForm/initializeFormCollapse.js +8 -18
- package/es/form/SchemaForm/initializeFormGroup.js +10 -20
- package/es/form/SchemaForm/initializeFormStep.js +11 -23
- package/es/form/SchemaForm/initializeFormTab.js +10 -20
- package/es/form/SchemaForm/initializeReactions.js +9 -33
- package/es/form/SchemaForm/initializeRequest.js +2 -16
- package/es/form/SchemaForm/initializeRules.js +4 -22
- package/es/form/SchemaForm/initializeSelectTable.js +7 -33
- package/es/form/SchemaForm/reactions.js +19 -34
- package/es/form/docs/ActionResponse.d.ts +1 -0
- package/es/form/index.d.ts +9 -9
- package/es/form/index.js +0 -9
- package/es/form/typing.d.ts +6 -4
- package/es/form/utils.d.ts +1 -1
- package/es/form/utils.js +4 -49
- package/es/form/warning.js +2 -7
- package/es/index-without-icon.js +4 -3
- package/es/index.d.ts +1 -1
- package/es/index.js +7 -8
- package/es/info/components/InfoGroup/index.js +21 -32
- package/es/info/components/InfoValueItem/index.js +66 -119
- package/es/info/components/ProInfoItem/index.js +13 -21
- package/es/info/components/baseInfo/index.js +14 -26
- package/es/info/components/headerInfo/index.js +8 -20
- package/es/info/components/tableInfo/index.js +20 -50
- package/es/info/index.js +53 -82
- package/es/info/utils/index.js +0 -11
- package/es/nocode/configurators/common.js +5 -6
- package/es/nocode/configurators/index.js +2 -3
- package/es/nocode/index.js +6 -6
- package/es/nocode/pages/editor.js +5 -9
- package/es/nocode/pages/index.js +4 -4
- package/es/nocode/pages/playground.js +18 -35
- package/es/nocode/pages/renderer.js +9 -42
- package/es/nocode/playground.js +10 -23
- package/es/page-header/index.d.ts +2 -2
- package/es/page-header/index.js +39 -75
- package/es/sidebar/components/sidebar-container/index.js +41 -72
- package/es/sidebar/components/tree/index.js +88 -144
- package/es/sidebar/components/tree-node/components/HoverTooltip/index.js +11 -26
- package/es/sidebar/components/tree-node/components/IconAction/index.js +9 -35
- package/es/sidebar/components/tree-node/components/IconSwitch/index.js +12 -25
- package/es/sidebar/components/tree-node/index.js +41 -83
- package/es/sidebar/index.js +69 -94
- package/es/sidebar/utils/action-ref.js +2 -7
- package/es/sidebar/utils/index.d.ts +5 -2
- package/es/sidebar/utils/index.js +41 -98
- package/es/table/components/CardView/index.js +62 -149
- package/es/table/components/Filter/index.js +42 -83
- package/es/table/components/Layout/index.js +25 -45
- package/es/table/components/LoadMore/index.js +15 -34
- package/es/table/components/Pagination/index.js +25 -58
- package/es/table/components/QuickAction/index.js +3 -11
- package/es/table/components/ToolBar/CardSwitch.js +6 -17
- package/es/table/components/ToolBar/DensityIcon.js +18 -31
- package/es/table/components/ToolBar/FilterColumnIcon.js +50 -106
- package/es/table/components/ToolBar/FullScreenIcon.js +2 -6
- package/es/table/components/ToolBar/Fullscreen.js +19 -35
- package/es/table/components/ToolBar/RefreshIcon.js +2 -5
- package/es/table/components/ToolBar/index.js +23 -45
- package/es/table/index.js +226 -399
- package/es/table/utils/columnRender.d.ts +1 -1
- package/es/table/utils/columnRender.js +32 -76
- package/es/table/utils/genProColumnToColumn.js +5 -14
- package/es/table/utils/index.js +14 -47
- package/es/table/utils/pureColumnRender.js +21 -53
- package/es/table/utils/pureGenProColumnToColumn.d.ts +1 -1
- package/es/table/utils/pureGenProColumnToColumn.js +2 -10
- package/es/table/utils/useTableSelection.js +6 -33
- package/es/templates/List/index.js +2 -9
- package/es/timeline/ProTimeLineItem/index.js +24 -64
- package/es/timeline/index.js +8 -22
- package/es/timeline/typing.d.ts +1 -0
- package/es/utils/message.d.ts +2 -2
- package/es/utils/message.js +0 -5
- package/es/utils/useRealHistory.d.ts +8 -0
- package/es/utils/useRealHistory.js +23 -0
- package/lib/actions/base.js +8 -24
- package/lib/actions/confirm.js +0 -5
- package/lib/actions/danger-confirm.js +0 -5
- package/lib/actions/danger-pop-confirm.js +0 -4
- package/lib/actions/dialog-component.js +2 -15
- package/lib/actions/dialog-form.js +36 -88
- package/lib/actions/dialog-info.js +1 -10
- package/lib/actions/dialog-table.js +0 -5
- package/lib/actions/dialog.js +55 -111
- package/lib/actions/drawer-form.js +0 -3
- package/lib/actions/drawer-info.js +0 -3
- package/lib/actions/drawer-table.js +0 -3
- package/lib/actions/drawer.js +0 -4
- package/lib/actions/error.js +0 -5
- package/lib/actions/index.d.ts +2 -0
- package/lib/actions/index.js +70 -186
- package/lib/actions/link.js +3 -10
- package/lib/actions/notice.js +0 -5
- package/lib/actions/pop-confirm.js +0 -5
- package/lib/actions/quick.js +0 -13
- package/lib/actions/request.js +10 -32
- package/lib/actions/utils.js +1 -9
- package/lib/card/card-container.js +0 -9
- package/lib/card/divider.js +0 -7
- package/lib/card/index.js +56 -122
- package/lib/card/selectable.js +4 -20
- package/lib/card/tab.js +1 -14
- package/lib/card/utils.js +0 -6
- package/lib/field/index.js +0 -6
- package/lib/form/Components/Editable/index.js +15 -65
- package/lib/form/Components/FormGroup/index.d.ts +1 -0
- package/lib/form/Components/FormGroup/index.js +7 -28
- package/lib/form/Components/LightFilter/index.js +15 -47
- package/lib/form/Components/ProField/index.js +2 -21
- package/lib/form/Components/ProField/mapDateFormat.js +2 -32
- package/lib/form/Components/Text/index.d.ts +1 -0
- package/lib/form/Components/Text/index.js +2 -16
- package/lib/form/Filter/AdvancedFilter.js +11 -34
- package/lib/form/Filter/Layout.js +11 -33
- package/lib/form/Filter/LightFilter.js +13 -32
- package/lib/form/Filter/SimpleFilter.js +5 -27
- package/lib/form/Filter/index.js +105 -191
- package/lib/form/Filter/index2.js +11 -38
- package/lib/form/Filter/useBindUrl.js +18 -50
- package/lib/form/Filter/useSpecialProps.js +6 -13
- package/lib/form/ProForm/addCascadeEffect.js +10 -35
- package/lib/form/ProForm/customComponent.js +0 -8
- package/lib/form/ProForm/index.js +23 -57
- package/lib/form/ProForm/useAutoLayout.js +21 -45
- package/lib/form/ProForm/useAutoSubmit.js +3 -10
- package/lib/form/ProForm/useFieldRequest.js +0 -8
- package/lib/form/ProForm/useFormDisplayValues.js +12 -34
- package/lib/form/ProForm/useInitialRequest.js +0 -6
- package/lib/form/SchemaForm/adapterComponent.js +0 -6
- package/lib/form/SchemaForm/adapterDecorator.d.ts +1 -1
- package/lib/form/SchemaForm/adapterDecorator.js +0 -12
- package/lib/form/SchemaForm/adapterType.js +0 -5
- package/lib/form/SchemaForm/index.js +78 -144
- package/lib/form/SchemaForm/initializeArrayCards.js +0 -7
- package/lib/form/SchemaForm/initializeArrayCollapse.js +0 -7
- package/lib/form/SchemaForm/initializeArrayItems.js +2 -10
- package/lib/form/SchemaForm/initializeArrayTable.js +21 -34
- package/lib/form/SchemaForm/initializeDataSource.js +2 -8
- package/lib/form/SchemaForm/initializeFormButton.js +14 -32
- package/lib/form/SchemaForm/initializeFormCollapse.js +8 -18
- package/lib/form/SchemaForm/initializeFormGroup.js +10 -20
- package/lib/form/SchemaForm/initializeFormStep.js +11 -23
- package/lib/form/SchemaForm/initializeFormTab.js +10 -20
- package/lib/form/SchemaForm/initializeReactions.js +9 -37
- package/lib/form/SchemaForm/initializeRequest.js +2 -18
- package/lib/form/SchemaForm/initializeRules.js +4 -24
- package/lib/form/SchemaForm/initializeSelectTable.js +7 -36
- package/lib/form/SchemaForm/reactions.js +17 -37
- package/lib/form/docs/ActionResponse.d.ts +1 -0
- package/lib/form/docs/ActionResponse.js +0 -5
- package/lib/form/index.d.ts +9 -9
- package/lib/form/index.js +0 -25
- package/lib/form/typing.d.ts +6 -4
- package/lib/form/utils.d.ts +1 -1
- package/lib/form/utils.js +4 -61
- package/lib/form/warning.js +2 -8
- package/lib/hooks/index.js +0 -5
- package/lib/index-without-icon.js +2 -36
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -39
- package/lib/info/components/InfoGroup/index.js +21 -42
- package/lib/info/components/InfoValueItem/index.js +66 -134
- package/lib/info/components/ProInfoItem/index.js +13 -29
- package/lib/info/components/baseInfo/index.js +14 -38
- package/lib/info/components/headerInfo/index.js +8 -31
- package/lib/info/components/tableInfo/index.js +20 -62
- package/lib/info/index.js +53 -97
- package/lib/info/utils/index.js +0 -19
- package/lib/info/utils/utils.js +0 -1
- package/lib/nocode/configurators/PageHeader.js +0 -2
- package/lib/nocode/configurators/ProTable.js +0 -2
- package/lib/nocode/configurators/common.js +5 -10
- package/lib/nocode/configurators/index.js +2 -10
- package/lib/nocode/configurators/map.js +0 -5
- package/lib/nocode/index.js +0 -11
- package/lib/nocode/pages/editor.js +5 -19
- package/lib/nocode/pages/index.js +2 -9
- package/lib/nocode/pages/playground.js +18 -52
- package/lib/nocode/pages/renderer.js +9 -53
- package/lib/nocode/playground.js +10 -35
- package/lib/page-container/index.js +0 -6
- package/lib/page-header/index.d.ts +2 -2
- package/lib/page-header/index.js +38 -88
- package/lib/sidebar/components/sidebar-container/index.js +41 -84
- package/lib/sidebar/components/tree/index.js +88 -158
- package/lib/sidebar/components/tree-node/components/HoverTooltip/index.js +11 -34
- package/lib/sidebar/components/tree-node/components/IconAction/index.js +9 -46
- package/lib/sidebar/components/tree-node/components/IconSwitch/index.js +12 -35
- package/lib/sidebar/components/tree-node/index.js +41 -99
- package/lib/sidebar/index.js +69 -112
- package/lib/sidebar/utils/action-ref.js +2 -8
- package/lib/sidebar/utils/index.d.ts +5 -2
- package/lib/sidebar/utils/index.js +41 -106
- package/lib/skeleton/index.js +0 -6
- package/lib/table/components/CardView/index.js +62 -161
- package/lib/table/components/EmptyContent/index.js +0 -6
- package/lib/table/components/Filter/index.js +42 -93
- package/lib/table/components/Layout/index.js +25 -58
- package/lib/table/components/LoadMore/index.js +15 -44
- package/lib/table/components/Pagination/index.js +25 -68
- package/lib/table/components/QuickAction/index.js +3 -15
- package/lib/table/components/ToolBar/CardSwitch.js +6 -28
- package/lib/table/components/ToolBar/DensityIcon.js +18 -42
- package/lib/table/components/ToolBar/FilterColumnIcon.js +50 -118
- package/lib/table/components/ToolBar/FullScreenIcon.js +3 -13
- package/lib/table/components/ToolBar/Fullscreen.js +19 -42
- package/lib/table/components/ToolBar/RefreshIcon.js +3 -12
- package/lib/table/components/ToolBar/index.js +23 -63
- package/lib/table/index.js +226 -423
- package/lib/table/utils/columnRender.d.ts +1 -1
- package/lib/table/utils/columnRender.js +32 -89
- package/lib/table/utils/genProColumnToColumn.js +5 -19
- package/lib/table/utils/getTableProps.js +0 -2
- package/lib/table/utils/getTableSortIcons.js +0 -5
- package/lib/table/utils/index.js +12 -55
- package/lib/table/utils/pureColumnRender.js +21 -64
- package/lib/table/utils/pureGenProColumnToColumn.d.ts +1 -1
- package/lib/table/utils/pureGenProColumnToColumn.js +2 -11
- package/lib/table/utils/useTableSelection.js +6 -35
- package/lib/templates/Detail/index.js +0 -5
- package/lib/templates/Form/index.js +0 -5
- package/lib/templates/List/index.js +2 -19
- package/lib/templates/index.js +0 -6
- package/lib/timeline/ProTimeLineItem/index.js +24 -75
- package/lib/timeline/index.js +8 -33
- package/lib/timeline/typing.d.ts +1 -0
- package/lib/utils/index.js +0 -6
- package/lib/utils/message.d.ts +2 -2
- package/lib/utils/message.js +0 -10
- package/lib/utils/useRealHistory.d.ts +8 -0
- package/lib/utils/useRealHistory.js +32 -0
- package/package.json +1 -1
@@ -10,4 +10,4 @@ export declare const renderColumnsTitle: (item: ProTableColumnProps, actionRef:
|
|
10
10
|
/**
|
11
11
|
* 负责单元格的具体渲染
|
12
12
|
*/
|
13
|
-
export declare const renderCell: (value: any, item: ProTableColumnProps, index: number, record: any, actionRef: React.MutableRefObject<ProTableActionType | undefined>, context?: any, dataTeamixSpm?: string
|
13
|
+
export declare const renderCell: (value: any, item: ProTableColumnProps, index: number, record: any, actionRef: React.MutableRefObject<ProTableActionType | undefined>, context?: any, dataTeamixSpm?: string) => JSX.Element;
|
@@ -1,29 +1,16 @@
|
|
1
1
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
2
|
-
|
3
2
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
4
|
-
|
5
3
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
6
|
-
|
7
4
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
8
|
-
|
9
5
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
10
|
-
|
11
6
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
12
|
-
|
13
7
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
14
|
-
|
15
8
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
16
|
-
|
17
9
|
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
18
|
-
|
19
10
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
20
|
-
|
21
11
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
22
|
-
|
23
12
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
24
|
-
|
25
13
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
26
|
-
|
27
14
|
/**
|
28
15
|
* 渲染列的逻辑函数
|
29
16
|
*/
|
@@ -35,36 +22,28 @@ import Filter from '../components/Filter';
|
|
35
22
|
/**
|
36
23
|
* 增加了 icon 的功能 render title
|
37
24
|
*/
|
38
|
-
|
39
25
|
export var renderColumnsTitle = function renderColumnsTitle(item, actionRef) {
|
40
26
|
var filterMode = item.filterMode,
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
27
|
+
filters = item.filters,
|
28
|
+
dataSource = item.dataSource,
|
29
|
+
dataIndex = item.dataIndex,
|
30
|
+
valueType = item.valueType;
|
31
|
+
// 为列过滤添加状态标题
|
46
32
|
var getItemLabel = function getItemLabel() {
|
47
33
|
if (filters && filterMode !== 'multiple') {
|
48
34
|
var _actionRef$current$ge, _actionRef$current, _actionRef$current$ge2;
|
49
|
-
|
50
35
|
var selectedItem = (_actionRef$current$ge = (_actionRef$current = actionRef.current) === null || _actionRef$current === void 0 ? void 0 : (_actionRef$current$ge2 = _actionRef$current.getState) === null || _actionRef$current$ge2 === void 0 ? void 0 : _actionRef$current$ge2.call(_actionRef$current).filterRules) !== null && _actionRef$current$ge !== void 0 ? _actionRef$current$ge : {};
|
51
|
-
|
52
36
|
if (Object.keys(selectedItem).length > 0) {
|
53
37
|
var _selectedItem$dataInd;
|
54
|
-
|
55
38
|
if ((_selectedItem$dataInd = selectedItem[dataIndex]) === null || _selectedItem$dataInd === void 0 ? void 0 : _selectedItem$dataInd.params) {
|
56
39
|
var _targetFilters$find;
|
57
|
-
|
58
40
|
// 找到对应的 label
|
59
41
|
var targetFilters = filters !== null && filters !== void 0 ? filters : [];
|
60
|
-
|
61
42
|
if (filters === true) {
|
62
43
|
targetFilters = dataSource !== null && dataSource !== void 0 ? dataSource : [];
|
63
44
|
}
|
64
|
-
|
65
45
|
var label = (_targetFilters$find = targetFilters.find(function (item) {
|
66
46
|
var _selectedItem$dataInd2;
|
67
|
-
|
68
47
|
return item.value === ((_selectedItem$dataInd2 = selectedItem[dataIndex]) === null || _selectedItem$dataInd2 === void 0 ? void 0 : _selectedItem$dataInd2.params);
|
69
48
|
})) === null || _targetFilters$find === void 0 ? void 0 : _targetFilters$find.label;
|
70
49
|
var value = "".concat(item.title, " (").concat(label, ")");
|
@@ -82,7 +61,6 @@ export var renderColumnsTitle = function renderColumnsTitle(item, actionRef) {
|
|
82
61
|
}
|
83
62
|
}
|
84
63
|
}
|
85
|
-
|
86
64
|
return /*#__PURE__*/React.createElement(ProField, {
|
87
65
|
style: {
|
88
66
|
display: 'inline-flex'
|
@@ -95,7 +73,6 @@ export var renderColumnsTitle = function renderColumnsTitle(item, actionRef) {
|
|
95
73
|
}
|
96
74
|
});
|
97
75
|
};
|
98
|
-
|
99
76
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LabelIconTip, {
|
100
77
|
label: item.title,
|
101
78
|
tooltip: item.tooltip,
|
@@ -108,25 +85,22 @@ export var renderColumnsTitle = function renderColumnsTitle(item, actionRef) {
|
|
108
85
|
/**
|
109
86
|
* 负责单元格的具体渲染
|
110
87
|
*/
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
context, // 用于埋点
|
88
|
+
export var renderCell = function renderCell(value, item, index, record, actionRef, /** 接收外部比如 dialog-table 传过来的 context,用于弹窗关闭等 */
|
89
|
+
context,
|
90
|
+
// 用于埋点
|
115
91
|
dataTeamixSpm) {
|
116
92
|
var _actionSchema$actions;
|
117
|
-
|
118
93
|
var _item$valueType = item.valueType,
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
94
|
+
valueType = _item$valueType === void 0 ? 'text' : _item$valueType,
|
95
|
+
render = item.render,
|
96
|
+
actionSchema = item.actionSchema,
|
97
|
+
dataIndex = item.dataIndex,
|
98
|
+
format = item.format;
|
99
|
+
// 如果没传 dataIndex,返回 null
|
125
100
|
if (!dataIndex) {
|
126
101
|
value = null;
|
127
|
-
}
|
128
|
-
|
129
|
-
|
102
|
+
}
|
103
|
+
// 处理 dataIndex 为数组的情况
|
130
104
|
if (Array.isArray(dataIndex)) {
|
131
105
|
value = dataIndex.map(function (item) {
|
132
106
|
return getTargetValue("{{".concat(item, "}}"), _objectSpread(_objectSpread({}, record), {}, {
|
@@ -134,18 +108,16 @@ dataTeamixSpm) {
|
|
134
108
|
}));
|
135
109
|
});
|
136
110
|
}
|
137
|
-
|
138
111
|
var newRender = null;
|
139
112
|
var newDataSource = null;
|
140
|
-
var props = item.props;
|
141
|
-
|
113
|
+
var props = item.props;
|
114
|
+
// 如果 render 直接传函数
|
142
115
|
if (typeof render === 'function') {
|
143
116
|
newRender = function newRender() {
|
144
117
|
return render === null || render === void 0 ? void 0 : render(value, index, record);
|
145
118
|
};
|
146
119
|
} else {
|
147
120
|
newRender = processBuriedPoint(processRenderFunction(render, value, index, record), record, value, index);
|
148
|
-
|
149
121
|
if (valueType === 'selectGroup') {
|
150
122
|
newRender = _objectSpread(_objectSpread({
|
151
123
|
maxShowNumber: 'auto',
|
@@ -162,15 +134,13 @@ dataTeamixSpm) {
|
|
162
134
|
}
|
163
135
|
}, props);
|
164
136
|
}
|
165
|
-
|
166
137
|
if ((render === null || render === void 0 ? void 0 : render.type) === 'step') {
|
167
138
|
newRender = _objectSpread(_objectSpread({}, newRender), {}, {
|
168
139
|
ellipsis: false
|
169
140
|
});
|
170
141
|
}
|
171
|
-
}
|
172
|
-
|
173
|
-
|
142
|
+
}
|
143
|
+
// 渲染操作组
|
174
144
|
if (actionSchema && ((_actionSchema$actions = actionSchema.actions) === null || _actionSchema$actions === void 0 ? void 0 : _actionSchema$actions.length)) {
|
175
145
|
// 默认 context
|
176
146
|
var defaultContext = _objectSpread({
|
@@ -179,29 +149,24 @@ dataTeamixSpm) {
|
|
179
149
|
record: record,
|
180
150
|
action: actionRef.current
|
181
151
|
}, context);
|
182
|
-
|
183
152
|
return /*#__PURE__*/React.createElement(ProActionGroup, _objectSpread(_objectSpread({
|
184
153
|
type: "text"
|
185
154
|
}, actionSchema), {}, {
|
186
155
|
context: _objectSpread(_objectSpread({}, defaultContext), actionSchema.context),
|
187
156
|
"data-teamix-spm": dataTeamixSpm ? "".concat(dataTeamixSpm, "-columnAction") : undefined
|
188
157
|
}));
|
189
|
-
}
|
190
|
-
|
191
|
-
|
158
|
+
}
|
159
|
+
// dataSource可传函数
|
192
160
|
if (typeof item.dataSource === 'function') {
|
193
161
|
var _item$dataSource;
|
194
|
-
|
195
162
|
newDataSource = (_item$dataSource = item.dataSource) === null || _item$dataSource === void 0 ? void 0 : _item$dataSource.call(item, value, index, record);
|
196
163
|
} else {
|
197
164
|
var _item$dataSource2;
|
198
|
-
|
199
165
|
newDataSource = ((_item$dataSource2 = item.dataSource) !== null && _item$dataSource2 !== void 0 ? _item$dataSource2 : []).map(function (item) {
|
200
166
|
return Object.fromEntries(Object.entries(item).map(function (_ref) {
|
201
167
|
var _ref2 = _slicedToArray(_ref, 2),
|
202
|
-
|
203
|
-
|
204
|
-
|
168
|
+
k = _ref2[0],
|
169
|
+
v = _ref2[1];
|
205
170
|
return [k, getTargetValue(v, _objectSpread(_objectSpread({}, record), {}, {
|
206
171
|
record: record,
|
207
172
|
value: value,
|
@@ -209,9 +174,8 @@ dataTeamixSpm) {
|
|
209
174
|
}))];
|
210
175
|
}));
|
211
176
|
});
|
212
|
-
}
|
213
|
-
|
214
|
-
|
177
|
+
}
|
178
|
+
// 渲染 ProField
|
215
179
|
return /*#__PURE__*/React.createElement(ProField, _objectSpread({
|
216
180
|
type: valueType || 'text',
|
217
181
|
value: value,
|
@@ -228,7 +192,6 @@ dataTeamixSpm) {
|
|
228
192
|
* @param record table cell record
|
229
193
|
* @returns
|
230
194
|
*/
|
231
|
-
|
232
195
|
var processRenderFunction = function processRenderFunction() {
|
233
196
|
var render = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
234
197
|
var value = arguments.length > 1 ? arguments[1] : undefined;
|
@@ -238,25 +201,20 @@ var processRenderFunction = function processRenderFunction() {
|
|
238
201
|
var external = ['linkOnClick', 'link', 'value', 'renderEdit', 'descriptionRenderEdit', 'editPopConfirmProps', 'descriptionEditPopConfirmProps', 'editOnClick', 'descriptionEditOnClick', 'extra', 'prefixExtra'];
|
239
202
|
return Object.fromEntries(Object.entries(render).map(function (_ref3) {
|
240
203
|
var _ref4 = _slicedToArray(_ref3, 2),
|
241
|
-
|
242
|
-
|
243
|
-
|
204
|
+
k = _ref4[0],
|
205
|
+
v = _ref4[1];
|
244
206
|
if (typeof v === 'function') {
|
245
207
|
var _v;
|
246
|
-
|
247
208
|
if (external.includes(k)) {
|
248
209
|
return [k, function () {
|
249
210
|
for (var _len = arguments.length, others = new Array(_len), _key = 0; _key < _len; _key++) {
|
250
211
|
others[_key] = arguments[_key];
|
251
212
|
}
|
252
|
-
|
253
213
|
return v === null || v === void 0 ? void 0 : v.apply(void 0, [value, index, record].concat(others));
|
254
214
|
}];
|
255
215
|
}
|
256
|
-
|
257
216
|
return [k, (_v = v === null || v === void 0 ? void 0 : v(value, index, record)) !== null && _v !== void 0 ? _v : ''];
|
258
217
|
}
|
259
|
-
|
260
218
|
return [k, v];
|
261
219
|
}));
|
262
220
|
};
|
@@ -266,20 +224,18 @@ var processRenderFunction = function processRenderFunction() {
|
|
266
224
|
* @param record table cell record
|
267
225
|
* @returns
|
268
226
|
*/
|
269
|
-
|
270
|
-
|
271
227
|
var processBuriedPoint = function processBuriedPoint() {
|
272
228
|
var render = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
273
229
|
var record = arguments.length > 1 ? arguments[1] : undefined;
|
274
230
|
var value = arguments.length > 2 ? arguments[2] : undefined;
|
275
231
|
var index = arguments.length > 3 ? arguments[3] : undefined;
|
276
|
-
return Object.fromEntries([
|
232
|
+
return Object.fromEntries([
|
233
|
+
// 默认 ellipsis、descriptionEllipsis 为 true
|
277
234
|
// emptyText 默认为 '-'
|
278
235
|
['ellipsis', true], ['descriptionEllipsis', true], ['emptyText', '-']].concat(_toConsumableArray(Object.entries(render).map(function (_ref5) {
|
279
236
|
var _ref6 = _slicedToArray(_ref5, 2),
|
280
|
-
|
281
|
-
|
282
|
-
|
237
|
+
k = _ref6[0],
|
238
|
+
v = _ref6[1];
|
283
239
|
return [k, getTargetValue(v, _objectSpread(_objectSpread({}, record), {}, {
|
284
240
|
record: record,
|
285
241
|
value: value,
|
@@ -1,15 +1,9 @@
|
|
1
1
|
var _excluded = ["filters", "dataIndex"];
|
2
|
-
|
3
2
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
4
|
-
|
5
3
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
6
|
-
|
7
4
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
8
|
-
|
9
5
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
10
|
-
|
11
6
|
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; }
|
12
|
-
|
13
7
|
import React from 'react';
|
14
8
|
import { renderColumnsTitle, renderCell } from './columnRender';
|
15
9
|
import { ProSkeletonRaw as Skeleton } from '../../skeleton';
|
@@ -17,18 +11,16 @@ import { getLanguage } from '@teamix/utils';
|
|
17
11
|
/**
|
18
12
|
* ProColumn => Column
|
19
13
|
*/
|
20
|
-
|
21
|
-
export default function genProColumnToColumn(columns,
|
22
|
-
/** 是否渲染骨架屏 */
|
14
|
+
export default function genProColumnToColumn(columns, /** 是否渲染骨架屏 */
|
23
15
|
showSkeleton, actionRef) {
|
24
16
|
var context = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
25
|
-
var
|
17
|
+
var
|
18
|
+
// 用于埋点
|
26
19
|
dataTeamixSpm = arguments.length > 4 ? arguments[4] : undefined;
|
27
20
|
return columns.map(function (columnProps) {
|
28
21
|
var filters = columnProps.filters,
|
29
|
-
|
30
|
-
|
31
|
-
|
22
|
+
dataIndex = columnProps.dataIndex,
|
23
|
+
others = _objectWithoutProperties(columnProps, _excluded);
|
32
24
|
if (showSkeleton) {
|
33
25
|
return _objectSpread(_objectSpread({}, others), {}, {
|
34
26
|
filters: undefined,
|
@@ -40,7 +32,6 @@ showSkeleton, actionRef) {
|
|
40
32
|
}
|
41
33
|
});
|
42
34
|
}
|
43
|
-
|
44
35
|
return _objectSpread(_objectSpread({
|
45
36
|
// 金钱样式默认右对齐
|
46
37
|
align: columnProps.valueType === 'money' ? 'right' : 'left',
|
package/es/table/utils/index.js
CHANGED
@@ -1,36 +1,24 @@
|
|
1
1
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
2
|
-
|
3
2
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
4
|
-
|
5
3
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
6
|
-
|
7
4
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
8
|
-
|
9
5
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
10
|
-
|
11
6
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
12
|
-
|
13
7
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
14
|
-
|
15
8
|
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
16
|
-
|
17
9
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
10
|
+
import cloneDeepLodash from 'lodash.clonedeep';
|
11
|
+
// 所有 ProTable 组件公用一套组件内事件转发机制
|
12
|
+
var tableCallback = {};
|
13
|
+
// 组件内对全局状态的更改
|
23
14
|
var getMutations = function getMutations(actionRef) {
|
24
15
|
var _actionRef$current2, _actionRef$current2$g, _actionRef$current2$g2;
|
25
|
-
|
26
16
|
return {
|
27
17
|
setFullScreenState: function setFullScreenState(fullScreenState) {
|
28
18
|
var _actionRef$current, _actionRef$current$se;
|
29
|
-
|
30
19
|
(_actionRef$current = actionRef.current) === null || _actionRef$current === void 0 ? void 0 : (_actionRef$current$se = _actionRef$current.setState) === null || _actionRef$current$se === void 0 ? void 0 : _actionRef$current$se.call(_actionRef$current, 'fullScreenState', fullScreenState);
|
31
20
|
},
|
32
21
|
filterColumns: (_actionRef$current2 = actionRef.current) === null || _actionRef$current2 === void 0 ? void 0 : (_actionRef$current2$g = _actionRef$current2.getState) === null || _actionRef$current2$g === void 0 ? void 0 : (_actionRef$current2$g2 = _actionRef$current2$g.call(_actionRef$current2)) === null || _actionRef$current2$g2 === void 0 ? void 0 : _actionRef$current2$g2.filterColumns,
|
33
|
-
|
34
22
|
/**
|
35
23
|
* 设置筛选列规则
|
36
24
|
* @param rules 规则
|
@@ -38,49 +26,40 @@ var getMutations = function getMutations(actionRef) {
|
|
38
26
|
*/
|
39
27
|
setFilterRules: function setFilterRules(rules) {
|
40
28
|
var _actionRef$current3, _actionRef$current3$s;
|
41
|
-
|
42
29
|
(_actionRef$current3 = actionRef.current) === null || _actionRef$current3 === void 0 ? void 0 : (_actionRef$current3$s = _actionRef$current3.setState) === null || _actionRef$current3$s === void 0 ? void 0 : _actionRef$current3$s.call(_actionRef$current3, 'filterRules', rules);
|
43
30
|
},
|
44
|
-
|
45
31
|
/**
|
46
32
|
* 获取筛选规则。为params
|
47
33
|
*/
|
48
34
|
getFilterRules: function getFilterRules() {
|
49
35
|
var _actionRef$current4, _actionRef$current4$g;
|
50
|
-
|
51
36
|
var result = {};
|
52
37
|
var filterRules = (_actionRef$current4 = actionRef.current) === null || _actionRef$current4 === void 0 ? void 0 : (_actionRef$current4$g = _actionRef$current4.getState) === null || _actionRef$current4$g === void 0 ? void 0 : _actionRef$current4$g.call(_actionRef$current4).filterRules;
|
53
|
-
|
54
38
|
if (filterRules) {
|
55
39
|
result = Object.entries(filterRules).map(function (_ref) {
|
56
40
|
var _ref2 = _slicedToArray(_ref, 2),
|
57
|
-
|
58
|
-
|
59
|
-
|
41
|
+
k = _ref2[0],
|
42
|
+
v = _ref2[1];
|
60
43
|
return _defineProperty({}, k, v.params);
|
61
44
|
}).reduce(function (acc, cur) {
|
62
45
|
acc = _objectSpread(_objectSpread({}, acc), cur);
|
63
46
|
return acc;
|
64
47
|
}, {});
|
65
48
|
}
|
66
|
-
|
67
49
|
return result;
|
68
50
|
}
|
69
51
|
};
|
70
|
-
};
|
71
|
-
|
72
|
-
|
52
|
+
};
|
53
|
+
// 调用绑定的监听函数
|
73
54
|
export function actionRefUseStateOn(callback, state) {
|
74
55
|
for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
75
56
|
args[_key - 2] = arguments[_key];
|
76
57
|
}
|
77
|
-
|
78
58
|
if (callback[state]) {
|
79
59
|
Object.entries(callback[state]).forEach(function (_ref4) {
|
80
60
|
var _ref5 = _slicedToArray(_ref4, 2),
|
81
|
-
|
82
|
-
|
83
|
-
|
61
|
+
k = _ref5[0],
|
62
|
+
v = _ref5[1];
|
84
63
|
if (v) {
|
85
64
|
v === null || v === void 0 ? void 0 : v.apply(void 0, args);
|
86
65
|
}
|
@@ -88,33 +67,27 @@ export function actionRefUseStateOn(callback, state) {
|
|
88
67
|
}
|
89
68
|
}
|
90
69
|
/** table 组件内监听 不对外暴露 */
|
91
|
-
|
92
70
|
export function on(fun, key) {
|
93
71
|
tableCallback[key] = fun;
|
94
72
|
}
|
95
73
|
/** table 组件内销毁监听 不对外暴露 */
|
96
|
-
|
97
74
|
export function off(key) {
|
98
75
|
if (tableCallback[key]) {
|
99
76
|
delete tableCallback[key];
|
100
77
|
}
|
101
78
|
}
|
102
79
|
/** table 组件内触发事件 不对外暴露 */
|
103
|
-
|
104
80
|
export function emit(key) {
|
105
81
|
var fun = tableCallback[key];
|
106
|
-
|
107
82
|
if (fun) {
|
108
83
|
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
109
84
|
args[_key2 - 1] = arguments[_key2];
|
110
85
|
}
|
111
|
-
|
112
86
|
fun.apply(void 0, args);
|
113
87
|
}
|
114
88
|
}
|
115
89
|
export function initActionRef(ref, action) {
|
116
90
|
var userAction = _objectSpread(_objectSpread({}, action), getMutations(ref));
|
117
|
-
|
118
91
|
ref.current = userAction;
|
119
92
|
}
|
120
93
|
export function useActionType(ref, action) {
|
@@ -128,30 +101,24 @@ export function cloneDeep(obj) {
|
|
128
101
|
* @param columns
|
129
102
|
* @param ref
|
130
103
|
*/
|
131
|
-
|
132
104
|
export function processDefaultFilter(columns, ref, defaultFilterParams) {
|
133
105
|
columns.forEach(function (column) {
|
134
106
|
var _column$dataIndex$toS, _column$dataIndex;
|
135
|
-
|
136
107
|
var defaultRules = defaultFilterParams === null || defaultFilterParams === void 0 ? void 0 : defaultFilterParams[(_column$dataIndex$toS = column === null || column === void 0 ? void 0 : (_column$dataIndex = column.dataIndex) === null || _column$dataIndex === void 0 ? void 0 : _column$dataIndex.toString()) !== null && _column$dataIndex$toS !== void 0 ? _column$dataIndex$toS : ''];
|
137
|
-
|
138
108
|
if (defaultRules) {
|
139
109
|
var _ref$current$getState, _ref$current, _ref$current$getState2, _ref$current$getState3, _ref$current2, _ref$current2$setFilt;
|
140
|
-
|
141
110
|
var params = '';
|
142
111
|
var rules = [];
|
143
|
-
|
144
112
|
if (Array.isArray(defaultRules)) {
|
145
113
|
params = defaultRules.join(',');
|
146
114
|
rules = defaultRules;
|
147
115
|
} else {
|
148
116
|
params = defaultRules;
|
149
117
|
rules = [defaultRules];
|
150
|
-
}
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
118
|
+
}
|
119
|
+
// 需要带上其他所有的信息
|
120
|
+
var otherRules = (_ref$current$getState = (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : (_ref$current$getState2 = _ref$current.getState) === null || _ref$current$getState2 === void 0 ? void 0 : (_ref$current$getState3 = _ref$current$getState2.call(_ref$current)) === null || _ref$current$getState3 === void 0 ? void 0 : _ref$current$getState3.filterRules) !== null && _ref$current$getState !== void 0 ? _ref$current$getState : {};
|
121
|
+
// 再设置所有的列筛选状态
|
155
122
|
(_ref$current2 = ref.current) === null || _ref$current2 === void 0 ? void 0 : (_ref$current2$setFilt = _ref$current2.setFilterRules) === null || _ref$current2$setFilt === void 0 ? void 0 : _ref$current2$setFilt.call(_ref$current2, _objectSpread(_objectSpread({}, otherRules), {}, _defineProperty({}, column.dataIndex, {
|
156
123
|
rules: rules,
|
157
124
|
params: params
|