多表头问题

This commit is contained in:
wanghaoo 2018-12-06 19:13:28 +08:00
parent 1120d68bd1
commit 78d4156b2b
3 changed files with 8 additions and 6 deletions

7
dist/demo.js vendored
View File

@ -13163,7 +13163,8 @@
delete da.drgHover; delete da.drgHover;
var fixedStyle = ""; var fixedStyle = "";
var canDotDrag = ""; var canDotDrag = "";
if (!fixed && (da.fixed || rows[0][columIndex].fixed)) { //主表格下、固定列或者是过滤行中含有固定列时添加该属性
if (!fixed && (da.fixed || filterable && index == rows.length - 1 && rows[0][columIndex].fixed)) {
fixedStyle = clsPrefix + "-row-fixed-columns-in-body"; fixedStyle = clsPrefix + "-row-fixed-columns-in-body";
} }
@ -13187,8 +13188,8 @@
if (!da.fixed) { if (!da.fixed) {
return _react2["default"].createElement( return _react2["default"].createElement(
"th", "th",
{ key: 'table-header-th-' + da.dataindex, className: thClassName, "data-th-fixed": da.fixed, _extends({}, da, { key: 'table-header-th-' + da.dataindex, className: thClassName, "data-th-fixed": da.fixed,
"data-line-key": da.key, "data-line-index": columIndex, "data-th-width": da.width }, "data-line-key": da.key, "data-line-index": columIndex, "data-th-width": da.width }),
da.children, da.children,
dragborder ? _react2["default"].createElement( dragborder ? _react2["default"].createElement(
"div", "div",

2
dist/demo.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -523,7 +523,8 @@ class TableHeader extends Component {
delete da.drgHover; delete da.drgHover;
let fixedStyle = ""; let fixedStyle = "";
let canDotDrag = ""; let canDotDrag = "";
if (!fixed && (da.fixed || rows[0][columIndex].fixed) ) { //主表格下、固定列或者是过滤行中含有固定列时添加该属性
if (!fixed && (da.fixed || (filterable && index == rows.length - 1 && rows[0][columIndex].fixed)) ) {
fixedStyle = `${clsPrefix}-row-fixed-columns-in-body`; fixedStyle = `${clsPrefix}-row-fixed-columns-in-body`;
} }
@ -549,7 +550,7 @@ class TableHeader extends Component {
} }
thClassName += ` ${fixedStyle}`; thClassName += ` ${fixedStyle}`;
if(!da.fixed){ if(!da.fixed){
return (<th key={'table-header-th-'+da.dataindex} className={thClassName} data-th-fixed={da.fixed} return (<th {...da} key={'table-header-th-'+da.dataindex} className={thClassName} data-th-fixed={da.fixed}
data-line-key={da.key} data-line-index={columIndex} data-th-width={da.width} > data-line-key={da.key} data-line-index={columIndex} data-th-width={da.width} >
{da.children} {da.children}
{ {