diff --git a/build/Table.js b/build/Table.js index 4bd42bd..cc1848a 100644 --- a/build/Table.js +++ b/build/Table.js @@ -707,7 +707,8 @@ var Table = function (_Component) { _props3$scroll = _props3.scroll, scroll = _props3$scroll === undefined ? {} : _props3$scroll, getBodyWrapper = _props3.getBodyWrapper, - footerScroll = _props3.footerScroll; + footerScroll = _props3.footerScroll, + headerScroll = _props3.headerScroll; var useFixedHeader = this.props.useFixedHeader; var bodyStyle = _extends({}, this.props.bodyStyle); @@ -739,8 +740,18 @@ var Table = function (_Component) { // Add negative margin bottom for scroll bar overflow bug var scrollbarWidth = (0, _utils.measureScrollbar)(); if (scrollbarWidth >= 0) { - (fixed ? bodyStyle : headStyle).marginBottom = '-' + scrollbarWidth + 'px'; (fixed ? bodyStyle : headStyle).paddingBottom = '0px'; + //显示表头滚动条 + if (headerScroll) { + if (fixed) { + bodyStyle.marginBottom = '-' + scrollbarWidth + 'px'; + headStyle.marginBottom = scrollbarWidth + 'px'; + } else { + headStyle.marginBottom = '0px'; + } + } else { + (fixed ? bodyStyle : headStyle).marginBottom = '-' + scrollbarWidth + 'px'; + } } } diff --git a/package.json b/package.json index 31daf79..ab99ee7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bee-table", - "version": "1.4.30", + "version": "1.4.31", "description": "Table ui component for react", "keywords": [ "react",