update
This commit is contained in:
@@ -96,7 +96,7 @@
|
|||||||
const data = await articleService.getArticles({page});
|
const data = await articleService.getArticles({page});
|
||||||
const {content, totalPages, pageable} = data;
|
const {content, totalPages, pageable} = data;
|
||||||
|
|
||||||
this.pages = paginationUtil(page + 1, totalPages, 4);
|
this.pages = paginationUtil(page + 1, totalPages, 5);
|
||||||
|
|
||||||
this.articles = content;
|
this.articles = content;
|
||||||
this.pending = false;
|
this.pending = false;
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ export default function (currentPage, totalPage, chapterSize = 5) {
|
|||||||
end += 0.5;
|
end += 0.5;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const range = [];
|
const range = [];
|
||||||
for (let i = start; i <= end; i++) {
|
for (let i = start; i <= end; i++) {
|
||||||
range.push(i);
|
range.push(i);
|
||||||
|
|||||||
@@ -34,7 +34,9 @@ public class ArticleRepository {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int findTotal() {
|
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) {
|
public Optional<Article> findById(Long id) {
|
||||||
|
|||||||
Reference in New Issue
Block a user