diff --git a/build/Table.css b/build/Table.css index c0cf85e..6cbca3a 100644 --- a/build/Table.css +++ b/build/Table.css @@ -405,12 +405,15 @@ position: relative; } .u-table-filter-column-filter-icon { position: absolute; - top: 6px; - right: 3px; - width: 30px; - height: 30px; - line-height: 30px; - z-index: 2; } + top: 3px; + right: 2px; + width: 25px; + height: 38px; + line-height: 38px; + z-index: 2; + background: #f7f7f7; } + .u-table-filter-column-filter-iconi.uf { + padding: 0px; } .u-table-filter-column-pop-cont-item { margin-top: 10px; line-height: 30px; diff --git a/build/Table.js b/build/Table.js index 433d42d..4bd42bd 100644 --- a/build/Table.js +++ b/build/Table.js @@ -429,7 +429,7 @@ var Table = function (_Component) { drgHover: column.drgHover, fixed: column.fixed, width: column.width, - dataIndex: column.dataIndex + dataindex: column.dataIndex }; if (column.onHeadCellClick) { cell.onClick = column.onHeadCellClick; @@ -712,6 +712,7 @@ var Table = function (_Component) { var bodyStyle = _extends({}, this.props.bodyStyle); var headStyle = {}; + var innerBodyStyle = {}; var tableClassName = ''; //表格元素的宽度大于容器的宽度也显示滚动条 @@ -726,7 +727,9 @@ var Table = function (_Component) { // maxHeight will make fixed-Table scrolling not working // so we only set maxHeight to body-Table here if (fixed) { - bodyStyle.height = bodyStyle.height || scroll.y; + // bodyStyle.height = bodyStyle.height || scroll.y; + innerBodyStyle.maxHeight = bodyStyle.maxHeight || scroll.y; + innerBodyStyle.overflowY = bodyStyle.overflowY || 'auto'; } else { bodyStyle.maxHeight = bodyStyle.maxHeight || scroll.y; } @@ -756,7 +759,6 @@ var Table = function (_Component) { } // 自动出现滚动条 if (_this3.contentDomWidth > _this3.contentWidth) { - console.log(_this3.contentDomWidth); tableStyle.width = _this3.contentDomWidth; } var tableBody = hasBody ? getBodyWrapper(_react2["default"].createElement( @@ -822,6 +824,7 @@ var Table = function (_Component) { _react2["default"].createElement( 'div', { + style: _extends({}, innerBodyStyle), className: clsPrefix + '-body-inner', ref: refName, onMouseOver: this.detectScrollTarget, @@ -1027,11 +1030,6 @@ var Table = function (_Component) { _react2["default"].createElement( 'div', { className: clsPrefix + '-content' }, - this.columnManager.isAnyColumnsLeftFixed() && _react2["default"].createElement( - 'div', - { className: clsPrefix + '-fixed-left' }, - this.getLeftFixedTable() - ), _react2["default"].createElement( 'div', { className: isTableScroll ? clsPrefix + '-scroll' : '' }, @@ -1039,6 +1037,11 @@ var Table = function (_Component) { this.getEmptyText(), this.getFooter() ), + this.columnManager.isAnyColumnsLeftFixed() && _react2["default"].createElement( + 'div', + { className: clsPrefix + '-fixed-left' }, + this.getLeftFixedTable() + ), this.columnManager.isAnyColumnsRightFixed() && _react2["default"].createElement( 'div', { className: clsPrefix + '-fixed-right' }, diff --git a/package.json b/package.json index 48d56b2..776e94e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bee-table", - "version": "1.4.28", + "version": "1.4.29", "description": "Table ui component for react", "keywords": [ "react", @@ -91,4 +91,4 @@ "react-addons-test-utils": "^15.5.0", "react-dom": "^15.5.0" } -} +} \ No newline at end of file