mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-30 02:58:05 +08:00
fix: footable height
This commit is contained in:
parent
37787b610c
commit
7d0b1b1701
@ -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 {
|
||||
|
@ -137,39 +137,44 @@ export class TableRow extends React.Component<TableRowProps> {
|
||||
})}
|
||||
>
|
||||
<td className={cx(`Table-foot`)} colSpan={footableColSpan}>
|
||||
{ignoreFootableContent ? null : (
|
||||
<table className={cx(`Table-footTable`)}>
|
||||
<tbody>
|
||||
{columns.map(column => (
|
||||
<tr key={column.index}>
|
||||
{column.label !== false ? (
|
||||
<th>
|
||||
{render(
|
||||
`${regionPrefix}${itemIndex}/${column.index}/tpl`,
|
||||
column.label
|
||||
)}
|
||||
</th>
|
||||
) : null}
|
||||
<table className={cx(`Table-footTable`)}>
|
||||
<tbody>
|
||||
{ignoreFootableContent
|
||||
? columns.map(column => (
|
||||
<tr key={column.index}>
|
||||
{column.label !== false ? <th></th> : null}
|
||||
<td></td>
|
||||
</tr>
|
||||
))
|
||||
: columns.map(column => (
|
||||
<tr key={column.index}>
|
||||
{column.label !== false ? (
|
||||
<th>
|
||||
{render(
|
||||
`${regionPrefix}${itemIndex}/${column.index}/tpl`,
|
||||
column.label
|
||||
)}
|
||||
</th>
|
||||
) : 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
|
||||
}
|
||||
)}
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
)}
|
||||
{renderCell(
|
||||
`${regionPrefix}${itemIndex}/${column.index}`,
|
||||
column,
|
||||
item,
|
||||
{
|
||||
...rest,
|
||||
width: null,
|
||||
rowIndex: itemIndex,
|
||||
colIndex: column.rawIndex,
|
||||
key: column.index,
|
||||
onAction: this.handleAction,
|
||||
onQuickChange: this.handleQuickChange
|
||||
}
|
||||
)}
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
);
|
||||
|
@ -790,8 +790,9 @@ export default class Table extends React.Component<TableProps, object> {
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user