Skip to content

Commit b22c654

Browse files
committed
fix: table ts error
1 parent ca6ce42 commit b22c654

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

components/table/Table.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,8 @@ const Table = defineComponent<TableProps>({
653653
table,
654654
});
655655
return () => {
656-
const columns = attrs.columns || convertChildrenToColumns(slots.default?.());
656+
const props = attrs as TableProps;
657+
const columns = props.columns || convertChildrenToColumns(slots.default?.());
657658
return (
658659
<InteralTable
659660
ref={table}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ describe('Table.pagination', () => {
2525
props: {
2626
columns,
2727
dataSource: data,
28-
pagination,
28+
pagination: { ...pagination },
2929
...props,
3030
},
3131
sync: false,

components/table/demo/index.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,9 @@ import MultipleSorter from './multiple-sorter.vue';
5757
import Summary from './summary.vue';
5858
import CN from '../index.zh-CN.md';
5959
import US from '../index.en-US.md';
60+
import { defineComponent } from '@vue/runtime-core';
6061
61-
export default {
62+
export default defineComponent({
6263
CN,
6364
US,
6465
components: {
@@ -88,5 +89,5 @@ export default {
8889
MultipleSorter,
8990
Summary,
9091
},
91-
};
92+
});
9293
</script>

0 commit comments

Comments
 (0)