没有数据时不显示表体滚动条
This commit is contained in:
parent
92df6ea14b
commit
168fd8ed69
|
@ -11334,6 +11334,10 @@
|
||||||
//表格元素的宽度大于容器的宽度也显示滚动条
|
//表格元素的宽度大于容器的宽度也显示滚动条
|
||||||
if (scroll.x || fixed || this.contentDomWidth < this.contentWidth) {
|
if (scroll.x || fixed || this.contentDomWidth < this.contentWidth) {
|
||||||
tableClassName = clsPrefix + '-fixed';
|
tableClassName = clsPrefix + '-fixed';
|
||||||
|
//没有数据并且含有顶部菜单时
|
||||||
|
if (this.props.data.length == 0 && this.props.headerScroll) {
|
||||||
|
bodyStyle.overflowX = 'hidden';
|
||||||
|
}
|
||||||
if (!footerScroll) {
|
if (!footerScroll) {
|
||||||
bodyStyle.overflowX = bodyStyle.overflowX || 'auto';
|
bodyStyle.overflowX = bodyStyle.overflowX || 'auto';
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "bee-table",
|
"name": "bee-table",
|
||||||
"version": "1.6.9",
|
"version": "1.6.10-beta.0",
|
||||||
"description": "Table ui component for react",
|
"description": "Table ui component for react",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"react",
|
"react",
|
||||||
|
|
|
@ -661,6 +661,10 @@ class Table extends Component {
|
||||||
//表格元素的宽度大于容器的宽度也显示滚动条
|
//表格元素的宽度大于容器的宽度也显示滚动条
|
||||||
if (scroll.x || fixed || this.contentDomWidth < this.contentWidth) {
|
if (scroll.x || fixed || this.contentDomWidth < this.contentWidth) {
|
||||||
tableClassName = `${clsPrefix}-fixed`;
|
tableClassName = `${clsPrefix}-fixed`;
|
||||||
|
//没有数据并且含有顶部菜单时
|
||||||
|
if(this.props.data.length == 0 && this.props.headerScroll ){
|
||||||
|
bodyStyle.overflowX = 'hidden';
|
||||||
|
}
|
||||||
if (!footerScroll) {
|
if (!footerScroll) {
|
||||||
bodyStyle.overflowX = bodyStyle.overflowX || 'auto';
|
bodyStyle.overflowX = bodyStyle.overflowX || 'auto';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue