Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
问题一:分页列表最后一页只有一条数据,在这种情况下执行删除操作,删除成功后(多数情况下产品经理不会允许删除一条数据就要重新回到第一页),currentPage的值不会更新,此时刷新列表会出现currentPage大于总页数的情况
方案:在公共组件内监听total,如果出现以上情况,更新currentPage,再刷新列表
问题二:修改每页条数pageSize后,需要把currentPage值置为1,否则可能出现修改pageSize后总页数小于currentPage的情况
方案:修改后currentPage值置为1