Эх сурвалжийг харах

分页tablehooks添加总条数

wanghao 4 сар өмнө
parent
commit
6e7ad07900

+ 1 - 0
src/hooks/common/table.ts

@@ -109,6 +109,7 @@ export function useTable<A extends AntDesign.TableApiFn>(config: AntDesign.AntDe
     showSizeChanger: true,
     pageSizeOptions: ['10', '15', '20', '25', '30'],
     total: 0,
+    showTotal:total => `共 ${total} 条`,
     onChange: async (current: number, size: number) => {
       pagination.pageIndex = current
       pagination.pageSize = size