From edbdb7c5c92389bcbd3e02ec08376441b4ea9ef2 Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 5 Jul 2022 22:35:57 +0900 Subject: [PATCH] chore(client): rendering performance tweak a bit --- .../src/components/global/page-header.vue | 2 ++ .../client/src/components/ui/container.vue | 1 + packages/client/src/components/widgets.vue | 1 + .../src/ui/_common_/sidebar-for-mobile.vue | 24 ++++++------- packages/client/src/ui/_common_/sidebar.vue | 35 ++++++++++--------- 5 files changed, 34 insertions(+), 29 deletions(-) diff --git a/packages/client/src/components/global/page-header.vue b/packages/client/src/components/global/page-header.vue index e6917611f..766f9b6b6 100644 --- a/packages/client/src/components/global/page-header.vue +++ b/packages/client/src/components/global/page-header.vue @@ -178,6 +178,8 @@ onUnmounted(() => { -webkit-backdrop-filter: var(--blur, blur(15px)); backdrop-filter: var(--blur, blur(15px)); border-bottom: solid 0.5px var(--divider); + contain: strict; + height: var(--height); &.thin { --height: 45px; diff --git a/packages/client/src/components/ui/container.vue b/packages/client/src/components/ui/container.vue index e14242827..784414e79 100644 --- a/packages/client/src/components/ui/container.vue +++ b/packages/client/src/components/ui/container.vue @@ -144,6 +144,7 @@ export default defineComponent({ .ukygtjoj { position: relative; overflow: hidden; overflow: clip; + contain: content; &.naked { background: transparent !important; diff --git a/packages/client/src/components/widgets.vue b/packages/client/src/components/widgets.vue index be84cdbf7..85b8ae0ed 100644 --- a/packages/client/src/components/widgets.vue +++ b/packages/client/src/components/widgets.vue @@ -113,6 +113,7 @@ export default defineComponent({ } > .widget, .customize-container { + contain: content; margin: var(--margin) 0; &:first-of-type { diff --git a/packages/client/src/ui/_common_/sidebar-for-mobile.vue b/packages/client/src/ui/_common_/sidebar-for-mobile.vue index 41d083723..e789ae5e0 100644 --- a/packages/client/src/ui/_common_/sidebar-for-mobile.vue +++ b/packages/client/src/ui/_common_/sidebar-for-mobile.vue @@ -1,32 +1,32 @@