@fle-ui/plus-table 1.2.22 → 1.2.24
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.js +17 -15
- package/lib/index.js +17 -15
- package/package.json +2 -2
package/es/index.js
CHANGED
|
@@ -27,8 +27,8 @@ import React, { useEffect, useRef, useState, useImperativeHandle, forwardRef } f
|
|
|
27
27
|
import { ProTable } from '@ant-design/pro-components';
|
|
28
28
|
import FormRender from './FormSearch/index';
|
|
29
29
|
import { BarsOutlined } from '@ant-design/icons';
|
|
30
|
-
import './FormSearch/index.less';
|
|
31
30
|
import { simulateClick } from './utils/common';
|
|
31
|
+
import './FormSearch/index.less';
|
|
32
32
|
var PlusTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
33
33
|
var _otherProps$scroll;
|
|
34
34
|
var mode = props.mode,
|
|
@@ -140,29 +140,28 @@ var PlusTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
140
140
|
});
|
|
141
141
|
var handleOnChangeColumn = function handleOnChangeColumn(map) {
|
|
142
142
|
// 列设置更新
|
|
143
|
-
setColumnsStateMap(
|
|
143
|
+
setColumnsStateMap(function (columnsStateMap) {
|
|
144
|
+
var newObj = {};
|
|
145
|
+
for (var key in map) {
|
|
146
|
+
newObj[key] = _objectSpread(_objectSpread({}, columnsStateMap[key]), map[key]);
|
|
147
|
+
}
|
|
148
|
+
return newObj;
|
|
149
|
+
});
|
|
144
150
|
};
|
|
145
151
|
var handleSave = /*#__PURE__*/function () {
|
|
146
152
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
147
|
-
var newObj, key;
|
|
148
153
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
149
154
|
while (1) switch (_context4.prev = _context4.next) {
|
|
150
155
|
case 0:
|
|
151
|
-
newObj = {}; // 保存列设置的操作
|
|
152
156
|
if (!props.updateSetting) {
|
|
153
|
-
_context4.next =
|
|
157
|
+
_context4.next = 4;
|
|
154
158
|
break;
|
|
155
159
|
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
});
|
|
160
|
-
}
|
|
161
|
-
_context4.next = 5;
|
|
162
|
-
return props.updateSetting(newObj);
|
|
163
|
-
case 5:
|
|
160
|
+
_context4.next = 3;
|
|
161
|
+
return props.updateSetting(columnsStateMap);
|
|
162
|
+
case 3:
|
|
164
163
|
simulateClick();
|
|
165
|
-
case
|
|
164
|
+
case 4:
|
|
166
165
|
case "end":
|
|
167
166
|
return _context4.stop();
|
|
168
167
|
}
|
|
@@ -178,7 +177,10 @@ var PlusTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
178
177
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
179
178
|
while (1) switch (_context5.prev = _context5.next) {
|
|
180
179
|
case 0:
|
|
181
|
-
return _context5.abrupt("return", (_props$resetSetting = props.resetSetting) === null || _props$resetSetting === void 0 ? void 0 : _props$resetSetting.call(props))
|
|
180
|
+
return _context5.abrupt("return", (_props$resetSetting = props.resetSetting) === null || _props$resetSetting === void 0 ? void 0 : _props$resetSetting.call(props).then(function (res) {
|
|
181
|
+
console.log(res);
|
|
182
|
+
res.success && init();
|
|
183
|
+
}));
|
|
182
184
|
case 1:
|
|
183
185
|
case "end":
|
|
184
186
|
return _context5.stop();
|
package/lib/index.js
CHANGED
|
@@ -9,8 +9,8 @@ var _proComponents = require("@ant-design/pro-components");
|
|
|
9
9
|
var _antd = require("antd");
|
|
10
10
|
var _index = _interopRequireDefault(require("./FormSearch/index"));
|
|
11
11
|
var _icons = require("@ant-design/icons");
|
|
12
|
-
require("./FormSearch/index.less");
|
|
13
12
|
var _common = require("./utils/common");
|
|
13
|
+
require("./FormSearch/index.less");
|
|
14
14
|
var _excluded = ["mode", "columns", "hasShowFull", "request", "pagination", "formRef", "actionRef", "defaultColumnsState", "options", "action", "showDefaultSetting"];
|
|
15
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
16
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
@@ -144,29 +144,28 @@ var PlusTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
144
144
|
});
|
|
145
145
|
var handleOnChangeColumn = function handleOnChangeColumn(map) {
|
|
146
146
|
// 列设置更新
|
|
147
|
-
setColumnsStateMap(
|
|
147
|
+
setColumnsStateMap(function (columnsStateMap) {
|
|
148
|
+
var newObj = {};
|
|
149
|
+
for (var key in map) {
|
|
150
|
+
newObj[key] = _objectSpread(_objectSpread({}, columnsStateMap[key]), map[key]);
|
|
151
|
+
}
|
|
152
|
+
return newObj;
|
|
153
|
+
});
|
|
148
154
|
};
|
|
149
155
|
var handleSave = /*#__PURE__*/function () {
|
|
150
156
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
151
|
-
var newObj, key;
|
|
152
157
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
153
158
|
while (1) switch (_context4.prev = _context4.next) {
|
|
154
159
|
case 0:
|
|
155
|
-
newObj = {}; // 保存列设置的操作
|
|
156
160
|
if (!props.updateSetting) {
|
|
157
|
-
_context4.next =
|
|
161
|
+
_context4.next = 4;
|
|
158
162
|
break;
|
|
159
163
|
}
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
|
-
_context4.next = 5;
|
|
166
|
-
return props.updateSetting(newObj);
|
|
167
|
-
case 5:
|
|
164
|
+
_context4.next = 3;
|
|
165
|
+
return props.updateSetting(columnsStateMap);
|
|
166
|
+
case 3:
|
|
168
167
|
(0, _common.simulateClick)();
|
|
169
|
-
case
|
|
168
|
+
case 4:
|
|
170
169
|
case "end":
|
|
171
170
|
return _context4.stop();
|
|
172
171
|
}
|
|
@@ -182,7 +181,10 @@ var PlusTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
182
181
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
183
182
|
while (1) switch (_context5.prev = _context5.next) {
|
|
184
183
|
case 0:
|
|
185
|
-
return _context5.abrupt("return", (_props$resetSetting = props.resetSetting) === null || _props$resetSetting === void 0 ? void 0 : _props$resetSetting.call(props))
|
|
184
|
+
return _context5.abrupt("return", (_props$resetSetting = props.resetSetting) === null || _props$resetSetting === void 0 ? void 0 : _props$resetSetting.call(props).then(function (res) {
|
|
185
|
+
console.log(res);
|
|
186
|
+
res.success && init();
|
|
187
|
+
}));
|
|
186
188
|
case 1:
|
|
187
189
|
case "end":
|
|
188
190
|
return _context5.stop();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fle-ui/plus-table",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.24",
|
|
4
4
|
"description": "@fle-ui/plus-table",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fle-ui",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"@ant-design/pro-components": "^2.7.0",
|
|
47
47
|
"dayjs": "^1.11.10"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "6516adaf2e6579cf5d357fe403153ea356b344b9"
|
|
50
50
|
}
|