@ccs-ui/rc-pro 2.3.6-beta-2 → 2.3.6-beta-4

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.
@@ -8,8 +8,11 @@ type PropsType<T> = Pick<CcsProTableProps<T>, 'toolbar' | 'formItems' | 'formIni
8
8
  form: FormInstance<any>;
9
9
  /** table 操作栏 */
10
10
  tableOperation: ReactElement;
11
+ /** 查询 */
11
12
  onSearch: () => void;
13
+ /** header 高度改变 */
14
+ onHeaderResize: () => void;
12
15
  };
13
16
  /** 操作按钮、查询,重置、列筛选、 */
14
- declare function HeadComponent<T>({ form, title, toolbar, children, expandForm, formItems, formInitValues, formItemLabelWidth, tableOperation, onSearch, }: PropsType<T>): import("react/jsx-runtime").JSX.Element;
17
+ declare function HeadComponent<T>({ form, title, toolbar, children, expandForm, formItems, formInitValues, formItemLabelWidth, tableOperation, onSearch, onHeaderResize, }: PropsType<T>): import("react/jsx-runtime").JSX.Element;
15
18
  export default HeadComponent;
@@ -28,7 +28,8 @@ function HeadComponent(_ref) {
28
28
  formInitValues = _ref.formInitValues,
29
29
  formItemLabelWidth = _ref.formItemLabelWidth,
30
30
  tableOperation = _ref.tableOperation,
31
- onSearch = _ref.onSearch;
31
+ onSearch = _ref.onSearch,
32
+ onHeaderResize = _ref.onHeaderResize;
32
33
  var formItemsRef = useRef(null);
33
34
  // 查询条件是否展开
34
35
  var _useState = useState(expandForm),
@@ -61,6 +62,7 @@ function HeadComponent(_ref) {
61
62
  // 尺寸变化重设尺寸
62
63
  var resizeFn = _debounce(function (hm) {
63
64
  setVisible(hm);
65
+ onHeaderResize();
64
66
  }, 500);
65
67
 
66
68
  // 监听dom尺寸变化
@@ -596,6 +596,10 @@ var InternalProTable = function InternalProTable(props) {
596
596
  formInitValues: formInitValues,
597
597
  formItemLabelWidth: props.formItemLabelWidth,
598
598
  onSearch: _onSearch,
599
+ onHeaderResize: function onHeaderResize() {
600
+ var _tableRef$current2;
601
+ return (_tableRef$current2 = tableRef.current) === null || _tableRef$current2 === void 0 ? void 0 : _tableRef$current2.onFixedThead();
602
+ },
599
603
  title: props.title,
600
604
  tableOperation: (table === null || table === void 0 ? void 0 : table.hideOperation) !== true ? /*#__PURE__*/_jsx(TableOperation, {
601
605
  onChangeRowSize: function onChangeRowSize(e) {
package/es/table/index.js CHANGED
@@ -82,22 +82,27 @@ var CustomTable = function CustomTable(props) {
82
82
  if (!tableBody) return;
83
83
  var headerHeight = 0,
84
84
  pageHeight = 0,
85
- footerHeight = 0;
85
+ footerHeight = 0,
86
+ summaryHeight = 0;
86
87
  var _pagination = tableTarget.getElementsByClassName('ant-pagination');
87
88
  if (_pagination && _pagination.length > 0) {
88
89
  pageHeight = _pagination[0].clientHeight;
89
90
  }
90
91
  var header = tableTarget.getElementsByClassName('ant-table-header');
91
92
  var footer = tableTarget.getElementsByClassName('ant-table-footer');
93
+ var summary = tableTarget.getElementsByClassName('ant-table-summary');
92
94
  if (footer && footer.length > 0) {
93
95
  footerHeight = footer[0].clientHeight;
94
96
  }
95
97
  if (header && header.length > 0) {
96
98
  headerHeight = header[0].clientHeight;
97
99
  }
100
+ if (summary && summary.length > 0) {
101
+ summaryHeight = summary[0].clientHeight;
102
+ }
98
103
 
99
104
  // 计算table数据区高度
100
- var scrollHeight = (((_tableContentRef$curr = tableContentRef.current) === null || _tableContentRef$curr === void 0 ? void 0 : _tableContentRef$curr.clientHeight) || 0) - headerHeight - pageHeight - footerHeight;
105
+ var scrollHeight = (((_tableContentRef$curr = tableContentRef.current) === null || _tableContentRef$curr === void 0 ? void 0 : _tableContentRef$curr.clientHeight) || 0) - headerHeight - pageHeight - footerHeight - summaryHeight;
101
106
 
102
107
  // 固定tbody高度
103
108
  tableBody.style.height = "".concat(scrollHeight, "px");
@@ -174,6 +174,7 @@
174
174
 
175
175
  .ccs-tabs-auto-height {
176
176
  flex: 1 1 auto;
177
+ overflow: hidden;
177
178
  > .ant-tabs-content-holder {
178
179
  height: 100%;
179
180
  > .ant-tabs-content {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ccs-ui/rc-pro",
3
- "version": "2.3.6-beta-2",
3
+ "version": "2.3.6-beta-4",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "author": {