@teamix/pro 1.2.26 → 1.2.30

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 (75) hide show
  1. package/dist/212.js +129 -129
  2. package/dist/pro.css +1 -1
  3. package/dist/pro.js +18415 -16897
  4. package/dist/pro.min.css +1 -1
  5. package/dist/pro.min.js +1 -1
  6. package/dist/pro.min.js.LICENSE.txt +2 -0
  7. package/es/actions/index.d.ts +2 -3
  8. package/es/actions/index.js +15 -19
  9. package/es/form/Filter/AdvancedFilter.js +1 -1
  10. package/es/form/Filter/Layout.d.ts +5 -0
  11. package/es/form/Filter/Layout.js +82 -0
  12. package/es/form/Filter/SimpleFilter.js +30 -6
  13. package/es/form/Filter/index2.d.ts +2 -1
  14. package/es/form/Filter/index2.js +97 -116
  15. package/es/form/Filter/index2.scss +16 -45
  16. package/es/form/Filter/layout.scss +36 -0
  17. package/es/form/Filter/useSpecialProps.d.ts +6 -0
  18. package/es/form/Filter/useSpecialProps.js +37 -0
  19. package/es/form/ProForm/customComponent.d.ts +3 -0
  20. package/es/form/ProForm/customComponent.js +20 -0
  21. package/es/form/ProForm/index.scss +5 -6
  22. package/es/form/ProForm/useFormDisplayValues.js +14 -24
  23. package/es/form/SchemaForm/adapterType.js +1 -0
  24. package/es/form/fieldTypeMap.js +2 -1
  25. package/es/form/index.d.ts +4 -2
  26. package/es/form/index.js +4 -2
  27. package/es/form/typing.d.ts +25 -1
  28. package/es/index.d.ts +1 -1
  29. package/es/index.js +1 -1
  30. package/es/info/index.scss +1 -1
  31. package/es/nocode/pages/renderer.js +1 -1
  32. package/es/table/components/Layout/index.js +74 -163
  33. package/es/table/components/Layout/index.scss +4 -3
  34. package/es/table/components/Pagination/index.js +1 -0
  35. package/es/table/components/ToolBar/FullScreenIcon.js +4 -9
  36. package/es/table/components/ToolBar/Fullscreen.js +21 -11
  37. package/es/table/index.js +84 -102
  38. package/es/table/index.scss +4 -0
  39. package/es/table/typing.d.ts +12 -10
  40. package/es/table/utils/columnRender.js +21 -3
  41. package/lib/actions/index.d.ts +2 -3
  42. package/lib/actions/index.js +15 -19
  43. package/lib/form/Filter/AdvancedFilter.js +1 -1
  44. package/lib/form/Filter/Layout.d.ts +5 -0
  45. package/lib/form/Filter/Layout.js +102 -0
  46. package/lib/form/Filter/SimpleFilter.js +29 -4
  47. package/lib/form/Filter/index2.d.ts +2 -1
  48. package/lib/form/Filter/index2.js +101 -114
  49. package/lib/form/Filter/index2.scss +16 -45
  50. package/lib/form/Filter/layout.scss +36 -0
  51. package/lib/form/Filter/useSpecialProps.d.ts +6 -0
  52. package/lib/form/Filter/useSpecialProps.js +46 -0
  53. package/lib/form/ProForm/customComponent.d.ts +3 -0
  54. package/lib/form/ProForm/customComponent.js +28 -0
  55. package/lib/form/ProForm/index.scss +5 -6
  56. package/lib/form/ProForm/useFormDisplayValues.js +17 -24
  57. package/lib/form/SchemaForm/adapterType.js +1 -0
  58. package/lib/form/fieldTypeMap.js +2 -1
  59. package/lib/form/index.d.ts +4 -2
  60. package/lib/form/index.js +19 -1
  61. package/lib/form/typing.d.ts +25 -1
  62. package/lib/index.d.ts +1 -1
  63. package/lib/index.js +1 -1
  64. package/lib/info/index.scss +1 -1
  65. package/lib/nocode/pages/renderer.js +1 -1
  66. package/lib/table/components/Layout/index.js +72 -163
  67. package/lib/table/components/Layout/index.scss +4 -3
  68. package/lib/table/components/Pagination/index.js +1 -0
  69. package/lib/table/components/ToolBar/FullScreenIcon.js +4 -9
  70. package/lib/table/components/ToolBar/Fullscreen.js +22 -11
  71. package/lib/table/index.js +81 -100
  72. package/lib/table/index.scss +4 -0
  73. package/lib/table/typing.d.ts +12 -10
  74. package/lib/table/utils/columnRender.js +21 -3
  75. package/package.json +4 -4
@@ -38,8 +38,6 @@ var _form = require("../form");
38
38
 
39
39
  var _actions = require("../actions");
40
40
 
41
- var _lodash = _interopRequireDefault(require("lodash.debounce"));
42
-
43
41
  var _classnames = _interopRequireDefault(require("classnames"));
44
42
 
45
43
  var _pageContainer = _interopRequireDefault(require("../page-container"));
@@ -98,7 +96,9 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
98
96
  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; }
99
97
 
100
98
  var cls = (0, _utils.baseClass)('teamix-pro-table');
101
- var toJS = _form.formilyReactive.toJS;
99
+ var toJS = _form.formilyReactive.toJS; // 判断是否是 root 组织
100
+
101
+ var isRoot = (0, _utils.getCookie)('organizationId') === '1';
102
102
  /**
103
103
  * 处理原生传入的 columns 以便于 选择列 方便处理
104
104
  * @param columns 原生传入的 columns
@@ -106,14 +106,24 @@ var toJS = _form.formilyReactive.toJS;
106
106
  */
107
107
 
108
108
  var processColumns = function processColumns(columns, initialColumns) {
109
+ var _filterColumns;
110
+
109
111
  var filterColumns = columns.filter(function (item) {
110
112
  return item.columnFilters !== false;
111
- }); // 处理只剩一列批量选择的情况下宽度错乱问题
113
+ });
114
+
115
+ if (isRoot) {
116
+ // root 组织下不显示标签管理
117
+ filterColumns = filterColumns.filter(function (item) {
118
+ return item.valueType !== 'selectGroup';
119
+ });
120
+ } // 处理只剩一列批量选择的情况下宽度错乱问题
121
+
112
122
 
113
- if (filterColumns === null || filterColumns === void 0 ? void 0 : filterColumns.length) {
114
- var _initialColumns$;
123
+ if ((_filterColumns = filterColumns) === null || _filterColumns === void 0 ? void 0 : _filterColumns.length) {
124
+ var _filterColumns2, _initialColumns$;
115
125
 
116
- if ((filterColumns === null || filterColumns === void 0 ? void 0 : filterColumns.length) === 1) {
126
+ if (((_filterColumns2 = filterColumns) === null || _filterColumns2 === void 0 ? void 0 : _filterColumns2.length) === 1) {
117
127
  var _filterColumns$, _filterColumns$2;
118
128
 
119
129
  if ((_filterColumns$ = filterColumns[0]) === null || _filterColumns$ === void 0 ? void 0 : _filterColumns$.width) {
@@ -155,7 +165,7 @@ var globalFormatSort = function globalFormatSort(sort) {
155
165
  };
156
166
 
157
167
  var ProTable = function ProTable(props) {
158
- var _rowSelection$selecte;
168
+ var _rowSelection$selecte, _dataFilterForm4;
159
169
 
160
170
  var header = props.header,
161
171
  className = props.className,
@@ -253,10 +263,8 @@ var ProTable = function ProTable(props) {
253
263
  var _useState13 = (0, _react.useState)(true),
254
264
  _useState14 = _slicedToArray(_useState13, 2),
255
265
  customTableLoading = _useState14[0],
256
- setCustomTableLoading = _useState14[1]; // 用于存放 Search 组件之前值的 ref
257
-
266
+ setCustomTableLoading = _useState14[1];
258
267
 
259
- var searchValueRef = (0, _react.useRef)('');
260
268
  var tableRef = (0, _react.useRef)(null);
261
269
  var actionRef = (0, _react.useRef)(); // 传给 table 的过滤后的 columns
262
270
 
@@ -306,20 +314,23 @@ var ProTable = function ProTable(props) {
306
314
  var _useState23 = (0, _react.useState)(false),
307
315
  _useState24 = _slicedToArray(_useState23, 2),
308
316
  fullscreenState = _useState24[0],
309
- setFullscreenState = _useState24[1]; // 整个内容区是否超过一屏。用于表格在非全屏模式下的吸底
317
+ setFullscreenState = _useState24[1]; // 非全屏状态下的
318
+
319
+
320
+ var normalDataFilterFormRef = (0, _react.useRef)();
321
+ var fullscreenDataFilterFormRef = (0, _react.useRef)();
322
+ var normalDataFilterForm = normalDataFilterFormRef.current;
323
+ var fullscreenDataFilterForm = fullscreenDataFilterFormRef.current; // 传给 QueryFilter 的 formRef
310
324
 
325
+ var dataFilterFormRef = !fullscreenState ? normalDataFilterFormRef : fullscreenDataFilterFormRef;
326
+ var dataFilterForm = dataFilterFormRef.current; // 整个内容区是否超过一屏。用于表格在非全屏模式下的吸底
311
327
 
312
328
  var _useState25 = (0, _react.useState)(false),
313
329
  _useState26 = _slicedToArray(_useState25, 2),
314
330
  footerSuctionState = _useState26[0],
315
- setFooterSuctionState = _useState26[1];
316
- /** 筛选区域 form */
331
+ setFooterSuctionState = _useState26[1]; // TODO 获取内容区是否超出一屏(暂时仅支持全家桶)
317
332
 
318
333
 
319
- var dataFilterForm = (0, _react.useMemo)(function () {
320
- return (0, _form.createForm)();
321
- }, []); // TODO 获取内容区是否超出一屏(暂时仅支持全家桶)
322
-
323
334
  var getFooterSuctionState = function getFooterSuctionState() {
324
335
  var containerDom = document.querySelector('.teamix-pro-page-container-scroll-container');
325
336
 
@@ -471,26 +482,24 @@ var ProTable = function ProTable(props) {
471
482
  return _request(params);
472
483
  },
473
484
  request: function request(params) {
474
- if (dataFilterForm.validate()) {
475
- // 如果请求中还有翻页相关信息,需要自动设置到指定页
476
- if (params === null || params === void 0 ? void 0 : params[targetPageKey]) {
477
- setCurrentPage(params[targetPageKey]);
478
- }
479
-
480
- if (params === null || params === void 0 ? void 0 : params[targetPageSizeKey]) {
481
- setPageSize(params[targetPageSizeKey]);
482
- }
485
+ // 如果请求中还有翻页相关信息,需要自动设置到指定页
486
+ if (params === null || params === void 0 ? void 0 : params[targetPageKey]) {
487
+ setCurrentPage(params[targetPageKey]);
488
+ }
483
489
 
484
- _request(params);
490
+ if (params === null || params === void 0 ? void 0 : params[targetPageSizeKey]) {
491
+ setPageSize(params[targetPageSizeKey]);
485
492
  }
493
+
494
+ _request(params);
486
495
  },
487
496
  reset: function reset() {
488
- var _actionRef$current3, _actionRef$current3$s;
497
+ var _actionRef$current3, _actionRef$current3$s, _dataFilterForm;
489
498
 
490
499
  (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onReset) && (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onReset()); // 清空列过滤参数
491
500
 
492
501
  (_actionRef$current3 = actionRef.current) === null || _actionRef$current3 === void 0 ? void 0 : (_actionRef$current3$s = _actionRef$current3.setFilterRules) === null || _actionRef$current3$s === void 0 ? void 0 : _actionRef$current3$s.call(_actionRef$current3, {});
493
- dataFilterForm.reset();
502
+ (_dataFilterForm = dataFilterForm) === null || _dataFilterForm === void 0 ? void 0 : _dataFilterForm.reset();
494
503
  setCurrentPage(1);
495
504
 
496
505
  _request(_defineProperty({}, targetPageKey, 1));
@@ -513,6 +522,8 @@ var ProTable = function ProTable(props) {
513
522
  },
514
523
  data: data,
515
524
  dataFilterForm: dataFilterForm,
525
+ normalDataFilterForm: normalDataFilterForm,
526
+ fullscreenDataFilterForm: fullscreenDataFilterForm,
516
527
  resetTableMaxBodyHeight: function resetTableMaxBodyHeight() {
517
528
  getHeaderHeight().then(function (height) {
518
529
  setHeaderHeight(height);
@@ -602,7 +613,7 @@ var ProTable = function ProTable(props) {
602
613
  }); // 请求函数
603
614
 
604
615
  function _request(params, noLoading) {
605
- var _actionRef$current$ge, _actionRef$current4, _actionRef$current4$g, _objectSpread2;
616
+ var _dataFilterForm2, _actionRef$current$ge, _actionRef$current4, _actionRef$current4$g, _objectSpread2;
606
617
 
607
618
  // 如果没有传 url 且没有 customRequest,直接返回
608
619
  if (!url && !customRequest) {
@@ -615,7 +626,7 @@ var ProTable = function ProTable(props) {
615
626
 
616
627
  var sortParams = targetFormatSort(sort); // 筛选区请求参数
617
628
 
618
- var dataFilterParams = toJS(dataFilterForm.values); // 列过滤请求参数
629
+ var dataFilterParams = toJS((_dataFilterForm2 = dataFilterForm) === null || _dataFilterForm2 === void 0 ? void 0 : _dataFilterForm2.values); // 列过滤请求参数
619
630
 
620
631
  var columnsFilterParams = (_actionRef$current$ge = (_actionRef$current4 = actionRef.current) === null || _actionRef$current4 === void 0 ? void 0 : (_actionRef$current4$g = _actionRef$current4.getFilterRules) === null || _actionRef$current4$g === void 0 ? void 0 : _actionRef$current4$g.call(_actionRef$current4)) !== null && _actionRef$current$ge !== void 0 ? _actionRef$current$ge : {}; // 格式化后的请求参数
621
632
 
@@ -667,7 +678,8 @@ var ProTable = function ProTable(props) {
667
678
 
668
679
  (0, _react.useEffect)(function () {
669
680
  // 初始化 actionRef state、callback 此时 actionRef 已初始化完成
670
- (0, _utils2.initActionRef)(); // 监听 浏览器变化 更吸底状态
681
+ (0, _utils2.initActionRef)();
682
+ dataFilterForm = dataFilterFormRef.current; // 监听 浏览器变化 更吸底状态
671
683
 
672
684
  if (footerSuction) {
673
685
  getFooterSuctionState();
@@ -677,19 +689,21 @@ var ProTable = function ProTable(props) {
677
689
  };
678
690
  }
679
691
 
680
- if (requestWhenMount) {
681
- // 在请求发送之前 处理漏斗默认数据
682
- (0, _utils2.processDefaultFilter)(propsColumns, actionRef, defaultFilterParams);
692
+ if (propsDataFilter) {
693
+ var _dataFilterForm3;
683
694
 
684
- _request();
685
- }
695
+ if (requestWhenMount && ((_dataFilterForm3 = dataFilterForm) === null || _dataFilterForm3 === void 0 ? void 0 : _dataFilterForm3.id)) {
696
+ // 在请求发送之前 处理漏斗默认数据
697
+ (0, _utils2.processDefaultFilter)(propsColumns, actionRef, defaultFilterParams);
686
698
 
687
- var searchName = getSearchName();
699
+ _request();
700
+ }
701
+ } else {
702
+ if (requestWhenMount) {
703
+ (0, _utils2.processDefaultFilter)(propsColumns, actionRef, defaultFilterParams);
688
704
 
689
- if (searchName) {
690
- // 如果有初始值,需要赋值
691
- var initialValues = toJS(dataFilterForm.initialValues);
692
- searchValueRef.current = initialValues[searchName][1];
705
+ _request();
706
+ }
693
707
  }
694
708
 
695
709
  return function () {
@@ -703,7 +717,7 @@ var ProTable = function ProTable(props) {
703
717
 
704
718
  actionRef.current = undefined;
705
719
  };
706
- }, []);
720
+ }, [(_dataFilterForm4 = dataFilterForm) === null || _dataFilterForm4 === void 0 ? void 0 : _dataFilterForm4.id]);
707
721
 
708
722
  function onSort(dataIndex, order) {
709
723
  var nextSort = _defineProperty({}, dataIndex, order);
@@ -711,62 +725,27 @@ var ProTable = function ProTable(props) {
711
725
  setSort(nextSort);
712
726
 
713
727
  _request(targetFormatSort(nextSort));
714
- } // 找到 Search 组件对应的 name
715
-
716
-
717
- var getSearchName = function getSearchName() {
718
- var _dataFilter$schema;
719
-
720
- if ((dataFilter === null || dataFilter === void 0 ? void 0 : dataFilter.schema) && ((_dataFilter$schema = dataFilter.schema) === null || _dataFilter$schema === void 0 ? void 0 : _dataFilter$schema.length) > 0) {
721
- var searchSchema = dataFilter.schema.find(function (item) {
722
- return item.component === 'Search';
723
- });
724
-
725
- if (searchSchema) {
726
- var searchName = searchSchema.name;
727
- return searchName;
728
- }
729
- }
730
- }; // 处理 dataFilter 中的 onFilter、onReset
728
+ } // 处理 dataFilter 中的 onFilter、onReset
731
729
 
732
730
 
733
731
  var dataFilter = _objectSpread(_objectSpread({
734
732
  mode: 'inline'
735
733
  }, propsDataFilter), {}, {
736
- onFilter: (0, _lodash.default)(function (values) {
737
- (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onFilter) && (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onFilter(values));
738
-
739
- if (dataFilterForm.validate()) {
740
- var _actionRef$current5, _actionRef$current5$c;
741
-
742
- /**
743
- * 针对 inline 模式下的 Search 组件做特殊处理
744
- * 当切换条件且输入内容为空的时候,类似[a, ''] => [b, ''] 不触发请求
745
- */
746
- if (dataFilter.mode === 'inline') {
747
- var searchName = getSearchName();
748
-
749
- if (searchName) {
750
- var searchValue = values[searchName][1];
734
+ onFilter: function onFilter(values) {
735
+ var _actionRef$current5, _actionRef$current5$c;
751
736
 
752
- if (searchValue === (searchValueRef === null || searchValueRef === void 0 ? void 0 : searchValueRef.current)) {
753
- return;
754
- }
737
+ (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onFilter) && (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onFilter(values)); // 搜索变化时,暂时先清空选择
755
738
 
756
- searchValueRef.current = searchValue;
757
- }
758
- } // 搜索变化时,暂时先清空选择
759
-
760
-
761
- (_actionRef$current5 = actionRef.current) === null || _actionRef$current5 === void 0 ? void 0 : (_actionRef$current5$c = _actionRef$current5.clearRowSelection) === null || _actionRef$current5$c === void 0 ? void 0 : _actionRef$current5$c.call(_actionRef$current5);
762
- setCurrentPage(1);
739
+ (_actionRef$current5 = actionRef.current) === null || _actionRef$current5 === void 0 ? void 0 : (_actionRef$current5$c = _actionRef$current5.clearRowSelection) === null || _actionRef$current5$c === void 0 ? void 0 : _actionRef$current5$c.call(_actionRef$current5);
740
+ setCurrentPage(1);
763
741
 
764
- _request(_defineProperty({}, targetPageKey, 1));
765
- }
766
- }, filterDebounce),
742
+ _request(_defineProperty({}, targetPageKey, 1));
743
+ },
767
744
  onReset: function onReset() {
745
+ var _dataFilterForm5;
746
+
768
747
  (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onReset) && (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onReset());
769
- dataFilterForm.reset();
748
+ (_dataFilterForm5 = dataFilterForm) === null || _dataFilterForm5 === void 0 ? void 0 : _dataFilterForm5.reset();
770
749
  setCurrentPage(1);
771
750
 
772
751
  _request(_defineProperty({}, targetPageKey, 1));
@@ -781,7 +760,7 @@ var ProTable = function ProTable(props) {
781
760
  }
782
761
  };
783
762
 
784
- var renderTable = function renderTable() {
763
+ var renderTable = function renderTable(isFullScreen) {
785
764
  if (propsColumns) {
786
765
  return /*#__PURE__*/_react.default.createElement("div", {
787
766
  className: (0, _classnames.default)('teamix-pro-table-container', className)
@@ -793,7 +772,7 @@ var ProTable = function ProTable(props) {
793
772
  actionRef: actionRef,
794
773
  columns: propsColumns,
795
774
  dataFilter: dataFilter,
796
- dataFilterForm: dataFilterForm,
775
+ dataFilterFormRef: isFullScreen ? fullscreenDataFilterFormRef : normalDataFilterFormRef,
797
776
  rowSelection: rowSelection,
798
777
  filterColumnType: filterColumnType
799
778
  }), /*#__PURE__*/_react.default.createElement(_components.Table.StickyLock, _objectSpread({
@@ -938,14 +917,16 @@ var ProTable = function ProTable(props) {
938
917
  return /*#__PURE__*/_react.default.createElement(_Fullscreen.default, {
939
918
  visible: fullscreenState,
940
919
  actionRef: actionRef
941
- }, /*#__PURE__*/_react.default.createElement("div", {
942
- className: cls({
943
- '': true,
944
- fullscreen: fullscreenState // 'footer-suction': footerSuctionState && footerSuction,
945
-
946
- }),
947
- ref: tableRef
948
- }, renderTable(), footerSuctionState && footerSuction && !fullscreenState && /*#__PURE__*/_react.default.createElement(_pageContainer.default.FixedFooter, null, renderFooter()), !(footerSuctionState && footerSuction) && !fullscreenState && renderFooter(), fullscreenState && renderFooter()));
920
+ }, function (isFullScreen) {
921
+ return /*#__PURE__*/_react.default.createElement("div", {
922
+ className: cls({
923
+ '': true,
924
+ fullscreen: fullscreenState // 'footer-suction': footerSuctionState && footerSuction,
925
+
926
+ }),
927
+ ref: tableRef
928
+ }, renderTable(isFullScreen), footerSuctionState && footerSuction && !fullscreenState && /*#__PURE__*/_react.default.createElement(_pageContainer.default.FixedFooter, null, renderFooter()), !(footerSuctionState && footerSuction) && !fullscreenState && renderFooter(), fullscreenState && renderFooter());
929
+ });
949
930
  };
950
931
 
951
932
  var _default = ProTable;
@@ -114,4 +114,8 @@ $fullscreenPadding: 24px;
114
114
  // 后面在基础组件里面覆盖
115
115
  .next-table.next-table td .next-table-cell-wrapper {
116
116
  text-overflow: unset;
117
+ }
118
+
119
+ .mb8 {
120
+ margin-bottom: 8px;
117
121
  }
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import { ColumnProps, TableProps } from '@alicloudfe/components/types/table';
5
5
  import { ProFieldType, ProFieldRenderProps, ProFieldDataSourceItem } from '../field';
6
- import { IFilterProps } from '../form';
6
+ import { QueryFilterProps } from '../form';
7
7
  import { ProActionGroupProps, ProActionButtonProps } from '../actions';
8
8
  import { PaginationProps } from '@alicloudfe/components/types/pagination';
9
9
  import { HeaderProps as ProTableHeaderProps } from '@teamix/utils';
@@ -56,6 +56,8 @@ export declare type ProTableColumnProps = {
56
56
  dataIndex?: string | string[];
57
57
  /** 指定 valueType 为日期时间格式时,可以格式化日期时间 */
58
58
  format?: string;
59
+ /** ProField 其他配置项 */
60
+ props?: any;
59
61
  } & Omit<ColumnProps, 'filters' | 'dataIndex' | 'filtersMode'>;
60
62
  export declare type ProColumnProps = ProTableColumnProps;
61
63
  export declare type ProTableProps = {
@@ -105,7 +107,10 @@ export declare type ProTableProps = {
105
107
  footerAction?: ProActionGroupProps | React.ReactNode;
106
108
  /** 表格底部(右层)配置 */
107
109
  footer?: React.ReactNode;
108
- /** 筛选区自动搜索的防抖时间(毫秒) */
110
+ /**
111
+ * @deprecated 已废弃 建议用 dataFilter 中的 filterDebounce 代替
112
+ * 筛选区自动搜索的防抖时间(毫秒)
113
+ */
109
114
  filterDebounce?: number;
110
115
  /** ProTable action 的引用,便于手动触发一些方法 */
111
116
  actionRef?: React.MutableRefObject<ProTableActionType | undefined>;
@@ -185,6 +190,8 @@ export declare type ProTableActionType = {
185
190
  resetPage?: () => void;
186
191
  /** 获取数据过滤区表单实例 */
187
192
  dataFilterForm?: FormType;
193
+ normalDataFilterForm?: FormType;
194
+ fullscreenDataFilterForm?: FormType;
188
195
  /** 表格当前的数据 */
189
196
  data?: any[];
190
197
  } & ProTableActionTypeMutations;
@@ -219,17 +226,12 @@ export declare type ProTableActionTypeState = {
219
226
  [key: string]: any;
220
227
  };
221
228
  export declare type ProTableDataFilterProps = {
222
- /** 展示形式 */
223
- mode?: 'inline' | 'panel';
224
- /** mode='panel' 时是否默认展开 */
225
- expand?: boolean;
226
- /** 搜索时是否传入值为undefined的参数,默认不传 */
227
229
  searchUndefined?: boolean;
228
230
  /** 搜索时是否传入值为空字符串的参数,默认不传 */
229
231
  searchEmptyString?: boolean;
230
232
  /** 自定义内容 */
231
233
  content?: React.ReactNode;
232
- } & IFilterProps;
234
+ } & QueryFilterProps;
233
235
  export declare type dataFilterProps = ProTableDataFilterProps;
234
236
  export declare type ProTableTopAreaProps = {
235
237
  /** 标题区 */
@@ -242,8 +244,8 @@ export declare type ProTableTopAreaProps = {
242
244
  extra?: ProActionButtonProps | React.ReactNode | React.ReactNode[];
243
245
  /** 数据过滤区 */
244
246
  dataFilter?: ProTableDataFilterProps;
245
- /** 数据过滤区 form 表单模型 */
246
- dataFilterForm?: FormType;
247
+ /** 传给 QueryFilter formRef */
248
+ dataFilterFormRef?: any;
247
249
  /** 排序、筛选列展示状态 */
248
250
  filterColumnType?: 'dialog' | 'dropdown' | 'auto';
249
251
  };
@@ -145,7 +145,8 @@ var renderCell = function renderCell(value, item, index, record, actionRef) {
145
145
  }
146
146
 
147
147
  var newRender = null;
148
- var newDataSource = null; // 如果 render 直接传函数
148
+ var newDataSource = null;
149
+ var props = item.props; // 如果 render 直接传函数
149
150
 
150
151
  if (typeof render === 'function') {
151
152
  newRender = function newRender() {
@@ -153,6 +154,23 @@ var renderCell = function renderCell(value, item, index, record, actionRef) {
153
154
  };
154
155
  } else {
155
156
  newRender = processBuriedPoint(processRenderFunction(render, value, index, record), record, value, index);
157
+
158
+ if (valueType === 'selectGroup') {
159
+ newRender = _objectSpread(_objectSpread({
160
+ maxShowNumber: 1,
161
+ foldText: 'more',
162
+ editOnClick: function editOnClick() {},
163
+ edit: true
164
+ }, newRender), {}, {
165
+ ellipsis: false
166
+ });
167
+ props = _objectSpread({
168
+ valueAlias: {
169
+ value: 'TagValue',
170
+ key: 'TagKey'
171
+ }
172
+ }, props);
173
+ }
156
174
  } // 渲染操作组
157
175
 
158
176
 
@@ -195,13 +213,13 @@ var renderCell = function renderCell(value, item, index, record, actionRef) {
195
213
  } // 渲染 ProField
196
214
 
197
215
 
198
- return /*#__PURE__*/_react.default.createElement(_field.default, {
216
+ return /*#__PURE__*/_react.default.createElement(_field.default, _objectSpread({
199
217
  type: valueType || 'text',
200
218
  value: value,
201
219
  render: newRender,
202
220
  dataSource: newDataSource,
203
221
  format: format
204
- });
222
+ }, props));
205
223
  };
206
224
  /**
207
225
  * 处理 render 配置项是函数的情况
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamix/pro",
3
- "version": "1.2.26",
3
+ "version": "1.2.30",
4
4
  "description": "TeamixPro大包",
5
5
  "repository": "http://gitlab.alibaba-inc.com/teamix/pro",
6
6
  "author": "Velociraptor(迅猛龙)",
@@ -22,9 +22,9 @@
22
22
  ],
23
23
  "private": false,
24
24
  "dependencies": {
25
- "@formily/core": "2.0.5",
26
- "@formily/react": "2.0.5",
27
- "@teamix/formily": "2.0.5-2",
25
+ "@formily/core": "2.0.8",
26
+ "@formily/react": "2.0.8",
27
+ "@teamix/formily": "2.0.8",
28
28
  "@teamix/hooks": "^0.1.0",
29
29
  "@teamix/pop-confirm": "^1.2.4",
30
30
  "@teamix/pro-field": "^1.0.0",