@fle-ui/plus-table 1.1.2 → 1.2.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/es/index.js CHANGED
@@ -115,22 +115,23 @@ var PlusTable = /*#__PURE__*/forwardRef(function (props, ref) {
115
115
  };
116
116
  var handleSave = /*#__PURE__*/function () {
117
117
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
118
- var key;
118
+ var newObj, key;
119
119
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
120
120
  while (1) switch (_context2.prev = _context2.next) {
121
121
  case 0:
122
+ newObj = {}; // 保存列设置的操作
122
123
  if (!props.updateSetting) {
123
- _context2.next = 4;
124
+ _context2.next = 5;
124
125
  break;
125
126
  }
126
127
  for (key in columnsStateMap) {
127
- columnsStateContainId[key] = _objectSpread(_objectSpread({}, columnsStateContainId[key]), {}, {
128
+ newObj[key] = _objectSpread(_objectSpread({}, columnsStateMap[key]), {}, {
128
129
  hideInTable: columnsStateMap[key].show ? 0 : 1
129
130
  });
130
131
  }
131
- _context2.next = 4;
132
- return props.updateSetting(columnsStateContainId);
133
- case 4:
132
+ _context2.next = 5;
133
+ return props.updateSetting(newObj);
134
+ case 5:
134
135
  case "end":
135
136
  return _context2.stop();
136
137
  }
@@ -177,6 +178,13 @@ var PlusTable = /*#__PURE__*/forwardRef(function (props, ref) {
177
178
  return (_props$fetchSetting2 = props.fetchSetting) === null || _props$fetchSetting2 === void 0 ? void 0 : _props$fetchSetting2.call(props);
178
179
  case 3:
179
180
  res = _context4.sent;
181
+ // show?: boolean;
182
+ // fixed?: 'right' | 'left' | undefined;
183
+ // order?: number;
184
+ // disable?: boolean | {
185
+ // checkbox: boolean;
186
+ // };
187
+ // console.log(res);
180
188
  setColumnsStateContainId(res);
181
189
  setColumnsStateMap(res);
182
190
  case 6:
package/lib/index.js CHANGED
@@ -115,22 +115,23 @@ var PlusTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
115
115
  };
116
116
  var handleSave = /*#__PURE__*/function () {
117
117
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
118
- var key;
118
+ var newObj, key;
119
119
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
120
120
  while (1) switch (_context2.prev = _context2.next) {
121
121
  case 0:
122
+ newObj = {}; // 保存列设置的操作
122
123
  if (!props.updateSetting) {
123
- _context2.next = 4;
124
+ _context2.next = 5;
124
125
  break;
125
126
  }
126
127
  for (key in columnsStateMap) {
127
- columnsStateContainId[key] = _objectSpread(_objectSpread({}, columnsStateContainId[key]), {}, {
128
+ newObj[key] = _objectSpread(_objectSpread({}, columnsStateMap[key]), {}, {
128
129
  hideInTable: columnsStateMap[key].show ? 0 : 1
129
130
  });
130
131
  }
131
- _context2.next = 4;
132
- return props.updateSetting(columnsStateContainId);
133
- case 4:
132
+ _context2.next = 5;
133
+ return props.updateSetting(newObj);
134
+ case 5:
134
135
  case "end":
135
136
  return _context2.stop();
136
137
  }
@@ -177,6 +178,13 @@ var PlusTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
177
178
  return (_props$fetchSetting2 = props.fetchSetting) === null || _props$fetchSetting2 === void 0 ? void 0 : _props$fetchSetting2.call(props);
178
179
  case 3:
179
180
  res = _context4.sent;
181
+ // show?: boolean;
182
+ // fixed?: 'right' | 'left' | undefined;
183
+ // order?: number;
184
+ // disable?: boolean | {
185
+ // checkbox: boolean;
186
+ // };
187
+ // console.log(res);
180
188
  setColumnsStateContainId(res);
181
189
  setColumnsStateMap(res);
182
190
  case 6:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fle-ui/plus-table",
3
- "version": "1.1.2",
3
+ "version": "1.2.1",
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": "365fee8472448bd62f98b6f1c6d378e72a86a840"
49
+ "gitHead": "15c672cd31cf7dd9f8ad8d2a9cf5a283f736a868"
50
50
  }