Browse Source

fix: 修复表格合计报错问题

kailong321200875 10 tháng trước cách đây
mục cha
commit
9c44006ec2

+ 3 - 3
src/components/Table/src/Table.vue

@@ -167,20 +167,20 @@ export default defineComponent({
     sumText: propTypes.string.def('Sum'),
     summaryMethod: {
       type: Function as PropType<(param: { columns: any[]; data: any[] }) => any[]>,
-      default: () => undefined
+      default: undefined
     },
     spanMethod: {
       type: Function as PropType<
         (param: { row: any; column: any; rowIndex: number; columnIndex: number }) => any[]
       >,
-      default: () => undefined
+      default: undefined
     },
     selectOnIndeterminate: propTypes.bool.def(true),
     indent: propTypes.number.def(16),
     lazy: propTypes.bool.def(false),
     load: {
       type: Function as PropType<(row: Recordable, treeNode: any, resolve: Function) => void>,
-      default: () => undefined
+      default: undefined
     },
     treeProps: {
       type: Object as PropType<{ hasChildren?: string; children?: string; label?: string }>,

+ 1 - 0
src/views/Components/Table/UseTableDemo.vue

@@ -257,6 +257,7 @@ const getSelections = async () => {
       v-model:pageSize="pageSize"
       v-model:currentPage="currentPage"
       showAction
+      showSummary
       :columns="columns"
       :data="dataList"
       :loading="loading"