Skip to content

Commit 689486f

Browse files
committed
chore: table snap
1 parent 3b14396 commit 689486f

File tree

5 files changed

+15
-30
lines changed

5 files changed

+15
-30
lines changed

components/table/Table.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,14 +147,13 @@ export default defineComponent({
147147
};
148148
},
149149

150-
data() {
150+
data(this) {
151151
const props = getOptionProps(this);
152152
warning(
153153
!props.expandedRowRender || !('scroll' in props),
154154
'`expandedRowRender` and `scroll` are not compatible. Please use one of them at one time.',
155155
);
156-
const self = this;
157-
const { getDefaultSortOrder, getDefaultFilters, getDefaultPagination } = self as typeof self & {
156+
const { getDefaultSortOrder, getDefaultFilters, getDefaultPagination } = this as typeof this & {
158157
getDefaultSortOrder: Function;
159158
getDefaultFilters: Function;
160159
getDefaultPagination: Function;

components/table/__tests__/__snapshots__/Table.rowSelection.test.js.snap

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -138,13 +138,6 @@ exports[`Table.rowSelection fix selection column on the left 1`] = `
138138
<!---->
139139
</div>
140140
</div>
141-
<ul unselectable="unselectable" class="ant-pagination ant-table-pagination">
142-
<!---->
143-
<li title="Previous Page" class="ant-pagination-disabled ant-pagination-prev" aria-disabled="true"><a class="ant-pagination-item-link"><span role="img" aria-label="left" class="anticon anticon-left"><svg class="" data-icon="left" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896" focusable="false"><path d="M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"></path></svg></span></a></li>
144-
<li title="1" tabindex="0" class="ant-pagination-item ant-pagination-item-1 ant-pagination-item-active"><a>1</a></li>
145-
<li title="Next Page" class="ant-pagination-disabled ant-pagination-next" aria-disabled="true"><a class="ant-pagination-item-link"><span role="img" aria-label="right" class="anticon anticon-right"><svg class="" data-icon="right" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896" focusable="false"><path d="M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"></path></svg></span></a></li>
146-
<!---->
147-
</ul>
148141
</div>
149142
</div>
150143
</div>

components/table/__tests__/__snapshots__/Table.test.js.snap

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,6 @@ exports[`Table align column should not override cell style 1`] = `
5959
<!---->
6060
</div>
6161
</div>
62-
<ul unselectable="unselectable" class="ant-pagination ant-table-pagination">
63-
<!---->
64-
<li title="Previous Page" class="ant-pagination-disabled ant-pagination-prev" aria-disabled="true"><a class="ant-pagination-item-link"><span role="img" aria-label="left" class="anticon anticon-left"><svg class="" data-icon="left" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896" focusable="false"><path d="M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"></path></svg></span></a></li>
65-
<li title="1" tabindex="0" class="ant-pagination-item ant-pagination-item-1 ant-pagination-item-active"><a>1</a></li>
66-
<li title="Next Page" class="ant-pagination-disabled ant-pagination-next" aria-disabled="true"><a class="ant-pagination-item-link"><span role="img" aria-label="right" class="anticon anticon-right"><svg class="" data-icon="right" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896" focusable="false"><path d="M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"></path></svg></span></a></li>
67-
<!---->
68-
</ul>
6962
</div>
7063
</div>
7164
</div>

components/table/__tests__/__snapshots__/empty.test.js.snap

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@ exports[`Table renders empty table 1`] = `
6060
</div>
6161
<div class="ant-table-placeholder">
6262
<div class="ant-empty ant-empty-normal">
63-
<div class="ant-empty-image"><svg width="64" height="41" viewBox="0 0 64 41" xmlns="http://www.w3.org/2000/svg">
63+
<div class="ant-empty-image"><svg class="ant-empty-img-default" width="64" height="41" viewBox="0 0 64 41">
6464
<g transform="translate(0 1)" fill="none" fill-rule="evenodd">
65-
<ellipse fill="#F5F5F5" cx="32" cy="33" rx="32" ry="7"></ellipse>
66-
<g fill-rule="nonzero" stroke="#D9D9D9">
65+
<ellipse class="ant-empty-img-default-ellipse" fill="#F5F5F5" cx="32" cy="33" rx="32" ry="7"></ellipse>
66+
<g class="ant-empty-img-default-g" fill-rule="nonzero" stroke="#D9D9D9">
6767
<path d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"></path>
68-
<path d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z" fill="#FAFAFA"></path>
68+
<path d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z" fill="#FAFAFA" class="ant-empty-img-default-path"></path>
6969
</g>
7070
</g>
7171
</svg></div>
@@ -226,12 +226,12 @@ exports[`Table renders empty table with fixed columns 1`] = `
226226
</div>
227227
<div class="ant-table-placeholder">
228228
<div class="ant-empty ant-empty-normal">
229-
<div class="ant-empty-image"><svg width="64" height="41" viewBox="0 0 64 41" xmlns="http://www.w3.org/2000/svg">
229+
<div class="ant-empty-image"><svg class="ant-empty-img-default" width="64" height="41" viewBox="0 0 64 41">
230230
<g transform="translate(0 1)" fill="none" fill-rule="evenodd">
231-
<ellipse fill="#F5F5F5" cx="32" cy="33" rx="32" ry="7"></ellipse>
232-
<g fill-rule="nonzero" stroke="#D9D9D9">
231+
<ellipse class="ant-empty-img-default-ellipse" fill="#F5F5F5" cx="32" cy="33" rx="32" ry="7"></ellipse>
232+
<g class="ant-empty-img-default-g" fill-rule="nonzero" stroke="#D9D9D9">
233233
<path d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"></path>
234-
<path d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z" fill="#FAFAFA"></path>
234+
<path d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z" fill="#FAFAFA" class="ant-empty-img-default-path"></path>
235235
</g>
236236
</g>
237237
</svg></div>
@@ -359,12 +359,12 @@ exports[`Table renders empty table without emptyText when loading 1`] = `
359359
</div>
360360
<div class="ant-table-placeholder">
361361
<div class="ant-empty ant-empty-normal">
362-
<div class="ant-empty-image"><svg width="64" height="41" viewBox="0 0 64 41" xmlns="http://www.w3.org/2000/svg">
362+
<div class="ant-empty-image"><svg class="ant-empty-img-default" width="64" height="41" viewBox="0 0 64 41">
363363
<g transform="translate(0 1)" fill="none" fill-rule="evenodd">
364-
<ellipse fill="#F5F5F5" cx="32" cy="33" rx="32" ry="7"></ellipse>
365-
<g fill-rule="nonzero" stroke="#D9D9D9">
364+
<ellipse class="ant-empty-img-default-ellipse" fill="#F5F5F5" cx="32" cy="33" rx="32" ry="7"></ellipse>
365+
<g class="ant-empty-img-default-g" fill-rule="nonzero" stroke="#D9D9D9">
366366
<path d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"></path>
367-
<path d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z" fill="#FAFAFA"></path>
367+
<path d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z" fill="#FAFAFA" class="ant-empty-img-default-path"></path>
368368
</g>
369369
</g>
370370
</svg></div>

components/table/filterDropdown.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ export default defineComponent({
156156
column,
157157
filterDropdown
158158
? selectedKeys
159-
: selectedKeys.map(key => valueKeys[key]).filter(key => key !== undefined),
159+
: selectedKeys.map((key: any) => valueKeys[key]).filter(key => key !== undefined),
160160
);
161161
}
162162
},

0 commit comments

Comments
 (0)