@hw-component/table 1.10.11 → 1.10.13

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/index.css CHANGED
@@ -1,60 +1,60 @@
1
1
  .ant-hw-table-content .ant-hw-table-body {
2
- padding-top: 0px;
3
- border-top-left-radius: 0px;
4
- border-top-right-radius: 0px;
2
+ padding-top: 0;
3
+ border-top-left-radius: 0;
4
+ border-top-right-radius: 0;
5
5
  }
6
6
  .ant-hw-table-content .ant-hw-table-header {
7
- border-bottom-left-radius: 0px !important;
8
- border-bottom-right-radius: 0px !important;
7
+ border-bottom-right-radius: 0 !important;
8
+ border-bottom-left-radius: 0 !important;
9
9
  }
10
10
  .ant-hw-table-body {
11
- background-color: #fff;
12
11
  position: relative;
12
+ padding-top: 16px;
13
13
  padding-right: 20px;
14
14
  padding-left: 20px;
15
- padding-top: 16px;
15
+ background-color: #fff;
16
16
  border-radius: 4px;
17
17
  }
18
18
  .ant-hw-table-body .ant-hw-table-pagination {
19
+ margin-right: -20px;
20
+ margin-left: -20px;
19
21
  padding: 12px 24px;
20
- background-color: #ffffff;
21
- border-bottom-left-radius: 4px;
22
+ background-color: #fff;
22
23
  border-bottom-right-radius: 4px;
23
- margin-left: -20px;
24
- margin-right: -20px;
24
+ border-bottom-left-radius: 4px;
25
25
  }
26
26
  .ant-hw-table-body .ant-hw-table-pagination .ant-select {
27
27
  width: auto;
28
28
  }
29
29
  .ant-hw-table-body .ant-pro-card-body {
30
- padding-bottom: 0px;
30
+ padding-bottom: 0;
31
31
  }
32
32
  .ant-hw-table-body .ant-pro-table-list-toolbar-container {
33
- padding-top: 0px;
33
+ padding-top: 0;
34
34
  }
35
35
  .ant-hw-table-body .ant-pro-table > .ant-pro-card > .ant-pro-card-body {
36
- padding: 0px;
36
+ padding: 0;
37
37
  }
38
38
  .ant-hw-table-pagination {
39
+ position: relative;
39
40
  padding: 12px 24px;
41
+ background-color: #fff;
40
42
  border-radius: 4px;
41
- background-color: #ffffff;
42
- position: relative;
43
43
  }
44
44
  .ant-hw-top-btn {
45
45
  position: absolute;
46
46
  right: 10px;
47
47
  bottom: 54px;
48
48
  z-index: 9;
49
- cursor: pointer;
50
49
  width: 48px;
51
50
  height: 48px;
52
51
  background: url("./GoTop/goTop.png") no-repeat;
53
52
  background-size: 100%;
53
+ cursor: pointer;
54
54
  }
55
55
  .ant-hw-table-header {
56
+ padding-bottom: 0;
56
57
  border-radius: 4px !important;
57
- padding-bottom: 0px;
58
58
  }
59
59
  .ant-hw-table-header .ant-hw-table-header-item-hide {
60
60
  display: none;
@@ -74,7 +74,7 @@
74
74
  }
75
75
  .ant-hw-table-body-option-setting-title {
76
76
  width: 198px;
77
- margin: 0px -16px;
77
+ margin: 0 -16px;
78
78
  padding: 6px 8px;
79
79
  }
80
80
  .ant-hw-table-body-option-setting-content-title {
@@ -84,8 +84,8 @@
84
84
  display: flex;
85
85
  }
86
86
  .ant-hw-table-op-tree-content {
87
- padding: 6px 6px 6px 0px;
88
87
  width: 100%;
88
+ padding: 6px 6px 6px 0;
89
89
  }
90
90
  .ant-hw-table-body-option-tree .ant-tree-treenode {
91
91
  width: 100%;
@@ -98,10 +98,10 @@
98
98
  flex: 1;
99
99
  }
100
100
  .ant-hw-table-body-option-tree .ant-tree-switcher {
101
- width: 0px;
101
+ width: 0;
102
102
  }
103
103
  .ant-hw-table-body-option-tree .ant-tree-treenode-draggable {
104
- padding-left: 0px !important;
104
+ padding-left: 0 !important;
105
105
  }
106
106
  .ant-hw-table-pointer {
107
107
  cursor: pointer;
@@ -113,18 +113,18 @@
113
113
  cursor: pointer;
114
114
  }
115
115
  .ant-hw-table-header-title-box {
116
- -webkit-box-flex: 1;
117
- -webkit-flex: 1;
118
- -ms-flex: 1;
119
- flex: 1;
116
+ position: relative;
120
117
  display: -webkit-box;
121
118
  display: -webkit-flex;
122
119
  display: -ms-flexbox;
123
120
  display: flex;
124
- position: relative;
121
+ -webkit-box-flex: 1;
122
+ -webkit-flex: 1;
123
+ -ms-flex: 1;
124
+ flex: 1;
125
125
  box-sizing: border-box;
126
- margin: -10px 0px;
127
- padding: 10px 0px;
126
+ margin: -10px 0;
127
+ padding: 10px 0;
128
128
  }
129
129
  .ant-hw-table-header-title-box .ant-hw-table-header-title-box-content {
130
130
  white-space: nowrap;
@@ -134,16 +134,15 @@
134
134
  display: -webkit-flex;
135
135
  display: -ms-flexbox;
136
136
  display: flex;
137
+ -webkit-align-content: center;
138
+ -ms-flex-line-pack: center;
139
+ align-content: center;
137
140
  -webkit-box-pack: justify;
138
141
  -webkit-justify-content: space-between;
139
142
  -ms-flex-pack: justify;
140
143
  justify-content: space-between;
141
- -webkit-align-content: center;
142
- -ms-flex-line-pack: center;
143
- align-content: center;
144
144
  }
145
145
  .ant-hw-table-header-right-node {
146
- padding-left: 12px;
147
146
  display: -webkit-box;
148
147
  display: -webkit-flex;
149
148
  display: -ms-flexbox;
@@ -152,6 +151,7 @@
152
151
  -webkit-align-items: center;
153
152
  -ms-flex-align: center;
154
153
  align-items: center;
154
+ padding-left: 12px;
155
155
  }
156
156
  .ant-hw-table-render-copy {
157
157
  margin-bottom: 0 !important;
@@ -161,17 +161,17 @@
161
161
  .ant-hw-table-render-text-basic {
162
162
  width: 100%;
163
163
  }
164
- .ant-hw-table-col-hr:after {
164
+ .ant-hw-table-col-hr::after {
165
165
  position: absolute;
166
- top: 50%;
167
- left: 0;
168
- width: 1px;
166
+ top: 50% !important;
167
+ left: 0 !important;
168
+ width: 1px !important;
169
169
  height: 1.6em;
170
170
  background-color: rgba(0, 0, 0, 0.06);
171
- -webkit-transform: translateY(-50%);
172
- -ms-transform: translateY(-50%);
173
- transform: translateY(-50%);
171
+ -webkit-transform: translateY(-50%) !important;
172
+ -ms-transform: translateY(-50%) !important;
173
+ transform: translateY(-50%) !important;
174
174
  -webkit-transition: background-color 0.3s;
175
175
  transition: background-color 0.3s;
176
- content: '';
176
+ content: "";
177
177
  }
package/es/modal.d.ts CHANGED
@@ -26,7 +26,7 @@ export interface ParamsModal extends Record<string, any> {
26
26
  size?: number;
27
27
  current?: number;
28
28
  }
29
- interface HColumns extends Omit<ProColumns, "render" | "title"> {
29
+ interface HColumns extends Omit<ProColumns, "render" | "title" | "children"> {
30
30
  render?: (dom: React.ReactNode, data: any, index: number, tableInstance: HTableInstance) => React.ReactNode;
31
31
  showSearch?: boolean;
32
32
  searchType?: HItemProps["type"];
@@ -34,6 +34,7 @@ interface HColumns extends Omit<ProColumns, "render" | "title"> {
34
34
  rowSelectionTitle?: boolean;
35
35
  title?: string | React.ReactNode;
36
36
  valueTypeProps?: Record<string, any>;
37
+ children?: ConfigItemModal[];
37
38
  }
38
39
  interface BcItemModal {
39
40
  childrenDataIndex?: ConfigItemModal[] | string[];
@@ -2,7 +2,7 @@ import { HEditTableProps } from "./modal";
2
2
  import { MutableRefObject } from "react";
3
3
  import type { ActionType } from "@ant-design/pro-table";
4
4
  import { EditableFormInstance } from "@ant-design/pro-table/lib/components/EditableTable";
5
- export declare const useListRequest: ({ request, dataSource }: HEditTableProps) => import("@ahooksjs/use-request/lib/types").BaseResult<any, [params?: any]>;
5
+ export declare const useListRequest: ({ request, dataSource, manual }: HEditTableProps) => import("@ahooksjs/use-request/lib/types").BaseResult<any, [params?: any]>;
6
6
  export declare const useCuRef: ({ actionRef, editableFormRef }: HEditTableProps) => {
7
7
  cuActionRef: MutableRefObject<ActionType>;
8
8
  cuEditableFormRef: MutableRefObject<EditableFormInstance>;
@@ -21,7 +21,9 @@ function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymb
21
21
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context2 = ownKeys(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
22
22
  var useListRequest = function useListRequest(_ref) {
23
23
  var request = _ref.request,
24
- dataSource = _ref.dataSource;
24
+ dataSource = _ref.dataSource,
25
+ manual = _ref.manual;
26
+ var relManual = request ? manual : false;
25
27
  var saveParams = React.useMemo(function () {
26
28
  return {
27
29
  params: {
@@ -59,7 +61,7 @@ var useListRequest = function useListRequest(_ref) {
59
61
  }
60
62
  }, _callee);
61
63
  })), {
62
- manual: true,
64
+ manual: relManual,
63
65
  refreshDeps: [dataSource]
64
66
  });
65
67
  };
@@ -54,7 +54,8 @@ var HEditTable = (function (_ref) {
54
54
  var tableBody = index.useClassName("hw-table-body");
55
55
  var _useListRequest = hooks.useListRequest({
56
56
  request: request,
57
- dataSource: dataSource
57
+ dataSource: dataSource,
58
+ manual: manual
58
59
  }),
59
60
  loading = _useListRequest.loading,
60
61
  data = _useListRequest.data,
@@ -96,7 +97,7 @@ var HEditTable = (function (_ref) {
96
97
  loading: loading,
97
98
  rowKey: rowKey,
98
99
  editableFormRef: cuEditableFormRef,
99
- manualRequest: manual,
100
+ manualRequest: true,
100
101
  request: run,
101
102
  actionRef: cuActionRef,
102
103
  value: values,
@@ -8,11 +8,11 @@ var _Object$defineProperties = require('@babel/runtime-corejs3/core-js-stable/ob
8
8
  var _Object$defineProperty = require('@babel/runtime-corejs3/core-js-stable/object/define-property');
9
9
  var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
10
10
  var _slicedToArray = require('@babel/runtime-corejs3/helpers/slicedToArray');
11
+ var _mapInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/map');
11
12
  var _indexOfInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/index-of');
12
13
  var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
13
14
  var _filterInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/filter');
14
15
  var _spliceInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/splice');
15
- var _mapInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/map');
16
16
  var _forEachInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/for-each');
17
17
  var context = require('../../context.js');
18
18
  var React = require('react');
@@ -50,7 +50,15 @@ var useCols = function useCols(_ref) {
50
50
  var childLen = children.length;
51
51
  return !childLen && !!lastChildLen ? trClassname : "";
52
52
  };
53
- var itemProvider = function itemProvider(item, lastItem) {
53
+ var colChild = function colChild(children) {
54
+ if (!children) {
55
+ return children;
56
+ }
57
+ return _mapInstanceProperty(children).call(children, function (item) {
58
+ return itemProvider(item);
59
+ });
60
+ };
61
+ function itemProvider(item, lastItem) {
54
62
  var _context2;
55
63
  var _ref2 = lastItem || {},
56
64
  _ref2$children = _ref2.children,
@@ -71,14 +79,16 @@ var useCols = function useCols(_ref) {
71
79
  return _objectSpread(_objectSpread({}, item), {}, {
72
80
  ellipsis: ellipsis,
73
81
  className: _concatInstanceProperty(_context = "".concat(className, " ")).call(_context, trClassName),
74
- render: index$1.default(item, table, valueTypeConfig)
82
+ render: index$1.default(item, table, valueTypeConfig),
83
+ children: colChild(children)
75
84
  });
76
85
  }
77
86
  return _objectSpread(_objectSpread({}, item), {}, {
78
87
  className: _concatInstanceProperty(_context2 = "".concat(className, " ")).call(_context2, trClassName),
79
- render: index$1.default(item, table, valueTypeConfig)
88
+ render: index$1.default(item, table, valueTypeConfig),
89
+ children: colChild(children)
80
90
  });
81
- };
91
+ }
82
92
  var changeConfigData = function changeConfigData(data) {
83
93
  var colsArray = _filterInstanceProperty(data).call(data, function (item) {
84
94
  return !item.hideInTable;
package/lib/index.css CHANGED
@@ -1,60 +1,60 @@
1
1
  .ant-hw-table-content .ant-hw-table-body {
2
- padding-top: 0px;
3
- border-top-left-radius: 0px;
4
- border-top-right-radius: 0px;
2
+ padding-top: 0;
3
+ border-top-left-radius: 0;
4
+ border-top-right-radius: 0;
5
5
  }
6
6
  .ant-hw-table-content .ant-hw-table-header {
7
- border-bottom-left-radius: 0px !important;
8
- border-bottom-right-radius: 0px !important;
7
+ border-bottom-right-radius: 0 !important;
8
+ border-bottom-left-radius: 0 !important;
9
9
  }
10
10
  .ant-hw-table-body {
11
- background-color: #fff;
12
11
  position: relative;
12
+ padding-top: 16px;
13
13
  padding-right: 20px;
14
14
  padding-left: 20px;
15
- padding-top: 16px;
15
+ background-color: #fff;
16
16
  border-radius: 4px;
17
17
  }
18
18
  .ant-hw-table-body .ant-hw-table-pagination {
19
+ margin-right: -20px;
20
+ margin-left: -20px;
19
21
  padding: 12px 24px;
20
- background-color: #ffffff;
21
- border-bottom-left-radius: 4px;
22
+ background-color: #fff;
22
23
  border-bottom-right-radius: 4px;
23
- margin-left: -20px;
24
- margin-right: -20px;
24
+ border-bottom-left-radius: 4px;
25
25
  }
26
26
  .ant-hw-table-body .ant-hw-table-pagination .ant-select {
27
27
  width: auto;
28
28
  }
29
29
  .ant-hw-table-body .ant-pro-card-body {
30
- padding-bottom: 0px;
30
+ padding-bottom: 0;
31
31
  }
32
32
  .ant-hw-table-body .ant-pro-table-list-toolbar-container {
33
- padding-top: 0px;
33
+ padding-top: 0;
34
34
  }
35
35
  .ant-hw-table-body .ant-pro-table > .ant-pro-card > .ant-pro-card-body {
36
- padding: 0px;
36
+ padding: 0;
37
37
  }
38
38
  .ant-hw-table-pagination {
39
+ position: relative;
39
40
  padding: 12px 24px;
41
+ background-color: #fff;
40
42
  border-radius: 4px;
41
- background-color: #ffffff;
42
- position: relative;
43
43
  }
44
44
  .ant-hw-top-btn {
45
45
  position: absolute;
46
46
  right: 10px;
47
47
  bottom: 54px;
48
48
  z-index: 9;
49
- cursor: pointer;
50
49
  width: 48px;
51
50
  height: 48px;
52
51
  background: url("./GoTop/goTop.png") no-repeat;
53
52
  background-size: 100%;
53
+ cursor: pointer;
54
54
  }
55
55
  .ant-hw-table-header {
56
+ padding-bottom: 0;
56
57
  border-radius: 4px !important;
57
- padding-bottom: 0px;
58
58
  }
59
59
  .ant-hw-table-header .ant-hw-table-header-item-hide {
60
60
  display: none;
@@ -74,7 +74,7 @@
74
74
  }
75
75
  .ant-hw-table-body-option-setting-title {
76
76
  width: 198px;
77
- margin: 0px -16px;
77
+ margin: 0 -16px;
78
78
  padding: 6px 8px;
79
79
  }
80
80
  .ant-hw-table-body-option-setting-content-title {
@@ -84,8 +84,8 @@
84
84
  display: flex;
85
85
  }
86
86
  .ant-hw-table-op-tree-content {
87
- padding: 6px 6px 6px 0px;
88
87
  width: 100%;
88
+ padding: 6px 6px 6px 0;
89
89
  }
90
90
  .ant-hw-table-body-option-tree .ant-tree-treenode {
91
91
  width: 100%;
@@ -98,10 +98,10 @@
98
98
  flex: 1;
99
99
  }
100
100
  .ant-hw-table-body-option-tree .ant-tree-switcher {
101
- width: 0px;
101
+ width: 0;
102
102
  }
103
103
  .ant-hw-table-body-option-tree .ant-tree-treenode-draggable {
104
- padding-left: 0px !important;
104
+ padding-left: 0 !important;
105
105
  }
106
106
  .ant-hw-table-pointer {
107
107
  cursor: pointer;
@@ -113,18 +113,18 @@
113
113
  cursor: pointer;
114
114
  }
115
115
  .ant-hw-table-header-title-box {
116
- -webkit-box-flex: 1;
117
- -webkit-flex: 1;
118
- -ms-flex: 1;
119
- flex: 1;
116
+ position: relative;
120
117
  display: -webkit-box;
121
118
  display: -webkit-flex;
122
119
  display: -ms-flexbox;
123
120
  display: flex;
124
- position: relative;
121
+ -webkit-box-flex: 1;
122
+ -webkit-flex: 1;
123
+ -ms-flex: 1;
124
+ flex: 1;
125
125
  box-sizing: border-box;
126
- margin: -10px 0px;
127
- padding: 10px 0px;
126
+ margin: -10px 0;
127
+ padding: 10px 0;
128
128
  }
129
129
  .ant-hw-table-header-title-box .ant-hw-table-header-title-box-content {
130
130
  white-space: nowrap;
@@ -134,16 +134,15 @@
134
134
  display: -webkit-flex;
135
135
  display: -ms-flexbox;
136
136
  display: flex;
137
+ -webkit-align-content: center;
138
+ -ms-flex-line-pack: center;
139
+ align-content: center;
137
140
  -webkit-box-pack: justify;
138
141
  -webkit-justify-content: space-between;
139
142
  -ms-flex-pack: justify;
140
143
  justify-content: space-between;
141
- -webkit-align-content: center;
142
- -ms-flex-line-pack: center;
143
- align-content: center;
144
144
  }
145
145
  .ant-hw-table-header-right-node {
146
- padding-left: 12px;
147
146
  display: -webkit-box;
148
147
  display: -webkit-flex;
149
148
  display: -ms-flexbox;
@@ -152,6 +151,7 @@
152
151
  -webkit-align-items: center;
153
152
  -ms-flex-align: center;
154
153
  align-items: center;
154
+ padding-left: 12px;
155
155
  }
156
156
  .ant-hw-table-render-copy {
157
157
  margin-bottom: 0 !important;
@@ -161,17 +161,17 @@
161
161
  .ant-hw-table-render-text-basic {
162
162
  width: 100%;
163
163
  }
164
- .ant-hw-table-col-hr:after {
164
+ .ant-hw-table-col-hr::after {
165
165
  position: absolute;
166
- top: 50%;
167
- left: 0;
168
- width: 1px;
166
+ top: 50% !important;
167
+ left: 0 !important;
168
+ width: 1px !important;
169
169
  height: 1.6em;
170
170
  background-color: rgba(0, 0, 0, 0.06);
171
- -webkit-transform: translateY(-50%);
172
- -ms-transform: translateY(-50%);
173
- transform: translateY(-50%);
171
+ -webkit-transform: translateY(-50%) !important;
172
+ -ms-transform: translateY(-50%) !important;
173
+ transform: translateY(-50%) !important;
174
174
  -webkit-transition: background-color 0.3s;
175
175
  transition: background-color 0.3s;
176
- content: '';
176
+ content: "";
177
177
  }
package/lib/modal.d.ts CHANGED
@@ -26,7 +26,7 @@ export interface ParamsModal extends Record<string, any> {
26
26
  size?: number;
27
27
  current?: number;
28
28
  }
29
- interface HColumns extends Omit<ProColumns, "render" | "title"> {
29
+ interface HColumns extends Omit<ProColumns, "render" | "title" | "children"> {
30
30
  render?: (dom: React.ReactNode, data: any, index: number, tableInstance: HTableInstance) => React.ReactNode;
31
31
  showSearch?: boolean;
32
32
  searchType?: HItemProps["type"];
@@ -34,6 +34,7 @@ interface HColumns extends Omit<ProColumns, "render" | "title"> {
34
34
  rowSelectionTitle?: boolean;
35
35
  title?: string | React.ReactNode;
36
36
  valueTypeProps?: Record<string, any>;
37
+ children?: ConfigItemModal[];
37
38
  }
38
39
  interface BcItemModal {
39
40
  childrenDataIndex?: ConfigItemModal[] | string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hw-component/table",
3
- "version": "1.10.11",
3
+ "version": "1.10.13",
4
4
  "description": "基于antd二次开发table组件",
5
5
  "keywords": [
6
6
  "table"
@@ -1,11 +1,12 @@
1
1
  import { useRequest } from "ahooks";
2
2
  import { HEditTableProps } from "./modal";
3
- import { MutableRefObject, useMemo, useRef } from "react";
3
+ import {MutableRefObject, useEffect, useMemo, useRef} from "react";
4
4
  import type { ActionType } from "@ant-design/pro-table";
5
5
  import { EditableFormInstance } from "@ant-design/pro-table/lib/components/EditableTable";
6
6
  import config from "../render/config";
7
7
 
8
- export const useListRequest = ({ request, dataSource }: HEditTableProps) => {
8
+ export const useListRequest = ({ request, dataSource ,manual}: HEditTableProps) => {
9
+ const relManual=request?manual:false;
9
10
  const saveParams = useMemo(() => {
10
11
  return {
11
12
  params: {
@@ -14,7 +15,7 @@ export const useListRequest = ({ request, dataSource }: HEditTableProps) => {
14
15
  },
15
16
  };
16
17
  }, []);
17
- return useRequest(
18
+ return useRequest(
18
19
  async (params = {}) => {
19
20
  const newParams = {
20
21
  ...saveParams.params,
@@ -29,7 +30,7 @@ export const useListRequest = ({ request, dataSource }: HEditTableProps) => {
29
30
  }
30
31
  return dataSource;
31
32
  },
32
- { manual: true, refreshDeps: [dataSource] }
33
+ { manual: relManual,refreshDeps:[dataSource]}
33
34
  );
34
35
  };
35
36
 
@@ -34,6 +34,7 @@ export default ({
34
34
  const { loading, data, error, run } = useListRequest({
35
35
  request,
36
36
  dataSource,
37
+ manual,
37
38
  });
38
39
  const {
39
40
  emptyRender: tableEmptyRender = emptyDefaultRender,
@@ -65,7 +66,7 @@ export default ({
65
66
  loading={loading}
66
67
  rowKey={rowKey}
67
68
  editableFormRef={cuEditableFormRef}
68
- manualRequest={manual}
69
+ manualRequest={true}
69
70
  request={run}
70
71
  actionRef={cuActionRef}
71
72
  value={values}
@@ -12,7 +12,7 @@ const getCuData = (data, rowKey) => {
12
12
  const rowKeys: Key[] = [];
13
13
  const rowObjs: Record<string, any> = {};
14
14
  data.forEach((item, index) => {
15
- if (!item){
15
+ if (!item) {
16
16
  return;
17
17
  }
18
18
  const key = getRowKey(item, index, rowKey);
@@ -39,10 +39,16 @@ export const useCols = ({
39
39
  const childLen = children.length;
40
40
  return !childLen && !!lastChildLen ? trClassname : "";
41
41
  };
42
-
43
- const itemProvider = (item: ConfigItemModal, lastItem?: ConfigItemModal) => {
42
+ const colChild = (children?: ConfigItemModal[]) => {
43
+ if (!children) {
44
+ return children;
45
+ }
46
+ return children.map((item) => {
47
+ return itemProvider(item);
48
+ });
49
+ };
50
+ function itemProvider(item: ConfigItemModal, lastItem?: ConfigItemModal) {
44
51
  const { children: lastChildren = [] } = lastItem || {};
45
-
46
52
  const {
47
53
  valueType = "",
48
54
  valueTypeProps = {},
@@ -54,7 +60,6 @@ export const useCols = ({
54
60
  ? ""
55
61
  : itemClassNameMk(children as any[], lastChildren as any[]);
56
62
  const itemType = valueType as string;
57
-
58
63
  if (textTypes.indexOf(itemType) !== -1) {
59
64
  const { ellipsis } = valueTypeProps;
60
65
  return {
@@ -62,6 +67,7 @@ export const useCols = ({
62
67
  ellipsis: ellipsis,
63
68
  className: `${className} ${trClassName}`,
64
69
  render: configRender(item, table as HTableInstance, valueTypeConfig),
70
+ children: colChild(children),
65
71
  };
66
72
  }
67
73
 
@@ -69,8 +75,9 @@ export const useCols = ({
69
75
  ...item,
70
76
  className: `${className} ${trClassName}`,
71
77
  render: configRender(item, table as HTableInstance, valueTypeConfig),
78
+ children: colChild(children),
72
79
  };
73
- };
80
+ }
74
81
 
75
82
  const changeConfigData = (data: ConfigDataModal) => {
76
83
  const colsArray = data.filter((item) => {
@@ -1,4 +1,8 @@
1
- import type { ConfigDataModal, ConfigItemModal,HTableInstance } from "../modal";
1
+ import type {
2
+ ConfigDataModal,
3
+ ConfigItemModal,
4
+ HTableInstance,
5
+ } from "../modal";
2
6
  import type { ColProps } from "antd";
3
7
  import type React from "react";
4
8
 
@@ -74,8 +74,8 @@ export default ({
74
74
  tableInstance={tableInstance}
75
75
  onFinish={(value) => {
76
76
  rowSelectionReload();
77
- const {size}=(saveParams.old as Record<string, any>);
78
- return run({ ...value, current: 1 ,size});
77
+ const { size } = saveParams.old as Record<string, any>;
78
+ return run({ ...value, current: 1, size });
79
79
  }}
80
80
  selectedRowData={selectedRowData}
81
81
  rowOnChange={rowOnChange}