diff --git a/build/Table.js b/build/Table.js index aaafe0c..cc94f35 100644 --- a/build/Table.js +++ b/build/Table.js @@ -766,6 +766,10 @@ var Table = function (_Component) { //表格元素的宽度大于容器的宽度也显示滚动条 if (scroll.x || fixed || this.contentDomWidth < this.contentWidth) { tableClassName = clsPrefix + '-fixed'; + //没有数据并且含有顶部菜单时 + if (this.props.data.length == 0 && this.props.headerScroll) { + bodyStyle.overflowX = 'hidden'; + } if (!footerScroll) { bodyStyle.overflowX = bodyStyle.overflowX || 'auto'; }