fix(固定列下的滚动条无法拖拽问题):

This commit is contained in:
wanghaoo 2018-10-26 15:04:25 +08:00
parent 71c5b3e347
commit a302b64da3
3 changed files with 22 additions and 16 deletions

View File

@ -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;

View File

@ -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' },

View File

@ -1,6 +1,6 @@
{
"name": "bee-table",
"version": "1.4.28",
"version": "1.4.29",
"description": "Table ui component for react",
"keywords": [
"react",