Merge branch 'feat-1.5.0' of https://github.com/vueComponent/ant-design-vue into feat-1.5.0
commit
d025dd7e03
|
@ -2,6 +2,6 @@ import warning, { resetWarned } from '../vc-util/warning';
|
|||
|
||||
export { resetWarned };
|
||||
|
||||
export default (valid, component, message) => {
|
||||
export default (valid, component, message = '') => {
|
||||
warning(valid, `[antdv: ${component}] ${message}`);
|
||||
};
|
||||
|
|
|
@ -298,7 +298,7 @@ describe('Cascader', () => {
|
|||
expect($$('.ant-cascader-menu-item').length).toBe(2);
|
||||
}, 0);
|
||||
expect(errorSpy).toBeCalledWith(
|
||||
"Warning: 'limit' of showSearch in Cascader should be positive number or false.",
|
||||
"Warning: [antdv: Cascader] 'limit' of showSearch in Cascader should be positive number or false.",
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -328,6 +328,7 @@ const Cascader = {
|
|||
} else {
|
||||
warning(
|
||||
typeof limit !== 'number',
|
||||
'Cascader',
|
||||
"'limit' of showSearch in Cascader should be positive number or false.",
|
||||
);
|
||||
filtered = flattenOptions.filter(path => filter(inputValue, path, names));
|
||||
|
|
|
@ -92,7 +92,7 @@ describe('Descriptions', () => {
|
|||
},
|
||||
});
|
||||
expect(errorSpy).toHaveBeenCalledWith(
|
||||
'Warning: [ant-design-vue: Descriptions] Sum of column `span` in a line exceeds `column` of Descriptions.',
|
||||
'Warning: [antdv: Descriptions] Sum of column `span` in a line exceeds `column` of Descriptions.',
|
||||
);
|
||||
});
|
||||
|
||||
|
|
|
@ -87,7 +87,8 @@ const generateChildrenRows = (children, column) => {
|
|||
|
||||
warning(
|
||||
leftSpans === 0 && lastSpanSame,
|
||||
'[ant-design-vue: Descriptions] Sum of column `span` in a line exceeds `column` of Descriptions.',
|
||||
'Descriptions',
|
||||
'Sum of column `span` in a line exceeds `column` of Descriptions.',
|
||||
);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -549,7 +549,7 @@ export default {
|
|||
const filtersToSetState = { ...filters };
|
||||
// Remove filters which is controlled
|
||||
getFilteredValueColumns({ columns: props.columns }).forEach(col => {
|
||||
const columnKey = this.getColumnKey(col);
|
||||
const columnKey = getColumnKey(col);
|
||||
if (columnKey) {
|
||||
delete filtersToSetState[columnKey];
|
||||
}
|
||||
|
|
|
@ -146,8 +146,8 @@ describe('Table.sorter', () => {
|
|||
const sorter3 = handleChange.mock.calls[2][2];
|
||||
expect(sorter3.column).toBe(undefined);
|
||||
expect(sorter3.order).toBe(undefined);
|
||||
expect(sorter3.field).toBe(undefined);
|
||||
expect(sorter3.columnKey).toBe(undefined);
|
||||
expect(sorter3.field).toBe('name');
|
||||
expect(sorter3.columnKey).toBe('name');
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -24,29 +24,24 @@ exports[`Table.filter renders filter correctly 1`] = `
|
|||
</colgroup>
|
||||
<thead class="ant-table-thead">
|
||||
<tr>
|
||||
<th key="name" class="ant-table-column-has-actions ant-table-column-has-filters">
|
||||
<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="">
|
||||
<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>
|
||||
</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="">
|
||||
<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>
|
||||
</svg></i>
|
||||
</th>
|
||||
</svg></i></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="ant-table-tbody">
|
||||
<tr class="ant-table-row ant-table-row-level-0" data-row-key="0">
|
||||
<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>
|
||||
<!---->Jack</td>
|
||||
<td class="ant-table-column-has-actions ant-table-column-has-filters">Jack</td>
|
||||
</tr>
|
||||
<tr class="ant-table-row ant-table-row-level-0" data-row-key="1">
|
||||
<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>
|
||||
<!---->Lucy</td>
|
||||
<td class="ant-table-column-has-actions ant-table-column-has-filters">Lucy</td>
|
||||
</tr>
|
||||
<tr class="ant-table-row ant-table-row-level-0" data-row-key="2">
|
||||
<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>
|
||||
<!---->Tom</td>
|
||||
<td class="ant-table-column-has-actions ant-table-column-has-filters">Tom</td>
|
||||
</tr>
|
||||
<tr class="ant-table-row ant-table-row-level-0" data-row-key="3">
|
||||
<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>
|
||||
<!---->Jerry</td>
|
||||
<td class="ant-table-column-has-actions ant-table-column-has-filters">Jerry</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -14,19 +14,16 @@ exports[`Table.pagination renders pagination correctly 1`] = `
|
|||
</colgroup>
|
||||
<thead class="ant-table-thead">
|
||||
<tr>
|
||||
<th key="name" class="">
|
||||
<div>Name</div>
|
||||
</th>
|
||||
<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>
|
||||
</div></span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="ant-table-tbody">
|
||||
<tr class="ant-table-row ant-table-row-level-0" data-row-key="0">
|
||||
<td><span class="ant-table-row-indent indent-level-0" style="padding-left: 0px;"></span>
|
||||
<!---->Jack</td>
|
||||
<td class="">Jack</td>
|
||||
</tr>
|
||||
<tr class="ant-table-row ant-table-row-level-0" data-row-key="1">
|
||||
<td><span class="ant-table-row-indent indent-level-0" style="padding-left: 0px;"></span>
|
||||
<!---->Lucy</td>
|
||||
<td class="">Lucy</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -11,41 +11,34 @@ exports[`Table.rowSelection fix selection column on the left 1`] = `
|
|||
<div class="ant-table-body">
|
||||
<table class="">
|
||||
<colgroup>
|
||||
<col style="width: 62px; min-width: 62px;">
|
||||
<col class="ant-table-selection-col">
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead class="ant-table-thead">
|
||||
<tr>
|
||||
<th key="selection-column" class="ant-table-fixed-columns-in-body ant-table-selection-column">
|
||||
<div>
|
||||
<div class="ant-table-selection"><label class="ant-checkbox-wrapper"><span class="ant-checkbox"><input type="checkbox" class="ant-checkbox-input" value=""><span class="ant-checkbox-inner"></span></span></label></div>
|
||||
</div>
|
||||
</th>
|
||||
<th key="name" class="">
|
||||
<div>Name</div>
|
||||
</th>
|
||||
<th key="selection-column" class="ant-table-fixed-columns-in-body ant-table-selection-column"><span class="ant-table-header-column"><div><span class="ant-table-column-title"><div class="ant-table-selection"><label class="ant-checkbox-wrapper"><span class="ant-checkbox"><input type="checkbox" class="ant-checkbox-input" value=""><span class="ant-checkbox-inner"></span></span></label>
|
||||
</div></span><span class="ant-table-column-sorter"></span>
|
||||
</div></span></th>
|
||||
<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>
|
||||
</div></span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="ant-table-tbody">
|
||||
<tr class="ant-table-row ant-table-row-level-0" data-row-key="0">
|
||||
<td class="ant-table-fixed-columns-in-body ant-table-selection-column"><span><label class="ant-checkbox-wrapper"><span class="ant-checkbox"><input type="checkbox" class="ant-checkbox-input" value=""><span class="ant-checkbox-inner"></span></span></label></span></td>
|
||||
<td><span class="ant-table-row-indent indent-level-0" style="padding-left: 0px;"></span>
|
||||
<!---->Jack</td>
|
||||
<td class="">Jack</td>
|
||||
</tr>
|
||||
<tr class="ant-table-row ant-table-row-level-0" data-row-key="1">
|
||||
<td class="ant-table-fixed-columns-in-body ant-table-selection-column"><span><label class="ant-checkbox-wrapper"><span class="ant-checkbox"><input type="checkbox" class="ant-checkbox-input" value=""><span class="ant-checkbox-inner"></span></span></label></span></td>
|
||||
<td><span class="ant-table-row-indent indent-level-0" style="padding-left: 0px;"></span>
|
||||
<!---->Lucy</td>
|
||||
<td class="">Lucy</td>
|
||||
</tr>
|
||||
<tr class="ant-table-row ant-table-row-level-0" data-row-key="2">
|
||||
<td class="ant-table-fixed-columns-in-body ant-table-selection-column"><span><label class="ant-checkbox-wrapper"><span class="ant-checkbox"><input type="checkbox" class="ant-checkbox-input" value=""><span class="ant-checkbox-inner"></span></span></label></span></td>
|
||||
<td><span class="ant-table-row-indent indent-level-0" style="padding-left: 0px;"></span>
|
||||
<!---->Tom</td>
|
||||
<td class="">Tom</td>
|
||||
</tr>
|
||||
<tr class="ant-table-row ant-table-row-level-0" data-row-key="3">
|
||||
<td class="ant-table-fixed-columns-in-body ant-table-selection-column"><span><label class="ant-checkbox-wrapper"><span class="ant-checkbox"><input type="checkbox" class="ant-checkbox-input" value=""><span class="ant-checkbox-inner"></span></span></label></span></td>
|
||||
<td><span class="ant-table-row-indent indent-level-0" style="padding-left: 0px;"></span>
|
||||
<!---->Jerry</td>
|
||||
<td class="">Jerry</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -57,15 +50,13 @@ exports[`Table.rowSelection fix selection column on the left 1`] = `
|
|||
<div class="ant-table-body-inner">
|
||||
<table class="ant-table-fixed">
|
||||
<colgroup>
|
||||
<col style="width: 62px; min-width: 62px;">
|
||||
<col class="ant-table-selection-col">
|
||||
</colgroup>
|
||||
<thead class="ant-table-thead">
|
||||
<tr>
|
||||
<th key="selection-column" class="ant-table-selection-column">
|
||||
<div>
|
||||
<div class="ant-table-selection"><label class="ant-checkbox-wrapper"><span class="ant-checkbox"><input type="checkbox" class="ant-checkbox-input" value=""><span class="ant-checkbox-inner"></span></span></label></div>
|
||||
</div>
|
||||
</th>
|
||||
<th key="selection-column" class="ant-table-selection-column ant-table-row-cell-last"><span class="ant-table-header-column"><div><span class="ant-table-column-title"><div class="ant-table-selection"><label class="ant-checkbox-wrapper"><span class="ant-checkbox"><input type="checkbox" class="ant-checkbox-input" value=""><span class="ant-checkbox-inner"></span></span></label>
|
||||
</div></span><span class="ant-table-column-sorter"></span>
|
||||
</div></span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="ant-table-tbody">
|
||||
|
|
|
@ -3,14 +3,7 @@
|
|||
exports[`Table.sorter renders sorter icon correctly 1`] = `
|
||||
<thead class="ant-table-thead">
|
||||
<tr>
|
||||
<th key="name" class="ant-table-column-has-actions ant-table-column-has-sorters">
|
||||
<div class="ant-table-column-sorters">Name<div title="Sort" class="ant-table-column-sorter"><i aria-label="icon: caret-up" class="ant-table-column-sorter-up off anticon anticon-caret-up"><svg viewBox="0 0 1024 1024" data-icon="caret-up" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class="">
|
||||
<path d="M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"></path>
|
||||
</svg></i><i aria-label="icon: caret-down" class="ant-table-column-sorter-down off anticon anticon-caret-down"><svg viewBox="0 0 1024 1024" data-icon="caret-down" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class="">
|
||||
<path d="M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"></path>
|
||||
</svg></i></div>
|
||||
</div>
|
||||
</th>
|
||||
<th key="name" class="ant-table-column-has-actions ant-table-column-has-sorters ant-table-row-cell-last"><span class="ant-table-header-column"><div class="ant-table-column-sorters"><span class="ant-table-column-title">Name</span><span class="ant-table-column-sorter"><div title="Sort" class="ant-table-column-sorter-inner ant-table-column-sorter-inner-full"><i aria-label="icon: caret-up" class="ant-table-column-sorter-up off anticon anticon-caret-up"><svg viewBox="0 0 1024 1024" data-icon="caret-up" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><path d="M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"></path></svg></i><i aria-label="icon: caret-down" class="ant-table-column-sorter-down off anticon anticon-caret-down"><svg viewBox="0 0 1024 1024" data-icon="caret-down" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><path d="M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"></path></svg></i></div></span></div></span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
`;
|
||||
|
|
|
@ -15,26 +15,20 @@ exports[`Table align column should not override cell style 1`] = `
|
|||
</colgroup>
|
||||
<thead class="ant-table-thead">
|
||||
<tr>
|
||||
<th key="name" class="">
|
||||
<div>Name</div>
|
||||
</th>
|
||||
<th key="age" class="ant-table-align-center" style="text-align: center;">
|
||||
<div>Age</div>
|
||||
</th>
|
||||
<th key="name" class=""><span class="ant-table-header-column"><div><span class="ant-table-column-title">Name</span><span class="ant-table-column-sorter"></span>
|
||||
</div></span></th>
|
||||
<th key="age" class="ant-table-align-center ant-table-row-cell-last" style="text-align: center;"><span class="ant-table-header-column"><div><span class="ant-table-column-title">Age</span><span class="ant-table-column-sorter"></span>
|
||||
</div></span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="ant-table-tbody">
|
||||
<tr class="ant-table-row ant-table-row-level-0" data-row-key="1">
|
||||
<td><span class="ant-table-row-indent indent-level-0" style="padding-left: 0px;"></span>
|
||||
<!---->
|
||||
</td>
|
||||
<td style="color: red; text-align: center;">32</td>
|
||||
<td class=""></td>
|
||||
<td class="" style="text-align: center; color: red;">32</td>
|
||||
</tr>
|
||||
<tr class="ant-table-row ant-table-row-level-0" data-row-key="2">
|
||||
<td><span class="ant-table-row-indent indent-level-0" style="padding-left: 0px;"></span>
|
||||
<!---->
|
||||
</td>
|
||||
<td style="color: red; text-align: center;">42</td>
|
||||
<td class=""></td>
|
||||
<td class="" style="text-align: center; color: red;">42</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -72,32 +66,26 @@ exports[`Table renders JSX correctly 1`] = `
|
|||
</colgroup>
|
||||
<thead class="ant-table-thead">
|
||||
<tr>
|
||||
<th key="0" colspan="2" class="">
|
||||
<div>Name</div>
|
||||
</th>
|
||||
<th key="age" rowspan="2" class="">
|
||||
<div>Age</div>
|
||||
</th>
|
||||
<th key="0" colspan="2" class=""><span class="ant-table-header-column"><div><span class="ant-table-column-title">Name</span><span class="ant-table-column-sorter"></span>
|
||||
</div></span></th>
|
||||
<th key="age" rowspan="2" class="ant-table-row-cell-last"><span class="ant-table-header-column"><div><span class="ant-table-column-title">Age</span><span class="ant-table-column-sorter"></span>
|
||||
</div></span></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th key="firstName" class="">
|
||||
<div>First Name</div>
|
||||
</th>
|
||||
<th key="lastName" class="">
|
||||
<div>Last Name</div>
|
||||
</th>
|
||||
<th key="firstName" class=""><span class="ant-table-header-column"><div><span class="ant-table-column-title">First Name</span><span class="ant-table-column-sorter"></span>
|
||||
</div></span></th>
|
||||
<th key="lastName" class=""><span class="ant-table-header-column"><div><span class="ant-table-column-title">Last Name</span><span class="ant-table-column-sorter"></span>
|
||||
</div></span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="ant-table-tbody">
|
||||
<tr class="ant-table-row ant-table-row-level-0" data-row-key="1">
|
||||
<td class=""><span class="ant-table-row-indent indent-level-0" style="padding-left: 0px;"></span>
|
||||
<!---->John</td>
|
||||
<td class="">John</td>
|
||||
<td class="">Brown</td>
|
||||
<td class="">32</td>
|
||||
</tr>
|
||||
<tr class="ant-table-row ant-table-row-level-0" data-row-key="2">
|
||||
<td class=""><span class="ant-table-row-indent indent-level-0" style="padding-left: 0px;"></span>
|
||||
<!---->Jim</td>
|
||||
<td class="">Jim</td>
|
||||
<td class="">Green</td>
|
||||
<td class="">42</td>
|
||||
</tr>
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -21,30 +21,20 @@ exports[`Table renders empty table 1`] = `
|
|||
</colgroup>
|
||||
<thead class="ant-table-thead">
|
||||
<tr>
|
||||
<th key="1" class="">
|
||||
<div>Column 1</div>
|
||||
</th>
|
||||
<th key="2" class="">
|
||||
<div>Column 2</div>
|
||||
</th>
|
||||
<th key="3" class="">
|
||||
<div>Column 3</div>
|
||||
</th>
|
||||
<th key="4" class="">
|
||||
<div>Column 4</div>
|
||||
</th>
|
||||
<th key="5" class="">
|
||||
<div>Column 5</div>
|
||||
</th>
|
||||
<th key="6" class="">
|
||||
<div>Column 6</div>
|
||||
</th>
|
||||
<th key="7" class="">
|
||||
<div>Column 7</div>
|
||||
</th>
|
||||
<th key="8" class="">
|
||||
<div>Column 8</div>
|
||||
</th>
|
||||
<th key="1" class=""><span class="ant-table-header-column"><div><span class="ant-table-column-title">Column 1</span><span class="ant-table-column-sorter"></span>
|
||||
</div></span></th>
|
||||
<th key="2" class=""><span class="ant-table-header-column"><div><span class="ant-table-column-title">Column 2</span><span class="ant-table-column-sorter"></span>
|
||||
</div></span></th>
|
||||
<th key="3" class=""><span class="ant-table-header-column"><div><span class="ant-table-column-title">Column 3</span><span class="ant-table-column-sorter"></span>
|
||||
</div></span></th>
|
||||
<th key="4" class=""><span class="ant-table-header-column"><div><span class="ant-table-column-title">Column 4</span><span class="ant-table-column-sorter"></span>
|
||||
</div></span></th>
|
||||
<th key="5" class=""><span class="ant-table-header-column"><div><span class="ant-table-column-title">Column 5</span><span class="ant-table-column-sorter"></span>
|
||||
</div></span></th>
|
||||
<th key="6" class=""><span class="ant-table-header-column"><div><span class="ant-table-column-title">Column 6</span><span class="ant-table-column-sorter"></span>
|
||||
</div></span></th>
|
||||
<th key="7" class=""><span class="ant-table-header-column"><div><span class="ant-table-column-title">Column 7</span><span class="ant-table-column-sorter"></span></div></span></th>
|
||||
<th key="8" class="ant-table-row-cell-last"><span class="ant-table-header-column"><div><span class="ant-table-column-title">Column 8</span><span class="ant-table-column-sorter"></span></div></span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="ant-table-tbody"></tbody>
|
||||
|
@ -52,7 +42,15 @@ exports[`Table renders empty table 1`] = `
|
|||
</div>
|
||||
<div class="ant-table-placeholder">
|
||||
<div class="ant-empty ant-empty-normal">
|
||||
<div class="ant-empty-image"><img alt="No Data" src=""></div>
|
||||
<div class="ant-empty-image"><svg width="64" height="41" viewBox="0 0 64 41" xmlns="http://www.w3.org/2000/svg">
|
||||
<g transform="translate(0 1)" fill="none" fillRule="evenodd">
|
||||
<ellipse fill="#F5F5F5" cx="32" cy="33" rx="32" ry="7"></ellipse>
|
||||
<g fillRule="nonzero" stroke="#D9D9D9">
|
||||
<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>
|
||||
<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>
|
||||
</g>
|
||||
</g>
|
||||
</svg></div>
|
||||
<p class="ant-empty-description">No Data</p>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -84,30 +82,20 @@ exports[`Table renders empty table with custom emptyText 1`] = `
|
|||
</colgroup>
|
||||
<thead class="ant-table-thead">
|
||||
<tr>
|
||||
<th key="1" class="">
|
||||
<div>Column 1</div>
|
||||
</th>
|
||||
<th key="2" class="">
|
||||
<div>Column 2</div>
|
||||
</th>
|
||||
<th key="3" class="">
|
||||
<div>Column 3</div>
|
||||
</th>
|
||||
<th key="4" class="">
|
||||
<div>Column 4</div>
|
||||
</th>
|
||||
<th key="5" class="">
|
||||
<div>Column 5</div>
|
||||
</th>
|
||||
<th key="6" class="">
|
||||
<div>Column 6</div>
|
||||
</th>
|
||||
<th key="7" class="">
|
||||
<div>Column 7</div>
|
||||
</th>
|
||||
<th key="8" class="">
|
||||
<div>Column 8</div>
|
||||
</th>
|
||||
<th key="1" class=""><span class="ant-table-header-column"><div><span class="ant-table-column-title">Column 1</span><span class="ant-table-column-sorter"></span>
|
||||
</div></span></th>
|
||||
<th key="2" class=""><span class="ant-table-header-column"><div><span class="ant-table-column-title">Column 2</span><span class="ant-table-column-sorter"></span>
|
||||
</div></span></th>
|
||||
<th key="3" class=""><span class="ant-table-header-column"><div><span class="ant-table-column-title">Column 3</span><span class="ant-table-column-sorter"></span>
|
||||
</div></span></th>
|
||||
<th key="4" class=""><span class="ant-table-header-column"><div><span class="ant-table-column-title">Column 4</span><span class="ant-table-column-sorter"></span>
|
||||
</div></span></th>
|
||||
<th key="5" class=""><span class="ant-table-header-column"><div><span class="ant-table-column-title">Column 5</span><span class="ant-table-column-sorter"></span>
|
||||
</div></span></th>
|
||||
<th key="6" class=""><span class="ant-table-header-column"><div><span class="ant-table-column-title">Column 6</span><span class="ant-table-column-sorter"></span>
|
||||
</div></span></th>
|
||||
<th key="7" class=""><span class="ant-table-header-column"><div><span class="ant-table-column-title">Column 7</span><span class="ant-table-column-sorter"></span></div></span></th>
|
||||
<th key="8" class="ant-table-row-cell-last"><span class="ant-table-header-column"><div><span class="ant-table-column-title">Column 8</span><span class="ant-table-column-sorter"></span></div></span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="ant-table-tbody"></tbody>
|
||||
|
@ -146,39 +134,24 @@ exports[`Table renders empty table with fixed columns 1`] = `
|
|||
</colgroup>
|
||||
<thead class="ant-table-thead">
|
||||
<tr>
|
||||
<th key="name" class="ant-table-fixed-columns-in-body">
|
||||
<div>Full Name</div>
|
||||
</th>
|
||||
<th key="age" class="ant-table-fixed-columns-in-body">
|
||||
<div>Age</div>
|
||||
</th>
|
||||
<th key="1" class="">
|
||||
<div>Column 1</div>
|
||||
</th>
|
||||
<th key="2" class="">
|
||||
<div>Column 2</div>
|
||||
</th>
|
||||
<th key="3" class="">
|
||||
<div>Column 3</div>
|
||||
</th>
|
||||
<th key="4" class="">
|
||||
<div>Column 4</div>
|
||||
</th>
|
||||
<th key="5" class="">
|
||||
<div>Column 5</div>
|
||||
</th>
|
||||
<th key="6" class="">
|
||||
<div>Column 6</div>
|
||||
</th>
|
||||
<th key="7" class="">
|
||||
<div>Column 7</div>
|
||||
</th>
|
||||
<th key="8" class="">
|
||||
<div>Column 8</div>
|
||||
</th>
|
||||
<th key="address" class="ant-table-fixed-columns-in-body">
|
||||
<div>Action</div>
|
||||
</th>
|
||||
<th key="name" class="ant-table-fixed-columns-in-body ant-table-row-cell-break-word"><span class="ant-table-header-column"><div><span class="ant-table-column-title">Full Name</span><span class="ant-table-column-sorter"></span>
|
||||
</div></span></th>
|
||||
<th key="age" class="ant-table-fixed-columns-in-body ant-table-row-cell-break-word"><span class="ant-table-header-column"><div><span class="ant-table-column-title">Age</span><span class="ant-table-column-sorter"></span>
|
||||
</div></span></th>
|
||||
<th key="1" class=""><span class="ant-table-header-column"><div><span class="ant-table-column-title">Column 1</span><span class="ant-table-column-sorter"></span>
|
||||
</div></span></th>
|
||||
<th key="2" class=""><span class="ant-table-header-column"><div><span class="ant-table-column-title">Column 2</span><span class="ant-table-column-sorter"></span>
|
||||
</div></span></th>
|
||||
<th key="3" class=""><span class="ant-table-header-column"><div><span class="ant-table-column-title">Column 3</span><span class="ant-table-column-sorter"></span>
|
||||
</div></span></th>
|
||||
<th key="4" class=""><span class="ant-table-header-column"><div><span class="ant-table-column-title">Column 4</span><span class="ant-table-column-sorter"></span>
|
||||
</div></span></th>
|
||||
<th key="5" class=""><span class="ant-table-header-column"><div><span class="ant-table-column-title">Column 5</span><span class="ant-table-column-sorter"></span>
|
||||
</div></span></th>
|
||||
<th key="6" class=""><span class="ant-table-header-column"><div><span class="ant-table-column-title">Column 6</span><span class="ant-table-column-sorter"></span></div></span></th>
|
||||
<th key="7" class=""><span class="ant-table-header-column"><div><span class="ant-table-column-title">Column 7</span><span class="ant-table-column-sorter"></span></div></span></th>
|
||||
<th key="8" class=""><span class="ant-table-header-column"><div><span class="ant-table-column-title">Column 8</span><span class="ant-table-column-sorter"></span></div></span></th>
|
||||
<th key="address" class="ant-table-fixed-columns-in-body ant-table-row-cell-break-word ant-table-row-cell-last"><span class="ant-table-header-column"><div><span class="ant-table-column-title">Action</span><span class="ant-table-column-sorter"></span></div></span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="ant-table-tbody"></tbody>
|
||||
|
@ -186,7 +159,15 @@ exports[`Table renders empty table with fixed columns 1`] = `
|
|||
</div>
|
||||
<div class="ant-table-placeholder">
|
||||
<div class="ant-empty ant-empty-normal">
|
||||
<div class="ant-empty-image"><img alt="No Data" src=""></div>
|
||||
<div class="ant-empty-image"><svg width="64" height="41" viewBox="0 0 64 41" xmlns="http://www.w3.org/2000/svg">
|
||||
<g transform="translate(0 1)" fill="none" fillRule="evenodd">
|
||||
<ellipse fill="#F5F5F5" cx="32" cy="33" rx="32" ry="7"></ellipse>
|
||||
<g fillRule="nonzero" stroke="#D9D9D9">
|
||||
<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>
|
||||
<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>
|
||||
</g>
|
||||
</g>
|
||||
</svg></div>
|
||||
<p class="ant-empty-description">No Data</p>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -202,12 +183,10 @@ exports[`Table renders empty table with fixed columns 1`] = `
|
|||
</colgroup>
|
||||
<thead class="ant-table-thead">
|
||||
<tr>
|
||||
<th key="name" class="">
|
||||
<div>Full Name</div>
|
||||
</th>
|
||||
<th key="age" class="">
|
||||
<div>Age</div>
|
||||
</th>
|
||||
<th key="name" class="ant-table-row-cell-break-word"><span class="ant-table-header-column"><div><span class="ant-table-column-title">Full Name</span><span class="ant-table-column-sorter"></span>
|
||||
</div></span></th>
|
||||
<th key="age" class="ant-table-row-cell-break-word ant-table-row-cell-last"><span class="ant-table-header-column"><div><span class="ant-table-column-title">Age</span><span class="ant-table-column-sorter"></span>
|
||||
</div></span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="ant-table-tbody"></tbody>
|
||||
|
@ -225,9 +204,8 @@ exports[`Table renders empty table with fixed columns 1`] = `
|
|||
</colgroup>
|
||||
<thead class="ant-table-thead">
|
||||
<tr>
|
||||
<th key="address" class="">
|
||||
<div>Action</div>
|
||||
</th>
|
||||
<th key="address" class="ant-table-row-cell-break-word ant-table-row-cell-last"><span class="ant-table-header-column"><div><span class="ant-table-column-title">Action</span><span class="ant-table-column-sorter"></span>
|
||||
</div></span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="ant-table-tbody"></tbody>
|
||||
|
@ -246,7 +224,7 @@ exports[`Table renders empty table without emptyText when loading 1`] = `
|
|||
<div class="ant-table-wrapper">
|
||||
<div class="ant-spin-nested-loading ant-table-without-pagination ant-table-spin-holder">
|
||||
<div>
|
||||
<div class="ant-spin ant-spin-spinning"><span class="ant-spin-dot ant-spin-dot-spin"><i></i><i></i><i></i><i></i></span></div>
|
||||
<div class="ant-spin ant-spin-spinning"><span class="ant-spin-dot ant-spin-dot-spin"><i class="ant-spin-dot-item"></i><i class="ant-spin-dot-item"></i><i class="ant-spin-dot-item"></i><i class="ant-spin-dot-item"></i></span></div>
|
||||
</div>
|
||||
<div class="ant-spin-container ant-spin-blur">
|
||||
<div class="ant-table ant-table-scroll-position-left ant-table-default ant-table-empty">
|
||||
|
@ -266,36 +244,39 @@ exports[`Table renders empty table without emptyText when loading 1`] = `
|
|||
</colgroup>
|
||||
<thead class="ant-table-thead">
|
||||
<tr>
|
||||
<th key="1" class="">
|
||||
<div>Column 1</div>
|
||||
</th>
|
||||
<th key="2" class="">
|
||||
<div>Column 2</div>
|
||||
</th>
|
||||
<th key="3" class="">
|
||||
<div>Column 3</div>
|
||||
</th>
|
||||
<th key="4" class="">
|
||||
<div>Column 4</div>
|
||||
</th>
|
||||
<th key="5" class="">
|
||||
<div>Column 5</div>
|
||||
</th>
|
||||
<th key="6" class="">
|
||||
<div>Column 6</div>
|
||||
</th>
|
||||
<th key="7" class="">
|
||||
<div>Column 7</div>
|
||||
</th>
|
||||
<th key="8" class="">
|
||||
<div>Column 8</div>
|
||||
</th>
|
||||
<th key="1" class=""><span class="ant-table-header-column"><div><span class="ant-table-column-title">Column 1</span><span class="ant-table-column-sorter"></span>
|
||||
</div></span></th>
|
||||
<th key="2" class=""><span class="ant-table-header-column"><div><span class="ant-table-column-title">Column 2</span><span class="ant-table-column-sorter"></span>
|
||||
</div></span></th>
|
||||
<th key="3" class=""><span class="ant-table-header-column"><div><span class="ant-table-column-title">Column 3</span><span class="ant-table-column-sorter"></span>
|
||||
</div></span></th>
|
||||
<th key="4" class=""><span class="ant-table-header-column"><div><span class="ant-table-column-title">Column 4</span><span class="ant-table-column-sorter"></span>
|
||||
</div></span></th>
|
||||
<th key="5" class=""><span class="ant-table-header-column"><div><span class="ant-table-column-title">Column 5</span><span class="ant-table-column-sorter"></span>
|
||||
</div></span></th>
|
||||
<th key="6" class=""><span class="ant-table-header-column"><div><span class="ant-table-column-title">Column 6</span><span class="ant-table-column-sorter"></span>
|
||||
</div></span></th>
|
||||
<th key="7" class=""><span class="ant-table-header-column"><div><span class="ant-table-column-title">Column 7</span><span class="ant-table-column-sorter"></span></div></span></th>
|
||||
<th key="8" class="ant-table-row-cell-last"><span class="ant-table-header-column"><div><span class="ant-table-column-title">Column 8</span><span class="ant-table-column-sorter"></span></div></span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="ant-table-tbody"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="ant-table-placeholder"></div>
|
||||
<div class="ant-table-placeholder">
|
||||
<div class="ant-empty ant-empty-normal">
|
||||
<div class="ant-empty-image"><svg width="64" height="41" viewBox="0 0 64 41" xmlns="http://www.w3.org/2000/svg">
|
||||
<g transform="translate(0 1)" fill="none" fillRule="evenodd">
|
||||
<ellipse fill="#F5F5F5" cx="32" cy="33" rx="32" ry="7"></ellipse>
|
||||
<g fillRule="nonzero" stroke="#D9D9D9">
|
||||
<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>
|
||||
<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>
|
||||
</g>
|
||||
</g>
|
||||
</svg></div>
|
||||
<p class="ant-empty-description">No Data</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -58,6 +58,7 @@ If a `sortOrder` or `defaultSortOrder` is specified with the value `ascend` or `
|
|||
{
|
||||
title: 'Age',
|
||||
dataIndex: 'age',
|
||||
defaultSortOrder: 'descend',
|
||||
sorter: (a, b) => a.age - b.age,
|
||||
},
|
||||
{
|
||||
|
|
|
@ -32,9 +32,8 @@ const TableHeaderRow = {
|
|||
return (
|
||||
<HeaderRow {...rowProps} style={style}>
|
||||
{row.map((cell, i) => {
|
||||
const { column, isLast, children, ...cellProps } = cell;
|
||||
const { column, isLast, children, className, ...cellProps } = cell;
|
||||
const customProps = column.customHeaderCell ? column.customHeaderCell(column) : {};
|
||||
|
||||
const headerCellProps = mergeProps(
|
||||
{
|
||||
attrs: {
|
||||
|
@ -49,15 +48,11 @@ const TableHeaderRow = {
|
|||
|
||||
if (column.align) {
|
||||
headerCellProps.style = { ...customProps.style, textAlign: column.align };
|
||||
headerCellProps.class = classNames(customProps.cls, column.class, column.className, {
|
||||
[`${prefixCls}-align-${column.align}`]: !!column.align,
|
||||
});
|
||||
}
|
||||
|
||||
headerCellProps.class = classNames(
|
||||
customProps.className,
|
||||
customProps.class,
|
||||
column.class,
|
||||
column.className,
|
||||
customProps.class || customProps.className,
|
||||
column.class || column.className,
|
||||
{
|
||||
[`${prefixCls}-align-${column.align}`]: !!column.align,
|
||||
[`${prefixCls}-row-cell-ellipsis`]: !!column.ellipsis,
|
||||
|
|
|
@ -60,7 +60,7 @@ export default {
|
|||
|
||||
beforeDestroy() {
|
||||
if (this.resizeObserver) {
|
||||
this.resizeObserver.remove();
|
||||
this.resizeObserver.disconnect();
|
||||
}
|
||||
if (this.debouncedResize && this.debouncedResize.cancel) {
|
||||
this.debouncedResize.cancel();
|
||||
|
|
Loading…
Reference in New Issue