Skip to content

Commit 89bb746

Browse files
committed
perf: Optimize the display effect of scrolling in the setting window
1 parent be2dead commit 89bb746

2 files changed

Lines changed: 11 additions & 10 deletions

File tree

ui/components/Header/ActionButtons.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ const actionItems = computed<ActionItem[]>(() => [
196196
new useTauriWebviewWindowWebviewWindow(label, {
197197
title: t("Common.ConnectionSettings"),
198198
url: "/setting",
199-
minWidth: 760,
199+
minWidth: 930,
200200
minHeight: 520,
201201
maxHeight: 675,
202202
hiddenTitle: true,

ui/layouts/setting.vue

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ definePageMeta({
88
});
99
1010
const localePath = useLocalePath();
11-
12-
const { t, locale, setLocale } = useI18n();
1311
const { theme } = useSettingManager();
12+
const { t, locale, setLocale } = useI18n();
13+
1414
const userInfoStore = useUserInfoStore();
1515
const { currentLanguage } = storeToRefs(userInfoStore);
1616
@@ -129,9 +129,12 @@ watch(
129129

130130
<template>
131131
<UPage
132-
class="h-screen"
132+
class="h-screen flex flex-col"
133+
:ui="{
134+
center: 'flex flex-col h-full min-h-0'
135+
}"
133136
:style="{
134-
backgroundColor: theme === 'dark' ? '#201F22' : '#F5F5F5'
137+
backgroundColor: theme === 'dark' ? '#2C2C2C' : '#F5F5F5'
135138
}"
136139
>
137140
<UPageHeader
@@ -148,8 +151,8 @@ watch(
148151
</template>
149152
</UPageHeader>
150153

151-
<UPageBody class="mt-2 mx-2">
152-
<div class="flex gap-1 w-full">
154+
<UPageBody class="mt-2 mx-2 flex-1 min-h-0 h-full overflow-y-auto">
155+
<div class="flex gap-1 w-full min-h-0">
153156
<UNavigationMenu
154157
:items="settingMenu"
155158
:highlight="true"
@@ -159,9 +162,7 @@ watch(
159162
:class="locale === 'en' ? 'w-64' : 'w-48'"
160163
/>
161164

162-
<USeparator orientation="vertical" class="h-48" />
163-
164-
<UCard class="flex-1" variant="subtle">
165+
<UCard class="flex-1 min-w-0 h-full overflow-y-auto" variant="subtle">
165166
<slot />
166167
</UCard>
167168
</div>

0 commit comments

Comments
 (0)