@ccs-ui/rc-pro 2.3.6-beta-34 → 2.3.6-beta-36
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/aj-captcha/index.d.ts +5 -2
- package/es/aj-captcha/index.js +6 -2
- package/es/auth/index.d.ts +3 -0
- package/es/auth/index.js +3 -0
- package/es/button/dropdown.js +5 -17
- package/es/button/group.js +31 -48
- package/es/button/index.d.ts +2 -8
- package/es/button/index.js +10 -13
- package/es/cascader/index.d.ts +5 -2
- package/es/cascader/index.js +6 -2
- package/es/ccs.d.ts +7 -8
- package/es/color-picker/index.d.ts +5 -1
- package/es/color-picker/index.js +6 -2
- package/es/date-picker/index.d.ts +1 -0
- package/es/date-picker/index.js +3 -0
- package/es/dialog/button.d.ts +1 -1
- package/es/dialog/index.d.ts +3 -1
- package/es/dialog/index.js +3 -0
- package/es/editor/index.d.ts +1 -0
- package/es/editor/index.js +3 -0
- package/es/ellipsis/index.d.ts +2 -2
- package/es/ellipsis/index.js +7 -6
- package/es/index.d.ts +1 -2
- package/es/index.js +1 -2
- package/es/interval-button/index.js +3 -0
- package/es/layout-keep-alive/index.d.ts +5 -2
- package/es/layout-keep-alive/index.js +6 -2
- package/es/layout-single-page/index.d.ts +5 -2
- package/es/layout-single-page/index.js +8 -7
- package/es/loading/index.d.ts +4 -1
- package/es/loading/index.js +4 -1
- package/es/pro-table/index.d.ts +7 -0
- package/es/pro-table/index.js +9 -0
- package/es/pro-table/selection-alert.d.ts +18 -0
- package/es/pro-table/selection-alert.js +52 -0
- package/es/pro-table/summary.d.ts +8 -0
- package/es/pro-table/summary.js +32 -0
- package/es/pro-table/table.d.ts +28 -18
- package/es/pro-table/table.js +279 -141
- package/es/pro-table/useSelection.d.ts +28 -0
- package/es/pro-table/useSelection.js +146 -0
- package/es/pro-tabs/index.d.ts +5 -2
- package/es/pro-tabs/index.js +6 -2
- package/es/result/index.d.ts +11 -15
- package/es/result/index.js +57 -54
- package/es/select/ modal.d.ts +16 -0
- package/es/select/ modal.js +100 -0
- package/es/select/api.d.ts +25 -0
- package/es/select/api.js +67 -0
- package/es/select/customize.d.ts +33 -0
- package/es/{select-customize/index.js → select/customize.js} +82 -98
- package/es/select/index.d.ts +20 -20
- package/es/select/index.js +69 -80
- package/es/status-tag/index.d.ts +5 -1
- package/es/status-tag/index.js +6 -2
- package/es/table/index.d.ts +5 -2
- package/es/table/index.js +53 -43
- package/es/trigger/index.d.ts +1 -0
- package/es/trigger/index.js +1 -0
- package/es/upload/index.d.ts +4 -3
- package/es/upload/index.js +6 -3
- package/es/water-mark/index.d.ts +4 -1
- package/es/water-mark/index.js +3 -0
- package/package.json +3 -2
- package/es/select-customize/index.d.ts +0 -26
package/es/pro-table/table.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
var _excluded = ["
|
|
1
|
+
var _excluded = ["selectedRowKeys", "onChange"];
|
|
2
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
3
|
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; }
|
|
3
4
|
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; }
|
|
4
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
5
5
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
6
6
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
7
7
|
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."); }
|
|
@@ -49,10 +49,19 @@ function onSetObj(target, paths, value) {
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
+
// table 事件
|
|
53
|
+
export var TableEvent = /*#__PURE__*/function (TableEvent) {
|
|
54
|
+
TableEvent["Search"] = "search";
|
|
55
|
+
TableEvent["Reset"] = "reset";
|
|
56
|
+
TableEvent["Reload"] = "reload";
|
|
57
|
+
TableEvent["ChangePage"] = "changePage";
|
|
58
|
+
TableEvent["InitSearch"] = "initSearch";
|
|
59
|
+
TableEvent["FullScreen"] = "fullScreen";
|
|
60
|
+
TableEvent["ColumnFilter"] = "columnFilter";
|
|
61
|
+
TableEvent["SelectedRows"] = "SelectedRows";
|
|
62
|
+
return TableEvent;
|
|
63
|
+
}({});
|
|
52
64
|
export var classPrefix = 'ccs-pl';
|
|
53
|
-
export var TableSelectionContext = /*#__PURE__*/React.createContext({
|
|
54
|
-
selectedRows: undefined
|
|
55
|
-
});
|
|
56
65
|
|
|
57
66
|
/**
|
|
58
67
|
* 布局组件 包括form、查询、toolbar、table 自动初始化数据
|
|
@@ -72,23 +81,24 @@ var InternalProTable = function InternalProTable(props) {
|
|
|
72
81
|
children = props.children,
|
|
73
82
|
className = props.className,
|
|
74
83
|
expandForm = props.expandForm,
|
|
75
|
-
toolbarExtra = props.toolbarExtra,
|
|
76
84
|
_props$formItems = props.formItems,
|
|
77
85
|
formItems = _props$formItems === void 0 ? [] : _props$formItems,
|
|
78
86
|
leafNode = props.leafNode,
|
|
79
87
|
bordered = props.bordered,
|
|
80
88
|
parentFieldName = props.parentFieldName,
|
|
81
89
|
_props$formInitValues = props.formInitValues,
|
|
82
|
-
formInitValues = _props$formInitValues === void 0 ? {} : _props$formInitValues
|
|
90
|
+
formInitValues = _props$formInitValues === void 0 ? {} : _props$formInitValues,
|
|
91
|
+
onEvent = props.onEvent;
|
|
83
92
|
var _useCcsPage = useCcsPage(),
|
|
84
93
|
onAuth = _useCcsPage.onAuth;
|
|
85
94
|
var _ref = table || {},
|
|
86
95
|
pagination = _ref.pagination,
|
|
87
|
-
httpRequest = _ref.request,
|
|
88
96
|
_ref$requestParam = _ref.requestParam,
|
|
89
97
|
requestParam = _ref$requestParam === void 0 ? {} : _ref$requestParam,
|
|
90
98
|
columns = _ref.columns,
|
|
91
|
-
rowKey = _ref.rowKey
|
|
99
|
+
rowKey = _ref.rowKey,
|
|
100
|
+
httpRequest = _ref.request,
|
|
101
|
+
rowSelection = _ref.rowSelection;
|
|
92
102
|
// table sticky
|
|
93
103
|
var stickyRef = useRef(false);
|
|
94
104
|
|
|
@@ -116,9 +126,11 @@ var InternalProTable = function InternalProTable(props) {
|
|
|
116
126
|
}, []);
|
|
117
127
|
|
|
118
128
|
// column filter
|
|
119
|
-
var
|
|
129
|
+
var filterOrderRef = useRef(defaultColumnValues);
|
|
120
130
|
// table content
|
|
121
131
|
var tableContentRef = useRef(null);
|
|
132
|
+
// 接口查询条件
|
|
133
|
+
var searchParamRef = useRef({});
|
|
122
134
|
// container
|
|
123
135
|
var containerRef = useRef(null);
|
|
124
136
|
// table ref
|
|
@@ -136,10 +148,14 @@ var InternalProTable = function InternalProTable(props) {
|
|
|
136
148
|
data = _useState2[0],
|
|
137
149
|
setData = _useState2[1];
|
|
138
150
|
var treeRef = useRef(null);
|
|
139
|
-
|
|
151
|
+
// const [selectedRowKeys, setSelectedRowKeys] = useState(
|
|
152
|
+
// table?.rowSelection?.defaultSelectedRowKeys || [],
|
|
153
|
+
// );
|
|
154
|
+
var _useState3 = useState({}),
|
|
140
155
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
141
|
-
|
|
142
|
-
|
|
156
|
+
update = _useState4[1];
|
|
157
|
+
var rowSelectionRef = useRef({});
|
|
158
|
+
// const selectedRowsRef = useRef<RecordType[]>([]);
|
|
143
159
|
var _useState5 = useState((table === null || table === void 0 ? void 0 : table.size) || 'middle'),
|
|
144
160
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
145
161
|
tableRowSize = _useState6[0],
|
|
@@ -184,13 +200,14 @@ var InternalProTable = function InternalProTable(props) {
|
|
|
184
200
|
fsOrderProps,
|
|
185
201
|
fsQuery,
|
|
186
202
|
params,
|
|
187
|
-
|
|
203
|
+
_filterOrderRef$curre,
|
|
188
204
|
filters,
|
|
189
205
|
orderProps,
|
|
190
206
|
_treeRef$current,
|
|
191
207
|
requestResult,
|
|
192
208
|
dataSource,
|
|
193
209
|
total,
|
|
210
|
+
newData,
|
|
194
211
|
_args = arguments;
|
|
195
212
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
196
213
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -223,9 +240,7 @@ var InternalProTable = function InternalProTable(props) {
|
|
|
223
240
|
|
|
224
241
|
// 请求字段
|
|
225
242
|
_fieldNames$requestPa = fieldNames.requestParam, _fieldNames$requestPa2 = _fieldNames$requestPa.filters, fsFilters = _fieldNames$requestPa2 === void 0 ? ['filters'] : _fieldNames$requestPa2, _fieldNames$requestPa3 = _fieldNames$requestPa.pageNo, fsPageNo = _fieldNames$requestPa3 === void 0 ? ['pageNo'] : _fieldNames$requestPa3, _fieldNames$requestPa4 = _fieldNames$requestPa.pageSize, fsPageSize = _fieldNames$requestPa4 === void 0 ? ['pageSize'] : _fieldNames$requestPa4, _fieldNames$requestPa5 = _fieldNames$requestPa.orderProps, fsOrderProps = _fieldNames$requestPa5 === void 0 ? ['orderProps'] : _fieldNames$requestPa5, fsQuery = _fieldNames$requestPa.query; // 构建请求参数
|
|
226
|
-
params = {
|
|
227
|
-
eventType: eventType
|
|
228
|
-
};
|
|
243
|
+
params = {};
|
|
229
244
|
if (fsQuery && fsQuery.length > 0) {
|
|
230
245
|
onSetObj(params, _toConsumableArray(fsQuery), _objectSpread(_objectSpread(_objectSpread({}, requestParam), formInitValues), formValues));
|
|
231
246
|
} else {
|
|
@@ -238,7 +253,7 @@ var InternalProTable = function InternalProTable(props) {
|
|
|
238
253
|
}
|
|
239
254
|
|
|
240
255
|
// 列过滤或排序参数
|
|
241
|
-
|
|
256
|
+
_filterOrderRef$curre = filterOrderRef.current, filters = _filterOrderRef$curre.filters, orderProps = _filterOrderRef$curre.orderProps;
|
|
242
257
|
if (Object.keys(filters).length > 0) {
|
|
243
258
|
onSetObj(params, _toConsumableArray(fsFilters), filters);
|
|
244
259
|
}
|
|
@@ -254,42 +269,57 @@ var InternalProTable = function InternalProTable(props) {
|
|
|
254
269
|
(_treeRef$current = treeRef.current) === null || _treeRef$current === void 0 || _treeRef$current.onRequestTree(params.query, record);
|
|
255
270
|
return _context.abrupt("return");
|
|
256
271
|
case 20:
|
|
272
|
+
// 记录查询条件
|
|
273
|
+
searchParamRef.current = params;
|
|
274
|
+
onEvent === null || onEvent === void 0 || onEvent(eventType, {
|
|
275
|
+
loading: true,
|
|
276
|
+
params: params
|
|
277
|
+
});
|
|
278
|
+
|
|
257
279
|
// 发起请求
|
|
258
280
|
setData(function (d) {
|
|
259
281
|
return _objectSpread(_objectSpread({}, d), {}, {
|
|
260
282
|
loading: true
|
|
261
283
|
});
|
|
262
284
|
});
|
|
263
|
-
_context.next =
|
|
285
|
+
_context.next = 25;
|
|
264
286
|
return httpRequest(params);
|
|
265
|
-
case
|
|
287
|
+
case 25:
|
|
266
288
|
requestResult = _context.sent;
|
|
289
|
+
onEvent === null || onEvent === void 0 || onEvent(eventType, {
|
|
290
|
+
loading: false,
|
|
291
|
+
params: params,
|
|
292
|
+
data: requestResult
|
|
293
|
+
});
|
|
294
|
+
|
|
295
|
+
// 请求结果
|
|
267
296
|
if (!requestResult) {
|
|
268
|
-
_context.next =
|
|
297
|
+
_context.next = 37;
|
|
269
298
|
break;
|
|
270
299
|
}
|
|
271
300
|
// 获取table数据
|
|
272
301
|
dataSource = getDataFromFields(requestResult, fieldNames.dataSource); // 默认添加一条数据
|
|
273
|
-
if (
|
|
302
|
+
if (table !== null && table !== void 0 && table.emptyDefaultOne && dataSource && dataSource.length === 0) {
|
|
274
303
|
dataSource.push(_defineProperty({}, rowKey || 'id', '0'));
|
|
275
304
|
}
|
|
276
305
|
total = getDataFromFields(requestResult, fieldNames.total);
|
|
277
306
|
if (!(total === undefined || dataSource === undefined)) {
|
|
278
|
-
_context.next =
|
|
307
|
+
_context.next = 35;
|
|
279
308
|
break;
|
|
280
309
|
}
|
|
281
|
-
|
|
310
|
+
newData = {
|
|
282
311
|
dataSource: dataSource,
|
|
283
312
|
pageSize: pageSize,
|
|
284
313
|
current: pageNo,
|
|
285
314
|
total: total,
|
|
286
315
|
loading: false
|
|
287
|
-
}
|
|
316
|
+
};
|
|
317
|
+
setData(newData);
|
|
288
318
|
return _context.abrupt("return");
|
|
289
|
-
case
|
|
319
|
+
case 35:
|
|
290
320
|
// 当前页无数据,返回上一页
|
|
291
321
|
if (!dataSource.length && pageNo !== 1) {
|
|
292
|
-
onRequest(
|
|
322
|
+
onRequest(TableEvent.Reload, pageNo - 1);
|
|
293
323
|
} else {
|
|
294
324
|
setData({
|
|
295
325
|
current: pageNo,
|
|
@@ -299,15 +329,14 @@ var InternalProTable = function InternalProTable(props) {
|
|
|
299
329
|
total: total || 0
|
|
300
330
|
});
|
|
301
331
|
}
|
|
302
|
-
_context.
|
|
303
|
-
|
|
304
|
-
case 34:
|
|
332
|
+
return _context.abrupt("return");
|
|
333
|
+
case 37:
|
|
305
334
|
setData(function (d) {
|
|
306
335
|
return _objectSpread(_objectSpread({}, d), {}, {
|
|
307
336
|
loading: false
|
|
308
337
|
});
|
|
309
338
|
});
|
|
310
|
-
case
|
|
339
|
+
case 38:
|
|
311
340
|
case "end":
|
|
312
341
|
return _context.stop();
|
|
313
342
|
}
|
|
@@ -325,7 +354,7 @@ var InternalProTable = function InternalProTable(props) {
|
|
|
325
354
|
var treeNode = getDataById(data.dataSource || [], rowKey, id);
|
|
326
355
|
// 没有查找到、全部刷新
|
|
327
356
|
if (!treeNode) {
|
|
328
|
-
onRequest(
|
|
357
|
+
onRequest(TableEvent.Search);
|
|
329
358
|
return;
|
|
330
359
|
}
|
|
331
360
|
// 获取所有下级ID
|
|
@@ -360,19 +389,152 @@ var InternalProTable = function InternalProTable(props) {
|
|
|
360
389
|
// 初始查询
|
|
361
390
|
useEffect(function () {
|
|
362
391
|
if (init !== false && httpRequest) {
|
|
363
|
-
onRequest(
|
|
392
|
+
onRequest(TableEvent.InitSearch);
|
|
364
393
|
}
|
|
365
394
|
}, [Object.keys(requestParam || {}).toString(), Object.values(requestParam || {}).toString()]);
|
|
366
395
|
|
|
396
|
+
// 初始状态,记录选中key和选中记录,用作选中数据回显
|
|
397
|
+
// useEffect(() => {
|
|
398
|
+
// if (!rowSelectionDefaultRows) return;
|
|
399
|
+
|
|
400
|
+
// const { selectedRowKeys } = table?.rowSelection || {};
|
|
401
|
+
// if (
|
|
402
|
+
// selectedRowKeys &&
|
|
403
|
+
// selectedRowKeys.length > 0 &&
|
|
404
|
+
// !rowSelectionRef.current.selectedRowKeys &&
|
|
405
|
+
// rowSelectionDefaultRows.length > 0
|
|
406
|
+
// ) {
|
|
407
|
+
// rowSelectionRef.current = {
|
|
408
|
+
// selectedRowKeys,
|
|
409
|
+
// selectedRows: rowSelectionDefaultRows,
|
|
410
|
+
// };
|
|
411
|
+
// update({});
|
|
412
|
+
// }
|
|
413
|
+
// }, [rowSelectionDefaultRows]);
|
|
414
|
+
|
|
367
415
|
// 查询按钮
|
|
368
|
-
var
|
|
369
|
-
onRequest(
|
|
416
|
+
var onSearch = function onSearch() {
|
|
417
|
+
onRequest(TableEvent.Search);
|
|
418
|
+
};
|
|
419
|
+
|
|
420
|
+
// ==================== 封装table行选中逻辑 start====================
|
|
421
|
+
var _ref3 = rowSelection || {},
|
|
422
|
+
selectedRowKeys = _ref3.selectedRowKeys,
|
|
423
|
+
onRowChange = _ref3.onChange,
|
|
424
|
+
rsProps = _objectWithoutProperties(_ref3, _excluded);
|
|
425
|
+
var _rowSelectionRef$curr = rowSelectionRef.current.selectedRowKeys,
|
|
426
|
+
keys = _rowSelectionRef$curr === void 0 ? [] : _rowSelectionRef$curr;
|
|
427
|
+
|
|
428
|
+
// // 传入了选中的key,生成与之匹配的selectedRows数据
|
|
429
|
+
// if (
|
|
430
|
+
// rowSelection &&
|
|
431
|
+
// 'selectedRowKeys' in rowSelection &&
|
|
432
|
+
// !isEqual(selectedRowKeys, keys)
|
|
433
|
+
// ) {
|
|
434
|
+
// // 初始状态,传入了默认值,根据rowSelectionDefaultRows 生成选中rows
|
|
435
|
+
// if (
|
|
436
|
+
// selectedRowKeys.length > 0 &&
|
|
437
|
+
// keys.length === 0 &&
|
|
438
|
+
// (rowSelectionDefaultRows || []).length > 0
|
|
439
|
+
// ) {
|
|
440
|
+
// rowSelectionRef.current = {
|
|
441
|
+
// selectedRowKeys,
|
|
442
|
+
// selectedRows: rowSelectionDefaultRows,
|
|
443
|
+
// };
|
|
444
|
+
// }
|
|
445
|
+
|
|
446
|
+
// // 选中数据清空了,清空当前rowSelectionRef.current 数据
|
|
447
|
+
// if (selectedRowKeys.length === 0 && keys.length !== 0) {
|
|
448
|
+
// rowSelectionRef.current = { selectedRowKeys: [], selectedRows: [] };
|
|
449
|
+
// }
|
|
450
|
+
// }
|
|
451
|
+
|
|
452
|
+
// 行选择配置
|
|
453
|
+
var newRowSelection = rowSelection ? _objectSpread({
|
|
454
|
+
selectedRowKeys: selectedRowKeys || keys,
|
|
455
|
+
onChange: function onChange(keys, rows, info) {
|
|
456
|
+
onRowChange === null || onRowChange === void 0 || onRowChange(keys, rows, info);
|
|
457
|
+
// // row 中存在undefined记录,由于初始渲染造成无法获取选中记录,需从rowSelectionDefaultRows 中获取
|
|
458
|
+
// rows.forEach((row, index) => {
|
|
459
|
+
// if (!row) {
|
|
460
|
+
// const defaultRow = rowSelectionDefaultRows?.find(
|
|
461
|
+
// (rs: any) => rs[rowKey || 'id'] === keys[index],
|
|
462
|
+
// );
|
|
463
|
+
// CcsUtils.showWarning(
|
|
464
|
+
// !!defaultRow,
|
|
465
|
+
// 'CcsProTable:存在未知选中记录,请使用rowSelectionDefaultRows传入初始选中记录',
|
|
466
|
+
// );
|
|
467
|
+
// rows[index] = defaultRow || ({} as RecordType);
|
|
468
|
+
// }
|
|
469
|
+
// });
|
|
470
|
+
// rowSelectionRef.current = {
|
|
471
|
+
// selectedRowKeys: keys,
|
|
472
|
+
// selectedRows: rows,
|
|
473
|
+
// };
|
|
474
|
+
onEvent === null || onEvent === void 0 || onEvent(TableEvent.SelectedRows, {
|
|
475
|
+
keys: keys,
|
|
476
|
+
rows: rows
|
|
477
|
+
});
|
|
478
|
+
|
|
479
|
+
// 未传入onChange则更新状态
|
|
480
|
+
if (!onRowChange) update({});
|
|
481
|
+
},
|
|
482
|
+
preserveSelectedRowKeys: true
|
|
483
|
+
}, rsProps) : undefined;
|
|
484
|
+
// ==================== 当处于受控状态,处理table选中记录 end====================
|
|
485
|
+
|
|
486
|
+
// 清除选择
|
|
487
|
+
var onClearSelected = function onClearSelected(key, noUpdate) {
|
|
488
|
+
var _rowSelection$onChang2;
|
|
489
|
+
// 指定删除
|
|
490
|
+
if (key !== undefined) {
|
|
491
|
+
var _rowSelectionRef$curr2 = rowSelectionRef.current,
|
|
492
|
+
_rowSelectionRef$curr3 = _rowSelectionRef$curr2.selectedRowKeys,
|
|
493
|
+
_selectedRowKeys = _rowSelectionRef$curr3 === void 0 ? [] : _rowSelectionRef$curr3,
|
|
494
|
+
_rowSelectionRef$curr4 = _rowSelectionRef$curr2.selectedRows,
|
|
495
|
+
selectedRows = _rowSelectionRef$curr4 === void 0 ? [] : _rowSelectionRef$curr4;
|
|
496
|
+
rowSelectionRef.current = {
|
|
497
|
+
selectedRowKeys: _selectedRowKeys.filter(function (r) {
|
|
498
|
+
return r !== key;
|
|
499
|
+
}),
|
|
500
|
+
selectedRows: selectedRows.filter(function (r) {
|
|
501
|
+
return r[rowKey || 'id'] !== key;
|
|
502
|
+
})
|
|
503
|
+
};
|
|
504
|
+
} else {
|
|
505
|
+
// 删除全部
|
|
506
|
+
rowSelectionRef.current = {
|
|
507
|
+
selectedRowKeys: undefined,
|
|
508
|
+
selectedRows: undefined
|
|
509
|
+
};
|
|
510
|
+
}
|
|
511
|
+
var _rowSelectionRef$curr5 = rowSelectionRef.current,
|
|
512
|
+
keys = _rowSelectionRef$curr5.selectedRowKeys,
|
|
513
|
+
_rowSelectionRef$curr6 = _rowSelectionRef$curr5.selectedRows,
|
|
514
|
+
rows = _rowSelectionRef$curr6 === void 0 ? [] : _rowSelectionRef$curr6;
|
|
515
|
+
onEvent === null || onEvent === void 0 || onEvent(TableEvent.SelectedRows, {
|
|
516
|
+
keys: keys,
|
|
517
|
+
rows: rows
|
|
518
|
+
});
|
|
519
|
+
|
|
520
|
+
// 受控状态,需要调用onchange
|
|
521
|
+
if (rowSelection !== null && rowSelection !== void 0 && rowSelection.onChange) {
|
|
522
|
+
var _rowSelection$onChang;
|
|
523
|
+
rowSelection === null || rowSelection === void 0 || (_rowSelection$onChang = rowSelection.onChange) === null || _rowSelection$onChang === void 0 || _rowSelection$onChang.call(rowSelection, keys, rows, {});
|
|
524
|
+
return;
|
|
525
|
+
}
|
|
526
|
+
if (!noUpdate)
|
|
527
|
+
// 需要更新状态
|
|
528
|
+
update({});
|
|
529
|
+
rowSelection === null || rowSelection === void 0 || (_rowSelection$onChang2 = rowSelection.onChange) === null || _rowSelection$onChang2 === void 0 || _rowSelection$onChang2.call(rowSelection, selectedRowKeys, rows, {});
|
|
370
530
|
};
|
|
371
531
|
|
|
372
532
|
// 重置
|
|
373
|
-
var
|
|
533
|
+
var onReset = function onReset() {
|
|
374
534
|
var _formRef$current2;
|
|
375
|
-
|
|
535
|
+
// 清空选择
|
|
536
|
+
onClearSelected(undefined, true);
|
|
537
|
+
// 重置表单
|
|
376
538
|
(_formRef$current2 = formRef.current) === null || _formRef$current2 === void 0 || _formRef$current2.resetFields();
|
|
377
539
|
// 清空columns显示filter和sort值
|
|
378
540
|
columns === null || columns === void 0 || columns.forEach(function (c) {
|
|
@@ -384,39 +546,31 @@ var InternalProTable = function InternalProTable(props) {
|
|
|
384
546
|
}
|
|
385
547
|
});
|
|
386
548
|
// 清空filter请求值
|
|
387
|
-
|
|
388
|
-
onRequest(
|
|
549
|
+
filterOrderRef.current = defaultColumnValues;
|
|
550
|
+
onRequest(TableEvent.Reset);
|
|
389
551
|
};
|
|
390
552
|
|
|
391
553
|
// 刷新
|
|
392
|
-
var
|
|
393
|
-
|
|
394
|
-
onRequest(
|
|
554
|
+
var onReload = function onReload() {
|
|
555
|
+
onClearSelected(undefined, true);
|
|
556
|
+
onRequest(TableEvent.Reload, data.current, data.pageSize);
|
|
395
557
|
};
|
|
396
558
|
|
|
397
559
|
// form 数据 查询,重载,重置方法
|
|
398
560
|
useImperativeHandle(proRef, function () {
|
|
399
|
-
var _formRef$current3;
|
|
400
561
|
return {
|
|
401
562
|
data: data,
|
|
402
|
-
selectedRows: selectedRows,
|
|
403
|
-
formValues:
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
onReload: function onReload() {
|
|
408
|
-
_onReload();
|
|
409
|
-
},
|
|
563
|
+
selectedRows: rowSelectionRef.current.selectedRows,
|
|
564
|
+
formValues: searchParamRef.current,
|
|
565
|
+
searchParam: searchParamRef.current,
|
|
566
|
+
onSearch: onSearch,
|
|
567
|
+
onReload: onReload,
|
|
410
568
|
onPartialReload: function onPartialReload(param) {
|
|
411
569
|
_onPartialReload(param);
|
|
412
570
|
},
|
|
413
|
-
onReset:
|
|
414
|
-
_onReset();
|
|
415
|
-
},
|
|
571
|
+
onReset: onReset,
|
|
416
572
|
onChangeData: setData,
|
|
417
|
-
onClearSelected:
|
|
418
|
-
return setSelectedRows([]);
|
|
419
|
-
}
|
|
573
|
+
onClearSelected: onClearSelected
|
|
420
574
|
};
|
|
421
575
|
});
|
|
422
576
|
|
|
@@ -430,7 +584,7 @@ var InternalProTable = function InternalProTable(props) {
|
|
|
430
584
|
c.filteredValue = filters[c.dataIndex];
|
|
431
585
|
}
|
|
432
586
|
});
|
|
433
|
-
|
|
587
|
+
filterOrderRef.current = _objectSpread(_objectSpread({}, filterOrderRef.current), {}, {
|
|
434
588
|
filters: filters
|
|
435
589
|
});
|
|
436
590
|
}
|
|
@@ -472,12 +626,18 @@ var InternalProTable = function InternalProTable(props) {
|
|
|
472
626
|
});
|
|
473
627
|
}
|
|
474
628
|
}
|
|
475
|
-
|
|
629
|
+
filterOrderRef.current = _objectSpread(_objectSpread({}, filterOrderRef.current), {}, {
|
|
476
630
|
orderProps: orderProps
|
|
477
631
|
});
|
|
478
632
|
}
|
|
479
|
-
onRequest(
|
|
633
|
+
onRequest(TableEvent.ChangePage, paginationTable.current || 0, paginationTable.pageSize || 10);
|
|
480
634
|
};
|
|
635
|
+
|
|
636
|
+
// 扩展组件传递参数
|
|
637
|
+
var extraProps = _objectSpread(_objectSpread({}, rowSelectionRef.current), {}, {
|
|
638
|
+
data: data.dataSource || [],
|
|
639
|
+
onClear: onClearSelected
|
|
640
|
+
});
|
|
481
641
|
var renderTable = function renderTable() {
|
|
482
642
|
if (!table) return null;
|
|
483
643
|
if (!isAuth) {
|
|
@@ -503,38 +663,15 @@ var InternalProTable = function InternalProTable(props) {
|
|
|
503
663
|
}
|
|
504
664
|
}
|
|
505
665
|
|
|
506
|
-
// 选择,只传入一个type参数或不传,封装选择行为
|
|
507
|
-
var _ref3 = table.rowSelection || {},
|
|
508
|
-
_ref3$type = _ref3.type,
|
|
509
|
-
type = _ref3$type === void 0 ? 'checkbox' : _ref3$type,
|
|
510
|
-
restSelection = _objectWithoutProperties(_ref3, _excluded);
|
|
511
|
-
var hasSelection = table.rowSelection && CcsUtils.isEmpty(restSelection);
|
|
512
|
-
var rowSelection = hasSelection ? {
|
|
513
|
-
type: type,
|
|
514
|
-
selectedRowKeys: selectedRows.map(function (k) {
|
|
515
|
-
return k[rowKey];
|
|
516
|
-
}),
|
|
517
|
-
onChange: function onChange(_, rows) {
|
|
518
|
-
return setSelectedRows(rows);
|
|
519
|
-
},
|
|
520
|
-
preserveSelectedRowKeys: true
|
|
521
|
-
} : table.rowSelection;
|
|
522
|
-
|
|
523
666
|
// table title
|
|
524
|
-
var tableTitle = table.title ? table.title(
|
|
525
|
-
selectedRows: selectedRows,
|
|
526
|
-
data: data.dataSource || [],
|
|
527
|
-
onClear: function onClear() {
|
|
528
|
-
return setSelectedRows([]);
|
|
529
|
-
}
|
|
530
|
-
}) : undefined;
|
|
667
|
+
var tableTitle = CcsUtils.isFunction(table.title) ? table.title(extraProps) : undefined;
|
|
531
668
|
|
|
532
669
|
// 异步树
|
|
533
670
|
if (parentFieldName) {
|
|
534
671
|
return /*#__PURE__*/_jsx(TableTree, {
|
|
535
672
|
data: data,
|
|
536
673
|
table: _objectSpread(_objectSpread({}, table), {}, {
|
|
537
|
-
rowSelection:
|
|
674
|
+
rowSelection: newRowSelection,
|
|
538
675
|
title: tableTitle ? function () {
|
|
539
676
|
return tableTitle;
|
|
540
677
|
} : undefined
|
|
@@ -560,12 +697,13 @@ var InternalProTable = function InternalProTable(props) {
|
|
|
560
697
|
size: tableRowSize,
|
|
561
698
|
columns: columns,
|
|
562
699
|
showSorterTooltip: true,
|
|
563
|
-
rowSelection:
|
|
700
|
+
rowSelection: newRowSelection,
|
|
564
701
|
showNumber: props.showNumber,
|
|
565
702
|
loading: table.loading || data.loading || false,
|
|
566
703
|
title: tableTitle ? function () {
|
|
567
704
|
return tableTitle;
|
|
568
|
-
} : undefined
|
|
705
|
+
} : undefined,
|
|
706
|
+
onEvent: onEvent
|
|
569
707
|
}));
|
|
570
708
|
};
|
|
571
709
|
var _antTheme$useToken = antTheme.useToken(),
|
|
@@ -608,12 +746,17 @@ var InternalProTable = function InternalProTable(props) {
|
|
|
608
746
|
return setTableRowSize(e);
|
|
609
747
|
},
|
|
610
748
|
tableRowSize: tableRowSize,
|
|
611
|
-
onReset:
|
|
749
|
+
onReset: onReset,
|
|
612
750
|
columns: columns,
|
|
613
751
|
tableRef: tableRef,
|
|
614
752
|
onFullScreen: onFullScreen
|
|
615
753
|
}) : undefined;
|
|
754
|
+
|
|
755
|
+
// 有查询条件
|
|
616
756
|
var hasFormItem = formItems.length > 0;
|
|
757
|
+
|
|
758
|
+
// table 按钮区
|
|
759
|
+
var tableToolbar = CcsUtils.isFunction(toolbar) ? toolbar(extraProps) : toolbar;
|
|
617
760
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
618
761
|
children: [/*#__PURE__*/_jsx(CcsResizeObserver.Target, {
|
|
619
762
|
targetRef: tableContentRef,
|
|
@@ -624,64 +767,59 @@ var InternalProTable = function InternalProTable(props) {
|
|
|
624
767
|
overflow: (table === null || table === void 0 || (_table$scroll2 = table.scroll) === null || _table$scroll2 === void 0 ? void 0 : _table$scroll2.y) === 'auto' ? 'hidden' : 'unset'
|
|
625
768
|
}),
|
|
626
769
|
ref: containerRef,
|
|
627
|
-
children: [/*#__PURE__*/
|
|
628
|
-
|
|
629
|
-
|
|
770
|
+
children: [/*#__PURE__*/_jsx(Card, {
|
|
771
|
+
className: "ccs-pl-adaptation",
|
|
772
|
+
style: {
|
|
773
|
+
boxShadow: 'none'
|
|
630
774
|
},
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
775
|
+
styles: {
|
|
776
|
+
body: {
|
|
777
|
+
padding: hasFormItem ? 16 : 0
|
|
778
|
+
}
|
|
779
|
+
},
|
|
780
|
+
bordered: false,
|
|
781
|
+
title: props.title,
|
|
782
|
+
children: hasFormItem && /*#__PURE__*/_jsx(HeadComponent, {
|
|
783
|
+
formRef: formRef,
|
|
784
|
+
toolbar: tableToolbar,
|
|
785
|
+
formItems: formItems,
|
|
786
|
+
expandForm: expandForm,
|
|
787
|
+
formInitValues: formInitValues,
|
|
788
|
+
formItemLabelWidth: props.formItemLabelWidth,
|
|
789
|
+
onSearch: onSearch,
|
|
790
|
+
tableOperation: renderTableOperation
|
|
791
|
+
})
|
|
792
|
+
}), (toolbar || !hasFormItem && renderTableOperation) && /*#__PURE__*/_jsxs(Card, {
|
|
793
|
+
styles: {
|
|
794
|
+
cover: {
|
|
795
|
+
borderRadius: 0
|
|
640
796
|
},
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
display: 'flex',
|
|
660
|
-
justifyContent: 'space-between',
|
|
661
|
-
width: '100%',
|
|
662
|
-
padding: '12px 16px',
|
|
663
|
-
alignContent: 'center'
|
|
664
|
-
}
|
|
797
|
+
body: {
|
|
798
|
+
display: 'flex',
|
|
799
|
+
justifyContent: 'space-between',
|
|
800
|
+
width: '100%',
|
|
801
|
+
padding: '12px 16px',
|
|
802
|
+
alignContent: 'center'
|
|
803
|
+
}
|
|
804
|
+
},
|
|
805
|
+
style: {
|
|
806
|
+
borderRadius: 0,
|
|
807
|
+
borderLeft: 0,
|
|
808
|
+
borderBottom: 0,
|
|
809
|
+
borderRight: 0,
|
|
810
|
+
borderTop: !hasFormItem ? 0 : undefined
|
|
811
|
+
},
|
|
812
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
813
|
+
style: {
|
|
814
|
+
flex: '1 1 auto'
|
|
665
815
|
},
|
|
816
|
+
children: tableToolbar
|
|
817
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
666
818
|
style: {
|
|
667
|
-
|
|
668
|
-
borderLeft: 0,
|
|
669
|
-
borderBottom: 0,
|
|
670
|
-
borderRight: 0,
|
|
671
|
-
borderTop: !hasFormItem ? 0 : undefined
|
|
819
|
+
flex: '0 0 auto'
|
|
672
820
|
},
|
|
673
|
-
children:
|
|
674
|
-
|
|
675
|
-
flex: '1 1 auto'
|
|
676
|
-
},
|
|
677
|
-
children: toolbar
|
|
678
|
-
}), /*#__PURE__*/_jsx("div", {
|
|
679
|
-
style: {
|
|
680
|
-
flex: '0 0 auto'
|
|
681
|
-
},
|
|
682
|
-
children: renderTableOperation
|
|
683
|
-
})]
|
|
684
|
-
}), toolbarExtra]
|
|
821
|
+
children: renderTableOperation
|
|
822
|
+
})]
|
|
685
823
|
}), /*#__PURE__*/_jsxs("div", {
|
|
686
824
|
className: "".concat(classPrefix, "-table-content"),
|
|
687
825
|
style: _objectSpread(_objectSpread({}, styles === null || styles === void 0 ? void 0 : styles.table), {}, {
|