zollero / el-search-table-pagination

🐶 Combine Form, Table and Pagination components of Element UI together.
MIT License
306 stars 79 forks source link

Remote data如何进行前端分页 #10

Closed BennyThink closed 6 years ago

BennyThink commented 6 years ago

在设置了type=“remote”和url之后,分页就变成了GET /data/fetch?pageIndex=2&pageSize=10这种请求后端分页的样子,如果此时想进行前端分页该如何处理?

非常感谢!!

zollero commented 6 years ago

type="remote" 默认是调用后端的分页接口,前端不会对接口的数据进行分页操作。

如果,你想一次性把后端的数据拿过来,然后在前端分页,请使用 type="local"。

BennyThink commented 6 years ago

那么在设置了type="local"之后,data直接是后端返回的数据就可以了是吗?

再次感谢!

zollero commented 6 years ago

@BennyThink 是的。