From 5126684f7944617a4b532e9cfba21020cfb11395 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9=20=D0=9C=D0=B0?= =?UTF-8?q?=D0=BB=D1=8E=D0=B3=D0=B8=D0=BD?= <d.malygin@iqdev.digital> Date: Thu, 30 Jan 2025 14:04:14 +0500 Subject: [PATCH] fix: styles (add "scoped") and watcher in 'Paginator' --- src/components/Paginator/Paginator.vue | 2 +- src/components/Paginator/PaginatorItem.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Paginator/Paginator.vue b/src/components/Paginator/Paginator.vue index 1b7130f..7e6aa4b 100644 --- a/src/components/Paginator/Paginator.vue +++ b/src/components/Paginator/Paginator.vue @@ -65,7 +65,7 @@ const color = computed(() => convertThemeToColor(props.theme, props.darknessThem const textColor = computed(() => convertThemeToTextColor(props.theme, props.darknessTheme)); watch(itemsPerPage, (cur, prev) => { - if (cur > prev) current.value = Math.ceil((current.value * prev) / cur); + if (cur > prev) current.value = Math.round((current.value * prev) / cur); else current.value = Math.ceil((prev * (current.value - 1) + +cur) / cur); }); </script> diff --git a/src/components/Paginator/PaginatorItem.vue b/src/components/Paginator/PaginatorItem.vue index e44b2ca..485bdb9 100644 --- a/src/components/Paginator/PaginatorItem.vue +++ b/src/components/Paginator/PaginatorItem.vue @@ -29,7 +29,7 @@ defineProps<{ </div> </template> -<style> +<style scoped> .item { position: relative; display: flex; -- GitLab