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 {
|
&.in {
|
||||||
box-shadow: $Table-fixedLeft-boxShadow;
|
box-shadow: $Table-fixedLeft-boxShadow;
|
||||||
top: 0;
|
top: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
& > .#{$ns}Table-table {
|
& > .#{$ns}Table-table {
|
||||||
@ -47,7 +47,7 @@
|
|||||||
|
|
||||||
&.in {
|
&.in {
|
||||||
box-shadow: $Table-fixedRight-boxShadow;
|
box-shadow: $Table-fixedRight-boxShadow;
|
||||||
top: 0;
|
top: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
& > .#{$ns}Table-table {
|
& > .#{$ns}Table-table {
|
||||||
|
@ -137,39 +137,44 @@ export class TableRow extends React.Component<TableRowProps> {
|
|||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
<td className={cx(`Table-foot`)} colSpan={footableColSpan}>
|
<td className={cx(`Table-foot`)} colSpan={footableColSpan}>
|
||||||
{ignoreFootableContent ? null : (
|
<table className={cx(`Table-footTable`)}>
|
||||||
<table className={cx(`Table-footTable`)}>
|
<tbody>
|
||||||
<tbody>
|
{ignoreFootableContent
|
||||||
{columns.map(column => (
|
? columns.map(column => (
|
||||||
<tr key={column.index}>
|
<tr key={column.index}>
|
||||||
{column.label !== false ? (
|
{column.label !== false ? <th></th> : null}
|
||||||
<th>
|
<td></td>
|
||||||
{render(
|
</tr>
|
||||||
`${regionPrefix}${itemIndex}/${column.index}/tpl`,
|
))
|
||||||
column.label
|
: columns.map(column => (
|
||||||
)}
|
<tr key={column.index}>
|
||||||
</th>
|
{column.label !== false ? (
|
||||||
) : null}
|
<th>
|
||||||
|
{render(
|
||||||
|
`${regionPrefix}${itemIndex}/${column.index}/tpl`,
|
||||||
|
column.label
|
||||||
|
)}
|
||||||
|
</th>
|
||||||
|
) : null}
|
||||||
|
|
||||||
{renderCell(
|
{renderCell(
|
||||||
`${regionPrefix}${itemIndex}/${column.index}`,
|
`${regionPrefix}${itemIndex}/${column.index}`,
|
||||||
column,
|
column,
|
||||||
item,
|
item,
|
||||||
{
|
{
|
||||||
...rest,
|
...rest,
|
||||||
width: null,
|
width: null,
|
||||||
rowIndex: itemIndex,
|
rowIndex: itemIndex,
|
||||||
colIndex: column.rawIndex,
|
colIndex: column.rawIndex,
|
||||||
key: column.index,
|
key: column.index,
|
||||||
onAction: this.handleAction,
|
onAction: this.handleAction,
|
||||||
onQuickChange: this.handleQuickChange
|
onQuickChange: this.handleQuickChange
|
||||||
}
|
}
|
||||||
)}
|
)}
|
||||||
</tr>
|
</tr>
|
||||||
))}
|
))}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
)}
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
);
|
);
|
||||||
|
@ -790,8 +790,9 @@ export default class Table extends React.Component<TableProps, object> {
|
|||||||
const dom = findDOMNode(this) as HTMLElement;
|
const dom = findDOMNode(this) as HTMLElement;
|
||||||
|
|
||||||
forEach(
|
forEach(
|
||||||
|
// 折叠 footTable 不需要改变
|
||||||
dom.querySelectorAll(
|
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) => {
|
(table: HTMLTableElement) => {
|
||||||
let totalWidth = 0;
|
let totalWidth = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user