Export tables in iview. How to configure exportCsv parameters if you want to export all the data?

now the data in the current page number is exported by default, and you want to export all

Jun.19,2021

you can use the code to request all the paged data to come back, and then call the interface for exporting the table.


has just made such a requirement. Request all the data individually, and then give an array, which is processed with iview's exportCsv, array. The table after $ref is the component name of the paging table, and the interface method derived by it is used, as shown in figure code


.

if there are 100 pieces of data in the background, the front-end page displays 10 pieces of data when loading

first of all, do you use the interface for paging
that is, you submit page numbers through the interface to render the table data. The page:1, backend returns an array of 10 in length and returns all items to you

.

if this is the case, then the function of exporting the table should be implemented at the back end, because you only have 10 pieces of data at the front end

Menu