From 18d336e7a442061a8fb924fa14ff47bad2281ef7 Mon Sep 17 00:00:00 2001 From: Trirst <abeces968@gmail.com> Date: Tue, 27 Jul 2021 20:51:44 +0700 Subject: [PATCH] Style pagination bar --- src/components/PaginationBar.vue | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/PaginationBar.vue b/src/components/PaginationBar.vue index b026fd9..558bf2b 100644 --- a/src/components/PaginationBar.vue +++ b/src/components/PaginationBar.vue @@ -3,7 +3,11 @@ <button v-for="(page, index) in pages" :key="index" - class="mr-2 last:mr-0" + class="mr-2 last:mr-0 text-lg" + :class="{ + 'text-red-800': page === currentPage, + 'font-bold': page === currentPage, + }" @click="$emit('onPageChange', page)" > {{ page }} @@ -30,7 +34,7 @@ export default { // 1 ... 3 [4] 5 ... 12 (4 is the selected page) // [1] 2 ... 12 // 1 2 [3] 4 ... 12 - // The bar always shows the first and last pages, the selected page and 2 pages + // The bar always shows the first and last pages, the selected page and 2 pages // that are offset by 1 to the selected page pages: function () { return [ @@ -45,4 +49,4 @@ export default { }, }, }; -</script> \ No newline at end of file +</script> -- GitLab