vben-admin分页
// support xxx.xxx.xxx fetchSetting: { // The field name of the current page passed to the background pageField: 'page', // The number field name of each page displayed in the background sizeField: 'totalSize', // Field name of the form data returned by the interface listField: 'items', // Total number of tables returned by the interface field name totalField: 'totalSize', }, // Number of pages that can be selected pageSizeOptions: ['10', '50', '80', '100'], // Default display quantity on one page defaultPageSize: 10, // Default Size defaultSize: 'middle',
const [registerTable, { reload, getPaginationRef }] = useTable({
title: '租户列表',
api: getTenantDatac,
columns: getTenantColumns(),
beforeFetch(params) {
var currentPageInfo: any = getPaginationRef();
params.pageOffset =
currentPageInfo.current * currentPageInfo.pageSize - currentPageInfo.pageSize;
console.log('params', getPaginationRef());
return params;
},
isTreeTable: true,
striped: false,
本文来自博客园,作者:zjxgdq,转载请注明原文链接:https://www.cnblogs.com/zjxzhj/p/15963013.html