table宽度计算问题,动态显示滚动条

This commit is contained in:
wanghaoo 2018-11-19 22:40:37 +08:00
parent 7e4d3447f3
commit 8c9edf4b05
6 changed files with 2261 additions and 2271 deletions

View File

@ -799,8 +799,8 @@ var Table = function (_Component) {
}
}
// 自动出现滚动条
if (_this3.contentDomWidth > _this3.contentWidth) {
tableStyle.width = _this3.contentDomWidth;
if (!fixed && _this3.contentDomWidth < _this3.contentWidth) {
tableStyle.width = _this3.contentWidth;
}
var tableBody = hasBody ? getBodyWrapper(_react2["default"].createElement(
'tbody',

15
dist/demo.css vendored
View File

@ -2420,6 +2420,9 @@ i.uf {
/*
* 选择时删除文本阴影及设置默认选中颜色
*/
::-moz-selection {
background: rgb(187,222,251);
text-shadow: none; }
::selection {
background: rgb(187,222,251);
text-shadow: none; }
@ -6669,8 +6672,7 @@ input.u-button[type="submit"] {
border-radius: 0 500px 500px 0; }
.u-pagination {
font-size: 14px;
position: relative; }
font-size: 14px; }
.u-pagination-list {
float: left;
margin: 5px; }
@ -6808,15 +6810,6 @@ input.u-button[type="submit"] {
margin: 5px; }
.u-pagination-total span {
padding: 0 5px; }
.u-pagination.u-pagination-disabled .u-pagination-disabled-mask {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 46px;
background: rgba(255, 255, 255, 0.6);
z-index: 2;
cursor: not-allowed; }
.pagination-state {
float: left;

2
dist/demo.css.map vendored

File diff suppressed because one or more lines are too long

4505
dist/demo.js vendored

File diff suppressed because one or more lines are too long

2
dist/demo.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -703,8 +703,8 @@ class Table extends Component {
}
}
// 自动出现滚动条
if (this.contentDomWidth > this.contentWidth) {
tableStyle.width = this.contentDomWidth;
if ( !fixed && this.contentDomWidth < this.contentWidth) {
tableStyle.width = this.contentWidth;
}
const tableBody = hasBody ? getBodyWrapper(
<tbody className={`${clsPrefix}-tbody`}>