@teamix/pro 1.2.29 → 1.2.33

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.
Files changed (89) hide show
  1. package/dist/pro.css +1 -1
  2. package/dist/pro.js +737 -1579
  3. package/dist/pro.min.css +1 -1
  4. package/dist/pro.min.js +1 -1
  5. package/es/actions/dialog-form.js +58 -9
  6. package/es/common.scss +22 -0
  7. package/es/form/Filter/SimpleFilter.js +10 -3
  8. package/es/form/Filter/index.d.ts +5 -9
  9. package/es/form/Filter/index.js +371 -154
  10. package/es/form/Filter/index.scss +33 -11
  11. package/es/form/Filter/index2.d.ts +9 -5
  12. package/es/form/Filter/index2.js +154 -370
  13. package/es/form/Filter/index2.scss +11 -33
  14. package/es/form/ProForm/index.scss +5 -0
  15. package/es/form/SchemaForm/index.js +4 -4
  16. package/es/form/index.d.ts +3 -3
  17. package/es/form/index.js +3 -3
  18. package/es/form/typing.d.ts +6 -1
  19. package/es/index.d.ts +1 -1
  20. package/es/index.js +1 -1
  21. package/es/info/components/InfoValueItem/index.js +38 -12
  22. package/es/info/components/InfoValueItem/index.scss +1 -0
  23. package/es/info/components/ProInfoItem/index.js +6 -3
  24. package/es/info/components/ProInfoItem/index.scss +9 -0
  25. package/es/info/components/baseInfo/index.js +4 -2
  26. package/es/info/components/headerInfo/index.js +2 -1
  27. package/es/info/components/tableInfo/index.js +2 -1
  28. package/es/info/index.scss +2 -0
  29. package/es/info/typing.d.ts +3 -0
  30. package/es/table/components/Filter/index.js +6 -6
  31. package/es/table/components/Layout/index.js +39 -18
  32. package/es/table/components/Layout/index.scss +7 -0
  33. package/es/table/components/ToolBar/Fullscreen.js +7 -11
  34. package/es/table/components/ToolBar/index.scss +1 -0
  35. package/es/table/index.js +82 -29
  36. package/es/table/index.scss +4 -0
  37. package/es/table/typing.d.ts +2 -2
  38. package/es/table/utils/columnRender.js +1 -1
  39. package/es/table/utils/index.d.ts +2 -1
  40. package/es/table/utils/index.js +62 -113
  41. package/lib/actions/dialog-form.js +57 -10
  42. package/lib/common.scss +22 -0
  43. package/lib/form/Filter/SimpleFilter.js +8 -1
  44. package/lib/form/Filter/index.d.ts +5 -9
  45. package/lib/form/Filter/index.js +384 -154
  46. package/lib/form/Filter/index.scss +33 -11
  47. package/lib/form/Filter/index2.d.ts +9 -5
  48. package/lib/form/Filter/index2.js +154 -383
  49. package/lib/form/Filter/index2.scss +11 -33
  50. package/lib/form/ProForm/index.scss +5 -0
  51. package/lib/form/SchemaForm/index.js +4 -4
  52. package/lib/form/index.d.ts +3 -3
  53. package/lib/form/index.js +8 -8
  54. package/lib/form/typing.d.ts +6 -1
  55. package/lib/index.d.ts +1 -1
  56. package/lib/index.js +1 -1
  57. package/lib/info/components/InfoValueItem/index.js +38 -12
  58. package/lib/info/components/InfoValueItem/index.scss +1 -0
  59. package/lib/info/components/ProInfoItem/index.js +6 -3
  60. package/lib/info/components/ProInfoItem/index.scss +9 -0
  61. package/lib/info/components/baseInfo/index.js +4 -2
  62. package/lib/info/components/headerInfo/index.js +2 -1
  63. package/lib/info/components/tableInfo/index.js +2 -1
  64. package/lib/info/index.scss +2 -0
  65. package/lib/info/typing.d.ts +3 -0
  66. package/lib/table/components/Filter/index.js +6 -6
  67. package/lib/table/components/Layout/index.js +39 -18
  68. package/lib/table/components/Layout/index.scss +7 -0
  69. package/lib/table/components/ToolBar/Fullscreen.js +7 -11
  70. package/lib/table/components/ToolBar/index.scss +1 -0
  71. package/lib/table/index.js +81 -28
  72. package/lib/table/index.scss +4 -0
  73. package/lib/table/typing.d.ts +2 -2
  74. package/lib/table/utils/columnRender.js +1 -1
  75. package/lib/table/utils/index.d.ts +2 -1
  76. package/lib/table/utils/index.js +63 -112
  77. package/package.json +1 -1
  78. package/dist/212.js +0 -155705
  79. package/dist/fonts/codicon.ttf +0 -0
  80. package/es/form/Components/SelectTable/index.d.ts +0 -24
  81. package/es/form/Components/SelectTable/index.js +0 -135
  82. package/es/form/Components/SelectTable/index.scss +0 -28
  83. package/es/form/Components/SelectTable/table.d.ts +0 -6
  84. package/es/form/Components/SelectTable/table.js +0 -64
  85. package/lib/form/Components/SelectTable/index.d.ts +0 -24
  86. package/lib/form/Components/SelectTable/index.js +0 -157
  87. package/lib/form/Components/SelectTable/index.scss +0 -28
  88. package/lib/form/Components/SelectTable/table.d.ts +0 -6
  89. package/lib/form/Components/SelectTable/table.js +0 -76
@@ -24,7 +24,7 @@ export interface ProFormSchemaItem {
24
24
  name?: string;
25
25
  description?: React.ReactNode;
26
26
  title?: string;
27
- component?: IBaseComponent | IButtonComponent | IComboComponent | ILayoutComponent | 'ProField' | any;
27
+ component?: IBaseComponent | IButtonComponent | IComboComponent | ILayoutComponent | any;
28
28
  props?: AnyObject | any;
29
29
  decorator?: string | null;
30
30
  decoratorProps?: AnyObject;
@@ -88,6 +88,8 @@ export interface QueryFilterProps extends ProFormProps {
88
88
  triggerType?: 'keydown' | 'change' | 'submit';
89
89
  /** 表单展示形式 */
90
90
  mode?: 'inline' | 'panel';
91
+ /** 面板模式下是否仅展示面板 */
92
+ purePanel?: boolean;
91
93
  /** 面板是否默认展开,仅在 mode='panel' 时生效 */
92
94
  expand?: boolean;
93
95
  /** 顶部筛选区前缀 */
@@ -112,6 +114,9 @@ export interface QueryFilterProps extends ProFormProps {
112
114
  /**
113
115
  * 兼容性导出
114
116
  */
117
+ /**
118
+ * @deprecated 将在未来移除该组件,建议使用 QueryFilter 代替
119
+ */
115
120
  export interface IFilterProps extends ProFormProps {
116
121
  triggerType?: 'keydown' | 'change' | 'submit';
117
122
  onFilter?: (values: any) => void;
package/es/index.d.ts CHANGED
@@ -24,5 +24,5 @@ export * from './skeleton';
24
24
  export * from './table';
25
25
  export * from './utils';
26
26
  export * from './step';
27
- declare const version = "1.2.29";
27
+ declare const version = "1.2.33";
28
28
  export { version, ProAction, ProCard, ProField, ProForm, ProInfo, ProPageContainer, ProPageHeader, ProSkeleton, ProTable, ProStep, hooks, nocode, templates, utils, };
package/es/index.js CHANGED
@@ -30,7 +30,7 @@ export * from './table';
30
30
  export * from './utils'; // export * from './sidebar';
31
31
 
32
32
  export * from './step';
33
- var version = '1.2.29';
33
+ var version = '1.2.33';
34
34
  export { version, ProAction, ProCard, ProField, ProForm, ProInfo, // ProLayout,
35
35
  ProPageContainer, ProPageHeader, ProSkeleton, ProTable, // ProSidebar,
36
36
  ProStep, hooks, nocode, templates, utils };
@@ -1,4 +1,4 @@
1
- var _excluded = ["type", "value", "render", "infoItem", "record", "actionRef", "dataSource", "context"];
1
+ var _excluded = ["type", "value", "render", "infoItem", "record", "actionRef", "dataSource", "context", "props"];
2
2
 
3
3
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
4
4
 
@@ -8,12 +8,6 @@ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symb
8
8
 
9
9
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
10
10
 
11
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
12
-
13
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
14
-
15
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
16
-
17
11
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
18
12
 
19
13
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -26,6 +20,12 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
26
20
 
27
21
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
28
22
 
23
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
24
+
25
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
26
+
27
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
28
+
29
29
  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; }
30
30
 
31
31
  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; }
@@ -52,6 +52,7 @@ var InfoValueItem = function InfoValueItem(props) {
52
52
  actionRef = props.actionRef,
53
53
  dataSource = props.dataSource,
54
54
  context = props.context,
55
+ fieldProps = props.props,
55
56
  others = _objectWithoutProperties(props, _excluded);
56
57
 
57
58
  var dataIndex = infoItem.dataIndex,
@@ -65,7 +66,8 @@ var InfoValueItem = function InfoValueItem(props) {
65
66
  _infoItem$successMess = infoItem.successMessage,
66
67
  successMessage = _infoItem$successMess === void 0 ? 'success' : _infoItem$successMess,
67
68
  actions = infoItem.actions,
68
- extra = infoItem.extra; // 获取处理过的 render
69
+ extra = infoItem.extra,
70
+ valueType = infoItem.valueType; // 获取处理过的 render
69
71
 
70
72
  var getRender = function getRender() {
71
73
  var _processRenderFunctio;
@@ -77,7 +79,31 @@ var InfoValueItem = function InfoValueItem(props) {
77
79
  }
78
80
 
79
81
  var newRender = processBuriedPoint((_processRenderFunctio = processRenderFunction(render !== null && render !== void 0 ? render : {}, value, record)) !== null && _processRenderFunctio !== void 0 ? _processRenderFunctio : {}, value, record);
82
+
83
+ if (valueType === 'selectGroup') {
84
+ newRender = _objectSpread(_objectSpread({
85
+ maxShowNumber: 'auto',
86
+ foldText: 'more'
87
+ }, newRender), {}, {
88
+ ellipsis: false
89
+ });
90
+ }
91
+
80
92
  return newRender;
93
+ };
94
+
95
+ var getFieldProps = function getFieldProps() {
96
+ if (valueType === 'selectGroup') {
97
+ return _objectSpread({
98
+ valueAlias: {
99
+ value: 'TagValue',
100
+ key: 'TagKey'
101
+ },
102
+ layout: 'compact'
103
+ }, fieldProps);
104
+ }
105
+
106
+ return fieldProps;
81
107
  }; // 获取处理过的 dataSource
82
108
 
83
109
 
@@ -275,12 +301,12 @@ var InfoValueItem = function InfoValueItem(props) {
275
301
  onMouseLeave: function onMouseLeave() {
276
302
  setEditVisible(false);
277
303
  }
278
- }, /*#__PURE__*/React.createElement(ProField, _objectSpread({
304
+ }, /*#__PURE__*/React.createElement(ProField, _objectSpread(_objectSpread({
279
305
  type: type,
280
306
  value: value,
281
307
  render: getRender(),
282
308
  dataSource: getDataSource()
283
- }, others)), /*#__PURE__*/React.createElement(PopConfirm, {
309
+ }, others), getFieldProps())), /*#__PURE__*/React.createElement(PopConfirm, {
284
310
  visible: popConfirmVisible,
285
311
  content: renderContent(),
286
312
  triggerType: "click",
@@ -307,12 +333,12 @@ var InfoValueItem = function InfoValueItem(props) {
307
333
 
308
334
  return /*#__PURE__*/React.createElement("div", {
309
335
  className: cls('item-value')
310
- }, /*#__PURE__*/React.createElement(ProField, _objectSpread({
336
+ }, /*#__PURE__*/React.createElement(ProField, _objectSpread(_objectSpread({
311
337
  type: type,
312
338
  value: value,
313
339
  render: getRender(),
314
340
  dataSource: getDataSource()
315
- }, others)), renderAction(), extra && extra);
341
+ }, others), getFieldProps())), renderAction(), extra && extra);
316
342
  };
317
343
 
318
344
  export default InfoValueItem;
@@ -20,6 +20,7 @@
20
20
  &-item-value {
21
21
  display: flex;
22
22
  align-items: center;
23
+ width: 100%;
23
24
  }
24
25
 
25
26
  }
@@ -22,7 +22,8 @@ var ProInfoItem = function ProInfoItem(prop) {
22
22
  return /*#__PURE__*/React.createElement("div", {
23
23
  className: cls()
24
24
  }, /*#__PURE__*/React.createElement(Row, {
25
- gutter: 10
25
+ gutter: 10,
26
+ className: cls('base-row')
26
27
  }, /*#__PURE__*/React.createElement(Col, {
27
28
  span: labelCol === null || labelCol === void 0 ? void 0 : labelCol.span,
28
29
  className: cls('label')
@@ -37,7 +38,7 @@ var ProInfoItem = function ProInfoItem(prop) {
37
38
  className: cls('value')
38
39
  }, loading && /*#__PURE__*/React.createElement("div", {
39
40
  className: cls('base-skeleton-box')
40
- }, /*#__PURE__*/React.createElement(ProSkeletonRaw.Info.Item, null)), !loading && /*#__PURE__*/React.createElement("div", null, value))));
41
+ }, /*#__PURE__*/React.createElement(ProSkeletonRaw.Info.Item, null)), !loading && value)));
41
42
  }
42
43
 
43
44
  if (headerInfoLayout) {
@@ -45,7 +46,9 @@ var ProInfoItem = function ProInfoItem(prop) {
45
46
  labelGutter = _headerInfoLayout$lab === void 0 ? '16px' : _headerInfoLayout$lab;
46
47
  return /*#__PURE__*/React.createElement("div", {
47
48
  className: cls()
48
- }, /*#__PURE__*/React.createElement(Row, null, /*#__PURE__*/React.createElement("div", {
49
+ }, /*#__PURE__*/React.createElement(Row, {
50
+ className: cls('header-row')
51
+ }, /*#__PURE__*/React.createElement("div", {
49
52
  className: cls('header-label')
50
53
  }, /*#__PURE__*/React.createElement(LabelIconTip, {
51
54
  label: label,
@@ -17,6 +17,15 @@ $item-padding-bottom: 8px;
17
17
  .teamix-pro-field-info-form-item {
18
18
  width: 100%;
19
19
  padding-bottom: $item-padding-bottom;
20
+
21
+ &-header-row {
22
+ display: flex;
23
+ align-items: center;
24
+ }
25
+ &-base-row {
26
+ display: flex;
27
+ align-items: center;
28
+ }
20
29
  }
21
30
 
22
31
  .teamix-pro-field-info-form-item-label {
@@ -73,7 +73,8 @@ var ProBaseInfo = function ProBaseInfo(props) {
73
73
  infoItem: item,
74
74
  record: dataSource !== null && dataSource !== void 0 ? dataSource : result,
75
75
  actionRef: actionRef,
76
- context: context
76
+ context: context,
77
+ props: item.props
77
78
  }),
78
79
  baseInfoLayout: getFormItemLayout((_item$colSpan = item === null || item === void 0 ? void 0 : item.colSpan) !== null && _item$colSpan !== void 0 ? _item$colSpan : 0),
79
80
  tooltip: item.tooltip,
@@ -84,7 +85,8 @@ var ProBaseInfo = function ProBaseInfo(props) {
84
85
 
85
86
  return /*#__PURE__*/React.createElement(React.Fragment, null, (size === null || size === void 0 ? void 0 : size.width) && /*#__PURE__*/React.createElement(Row, {
86
87
  wrap: true,
87
- className: "teamix-pro-info-content-row"
88
+ className: "teamix-pro-info-content-row",
89
+ gutter: 20
88
90
  }, renderContent()));
89
91
  };
90
92
 
@@ -50,7 +50,8 @@ var ProHeaderInfo = function ProHeaderInfo(props) {
50
50
  dataSource: item.dataSource,
51
51
  infoItem: item,
52
52
  record: dataSource !== null && dataSource !== void 0 ? dataSource : result,
53
- actionRef: actionRef
53
+ actionRef: actionRef,
54
+ props: item.props
54
55
  }),
55
56
  headerInfoLayout: layout !== null && layout !== void 0 ? layout : defaultLayout,
56
57
  tooltip: item.tooltip,
@@ -65,7 +65,8 @@ var ProTableInfo = function ProTableInfo(props) {
65
65
  dataSource: item.dataSource,
66
66
  infoItem: item,
67
67
  record: dataSource !== null && dataSource !== void 0 ? dataSource : result,
68
- actionRef: actionRef
68
+ actionRef: actionRef,
69
+ props: item.props
69
70
  });
70
71
  };
71
72
 
@@ -1,4 +1,6 @@
1
+ @import '../common.scss';
1
2
  .teamix-pro-info {
3
+ @include hybridcloud-scrollbar;
2
4
  color: var(--color-brand1-6);
3
5
 
4
6
  .teamix-pro-info-content-row {
@@ -94,6 +94,8 @@ export interface ProInfoColumnsProps {
94
94
  actions?: ProActionButtonProps[];
95
95
  /** 追加在列后 */
96
96
  extra?: React.ReactNode;
97
+ /** 其他 ProField 配置 */
98
+ props?: any;
97
99
  }
98
100
  export declare type ProInfoActionType = {
99
101
  /** 刷新Info */
@@ -168,6 +170,7 @@ export declare type InfoValueItemProps = {
168
170
  render?: ProInfoCellRender;
169
171
  dataSource?: ProFieldDataSourceItem[] | ProInfoCellFunProp;
170
172
  context?: object;
173
+ props?: any;
171
174
  } & Omit<ProFieldProps, 'render' | 'dataSource'>;
172
175
  export declare type ProInfoHeaderProps = Omit<ProCardProps, 'loading'>;
173
176
  /** ProInfoGroupContextProps */
@@ -51,10 +51,10 @@ var Filter = function Filter(props) {
51
51
  setVisible = _useState4[1];
52
52
 
53
53
  useEffect(function () {
54
- var _actionRef$current$ge, _actionRef$current, _actionRef$current$ge2, _actionRef$current$ge3, _actionRef$current$ge4;
54
+ var _actionRef$current$ge, _actionRef$current, _actionRef$current$ge2, _actionRef$current$ge3, _actionRef$current$ge4, _actionRef$current$ge5;
55
55
 
56
56
  // 从全局状态中读取上次存储的条件
57
- var rules = (_actionRef$current$ge = (_actionRef$current = actionRef.current) === null || _actionRef$current === void 0 ? void 0 : (_actionRef$current$ge2 = _actionRef$current.getState) === null || _actionRef$current$ge2 === void 0 ? void 0 : (_actionRef$current$ge3 = _actionRef$current$ge2.call(_actionRef$current).filterRules) === null || _actionRef$current$ge3 === void 0 ? void 0 : (_actionRef$current$ge4 = _actionRef$current$ge3[column.dataIndex]) === null || _actionRef$current$ge4 === void 0 ? void 0 : _actionRef$current$ge4.rules) !== null && _actionRef$current$ge !== void 0 ? _actionRef$current$ge : [];
57
+ var rules = (_actionRef$current$ge = (_actionRef$current = actionRef.current) === null || _actionRef$current === void 0 ? void 0 : (_actionRef$current$ge2 = _actionRef$current.getState) === null || _actionRef$current$ge2 === void 0 ? void 0 : (_actionRef$current$ge3 = _actionRef$current$ge2.call(_actionRef$current)) === null || _actionRef$current$ge3 === void 0 ? void 0 : (_actionRef$current$ge4 = _actionRef$current$ge3.filterRules) === null || _actionRef$current$ge4 === void 0 ? void 0 : (_actionRef$current$ge5 = _actionRef$current$ge4[column.dataIndex]) === null || _actionRef$current$ge5 === void 0 ? void 0 : _actionRef$current$ge5.rules) !== null && _actionRef$current$ge !== void 0 ? _actionRef$current$ge : [];
58
58
  setSelected(rules);
59
59
  }, []); // 获取过滤项
60
60
 
@@ -172,7 +172,7 @@ var Filter = function Filter(props) {
172
172
  btn: true
173
173
  }),
174
174
  onClick: function onClick() {
175
- var _actionRef$current2, _actionRef$current2$f, _actionRef$current$ge5, _actionRef$current3, _actionRef$current3$g, _actionRef$current3$g2, _actionRef$current4, _actionRef$current4$s;
175
+ var _actionRef$current2, _actionRef$current2$f, _actionRef$current$ge6, _actionRef$current3, _actionRef$current3$g, _actionRef$current3$g2, _actionRef$current4, _actionRef$current4$s;
176
176
 
177
177
  (_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
178
178
 
@@ -187,7 +187,7 @@ var Filter = function Filter(props) {
187
187
  } // 需要带上其他所有的信息
188
188
 
189
189
 
190
- var rules = (_actionRef$current$ge5 = (_actionRef$current3 = actionRef.current) === null || _actionRef$current3 === void 0 ? void 0 : (_actionRef$current3$g = _actionRef$current3.getState) === null || _actionRef$current3$g === void 0 ? void 0 : (_actionRef$current3$g2 = _actionRef$current3$g.call(_actionRef$current3)) === null || _actionRef$current3$g2 === void 0 ? void 0 : _actionRef$current3$g2.filterRules) !== null && _actionRef$current$ge5 !== void 0 ? _actionRef$current$ge5 : {}; // 再设置所有的列筛选状态
190
+ var rules = (_actionRef$current$ge6 = (_actionRef$current3 = actionRef.current) === null || _actionRef$current3 === void 0 ? void 0 : (_actionRef$current3$g = _actionRef$current3.getState) === null || _actionRef$current3$g === void 0 ? void 0 : (_actionRef$current3$g2 = _actionRef$current3$g.call(_actionRef$current3)) === null || _actionRef$current3$g2 === void 0 ? void 0 : _actionRef$current3$g2.filterRules) !== null && _actionRef$current$ge6 !== void 0 ? _actionRef$current$ge6 : {}; // 再设置所有的列筛选状态
191
191
 
192
192
  (_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, {
193
193
  rules: selected,
@@ -220,10 +220,10 @@ var Filter = function Filter(props) {
220
220
  btn: true
221
221
  }),
222
222
  onClick: function onClick() {
223
- var _actionRef$current$ge6, _actionRef$current9, _actionRef$current9$g, _actionRef$current9$g2, _actionRef$current10, _actionRef$current10$, _actionRef$current11, _actionRef$current11$;
223
+ var _actionRef$current$ge7, _actionRef$current9, _actionRef$current9$g, _actionRef$current9$g2, _actionRef$current10, _actionRef$current10$, _actionRef$current11, _actionRef$current11$;
224
224
 
225
225
  setSelected([]);
226
- var rules = (_actionRef$current$ge6 = (_actionRef$current9 = actionRef.current) === null || _actionRef$current9 === void 0 ? void 0 : (_actionRef$current9$g = _actionRef$current9.getState) === null || _actionRef$current9$g === void 0 ? void 0 : (_actionRef$current9$g2 = _actionRef$current9$g.call(_actionRef$current9)) === null || _actionRef$current9$g2 === void 0 ? void 0 : _actionRef$current9$g2.filterRules) !== null && _actionRef$current$ge6 !== void 0 ? _actionRef$current$ge6 : {};
226
+ var rules = (_actionRef$current$ge7 = (_actionRef$current9 = actionRef.current) === null || _actionRef$current9 === void 0 ? void 0 : (_actionRef$current9$g = _actionRef$current9.getState) === null || _actionRef$current9$g === void 0 ? void 0 : (_actionRef$current9$g2 = _actionRef$current9$g.call(_actionRef$current9)) === null || _actionRef$current9$g2 === void 0 ? void 0 : _actionRef$current9$g2.filterRules) !== null && _actionRef$current$ge7 !== void 0 ? _actionRef$current$ge7 : {};
227
227
  (_actionRef$current10 = actionRef.current) === null || _actionRef$current10 === void 0 ? void 0 : (_actionRef$current10$ = _actionRef$current10.setFilterRules) === null || _actionRef$current10$ === void 0 ? void 0 : _actionRef$current10$.call(_actionRef$current10, _objectSpread(_objectSpread({}, rules), {}, _defineProperty({}, column.dataIndex, {
228
228
  rules: [],
229
229
  params: ''
@@ -56,12 +56,27 @@ var Layout = function Layout(props) {
56
56
  context: _objectSpread(_objectSpread({}, defaultContext), mainAction.context)
57
57
  })));
58
58
  } else return mainAction;
59
+ }; // 渲染 addonAfter
60
+
61
+
62
+ var renderAddonAfter = function renderAddonAfter() {
63
+ return /*#__PURE__*/React.createElement("div", {
64
+ className: cls('addon-after-wrapper')
65
+ }, extra && !header && /*#__PURE__*/React.createElement(QuickAction, {
66
+ actionRef: actionRef,
67
+ quickAction: extra,
68
+ rowSelection: rowSelection
69
+ }), /*#__PURE__*/React.createElement(ToolBar, _objectSpread({
70
+ actionRef: actionRef
71
+ }, otherProps)));
59
72
  }; // 渲染新版 QueryFilter
60
73
 
61
74
 
62
75
  var renderQueryFilter = function renderQueryFilter() {
63
- if (dataFilter) {
64
- var _dataFilter$schema;
76
+ var _dataFilter$schema;
77
+
78
+ if (dataFilter === null || dataFilter === void 0 ? void 0 : (_dataFilter$schema = dataFilter.schema) === null || _dataFilter$schema === void 0 ? void 0 : _dataFilter$schema.length) {
79
+ var _dataFilter$schema2;
65
80
 
66
81
  if ( /*#__PURE__*/isValidElement(dataFilter === null || dataFilter === void 0 ? void 0 : dataFilter.content)) {
67
82
  // 自定义渲染内容
@@ -81,15 +96,9 @@ var Layout = function Layout(props) {
81
96
  },
82
97
  panelContent: dataFilter.content,
83
98
  addonBefore: renderMainAction(),
84
- addonAfter: /*#__PURE__*/React.createElement(React.Fragment, null, extra && !header && /*#__PURE__*/React.createElement(QuickAction, {
85
- actionRef: actionRef,
86
- quickAction: extra,
87
- rowSelection: rowSelection
88
- }), /*#__PURE__*/React.createElement(ToolBar, _objectSpread({
89
- actionRef: actionRef
90
- }, otherProps)))
99
+ addonAfter: renderAddonAfter()
91
100
  }, dataFilter));
92
- } else if ((dataFilter === null || dataFilter === void 0 ? void 0 : (_dataFilter$schema = dataFilter.schema) === null || _dataFilter$schema === void 0 ? void 0 : _dataFilter$schema.length) >= 0) {
101
+ } else if ((dataFilter === null || dataFilter === void 0 ? void 0 : (_dataFilter$schema2 = dataFilter.schema) === null || _dataFilter$schema2 === void 0 ? void 0 : _dataFilter$schema2.length) >= 0) {
93
102
  return /*#__PURE__*/React.createElement(QueryFilter, _objectSpread({
94
103
  formRef: dataFilterFormRef,
95
104
  onExpand: function onExpand(expand) {
@@ -106,15 +115,19 @@ var Layout = function Layout(props) {
106
115
  (dataFilter === null || dataFilter === void 0 ? void 0 : dataFilter.onExpand) && (dataFilter === null || dataFilter === void 0 ? void 0 : dataFilter.onExpand(expand));
107
116
  },
108
117
  addonBefore: renderMainAction(),
109
- addonAfter: /*#__PURE__*/React.createElement(React.Fragment, null, extra && !header && /*#__PURE__*/React.createElement(QuickAction, {
110
- actionRef: actionRef,
111
- quickAction: extra,
112
- rowSelection: rowSelection
113
- }), /*#__PURE__*/React.createElement(ToolBar, _objectSpread({
114
- actionRef: actionRef
115
- }, otherProps)))
118
+ addonAfter: renderAddonAfter()
116
119
  }, dataFilter));
117
120
  }
121
+ } else if (mainAction) {
122
+ // 没传 dataFilter 但是传了 mainAction
123
+ return /*#__PURE__*/React.createElement(QueryFilterLayout, {
124
+ addonBefore: renderMainAction(),
125
+ addonAfter: renderAddonAfter()
126
+ });
127
+ } else {
128
+ return /*#__PURE__*/React.createElement(QueryFilterLayout, {
129
+ addonAfter: renderAddonAfter()
130
+ });
118
131
  }
119
132
  }; // 区域组合渲染
120
133
 
@@ -133,11 +146,19 @@ var Layout = function Layout(props) {
133
146
  rowSelection: rowSelection
134
147
  }))), renderQueryFilter());
135
148
  } else if (header && !mainAction) {
149
+ var _dataFilter$schema3, _dataFilter$schema4;
150
+
136
151
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
137
152
  className: cls('wrapper')
138
153
  }, /*#__PURE__*/React.createElement("div", {
139
154
  className: cls('left')
140
- }, header && /*#__PURE__*/React.createElement(Header, _objectSpread({}, header)), renderQueryFilter())));
155
+ }, header && /*#__PURE__*/React.createElement(Header, _objectSpread({}, header)), (dataFilter === null || dataFilter === void 0 ? void 0 : (_dataFilter$schema3 = dataFilter.schema) === null || _dataFilter$schema3 === void 0 ? void 0 : _dataFilter$schema3.length) && renderQueryFilter()), /*#__PURE__*/React.createElement("div", {
156
+ className: cls('right')
157
+ }, extra && /*#__PURE__*/React.createElement(QuickAction, {
158
+ actionRef: actionRef,
159
+ quickAction: extra,
160
+ rowSelection: rowSelection
161
+ }), !(dataFilter === null || dataFilter === void 0 ? void 0 : (_dataFilter$schema4 = dataFilter.schema) === null || _dataFilter$schema4 === void 0 ? void 0 : _dataFilter$schema4.length) && renderQueryFilter())));
141
162
  } else if (!header && mainAction) {
142
163
  return /*#__PURE__*/React.createElement(React.Fragment, null, renderQueryFilter());
143
164
  } else if (!header && !mainAction) {
@@ -37,4 +37,11 @@ $prefix: 'teamix-pro-table-layout';
37
37
  padding: 16px;
38
38
  background: var(--panel-filter-bg, var(--color-fill1-2));
39
39
  }
40
+ &-main-action {
41
+ margin-bottom: 8px;
42
+ }
43
+ &-addon-after-wrapper {
44
+ display: flex;
45
+ align-items: center;
46
+ }
40
47
  }
@@ -11,25 +11,21 @@ var FullScreen = function FullScreen(props) {
11
11
  normalDataFilterForm = _actionRef$current.normalDataFilterForm,
12
12
  fullscreenDataFilterForm = _actionRef$current.fullscreenDataFilterForm;
13
13
 
14
- function closeByESC(e) {
14
+ var closeByESC = function closeByESC(e) {
15
15
  if (visible && e.code === 'Escape') {
16
- var _actionRef$current2, _actionRef$current2$s, _actionRef$current3, _actionRef$current3$f;
16
+ var _actionRef$current2, _actionRef$current2$f;
17
17
 
18
- actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current2 = actionRef.current) === null || _actionRef$current2 === void 0 ? void 0 : (_actionRef$current2$s = _actionRef$current2.setFullScreenState) === null || _actionRef$current2$s === void 0 ? void 0 : _actionRef$current2$s.call(_actionRef$current2, false);
19
- actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current3 = actionRef.current) === null || _actionRef$current3 === void 0 ? void 0 : (_actionRef$current3$f = _actionRef$current3.fullScreen) === null || _actionRef$current3$f === void 0 ? void 0 : _actionRef$current3$f.call(_actionRef$current3);
18
+ actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current2 = actionRef.current) === null || _actionRef$current2 === void 0 ? void 0 : (_actionRef$current2$f = _actionRef$current2.fullScreen) === null || _actionRef$current2$f === void 0 ? void 0 : _actionRef$current2$f.call(_actionRef$current2);
20
19
  }
21
- } // 监听esc按钮
20
+ }; // 监听esc按钮
22
21
 
23
22
 
24
23
  useEffect(function () {
25
- var _actionRef$current4, _actionRef$current4$s;
26
-
27
- actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current4 = actionRef.current) === null || _actionRef$current4 === void 0 ? void 0 : (_actionRef$current4$s = _actionRef$current4.setFullScreenState) === null || _actionRef$current4$s === void 0 ? void 0 : _actionRef$current4$s.call(_actionRef$current4, visible);
28
24
  window.addEventListener('keydown', closeByESC);
29
25
  return function () {
30
26
  window.removeEventListener('keydown', closeByESC);
31
27
  };
32
- }, [visible]);
28
+ }, [visible, actionRef]);
33
29
 
34
30
  var afterClose = function afterClose() {
35
31
  normalDataFilterForm === null || normalDataFilterForm === void 0 ? void 0 : normalDataFilterForm.setValues(fullscreenDataFilterForm.values);
@@ -67,9 +63,9 @@ var FullScreen = function FullScreen(props) {
67
63
  zIndex: 999
68
64
  },
69
65
  onRequestClose: function onRequestClose() {
70
- var _actionRef$current5, _actionRef$current5$f;
66
+ var _actionRef$current3, _actionRef$current3$f;
71
67
 
72
- actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current5 = actionRef.current) === null || _actionRef$current5 === void 0 ? void 0 : (_actionRef$current5$f = _actionRef$current5.fullScreen) === null || _actionRef$current5$f === void 0 ? void 0 : _actionRef$current5$f.call(_actionRef$current5);
68
+ actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current3 = actionRef.current) === null || _actionRef$current3 === void 0 ? void 0 : (_actionRef$current3$f = _actionRef$current3.fullScreen) === null || _actionRef$current3$f === void 0 ? void 0 : _actionRef$current3$f.call(_actionRef$current3);
73
69
  }
74
70
  }, /*#__PURE__*/React.createElement("div", {
75
71
  className: "teamix-pro-table-full-screen"
@@ -1,6 +1,7 @@
1
1
  .teamix-pro-table-toolbar {
2
2
  width: 100%;
3
3
  text-align: right;
4
+ margin-bottom: 8px;
4
5
  }
5
6
  .teamix-pro-table-toolbar-custom {
6
7
  display: inline-block;