From a2e9ab39c174696a013681bd60df6cfe52a89c1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=B5=9C=EC=A4=80=ED=9D=A0?= Date: Wed, 31 Aug 2022 18:43:54 +0900 Subject: [PATCH] =?UTF-8?q?Vue2=5FFrontend=20=EC=88=98=EC=A0=951...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 4 ++++ src/components/todo/ListComponent.vue | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.env b/.env index 05c1a6f..8ed8e52 100644 --- a/.env +++ b/.env @@ -12,3 +12,7 @@ VUE_APP_BACKEND_HEADERS_Access_Control_Allow_Method="GET,PUT,POST,DELETE,PATCH,O #LocalStorage는 Edge 브라우저의 개발툴 > 응용프로그램 > 로컬 저장소에서 확인가능 VUE_APP_LOCALSTORAGE_NAME="access_token" VUE_APP_SESSIONSTORAGE_REDIRECT_NAME = "RedirectPATH" + + +VUE_APP_TABLE_DEFAULT_PERPAGE = 10 +VUE_APP_TABLE_DEFAULT_TABLE_PAGE = 1 \ No newline at end of file diff --git a/src/components/todo/ListComponent.vue b/src/components/todo/ListComponent.vue index ca7e280..87b93d1 100644 --- a/src/components/todo/ListComponent.vue +++ b/src/components/todo/ListComponent.vue @@ -112,7 +112,7 @@ @@ -222,8 +222,8 @@ export default { } ], total: 0, - currentPage: 1, // 현재 페이지 - perPage: 5, // 페이지당 보여줄 갯수 + page: process.env.VUE_APP_TABLE_DEFAULT_PAGE, // 현재 페이지 + perPage: process.env.VUE_APP_TABLE_DEFAULT_PERPAGE, // 페이지당 보여줄 갯수 perPageOptions: [ { text: '5줄', value: 5 }, { text: '10줄', value: 10 }, @@ -299,7 +299,7 @@ export default { console.log(results) this.total = results.total this.perPage = results.perPage - this.currentPage = results.page + this.page = results.page this.sortBy = results.sortBy this.sortDesc = results.sortDesc === 'true' ? true : false this.rows = results.rows