From fa5ec0866378ef920ade0cfab129ed231dc9576a Mon Sep 17 00:00:00 2001 From: leejinseok Date: Mon, 17 Feb 2020 14:33:32 +0900 Subject: [PATCH] pagination active update --- src/front/src/pages/articles/List.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/front/src/pages/articles/List.vue b/src/front/src/pages/articles/List.vue index 2a63cf6..a0bb54b 100644 --- a/src/front/src/pages/articles/List.vue +++ b/src/front/src/pages/articles/List.vue @@ -89,7 +89,7 @@ console.log(err); } - const page = this.$route.query.page || 0; + const page = +this.$route.query.page || 0; const data = await articleService.getArticles({page}); const {content, totalPages} = data; @@ -108,7 +108,7 @@ console.log(evt.target); }, isActivePage(page) { - const currentPage = this.$route.query.page || 0; + const currentPage = +this.$route.query.page || 0; return page - 1 === currentPage; } }