mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-01 03:29:39 +08:00
parent
8dc73f4601
commit
bd6bc70302
@ -1148,48 +1148,54 @@ exports[`test renders ./components/locale-provider/demo/all.md correctly 1`] = `
|
||||
<div
|
||||
class="">
|
||||
<div
|
||||
class="ant-table ant-table-large ant-table-empty ant-table-scroll-position-left">
|
||||
class="ant-spin-nested-loading">
|
||||
<div
|
||||
class="ant-table-content">
|
||||
class="ant-spin-container">
|
||||
<div
|
||||
class="">
|
||||
<span>
|
||||
<div
|
||||
class="ant-table-body">
|
||||
<table
|
||||
class="">
|
||||
<colgroup>
|
||||
<col />
|
||||
<col />
|
||||
</colgroup>
|
||||
<thead
|
||||
class="ant-table-thead">
|
||||
<tr>
|
||||
<th
|
||||
class="">
|
||||
<span>
|
||||
Name
|
||||
<i
|
||||
class="anticon anticon-filter ant-dropdown-trigger"
|
||||
title="Filter Menu" />
|
||||
</span>
|
||||
</th>
|
||||
<th
|
||||
class="">
|
||||
<span>
|
||||
Age
|
||||
</span>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody
|
||||
class="ant-table-tbody" />
|
||||
</table>
|
||||
</div>
|
||||
</span>
|
||||
class="ant-table ant-table-large ant-table-empty ant-table-scroll-position-left">
|
||||
<div
|
||||
class="ant-table-placeholder">
|
||||
No Data
|
||||
class="ant-table-content">
|
||||
<div
|
||||
class="">
|
||||
<span>
|
||||
<div
|
||||
class="ant-table-body">
|
||||
<table
|
||||
class="">
|
||||
<colgroup>
|
||||
<col />
|
||||
<col />
|
||||
</colgroup>
|
||||
<thead
|
||||
class="ant-table-thead">
|
||||
<tr>
|
||||
<th
|
||||
class="">
|
||||
<span>
|
||||
Name
|
||||
<i
|
||||
class="anticon anticon-filter ant-dropdown-trigger"
|
||||
title="Filter Menu" />
|
||||
</span>
|
||||
</th>
|
||||
<th
|
||||
class="">
|
||||
<span>
|
||||
Age
|
||||
</span>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody
|
||||
class="ant-table-tbody" />
|
||||
</table>
|
||||
</div>
|
||||
</span>
|
||||
<div
|
||||
class="ant-table-placeholder">
|
||||
No Data
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -875,16 +875,15 @@ export default class Table<T> extends React.Component<TableProps<T>, any> {
|
||||
const paginationPatchClass = (this.hasPagination() && data && data.length !== 0)
|
||||
? `${prefixCls}-with-pagination` : `${prefixCls}-without-pagination`;
|
||||
|
||||
const tableWithSpin = loading ? (
|
||||
<Spin className={loading ? `${paginationPatchClass} ${prefixCls}-spin-holder` : ''}>
|
||||
{table}
|
||||
{this.renderPagination()}
|
||||
</Spin>
|
||||
) : [table, this.renderPagination()];
|
||||
|
||||
return (
|
||||
<div className={className} style={style}>
|
||||
{tableWithSpin}
|
||||
<Spin
|
||||
spinning={loading}
|
||||
className={loading ? `${paginationPatchClass} ${prefixCls}-spin-holder` : ''}
|
||||
>
|
||||
{table}
|
||||
{this.renderPagination()}
|
||||
</Spin>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
@ -16,79 +16,85 @@ exports[`Table.filter renders filter correctly 1`] = `
|
||||
<div
|
||||
class="">
|
||||
<div
|
||||
class="ant-table ant-table-large ant-table-scroll-position-left">
|
||||
class="ant-spin-nested-loading">
|
||||
<div
|
||||
class="ant-table-content">
|
||||
class="ant-spin-container">
|
||||
<div
|
||||
class="">
|
||||
<span>
|
||||
class="ant-table ant-table-large ant-table-scroll-position-left">
|
||||
<div
|
||||
class="ant-table-content">
|
||||
<div
|
||||
class="ant-table-body">
|
||||
<table
|
||||
class="">
|
||||
<colgroup>
|
||||
<col />
|
||||
</colgroup>
|
||||
<thead
|
||||
class="ant-table-thead">
|
||||
<tr>
|
||||
<th
|
||||
class="">
|
||||
<span>
|
||||
Name
|
||||
<i
|
||||
class="anticon anticon-filter ant-dropdown-trigger"
|
||||
title="筛选" />
|
||||
</span>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody
|
||||
class="ant-table-tbody">
|
||||
<tr
|
||||
class="ant-table-row ant-table-row-level-0">
|
||||
<td
|
||||
class="">
|
||||
<span
|
||||
class="ant-table-row-indent indent-level-0"
|
||||
style="padding-left:0px;" />
|
||||
Jack
|
||||
</td>
|
||||
</tr>
|
||||
<tr
|
||||
class="ant-table-row ant-table-row-level-0">
|
||||
<td
|
||||
class="">
|
||||
<span
|
||||
class="ant-table-row-indent indent-level-0"
|
||||
style="padding-left:0px;" />
|
||||
Lucy
|
||||
</td>
|
||||
</tr>
|
||||
<tr
|
||||
class="ant-table-row ant-table-row-level-0">
|
||||
<td
|
||||
class="">
|
||||
<span
|
||||
class="ant-table-row-indent indent-level-0"
|
||||
style="padding-left:0px;" />
|
||||
Tom
|
||||
</td>
|
||||
</tr>
|
||||
<tr
|
||||
class="ant-table-row ant-table-row-level-0">
|
||||
<td
|
||||
class="">
|
||||
<span
|
||||
class="ant-table-row-indent indent-level-0"
|
||||
style="padding-left:0px;" />
|
||||
Jerry
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
class="">
|
||||
<span>
|
||||
<div
|
||||
class="ant-table-body">
|
||||
<table
|
||||
class="">
|
||||
<colgroup>
|
||||
<col />
|
||||
</colgroup>
|
||||
<thead
|
||||
class="ant-table-thead">
|
||||
<tr>
|
||||
<th
|
||||
class="">
|
||||
<span>
|
||||
Name
|
||||
<i
|
||||
class="anticon anticon-filter ant-dropdown-trigger"
|
||||
title="筛选" />
|
||||
</span>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody
|
||||
class="ant-table-tbody">
|
||||
<tr
|
||||
class="ant-table-row ant-table-row-level-0">
|
||||
<td
|
||||
class="">
|
||||
<span
|
||||
class="ant-table-row-indent indent-level-0"
|
||||
style="padding-left:0px;" />
|
||||
Jack
|
||||
</td>
|
||||
</tr>
|
||||
<tr
|
||||
class="ant-table-row ant-table-row-level-0">
|
||||
<td
|
||||
class="">
|
||||
<span
|
||||
class="ant-table-row-indent indent-level-0"
|
||||
style="padding-left:0px;" />
|
||||
Lucy
|
||||
</td>
|
||||
</tr>
|
||||
<tr
|
||||
class="ant-table-row ant-table-row-level-0">
|
||||
<td
|
||||
class="">
|
||||
<span
|
||||
class="ant-table-row-indent indent-level-0"
|
||||
style="padding-left:0px;" />
|
||||
Tom
|
||||
</td>
|
||||
</tr>
|
||||
<tr
|
||||
class="ant-table-row ant-table-row-level-0">
|
||||
<td
|
||||
class="">
|
||||
<span
|
||||
class="ant-table-row-indent indent-level-0"
|
||||
style="padding-left:0px;" />
|
||||
Jerry
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -2,86 +2,92 @@ exports[`Table.pagination renders pagination correctly 1`] = `
|
||||
<div
|
||||
class="">
|
||||
<div
|
||||
class="ant-table ant-table-large ant-table-scroll-position-left">
|
||||
class="ant-spin-nested-loading">
|
||||
<div
|
||||
class="ant-table-content">
|
||||
class="ant-spin-container">
|
||||
<div
|
||||
class="">
|
||||
<span>
|
||||
class="ant-table ant-table-large ant-table-scroll-position-left">
|
||||
<div
|
||||
class="ant-table-content">
|
||||
<div
|
||||
class="ant-table-body">
|
||||
<table
|
||||
class="">
|
||||
<colgroup>
|
||||
<col />
|
||||
</colgroup>
|
||||
<thead
|
||||
class="ant-table-thead">
|
||||
<tr>
|
||||
<th
|
||||
class="">
|
||||
<span>
|
||||
Name
|
||||
</span>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody
|
||||
class="ant-table-tbody">
|
||||
<tr
|
||||
class="ant-table-row ant-table-row-level-0">
|
||||
<td
|
||||
class="">
|
||||
<span
|
||||
class="ant-table-row-indent indent-level-0"
|
||||
style="padding-left:0px;" />
|
||||
Jack
|
||||
</td>
|
||||
</tr>
|
||||
<tr
|
||||
class="ant-table-row ant-table-row-level-0">
|
||||
<td
|
||||
class="">
|
||||
<span
|
||||
class="ant-table-row-indent indent-level-0"
|
||||
style="padding-left:0px;" />
|
||||
Lucy
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
class="">
|
||||
<span>
|
||||
<div
|
||||
class="ant-table-body">
|
||||
<table
|
||||
class="">
|
||||
<colgroup>
|
||||
<col />
|
||||
</colgroup>
|
||||
<thead
|
||||
class="ant-table-thead">
|
||||
<tr>
|
||||
<th
|
||||
class="">
|
||||
<span>
|
||||
Name
|
||||
</span>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody
|
||||
class="ant-table-tbody">
|
||||
<tr
|
||||
class="ant-table-row ant-table-row-level-0">
|
||||
<td
|
||||
class="">
|
||||
<span
|
||||
class="ant-table-row-indent indent-level-0"
|
||||
style="padding-left:0px;" />
|
||||
Jack
|
||||
</td>
|
||||
</tr>
|
||||
<tr
|
||||
class="ant-table-row ant-table-row-level-0">
|
||||
<td
|
||||
class="">
|
||||
<span
|
||||
class="ant-table-row-indent indent-level-0"
|
||||
style="padding-left:0px;" />
|
||||
Lucy
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<ul
|
||||
class="ant-pagination ant-table-pagination"
|
||||
unselectable="unselectable">
|
||||
<li
|
||||
class="ant-pagination-disabled ant-pagination-prev"
|
||||
title="上一页">
|
||||
<a />
|
||||
</li>
|
||||
<li
|
||||
class="ant-pagination-item ant-pagination-item-1 ant-pagination-item-active"
|
||||
title="1">
|
||||
<a>
|
||||
1
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
class="ant-pagination-item ant-pagination-item-2"
|
||||
title="2">
|
||||
<a>
|
||||
2
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
class=" ant-pagination-next"
|
||||
title="下一页">
|
||||
<a />
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<ul
|
||||
class="ant-pagination ant-table-pagination"
|
||||
unselectable="unselectable">
|
||||
<li
|
||||
class="ant-pagination-disabled ant-pagination-prev"
|
||||
title="上一页">
|
||||
<a />
|
||||
</li>
|
||||
<li
|
||||
class="ant-pagination-item ant-pagination-item-1 ant-pagination-item-active"
|
||||
title="1">
|
||||
<a>
|
||||
1
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
class="ant-pagination-item ant-pagination-item-2"
|
||||
title="2">
|
||||
<a>
|
||||
2
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
class=" ant-pagination-next"
|
||||
title="下一页">
|
||||
<a />
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
`;
|
||||
|
@ -2,96 +2,102 @@ exports[`Table renders JSX correctly 1`] = `
|
||||
<div
|
||||
class="">
|
||||
<div
|
||||
class="ant-table ant-table-large ant-table-scroll-position-left">
|
||||
class="ant-spin-nested-loading">
|
||||
<div
|
||||
class="ant-table-content">
|
||||
class="ant-spin-container">
|
||||
<div
|
||||
class="">
|
||||
<span>
|
||||
class="ant-table ant-table-large ant-table-scroll-position-left">
|
||||
<div
|
||||
class="ant-table-content">
|
||||
<div
|
||||
class="ant-table-body">
|
||||
<table
|
||||
class="">
|
||||
<colgroup>
|
||||
<col />
|
||||
<col />
|
||||
<col />
|
||||
</colgroup>
|
||||
<thead
|
||||
class="ant-table-thead">
|
||||
<tr>
|
||||
<th
|
||||
class=""
|
||||
colspan="2">
|
||||
<span>
|
||||
Name
|
||||
</span>
|
||||
</th>
|
||||
<th
|
||||
class=""
|
||||
rowspan="2">
|
||||
<span>
|
||||
Age
|
||||
</span>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th
|
||||
class="">
|
||||
<span>
|
||||
First Name
|
||||
</span>
|
||||
</th>
|
||||
<th
|
||||
class="">
|
||||
<span>
|
||||
Last Name
|
||||
</span>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody
|
||||
class="ant-table-tbody">
|
||||
<tr
|
||||
class="ant-table-row ant-table-row-level-0">
|
||||
<td
|
||||
class="">
|
||||
<span
|
||||
class="ant-table-row-indent indent-level-0"
|
||||
style="padding-left:0px;" />
|
||||
John
|
||||
</td>
|
||||
<td
|
||||
class="">
|
||||
Brown
|
||||
</td>
|
||||
<td
|
||||
class="">
|
||||
32
|
||||
</td>
|
||||
</tr>
|
||||
<tr
|
||||
class="ant-table-row ant-table-row-level-0">
|
||||
<td
|
||||
class="">
|
||||
<span
|
||||
class="ant-table-row-indent indent-level-0"
|
||||
style="padding-left:0px;" />
|
||||
Jim
|
||||
</td>
|
||||
<td
|
||||
class="">
|
||||
Green
|
||||
</td>
|
||||
<td
|
||||
class="">
|
||||
42
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
class="">
|
||||
<span>
|
||||
<div
|
||||
class="ant-table-body">
|
||||
<table
|
||||
class="">
|
||||
<colgroup>
|
||||
<col />
|
||||
<col />
|
||||
<col />
|
||||
</colgroup>
|
||||
<thead
|
||||
class="ant-table-thead">
|
||||
<tr>
|
||||
<th
|
||||
class=""
|
||||
colspan="2">
|
||||
<span>
|
||||
Name
|
||||
</span>
|
||||
</th>
|
||||
<th
|
||||
class=""
|
||||
rowspan="2">
|
||||
<span>
|
||||
Age
|
||||
</span>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th
|
||||
class="">
|
||||
<span>
|
||||
First Name
|
||||
</span>
|
||||
</th>
|
||||
<th
|
||||
class="">
|
||||
<span>
|
||||
Last Name
|
||||
</span>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody
|
||||
class="ant-table-tbody">
|
||||
<tr
|
||||
class="ant-table-row ant-table-row-level-0">
|
||||
<td
|
||||
class="">
|
||||
<span
|
||||
class="ant-table-row-indent indent-level-0"
|
||||
style="padding-left:0px;" />
|
||||
John
|
||||
</td>
|
||||
<td
|
||||
class="">
|
||||
Brown
|
||||
</td>
|
||||
<td
|
||||
class="">
|
||||
32
|
||||
</td>
|
||||
</tr>
|
||||
<tr
|
||||
class="ant-table-row ant-table-row-level-0">
|
||||
<td
|
||||
class="">
|
||||
<span
|
||||
class="ant-table-row-indent indent-level-0"
|
||||
style="padding-left:0px;" />
|
||||
Jim
|
||||
</td>
|
||||
<td
|
||||
class="">
|
||||
Green
|
||||
</td>
|
||||
<td
|
||||
class="">
|
||||
42
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user