From 2776f942ab6253f333df56d075f4689e1746526e Mon Sep 17 00:00:00 2001 From: henrygd Date: Sun, 29 Aug 2021 15:28:43 -0700 Subject: [PATCH] fix monitor list jumping to top on route change --- src/components/MonitorList.vue | 5 +++-- src/layouts/Layout.vue | 3 +-- src/pages/Dashboard.vue | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/components/MonitorList.vue b/src/components/MonitorList.vue index a3ead6c8..1e4fcaf4 100644 --- a/src/components/MonitorList.vue +++ b/src/components/MonitorList.vue @@ -89,8 +89,9 @@ export default { .list { &.scrollbar { - height: calc(100vh - 20px); - overflow-y: scroll; + min-height: calc(100vh - 240px); + max-height: calc(100vh - 20px); + overflow-y: auto; position: sticky; top: 10px; } diff --git a/src/layouts/Layout.vue b/src/layouts/Layout.vue index 0cb902a7..467ae53a 100644 --- a/src/layouts/Layout.vue +++ b/src/layouts/Layout.vue @@ -40,8 +40,7 @@
- - +
diff --git a/src/pages/Dashboard.vue b/src/pages/Dashboard.vue index 1dca6b6a..b9c82e00 100644 --- a/src/pages/Dashboard.vue +++ b/src/pages/Dashboard.vue @@ -9,7 +9,8 @@
- + +