Function listFilterAndPagination

列表过滤+列表分页,支持对象的嵌套过滤

listFilterAndPagination(list, {
pager: {page: 1, size: 10, total: 0},
keyword: 'test',
fields: ['username', 'email', 'phone'],
filterHook: (item) => {
return item.username.includes('test') || item.email.includes('test') || item.phone.includes('test')
},
relationOr: true, // 默认为false,即且的关系
})
  • Parameters

    Returns Record<string, any>[]