Skip to content

Commit d025dd7

Browse files
committed
Merge branch 'feat-1.5.0' of https://github.com/vueComponent/ant-design-vue into feat-1.5.0
2 parents 738d2f4 + 9f7d24d commit d025dd7

File tree

17 files changed

+2708
-2998
lines changed

17 files changed

+2708
-2998
lines changed

components/_util/warning.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ import warning, { resetWarned } from '../vc-util/warning';
22

33
export { resetWarned };
44

5-
export default (valid, component, message) => {
5+
export default (valid, component, message = '') => {
66
warning(valid, `[antdv: ${component}] ${message}`);
77
};

components/cascader/__tests__/index.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ describe('Cascader', () => {
298298
expect($$('.ant-cascader-menu-item').length).toBe(2);
299299
}, 0);
300300
expect(errorSpy).toBeCalledWith(
301-
"Warning: 'limit' of showSearch in Cascader should be positive number or false.",
301+
"Warning: [antdv: Cascader] 'limit' of showSearch in Cascader should be positive number or false.",
302302
);
303303
});
304304
});

components/cascader/index.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,7 @@ const Cascader = {
328328
} else {
329329
warning(
330330
typeof limit !== 'number',
331+
'Cascader',
331332
"'limit' of showSearch in Cascader should be positive number or false.",
332333
);
333334
filtered = flattenOptions.filter(path => filter(inputValue, path, names));

components/descriptions/__tests__/index.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ describe('Descriptions', () => {
9292
},
9393
});
9494
expect(errorSpy).toHaveBeenCalledWith(
95-
'Warning: [ant-design-vue: Descriptions] Sum of column `span` in a line exceeds `column` of Descriptions.',
95+
'Warning: [antdv: Descriptions] Sum of column `span` in a line exceeds `column` of Descriptions.',
9696
);
9797
});
9898

components/descriptions/index.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ const generateChildrenRows = (children, column) => {
8787

8888
warning(
8989
leftSpans === 0 && lastSpanSame,
90-
'[ant-design-vue: Descriptions] Sum of column `span` in a line exceeds `column` of Descriptions.',
90+
'Descriptions',
91+
'Sum of column `span` in a line exceeds `column` of Descriptions.',
9192
);
9293
}
9394
});

components/table/Table.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ export default {
549549
const filtersToSetState = { ...filters };
550550
// Remove filters which is controlled
551551
getFilteredValueColumns({ columns: props.columns }).forEach(col => {
552-
const columnKey = this.getColumnKey(col);
552+
const columnKey = getColumnKey(col);
553553
if (columnKey) {
554554
delete filtersToSetState[columnKey];
555555
}

components/table/__tests__/Table.sorter.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@ describe('Table.sorter', () => {
146146
const sorter3 = handleChange.mock.calls[2][2];
147147
expect(sorter3.column).toBe(undefined);
148148
expect(sorter3.order).toBe(undefined);
149-
expect(sorter3.field).toBe(undefined);
150-
expect(sorter3.columnKey).toBe(undefined);
149+
expect(sorter3.field).toBe('name');
150+
expect(sorter3.columnKey).toBe('name');
151151
});
152152
});
153153

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

Lines changed: 22 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -24,38 +24,33 @@ exports[`Table.filter renders filter correctly 1`] = `
2424
</colgroup>
2525
<thead class="ant-table-thead">
2626
<tr>
27-
<th key="name" class="ant-table-column-has-actions ant-table-column-has-filters">
28-
<div>Name</div><i title="Filter menu" aria-label="icon: filter" tabindex="-1" class="anticon anticon-filter ant-dropdown-trigger"><svg viewBox="64 64 896 896" data-icon="filter" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class="">
29-
<path d="M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z"></path>
30-
</svg></i>
31-
</th>
32-
</tr>
33-
</thead>
34-
<tbody class="ant-table-tbody">
35-
<tr class="ant-table-row ant-table-row-level-0" data-row-key="0">
36-
<td class="ant-table-column-has-actions ant-table-column-has-filters"><span class="ant-table-row-indent indent-level-0" style="padding-left: 0px;"></span>
37-
<!---->Jack</td>
38-
</tr>
39-
<tr class="ant-table-row ant-table-row-level-0" data-row-key="1">
40-
<td class="ant-table-column-has-actions ant-table-column-has-filters"><span class="ant-table-row-indent indent-level-0" style="padding-left: 0px;"></span>
41-
<!---->Lucy</td>
42-
</tr>
43-
<tr class="ant-table-row ant-table-row-level-0" data-row-key="2">
44-
<td class="ant-table-column-has-actions ant-table-column-has-filters"><span class="ant-table-row-indent indent-level-0" style="padding-left: 0px;"></span>
45-
<!---->Tom</td>
46-
</tr>
47-
<tr class="ant-table-row ant-table-row-level-0" data-row-key="3">
48-
<td class="ant-table-column-has-actions ant-table-column-has-filters"><span class="ant-table-row-indent indent-level-0" style="padding-left: 0px;"></span>
49-
<!---->Jerry</td>
50-
</tr>
51-
</tbody>
52-
</table>
53-
</div>
27+
<th key="name" class="ant-table-column-has-actions ant-table-column-has-filters ant-table-row-cell-last"><span class="ant-table-header-column"><div><span class="ant-table-column-title">Name</span><span class="ant-table-column-sorter"></span>
28+
</div></span><i title="Filter menu" aria-label="icon: filter" tabindex="-1" class="anticon anticon-filter ant-dropdown-trigger"><svg viewBox="64 64 896 896" data-icon="filter" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class="">
29+
<path d="M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z"></path>
30+
</svg></i></th>
31+
</tr>
32+
</thead>
33+
<tbody class="ant-table-tbody">
34+
<tr class="ant-table-row ant-table-row-level-0" data-row-key="0">
35+
<td class="ant-table-column-has-actions ant-table-column-has-filters">Jack</td>
36+
</tr>
37+
<tr class="ant-table-row ant-table-row-level-0" data-row-key="1">
38+
<td class="ant-table-column-has-actions ant-table-column-has-filters">Lucy</td>
39+
</tr>
40+
<tr class="ant-table-row ant-table-row-level-0" data-row-key="2">
41+
<td class="ant-table-column-has-actions ant-table-column-has-filters">Tom</td>
42+
</tr>
43+
<tr class="ant-table-row ant-table-row-level-0" data-row-key="3">
44+
<td class="ant-table-column-has-actions ant-table-column-has-filters">Jerry</td>
45+
</tr>
46+
</tbody>
47+
</table>
5448
</div>
5549
</div>
5650
</div>
5751
</div>
5852
</div>
53+
</div>
5954
`;
6055
6156
exports[`Table.filter renders menu correctly 1`] = `

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

Lines changed: 25 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -14,37 +14,34 @@ exports[`Table.pagination renders pagination correctly 1`] = `
1414
</colgroup>
1515
<thead class="ant-table-thead">
1616
<tr>
17-
<th key="name" class="">
18-
<div>Name</div>
19-
</th>
20-
</tr>
21-
</thead>
22-
<tbody class="ant-table-tbody">
23-
<tr class="ant-table-row ant-table-row-level-0" data-row-key="0">
24-
<td><span class="ant-table-row-indent indent-level-0" style="padding-left: 0px;"></span>
25-
<!---->Jack</td>
26-
</tr>
27-
<tr class="ant-table-row ant-table-row-level-0" data-row-key="1">
28-
<td><span class="ant-table-row-indent indent-level-0" style="padding-left: 0px;"></span>
29-
<!---->Lucy</td>
30-
</tr>
31-
</tbody>
32-
</table>
33-
</div>
17+
<th key="name" class="ant-table-row-cell-last"><span class="ant-table-header-column"><div><span class="ant-table-column-title">Name</span><span class="ant-table-column-sorter"></span>
18+
</div></span></th>
19+
</tr>
20+
</thead>
21+
<tbody class="ant-table-tbody">
22+
<tr class="ant-table-row ant-table-row-level-0" data-row-key="0">
23+
<td class="">Jack</td>
24+
</tr>
25+
<tr class="ant-table-row ant-table-row-level-0" data-row-key="1">
26+
<td class="">Lucy</td>
27+
</tr>
28+
</tbody>
29+
</table>
3430
</div>
3531
</div>
36-
<ul unselectable="unselectable" class="ant-pagination my-page ant-table-pagination">
37-
<li title="Previous Page" aria-disabled="true" class="ant-pagination-disabled ant-pagination-prev"><a class="ant-pagination-item-link"><i aria-label="icon: left" class="anticon anticon-left"><svg viewBox="64 64 896 896" data-icon="left" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class="">
38-
<path d="M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 0 0 0 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>
39-
</svg></i></a></li>
40-
<li title="1" tabindex="0" class="ant-pagination-item ant-pagination-item-1 ant-pagination-item-active"><a>1</a></li>
41-
<li title="2" tabindex="0" class="ant-pagination-item ant-pagination-item-2"><a>2</a></li>
42-
<li title="Next Page" tabindex="0" class=" ant-pagination-next"><a class="ant-pagination-item-link"><i aria-label="icon: right" class="anticon anticon-right"><svg viewBox="64 64 896 896" data-icon="right" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class="">
43-
<path d="M765.7 486.8L314.9 134.7A7.97 7.97 0 0 0 302 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 0 0 0-50.4z"></path>
44-
</svg></i></a></li>
45-
<!---->
46-
</ul>
4732
</div>
33+
<ul unselectable="unselectable" class="ant-pagination my-page ant-table-pagination">
34+
<li title="Previous Page" aria-disabled="true" class="ant-pagination-disabled ant-pagination-prev"><a class="ant-pagination-item-link"><i aria-label="icon: left" class="anticon anticon-left"><svg viewBox="64 64 896 896" data-icon="left" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class="">
35+
<path d="M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 0 0 0 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>
36+
</svg></i></a></li>
37+
<li title="1" tabindex="0" class="ant-pagination-item ant-pagination-item-1 ant-pagination-item-active"><a>1</a></li>
38+
<li title="2" tabindex="0" class="ant-pagination-item ant-pagination-item-2"><a>2</a></li>
39+
<li title="Next Page" tabindex="0" class=" ant-pagination-next"><a class="ant-pagination-item-link"><i aria-label="icon: right" class="anticon anticon-right"><svg viewBox="64 64 896 896" data-icon="right" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class="">
40+
<path d="M765.7 486.8L314.9 134.7A7.97 7.97 0 0 0 302 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 0 0 0-50.4z"></path>
41+
</svg></i></a></li>
42+
<!---->
43+
</ul>
4844
</div>
4945
</div>
46+
</div>
5047
`;

0 commit comments

Comments
 (0)