fix(固定列下的滚动条无法拖拽问题):
This commit is contained in:
parent
71c5b3e347
commit
a302b64da3
|
@ -405,12 +405,15 @@
|
||||||
position: relative; }
|
position: relative; }
|
||||||
.u-table-filter-column-filter-icon {
|
.u-table-filter-column-filter-icon {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 6px;
|
top: 3px;
|
||||||
right: 3px;
|
right: 2px;
|
||||||
width: 30px;
|
width: 25px;
|
||||||
height: 30px;
|
height: 38px;
|
||||||
line-height: 30px;
|
line-height: 38px;
|
||||||
z-index: 2; }
|
z-index: 2;
|
||||||
|
background: #f7f7f7; }
|
||||||
|
.u-table-filter-column-filter-iconi.uf {
|
||||||
|
padding: 0px; }
|
||||||
.u-table-filter-column-pop-cont-item {
|
.u-table-filter-column-pop-cont-item {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
line-height: 30px;
|
line-height: 30px;
|
||||||
|
|
|
@ -429,7 +429,7 @@ var Table = function (_Component) {
|
||||||
drgHover: column.drgHover,
|
drgHover: column.drgHover,
|
||||||
fixed: column.fixed,
|
fixed: column.fixed,
|
||||||
width: column.width,
|
width: column.width,
|
||||||
dataIndex: column.dataIndex
|
dataindex: column.dataIndex
|
||||||
};
|
};
|
||||||
if (column.onHeadCellClick) {
|
if (column.onHeadCellClick) {
|
||||||
cell.onClick = column.onHeadCellClick;
|
cell.onClick = column.onHeadCellClick;
|
||||||
|
@ -712,6 +712,7 @@ var Table = function (_Component) {
|
||||||
|
|
||||||
var bodyStyle = _extends({}, this.props.bodyStyle);
|
var bodyStyle = _extends({}, this.props.bodyStyle);
|
||||||
var headStyle = {};
|
var headStyle = {};
|
||||||
|
var innerBodyStyle = {};
|
||||||
|
|
||||||
var tableClassName = '';
|
var tableClassName = '';
|
||||||
//表格元素的宽度大于容器的宽度也显示滚动条
|
//表格元素的宽度大于容器的宽度也显示滚动条
|
||||||
|
@ -726,7 +727,9 @@ var Table = function (_Component) {
|
||||||
// maxHeight will make fixed-Table scrolling not working
|
// maxHeight will make fixed-Table scrolling not working
|
||||||
// so we only set maxHeight to body-Table here
|
// so we only set maxHeight to body-Table here
|
||||||
if (fixed) {
|
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 {
|
} else {
|
||||||
bodyStyle.maxHeight = bodyStyle.maxHeight || scroll.y;
|
bodyStyle.maxHeight = bodyStyle.maxHeight || scroll.y;
|
||||||
}
|
}
|
||||||
|
@ -756,7 +759,6 @@ var Table = function (_Component) {
|
||||||
}
|
}
|
||||||
// 自动出现滚动条
|
// 自动出现滚动条
|
||||||
if (_this3.contentDomWidth > _this3.contentWidth) {
|
if (_this3.contentDomWidth > _this3.contentWidth) {
|
||||||
console.log(_this3.contentDomWidth);
|
|
||||||
tableStyle.width = _this3.contentDomWidth;
|
tableStyle.width = _this3.contentDomWidth;
|
||||||
}
|
}
|
||||||
var tableBody = hasBody ? getBodyWrapper(_react2["default"].createElement(
|
var tableBody = hasBody ? getBodyWrapper(_react2["default"].createElement(
|
||||||
|
@ -822,6 +824,7 @@ var Table = function (_Component) {
|
||||||
_react2["default"].createElement(
|
_react2["default"].createElement(
|
||||||
'div',
|
'div',
|
||||||
{
|
{
|
||||||
|
style: _extends({}, innerBodyStyle),
|
||||||
className: clsPrefix + '-body-inner',
|
className: clsPrefix + '-body-inner',
|
||||||
ref: refName,
|
ref: refName,
|
||||||
onMouseOver: this.detectScrollTarget,
|
onMouseOver: this.detectScrollTarget,
|
||||||
|
@ -1027,11 +1030,6 @@ var Table = function (_Component) {
|
||||||
_react2["default"].createElement(
|
_react2["default"].createElement(
|
||||||
'div',
|
'div',
|
||||||
{ className: clsPrefix + '-content' },
|
{ className: clsPrefix + '-content' },
|
||||||
this.columnManager.isAnyColumnsLeftFixed() && _react2["default"].createElement(
|
|
||||||
'div',
|
|
||||||
{ className: clsPrefix + '-fixed-left' },
|
|
||||||
this.getLeftFixedTable()
|
|
||||||
),
|
|
||||||
_react2["default"].createElement(
|
_react2["default"].createElement(
|
||||||
'div',
|
'div',
|
||||||
{ className: isTableScroll ? clsPrefix + '-scroll' : '' },
|
{ className: isTableScroll ? clsPrefix + '-scroll' : '' },
|
||||||
|
@ -1039,6 +1037,11 @@ var Table = function (_Component) {
|
||||||
this.getEmptyText(),
|
this.getEmptyText(),
|
||||||
this.getFooter()
|
this.getFooter()
|
||||||
),
|
),
|
||||||
|
this.columnManager.isAnyColumnsLeftFixed() && _react2["default"].createElement(
|
||||||
|
'div',
|
||||||
|
{ className: clsPrefix + '-fixed-left' },
|
||||||
|
this.getLeftFixedTable()
|
||||||
|
),
|
||||||
this.columnManager.isAnyColumnsRightFixed() && _react2["default"].createElement(
|
this.columnManager.isAnyColumnsRightFixed() && _react2["default"].createElement(
|
||||||
'div',
|
'div',
|
||||||
{ className: clsPrefix + '-fixed-right' },
|
{ className: clsPrefix + '-fixed-right' },
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "bee-table",
|
"name": "bee-table",
|
||||||
"version": "1.4.28",
|
"version": "1.4.29",
|
||||||
"description": "Table ui component for react",
|
"description": "Table ui component for react",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"react",
|
"react",
|
||||||
|
@ -91,4 +91,4 @@
|
||||||
"react-addons-test-utils": "^15.5.0",
|
"react-addons-test-utils": "^15.5.0",
|
||||||
"react-dom": "^15.5.0"
|
"react-dom": "^15.5.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue