Browse Source

所有列表的默认数据条数为20

master_hella_20240701
wangyufei 5 months ago
parent
commit
c91f034ad9
  1. 2
      src/components/Table/src/Table.vue
  2. 2
      src/hooks/web/useTable.ts

2
src/components/Table/src/Table.vue

@ -17,7 +17,7 @@ export default defineComponent({
// eslint-disable-next-line vue/no-reserved-component-names // eslint-disable-next-line vue/no-reserved-component-names
name: 'Table', name: 'Table',
props: { props: {
pageSize: propTypes.number.def(10), pageSize: propTypes.number.def(20),
currentPage: propTypes.number.def(1), currentPage: propTypes.number.def(1),
// //
selection: propTypes.bool.def(false), selection: propTypes.bool.def(false),

2
src/hooks/web/useTable.ts

@ -39,7 +39,7 @@ interface TableObject<T = any> {
export const useTable = <T = any>(config?: UseTableConfig<T>) => { export const useTable = <T = any>(config?: UseTableConfig<T>) => {
const tableObject = reactive<TableObject<T>>({ const tableObject = reactive<TableObject<T>>({
// 页数 // 页数
pageSize: 10, pageSize: 20,
// 当前页 // 当前页
currentPage: 1, currentPage: 1,
// 总条数 // 总条数

Loading…
Cancel
Save