From e2abf8b8dcc24c901230f4f7cd36b1739bf460d5 Mon Sep 17 00:00:00 2001 From: wanghaoo Date: Tue, 30 Oct 2018 16:40:25 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E8=A1=A8=E5=A4=B4=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E6=BB=9A=E5=8A=A8=E6=9D=A1):?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/Table.js | 15 +++++++++++++-- package.json | 2 +- 2 files changed, 14 insertions(+), 3 deletions(-) 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",