Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
2.6k views
in Technique[技术] by (71.8m points)

elementUI做好的表格分页,分页是后台处理好的直接通过接口传过来的,现需求是让前端直接导出所有的数据,我该怎么做?

如图:
image
image

现在有31条数据 分两页展示 页面上还有一个导出报表的按钮 点击按钮的时候期望把31条数据都导出到Excel表格里面 但是现在我只能导出一页的数据(也就是20条) 请问大佬们有什么办法没有
PS:现阶段只希望前端处理


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

首先来说这种想法很危险,也不合理,但是也有处理方法
比如:点击导出按钮后,从第一页开始循环拉数据,依次拿到对应的数据后进行整合,然后处理成excel


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...