🚀 Feature Request: 可以只设置一次usePagination的total和data的回调函数还有initialData么 #573
mudyyy
started this conversation in
Feature Request
Replies: 1 comment
-
@mudyyy 不能 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What problem does the new feature need to solve?
一般一个项目的的分页接口返回的格式都一样,每次使用usePagination都要设置一样的total和data回调函数还有initialData,
usePagination((page, pageSize) => alovaInstance.Get("/data/page",{ params: {
pageNumber: page,
pageSize: pageSize
}}),{
initialData: {
totalRow: 0,
records:[]
},
total: (response: any) => response.totalRow,
data: (response: any) => response.records,
})
How should the new features you expect looks like?
能在createAlova时候设置usePagination的一些默认参数,
How important is it to you?
Better to have
Beta Was this translation helpful? Give feedback.
All reactions