How does vue get the data on the first page?

Why do I write this way to get all the data

Mar.16,2021

  1. if you use element-ui, see his paging usage.
  2. this kind of paging requires the cooperation of the backend. For example, when a request is made, {page:1,pageSize:20} is sent in params by default. If the request succeeds, the backend returns the first page with 20 pieces of data.
  3. looks something like this:

clipboard.png

Menu