fix: table ts error
parent
ca6ce42819
commit
b22c654bae
|
@ -653,7 +653,8 @@ const Table = defineComponent<TableProps>({
|
||||||
table,
|
table,
|
||||||
});
|
});
|
||||||
return () => {
|
return () => {
|
||||||
const columns = attrs.columns || convertChildrenToColumns(slots.default?.());
|
const props = attrs as TableProps;
|
||||||
|
const columns = props.columns || convertChildrenToColumns(slots.default?.());
|
||||||
return (
|
return (
|
||||||
<InteralTable
|
<InteralTable
|
||||||
ref={table}
|
ref={table}
|
||||||
|
|
|
@ -25,7 +25,7 @@ describe('Table.pagination', () => {
|
||||||
props: {
|
props: {
|
||||||
columns,
|
columns,
|
||||||
dataSource: data,
|
dataSource: data,
|
||||||
pagination,
|
pagination: { ...pagination },
|
||||||
...props,
|
...props,
|
||||||
},
|
},
|
||||||
sync: false,
|
sync: false,
|
||||||
|
|
|
@ -57,8 +57,9 @@ import MultipleSorter from './multiple-sorter.vue';
|
||||||
import Summary from './summary.vue';
|
import Summary from './summary.vue';
|
||||||
import CN from '../index.zh-CN.md';
|
import CN from '../index.zh-CN.md';
|
||||||
import US from '../index.en-US.md';
|
import US from '../index.en-US.md';
|
||||||
|
import { defineComponent } from '@vue/runtime-core';
|
||||||
|
|
||||||
export default {
|
export default defineComponent({
|
||||||
CN,
|
CN,
|
||||||
US,
|
US,
|
||||||
components: {
|
components: {
|
||||||
|
@ -88,5 +89,5 @@ export default {
|
||||||
MultipleSorter,
|
MultipleSorter,
|
||||||
Summary,
|
Summary,
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue