This commit is contained in:
leejinseok
2020-02-24 15:34:24 +09:00
parent fb0744f77c
commit 0653018311
3 changed files with 4 additions and 3 deletions

View File

@@ -96,7 +96,7 @@
const data = await articleService.getArticles({page});
const {content, totalPages, pageable} = data;
this.pages = paginationUtil(page + 1, totalPages, 4);
this.pages = paginationUtil(page + 1, totalPages, 5);
this.articles = content;
this.pending = false;

View File

@@ -24,7 +24,6 @@ export default function (currentPage, totalPage, chapterSize = 5) {
end += 0.5;
}
}
const range = [];
for (let i = start; i <= end; i++) {
range.push(i);

View File

@@ -34,7 +34,9 @@ public class ArticleRepository {
}
public int findTotal() {
return em.createNamedQuery("findAll", Article.class).getResultList().size();
return em.createNamedQuery("findAll", Article.class)
.getResultList()
.size();
}
public Optional<Article> findById(Long id) {