@teamix/pro 1.2.16 → 1.2.17

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.
@@ -24,6 +24,7 @@ export declare type ProActionConfig = ({
24
24
  export declare function registerActionHandler(id: string, extendActionId: string, defaultConfig: any): void;
25
25
  export declare function useAction(config?: ProActionConfig, context?: any): any;
26
26
  export interface ProActionButtonProps extends ButtonProps {
27
+ key?: string | number;
27
28
  config?: ProActionConfig;
28
29
  visible?: any;
29
30
  disabled?: any;
@@ -33,6 +34,7 @@ export interface ProActionButtonProps extends ButtonProps {
33
34
  }
34
35
  export declare const ProActionButton: (props: ProActionButtonProps) => JSX.Element;
35
36
  export interface ProActionMenuButtonProps extends MenuButtonProps {
37
+ key?: string | number;
36
38
  actions: ProActionProps[];
37
39
  visible?: any;
38
40
  icon?: string;
@@ -3,8 +3,8 @@ var _excluded = ["type"],
3
3
  _excluded3 = ["loading"],
4
4
  _excluded4 = ["icon", "iconSize", "label", "actions", "children", "context", "type"],
5
5
  _excluded5 = ["context", "text"],
6
- _excluded6 = ["actions"],
7
- _excluded7 = ["config"],
6
+ _excluded6 = ["key", "actions"],
7
+ _excluded7 = ["key", "config"],
8
8
  _excluded8 = ["type", "divider", "max", "moreText", "context", "actions", "className"];
9
9
 
10
10
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
@@ -205,8 +205,8 @@ function renderCommonActionButtonMenuItem(action, key, context) {
205
205
  return /*#__PURE__*/React.createElement(Menu.SubMenu, {
206
206
  key: key,
207
207
  label: menuBtn.label || menuBtn.children
208
- }, menuBtn.actions.map(function (a, j) {
209
- return renderCommonActionButtonMenuItem(a, String(j), context);
208
+ }, menuBtn.actions.map(function (a) {
209
+ return renderCommonActionButtonMenuItem(a, a.key, context);
210
210
  }));
211
211
  }
212
212
 
@@ -241,7 +241,7 @@ export var ProActionMenuButton = function ProActionMenuButton(props) {
241
241
  type: type,
242
242
  label: buttonContent(label || children, icon, iconSize, context)
243
243
  }, others), actions.map(function (action, i) {
244
- return renderCommonActionButtonMenuItem(action, String(i), context);
244
+ return renderCommonActionButtonMenuItem(action, action.key || i, context);
245
245
  }));
246
246
  }; // 如果 actions 数量超过了 max,则把第 max 个和剩余超出部分折叠起来成为一个 menu
247
247
 
@@ -252,7 +252,9 @@ function formatGroupActions(actions, max, moreConfig) {
252
252
  return actions;
253
253
  }
254
254
 
255
- return [].concat(_toConsumableArray(actions.slice(0, MAX - 1)), [_objectSpread(_objectSpread({}, moreConfig), {}, {
255
+ return [].concat(_toConsumableArray(actions.slice(0, MAX - 1)), [_objectSpread(_objectSpread({
256
+ key: '__teamix_pro_action_group_more_btn'
257
+ }, moreConfig), {}, {
256
258
  actions: actions.slice(MAX - 1)
257
259
  })]);
258
260
  } // 渲染一个 button 或者 menu button
@@ -298,22 +300,34 @@ function getDefaultMoreButton(type, moreText) {
298
300
 
299
301
  var MAX_ACTTIONS = 4;
300
302
 
301
- function getActionConfig(action, context) {
303
+ function getKey(index, key) {
304
+ if (key !== undefined) {
305
+ return key;
306
+ }
307
+
308
+ return "__teamix_pro_action_key_".concat(index);
309
+ }
310
+
311
+ function getActionConfig(action, index, context) {
302
312
  if (action.actions) {
303
- var actions = action.actions,
313
+ var _key = action.key,
314
+ actions = action.actions,
304
315
  _others = _objectWithoutProperties(action, _excluded6);
305
316
 
306
317
  return _objectSpread({
307
- actions: actions.map(function (a) {
308
- return getActionConfig(a, context);
318
+ key: getKey(index, _key),
319
+ actions: actions.map(function (a, j) {
320
+ return getActionConfig(a, j, context);
309
321
  })
310
322
  }, getTargetValue(_others, context));
311
323
  }
312
324
 
313
- var config = action.config,
325
+ var key = action.key,
326
+ config = action.config,
314
327
  others = _objectWithoutProperties(action, _excluded7);
315
328
 
316
329
  return _objectSpread({
330
+ key: getKey(index, key),
317
331
  config: config
318
332
  }, getTargetValue(others, context));
319
333
  }
@@ -333,8 +347,8 @@ export function ProActionGroup(props) {
333
347
  containerProps = _objectWithoutProperties(props, _excluded8);
334
348
 
335
349
  var isTypeText = type === 'text';
336
- var filteredActions = actions.map(function (action) {
337
- return getActionConfig(action, context);
350
+ var filteredActions = actions.map(function (action, index) {
351
+ return getActionConfig(action, index, context);
338
352
  }).filter(function (action) {
339
353
  return action.visible !== false;
340
354
  });
@@ -346,7 +360,7 @@ export function ProActionGroup(props) {
346
360
  }, containerProps), formatedActions.map(function (actionBtn, i) {
347
361
  var isLastOne = i === formatedActions.length - 1;
348
362
  return /*#__PURE__*/React.createElement(React.Fragment, {
349
- key: i
363
+ key: actionBtn.key
350
364
  }, renderCommonActionButton(actionBtn, context, isTypeText), isTypeText && divider && !isLastOne && /*#__PURE__*/React.createElement(Divider, {
351
365
  direction: "ver"
352
366
  }));
package/es/index.d.ts CHANGED
@@ -21,5 +21,5 @@ export * from './page-container';
21
21
  export * from './page-header';
22
22
  export * from './skeleton';
23
23
  export * from './table';
24
- declare const version = "1.2.15";
24
+ declare const version = "1.2.16";
25
25
  export { version, ProAction, ProCard, ProField, ProForm, ProInfo, ProPageContainer, ProPageHeader, ProSkeleton, ProTable, hooks, nocode, templates, utils, };
package/es/index.js CHANGED
@@ -27,7 +27,7 @@ export * from './page-header';
27
27
  export * from './skeleton';
28
28
  export * from './table'; // export * from './sidebar';
29
29
 
30
- var version = '1.2.15';
30
+ var version = '1.2.16';
31
31
  export { version, ProAction, ProCard, ProField, ProForm, ProInfo, // ProLayout,
32
32
  ProPageContainer, ProPageHeader, ProSkeleton, ProTable, // ProSidebar,
33
33
  hooks, nocode, templates, utils };
@@ -18,6 +18,7 @@ var initialValues = {
18
18
  },
19
19
  mainAction: {
20
20
  actions: [{
21
+ key: 'action',
21
22
  children: '操作按钮'
22
23
  }]
23
24
  }
@@ -140,7 +140,7 @@ var Filter = function Filter(props) {
140
140
  return /*#__PURE__*/React.createElement(Dropdown, {
141
141
  trigger: /*#__PURE__*/React.createElement(TeamixIcon, {
142
142
  size: "small",
143
- type: "filter-line",
143
+ type: selected.length > 0 && visible === false ? 'filter-fill' : 'filter-line',
144
144
  className: cls({
145
145
  icon: true,
146
146
  'icon-selected': selected.length > 0
@@ -149,6 +149,8 @@ var Filter = function Filter(props) {
149
149
  setVisible(!visible);
150
150
  }
151
151
  }),
152
+ //@ts-ignore
153
+ v2: true,
152
154
  triggerType: ['click'],
153
155
  align: "tl bl",
154
156
  visible: visible,
@@ -171,7 +173,7 @@ var Filter = function Filter(props) {
171
173
  btn: true
172
174
  }),
173
175
  onClick: function onClick() {
174
- var _actionRef$current2, _actionRef$current2$f, _actionRef$current$ge5, _actionRef$current3, _actionRef$current3$g, _actionRef$current3$g2, _actionRef$current4, _actionRef$current5, _actionRef$current5$s, _actionRef$current6, _actionRef$current6$r, _actionRef$current7, _actionRef$current7$r, _actionRef$current8, _actionRef$current8$c;
176
+ var _actionRef$current2, _actionRef$current2$f, _actionRef$current$ge5, _actionRef$current3, _actionRef$current3$g, _actionRef$current3$g2, _actionRef$current4, _actionRef$current4$s;
175
177
 
176
178
  (_actionRef$current2 = actionRef.current) === null || _actionRef$current2 === void 0 ? void 0 : (_actionRef$current2$f = _actionRef$current2.filterDataSource) === null || _actionRef$current2$f === void 0 ? void 0 : _actionRef$current2$f.call(_actionRef$current2, column.dataIndex); // 先获取此列的param
177
179
 
@@ -199,24 +201,30 @@ var Filter = function Filter(props) {
199
201
  return null;
200
202
  })), [[column.dataIndex, param]]).filter(function (item) {
201
203
  return item && (item === null || item === void 0 ? void 0 : item[1]);
202
- }));
203
- var targetPageKey = 'currentPage';
204
- var pageInfo = (_actionRef$current4 = actionRef.current) === null || _actionRef$current4 === void 0 ? void 0 : _actionRef$current4.pageInfo;
204
+ })); // 再设置所有的列筛选状态
205
205
 
206
- if (pageInfo && (pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.targetPageKey)) {
207
- targetPageKey = pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.targetPageKey;
208
- } // 再设置所有的列筛选状态
209
-
210
-
211
- (_actionRef$current5 = actionRef.current) === null || _actionRef$current5 === void 0 ? void 0 : (_actionRef$current5$s = _actionRef$current5.setFilterRules) === null || _actionRef$current5$s === void 0 ? void 0 : _actionRef$current5$s.call(_actionRef$current5, _objectSpread(_objectSpread({}, rules), {}, _defineProperty({}, column.dataIndex, {
206
+ (_actionRef$current4 = actionRef.current) === null || _actionRef$current4 === void 0 ? void 0 : (_actionRef$current4$s = _actionRef$current4.setFilterRules) === null || _actionRef$current4$s === void 0 ? void 0 : _actionRef$current4$s.call(_actionRef$current4, _objectSpread(_objectSpread({}, rules), {}, _defineProperty({}, column.dataIndex, {
212
207
  rules: selected,
213
208
  params: param
214
- }))); // 发送请求
209
+ })));
210
+
211
+ if (selected.length > 0) {
212
+ var _actionRef$current5, _actionRef$current6, _actionRef$current6$r, _actionRef$current7, _actionRef$current7$r, _actionRef$current8, _actionRef$current8$c;
213
+
214
+ var targetPageKey = 'currentPage';
215
+ var pageInfo = (_actionRef$current5 = actionRef.current) === null || _actionRef$current5 === void 0 ? void 0 : _actionRef$current5.pageInfo;
216
+
217
+ if (pageInfo && (pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.targetPageKey)) {
218
+ targetPageKey = pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.targetPageKey;
219
+ } // 发送请求
220
+
221
+
222
+ (_actionRef$current6 = actionRef.current) === null || _actionRef$current6 === void 0 ? void 0 : (_actionRef$current6$r = _actionRef$current6.request) === null || _actionRef$current6$r === void 0 ? void 0 : _actionRef$current6$r.call(_actionRef$current6, _objectSpread(_objectSpread({}, params), {}, _defineProperty({}, targetPageKey, 1)));
223
+ (_actionRef$current7 = actionRef.current) === null || _actionRef$current7 === void 0 ? void 0 : (_actionRef$current7$r = _actionRef$current7.resetPage) === null || _actionRef$current7$r === void 0 ? void 0 : _actionRef$current7$r.call(_actionRef$current7); // 清空表格选择
215
224
 
216
- (_actionRef$current6 = actionRef.current) === null || _actionRef$current6 === void 0 ? void 0 : (_actionRef$current6$r = _actionRef$current6.request) === null || _actionRef$current6$r === void 0 ? void 0 : _actionRef$current6$r.call(_actionRef$current6, _objectSpread(_objectSpread({}, params), {}, _defineProperty({}, targetPageKey, 1)));
217
- (_actionRef$current7 = actionRef.current) === null || _actionRef$current7 === void 0 ? void 0 : (_actionRef$current7$r = _actionRef$current7.resetPage) === null || _actionRef$current7$r === void 0 ? void 0 : _actionRef$current7$r.call(_actionRef$current7); // 清空表格选择
225
+ (_actionRef$current8 = actionRef.current) === null || _actionRef$current8 === void 0 ? void 0 : (_actionRef$current8$c = _actionRef$current8.clearRowSelection) === null || _actionRef$current8$c === void 0 ? void 0 : _actionRef$current8$c.call(_actionRef$current8);
226
+ }
218
227
 
219
- (_actionRef$current8 = actionRef.current) === null || _actionRef$current8 === void 0 ? void 0 : (_actionRef$current8$c = _actionRef$current8.clearRowSelection) === null || _actionRef$current8$c === void 0 ? void 0 : _actionRef$current8$c.call(_actionRef$current8);
220
228
  setVisible(false);
221
229
  }
222
230
  }, getMessage('ok')), /*#__PURE__*/React.createElement(Button, {
@@ -234,7 +242,25 @@ var Filter = function Filter(props) {
234
242
  rules: [],
235
243
  params: ''
236
244
  })));
237
- (_actionRef$current11 = actionRef.current) === null || _actionRef$current11 === void 0 ? void 0 : (_actionRef$current11$ = _actionRef$current11.filterDataSource) === null || _actionRef$current11$ === void 0 ? void 0 : _actionRef$current11$.call(_actionRef$current11, column.dataIndex); // setVisible(!visible);
245
+ (_actionRef$current11 = actionRef.current) === null || _actionRef$current11 === void 0 ? void 0 : (_actionRef$current11$ = _actionRef$current11.filterDataSource) === null || _actionRef$current11$ === void 0 ? void 0 : _actionRef$current11$.call(_actionRef$current11, column.dataIndex);
246
+
247
+ if (selected.length > 0) {
248
+ var _actionRef$current12, _actionRef$current13, _actionRef$current13$, _actionRef$current14, _actionRef$current14$, _actionRef$current15, _actionRef$current15$;
249
+
250
+ var targetPageKey = 'currentPage';
251
+ var pageInfo = (_actionRef$current12 = actionRef.current) === null || _actionRef$current12 === void 0 ? void 0 : _actionRef$current12.pageInfo;
252
+
253
+ if (pageInfo && (pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.targetPageKey)) {
254
+ targetPageKey = pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.targetPageKey;
255
+ } // 发送请求
256
+
257
+
258
+ (_actionRef$current13 = actionRef.current) === null || _actionRef$current13 === void 0 ? void 0 : (_actionRef$current13$ = _actionRef$current13.request) === null || _actionRef$current13$ === void 0 ? void 0 : _actionRef$current13$.call(_actionRef$current13, _defineProperty({}, targetPageKey, 1));
259
+ (_actionRef$current14 = actionRef.current) === null || _actionRef$current14 === void 0 ? void 0 : (_actionRef$current14$ = _actionRef$current14.resetPage) === null || _actionRef$current14$ === void 0 ? void 0 : _actionRef$current14$.call(_actionRef$current14); // 清空表格选择
260
+
261
+ (_actionRef$current15 = actionRef.current) === null || _actionRef$current15 === void 0 ? void 0 : (_actionRef$current15$ = _actionRef$current15.clearRowSelection) === null || _actionRef$current15$ === void 0 ? void 0 : _actionRef$current15$.call(_actionRef$current15);
262
+ } // setVisible(!visible);
263
+
238
264
  }
239
265
  }, getMessage('reset'))))));
240
266
  };
@@ -96,7 +96,7 @@ export var renderColumnsTitle = function renderColumnsTitle(item, actionRef) {
96
96
  };
97
97
 
98
98
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LabelIconTip, {
99
- label: getItemLabel(),
99
+ label: item.title,
100
100
  tooltip: item.tooltip,
101
101
  icon: item.tooltipIcon
102
102
  }), item.filters && /*#__PURE__*/React.createElement(Filter, {
@@ -24,6 +24,7 @@ export declare type ProActionConfig = ({
24
24
  export declare function registerActionHandler(id: string, extendActionId: string, defaultConfig: any): void;
25
25
  export declare function useAction(config?: ProActionConfig, context?: any): any;
26
26
  export interface ProActionButtonProps extends ButtonProps {
27
+ key?: string | number;
27
28
  config?: ProActionConfig;
28
29
  visible?: any;
29
30
  disabled?: any;
@@ -33,6 +34,7 @@ export interface ProActionButtonProps extends ButtonProps {
33
34
  }
34
35
  export declare const ProActionButton: (props: ProActionButtonProps) => JSX.Element;
35
36
  export interface ProActionMenuButtonProps extends MenuButtonProps {
37
+ key?: string | number;
36
38
  actions: ProActionProps[];
37
39
  visible?: any;
38
40
  icon?: string;
@@ -54,8 +54,8 @@ var _excluded = ["type"],
54
54
  _excluded3 = ["loading"],
55
55
  _excluded4 = ["icon", "iconSize", "label", "actions", "children", "context", "type"],
56
56
  _excluded5 = ["context", "text"],
57
- _excluded6 = ["actions"],
58
- _excluded7 = ["config"],
57
+ _excluded6 = ["key", "actions"],
58
+ _excluded7 = ["key", "config"],
59
59
  _excluded8 = ["type", "divider", "max", "moreText", "context", "actions", "className"];
60
60
 
61
61
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -242,8 +242,8 @@ function renderCommonActionButtonMenuItem(action, key, context) {
242
242
  return /*#__PURE__*/_react.default.createElement(_components.Menu.SubMenu, {
243
243
  key: key,
244
244
  label: menuBtn.label || menuBtn.children
245
- }, menuBtn.actions.map(function (a, j) {
246
- return renderCommonActionButtonMenuItem(a, String(j), context);
245
+ }, menuBtn.actions.map(function (a) {
246
+ return renderCommonActionButtonMenuItem(a, a.key, context);
247
247
  }));
248
248
  }
249
249
 
@@ -278,7 +278,7 @@ var ProActionMenuButton = function ProActionMenuButton(props) {
278
278
  type: type,
279
279
  label: buttonContent(label || children, icon, iconSize, context)
280
280
  }, others), actions.map(function (action, i) {
281
- return renderCommonActionButtonMenuItem(action, String(i), context);
281
+ return renderCommonActionButtonMenuItem(action, action.key || i, context);
282
282
  }));
283
283
  }; // 如果 actions 数量超过了 max,则把第 max 个和剩余超出部分折叠起来成为一个 menu
284
284
 
@@ -292,7 +292,9 @@ function formatGroupActions(actions, max, moreConfig) {
292
292
  return actions;
293
293
  }
294
294
 
295
- return [].concat(_toConsumableArray(actions.slice(0, MAX - 1)), [_objectSpread(_objectSpread({}, moreConfig), {}, {
295
+ return [].concat(_toConsumableArray(actions.slice(0, MAX - 1)), [_objectSpread(_objectSpread({
296
+ key: '__teamix_pro_action_group_more_btn'
297
+ }, moreConfig), {}, {
296
298
  actions: actions.slice(MAX - 1)
297
299
  })]);
298
300
  } // 渲染一个 button 或者 menu button
@@ -338,22 +340,34 @@ function getDefaultMoreButton(type, moreText) {
338
340
 
339
341
  var MAX_ACTTIONS = 4;
340
342
 
341
- function getActionConfig(action, context) {
343
+ function getKey(index, key) {
344
+ if (key !== undefined) {
345
+ return key;
346
+ }
347
+
348
+ return "__teamix_pro_action_key_".concat(index);
349
+ }
350
+
351
+ function getActionConfig(action, index, context) {
342
352
  if (action.actions) {
343
- var actions = action.actions,
353
+ var _key = action.key,
354
+ actions = action.actions,
344
355
  _others = _objectWithoutProperties(action, _excluded6);
345
356
 
346
357
  return _objectSpread({
347
- actions: actions.map(function (a) {
348
- return getActionConfig(a, context);
358
+ key: getKey(index, _key),
359
+ actions: actions.map(function (a, j) {
360
+ return getActionConfig(a, j, context);
349
361
  })
350
362
  }, (0, _utils.getTargetValue)(_others, context));
351
363
  }
352
364
 
353
- var config = action.config,
365
+ var key = action.key,
366
+ config = action.config,
354
367
  others = _objectWithoutProperties(action, _excluded7);
355
368
 
356
369
  return _objectSpread({
370
+ key: getKey(index, key),
357
371
  config: config
358
372
  }, (0, _utils.getTargetValue)(others, context));
359
373
  }
@@ -373,8 +387,8 @@ function ProActionGroup(props) {
373
387
  containerProps = _objectWithoutProperties(props, _excluded8);
374
388
 
375
389
  var isTypeText = type === 'text';
376
- var filteredActions = actions.map(function (action) {
377
- return getActionConfig(action, context);
390
+ var filteredActions = actions.map(function (action, index) {
391
+ return getActionConfig(action, index, context);
378
392
  }).filter(function (action) {
379
393
  return action.visible !== false;
380
394
  });
@@ -386,7 +400,7 @@ function ProActionGroup(props) {
386
400
  }, containerProps), formatedActions.map(function (actionBtn, i) {
387
401
  var isLastOne = i === formatedActions.length - 1;
388
402
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
389
- key: i
403
+ key: actionBtn.key
390
404
  }, renderCommonActionButton(actionBtn, context, isTypeText), isTypeText && divider && !isLastOne && /*#__PURE__*/_react.default.createElement(_components.Divider, {
391
405
  direction: "ver"
392
406
  }));
package/lib/index.d.ts CHANGED
@@ -21,5 +21,5 @@ export * from './page-container';
21
21
  export * from './page-header';
22
22
  export * from './skeleton';
23
23
  export * from './table';
24
- declare const version = "1.2.15";
24
+ declare const version = "1.2.16";
25
25
  export { version, ProAction, ProCard, ProField, ProForm, ProInfo, ProPageContainer, ProPageHeader, ProSkeleton, ProTable, hooks, nocode, templates, utils, };
package/lib/index.js CHANGED
@@ -253,5 +253,5 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
253
253
  _icon.default.setConfig(_utils.default.getTeamixIconConfig());
254
254
 
255
255
  // export * from './sidebar';
256
- var version = '1.2.15';
256
+ var version = '1.2.16';
257
257
  exports.version = version;
@@ -26,6 +26,7 @@ var initialValues = {
26
26
  },
27
27
  mainAction: {
28
28
  actions: [{
29
+ key: 'action',
29
30
  children: '操作按钮'
30
31
  }]
31
32
  }
@@ -160,7 +160,7 @@ var Filter = function Filter(props) {
160
160
  return /*#__PURE__*/_react.default.createElement(_components.Dropdown, {
161
161
  trigger: /*#__PURE__*/_react.default.createElement(_icon.default, {
162
162
  size: "small",
163
- type: "filter-line",
163
+ type: selected.length > 0 && visible === false ? 'filter-fill' : 'filter-line',
164
164
  className: cls({
165
165
  icon: true,
166
166
  'icon-selected': selected.length > 0
@@ -169,6 +169,8 @@ var Filter = function Filter(props) {
169
169
  setVisible(!visible);
170
170
  }
171
171
  }),
172
+ //@ts-ignore
173
+ v2: true,
172
174
  triggerType: ['click'],
173
175
  align: "tl bl",
174
176
  visible: visible,
@@ -191,7 +193,7 @@ var Filter = function Filter(props) {
191
193
  btn: true
192
194
  }),
193
195
  onClick: function onClick() {
194
- var _actionRef$current2, _actionRef$current2$f, _actionRef$current$ge5, _actionRef$current3, _actionRef$current3$g, _actionRef$current3$g2, _actionRef$current4, _actionRef$current5, _actionRef$current5$s, _actionRef$current6, _actionRef$current6$r, _actionRef$current7, _actionRef$current7$r, _actionRef$current8, _actionRef$current8$c;
196
+ var _actionRef$current2, _actionRef$current2$f, _actionRef$current$ge5, _actionRef$current3, _actionRef$current3$g, _actionRef$current3$g2, _actionRef$current4, _actionRef$current4$s;
195
197
 
196
198
  (_actionRef$current2 = actionRef.current) === null || _actionRef$current2 === void 0 ? void 0 : (_actionRef$current2$f = _actionRef$current2.filterDataSource) === null || _actionRef$current2$f === void 0 ? void 0 : _actionRef$current2$f.call(_actionRef$current2, column.dataIndex); // 先获取此列的param
197
199
 
@@ -219,24 +221,30 @@ var Filter = function Filter(props) {
219
221
  return null;
220
222
  })), [[column.dataIndex, param]]).filter(function (item) {
221
223
  return item && (item === null || item === void 0 ? void 0 : item[1]);
222
- }));
223
- var targetPageKey = 'currentPage';
224
- var pageInfo = (_actionRef$current4 = actionRef.current) === null || _actionRef$current4 === void 0 ? void 0 : _actionRef$current4.pageInfo;
224
+ })); // 再设置所有的列筛选状态
225
225
 
226
- if (pageInfo && (pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.targetPageKey)) {
227
- targetPageKey = pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.targetPageKey;
228
- } // 再设置所有的列筛选状态
229
-
230
-
231
- (_actionRef$current5 = actionRef.current) === null || _actionRef$current5 === void 0 ? void 0 : (_actionRef$current5$s = _actionRef$current5.setFilterRules) === null || _actionRef$current5$s === void 0 ? void 0 : _actionRef$current5$s.call(_actionRef$current5, _objectSpread(_objectSpread({}, rules), {}, _defineProperty({}, column.dataIndex, {
226
+ (_actionRef$current4 = actionRef.current) === null || _actionRef$current4 === void 0 ? void 0 : (_actionRef$current4$s = _actionRef$current4.setFilterRules) === null || _actionRef$current4$s === void 0 ? void 0 : _actionRef$current4$s.call(_actionRef$current4, _objectSpread(_objectSpread({}, rules), {}, _defineProperty({}, column.dataIndex, {
232
227
  rules: selected,
233
228
  params: param
234
- }))); // 发送请求
229
+ })));
230
+
231
+ if (selected.length > 0) {
232
+ var _actionRef$current5, _actionRef$current6, _actionRef$current6$r, _actionRef$current7, _actionRef$current7$r, _actionRef$current8, _actionRef$current8$c;
233
+
234
+ var targetPageKey = 'currentPage';
235
+ var pageInfo = (_actionRef$current5 = actionRef.current) === null || _actionRef$current5 === void 0 ? void 0 : _actionRef$current5.pageInfo;
236
+
237
+ if (pageInfo && (pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.targetPageKey)) {
238
+ targetPageKey = pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.targetPageKey;
239
+ } // 发送请求
240
+
241
+
242
+ (_actionRef$current6 = actionRef.current) === null || _actionRef$current6 === void 0 ? void 0 : (_actionRef$current6$r = _actionRef$current6.request) === null || _actionRef$current6$r === void 0 ? void 0 : _actionRef$current6$r.call(_actionRef$current6, _objectSpread(_objectSpread({}, params), {}, _defineProperty({}, targetPageKey, 1)));
243
+ (_actionRef$current7 = actionRef.current) === null || _actionRef$current7 === void 0 ? void 0 : (_actionRef$current7$r = _actionRef$current7.resetPage) === null || _actionRef$current7$r === void 0 ? void 0 : _actionRef$current7$r.call(_actionRef$current7); // 清空表格选择
235
244
 
236
- (_actionRef$current6 = actionRef.current) === null || _actionRef$current6 === void 0 ? void 0 : (_actionRef$current6$r = _actionRef$current6.request) === null || _actionRef$current6$r === void 0 ? void 0 : _actionRef$current6$r.call(_actionRef$current6, _objectSpread(_objectSpread({}, params), {}, _defineProperty({}, targetPageKey, 1)));
237
- (_actionRef$current7 = actionRef.current) === null || _actionRef$current7 === void 0 ? void 0 : (_actionRef$current7$r = _actionRef$current7.resetPage) === null || _actionRef$current7$r === void 0 ? void 0 : _actionRef$current7$r.call(_actionRef$current7); // 清空表格选择
245
+ (_actionRef$current8 = actionRef.current) === null || _actionRef$current8 === void 0 ? void 0 : (_actionRef$current8$c = _actionRef$current8.clearRowSelection) === null || _actionRef$current8$c === void 0 ? void 0 : _actionRef$current8$c.call(_actionRef$current8);
246
+ }
238
247
 
239
- (_actionRef$current8 = actionRef.current) === null || _actionRef$current8 === void 0 ? void 0 : (_actionRef$current8$c = _actionRef$current8.clearRowSelection) === null || _actionRef$current8$c === void 0 ? void 0 : _actionRef$current8$c.call(_actionRef$current8);
240
248
  setVisible(false);
241
249
  }
242
250
  }, (0, _utils.getMessage)('ok')), /*#__PURE__*/_react.default.createElement(_components.Button, {
@@ -254,7 +262,25 @@ var Filter = function Filter(props) {
254
262
  rules: [],
255
263
  params: ''
256
264
  })));
257
- (_actionRef$current11 = actionRef.current) === null || _actionRef$current11 === void 0 ? void 0 : (_actionRef$current11$ = _actionRef$current11.filterDataSource) === null || _actionRef$current11$ === void 0 ? void 0 : _actionRef$current11$.call(_actionRef$current11, column.dataIndex); // setVisible(!visible);
265
+ (_actionRef$current11 = actionRef.current) === null || _actionRef$current11 === void 0 ? void 0 : (_actionRef$current11$ = _actionRef$current11.filterDataSource) === null || _actionRef$current11$ === void 0 ? void 0 : _actionRef$current11$.call(_actionRef$current11, column.dataIndex);
266
+
267
+ if (selected.length > 0) {
268
+ var _actionRef$current12, _actionRef$current13, _actionRef$current13$, _actionRef$current14, _actionRef$current14$, _actionRef$current15, _actionRef$current15$;
269
+
270
+ var targetPageKey = 'currentPage';
271
+ var pageInfo = (_actionRef$current12 = actionRef.current) === null || _actionRef$current12 === void 0 ? void 0 : _actionRef$current12.pageInfo;
272
+
273
+ if (pageInfo && (pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.targetPageKey)) {
274
+ targetPageKey = pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.targetPageKey;
275
+ } // 发送请求
276
+
277
+
278
+ (_actionRef$current13 = actionRef.current) === null || _actionRef$current13 === void 0 ? void 0 : (_actionRef$current13$ = _actionRef$current13.request) === null || _actionRef$current13$ === void 0 ? void 0 : _actionRef$current13$.call(_actionRef$current13, _defineProperty({}, targetPageKey, 1));
279
+ (_actionRef$current14 = actionRef.current) === null || _actionRef$current14 === void 0 ? void 0 : (_actionRef$current14$ = _actionRef$current14.resetPage) === null || _actionRef$current14$ === void 0 ? void 0 : _actionRef$current14$.call(_actionRef$current14); // 清空表格选择
280
+
281
+ (_actionRef$current15 = actionRef.current) === null || _actionRef$current15 === void 0 ? void 0 : (_actionRef$current15$ = _actionRef$current15.clearRowSelection) === null || _actionRef$current15$ === void 0 ? void 0 : _actionRef$current15$.call(_actionRef$current15);
282
+ } // setVisible(!visible);
283
+
258
284
  }
259
285
  }, (0, _utils.getMessage)('reset'))))));
260
286
  };
@@ -106,7 +106,7 @@ var renderColumnsTitle = function renderColumnsTitle(item, actionRef) {
106
106
  };
107
107
 
108
108
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_utils.LabelIconTip, {
109
- label: getItemLabel(),
109
+ label: item.title,
110
110
  tooltip: item.tooltip,
111
111
  icon: item.tooltipIcon
112
112
  }), item.filters && /*#__PURE__*/_react.default.createElement(_Filter.default, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamix/pro",
3
- "version": "1.2.16",
3
+ "version": "1.2.17",
4
4
  "description": "TeamixPro大包",
5
5
  "repository": "http://gitlab.alibaba-inc.com/teamix/pro",
6
6
  "author": "Velociraptor(迅猛龙)",