多表头问题

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;
var fixedStyle = "";
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";
}
@ -13187,8 +13188,8 @@
if (!da.fixed) {
return _react2["default"].createElement(
"th",
{ 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 },
_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 }),
da.children,
dragborder ? _react2["default"].createElement(
"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;
let fixedStyle = "";
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`;
}
@ -549,7 +550,7 @@ class TableHeader extends Component {
}
thClassName += ` ${fixedStyle}`;
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} >
{da.children}
{