没有数据时不显示表体滚动条

This commit is contained in:
wanghaoo 2018-12-06 15:14:42 +08:00
parent 92df6ea14b
commit 168fd8ed69
4 changed files with 10 additions and 2 deletions

4
dist/demo.js vendored
View File

@ -11334,6 +11334,10 @@
//表格元素的宽度大于容器的宽度也显示滚动条
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';
}

2
dist/demo.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{
"name": "bee-table",
"version": "1.6.9",
"version": "1.6.10-beta.0",
"description": "Table ui component for react",
"keywords": [
"react",

View File

@ -661,6 +661,10 @@ class Table extends 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';
}