diff --git a/scss/components/_table.scss b/scss/components/_table.scss index 818587a4a..9f24fabf1 100644 --- a/scss/components/_table.scss +++ b/scss/components/_table.scss @@ -25,7 +25,7 @@ &.in { box-shadow: $Table-fixedLeft-boxShadow; - top: 0; + top: auto; } & > .#{$ns}Table-table { @@ -47,7 +47,7 @@ &.in { box-shadow: $Table-fixedRight-boxShadow; - top: 0; + top: auto; } & > .#{$ns}Table-table { diff --git a/src/renderers/Table/TableRow.tsx b/src/renderers/Table/TableRow.tsx index 8727c2ead..7d563659d 100644 --- a/src/renderers/Table/TableRow.tsx +++ b/src/renderers/Table/TableRow.tsx @@ -137,39 +137,44 @@ export class TableRow extends React.Component { })} > - {ignoreFootableContent ? null : ( - - - {columns.map(column => ( - - {column.label !== false ? ( - - ) : null} +
- {render( - `${regionPrefix}${itemIndex}/${column.index}/tpl`, - column.label - )} -
+ + {ignoreFootableContent + ? columns.map(column => ( + + {column.label !== false ? : null} + + + )) + : columns.map(column => ( + + {column.label !== false ? ( + + ) : null} - {renderCell( - `${regionPrefix}${itemIndex}/${column.index}`, - column, - item, - { - ...rest, - width: null, - rowIndex: itemIndex, - colIndex: column.rawIndex, - key: column.index, - onAction: this.handleAction, - onQuickChange: this.handleQuickChange - } - )} - - ))} - -
+ {render( + `${regionPrefix}${itemIndex}/${column.index}/tpl`, + column.label + )} +
- )} + {renderCell( + `${regionPrefix}${itemIndex}/${column.index}`, + column, + item, + { + ...rest, + width: null, + rowIndex: itemIndex, + colIndex: column.rawIndex, + key: column.index, + onAction: this.handleAction, + onQuickChange: this.handleQuickChange + } + )} + + ))} + + ); diff --git a/src/renderers/Table/index.tsx b/src/renderers/Table/index.tsx index 175b93987..12b2a1fc8 100644 --- a/src/renderers/Table/index.tsx +++ b/src/renderers/Table/index.tsx @@ -790,8 +790,9 @@ export default class Table extends React.Component { const dom = findDOMNode(this) as HTMLElement; forEach( + // 折叠 footTable 不需要改变 dom.querySelectorAll( - `.${ns}Table-fixedTop table, .${ns}Table-fixedLeft table, .${ns}Table-fixedRight table` + `.${ns}Table-fixedTop table, .${ns}Table-fixedLeft>table, .${ns}Table-fixedRight>table` ), (table: HTMLTableElement) => { let totalWidth = 0;