Skip to content

Commit ed13f82

Browse files
committed
perf: 修改 siderbar 在 windows 下的表现
1 parent 49a8365 commit ed13f82

3 files changed

Lines changed: 10 additions & 5 deletions

File tree

ui/app.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const backgroundColor = computed(() => {
2727
if (isMacOS.value) {
2828
return isDark ? "rgba(30, 30, 30, 0.6)" : "rgba(240, 240, 240, 0.4)";
2929
} else {
30-
return isDark ? "rgba(30, 30, 30, 0.8)" : "rgba(240, 240, 240, 0.9)";
30+
return isDark ? "rgba(30, 30, 30, 0.8)" : "rgba(240, 240, 240, 0.83)";
3131
}
3232
});
3333

ui/assets/css/main.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
--ui-color-secondary-500: #141419;
1717
--ui-color-neutral-100: #d1d1d1;
1818
--el-font-family: var(--font-sans);
19-
--bg-hover-light: rgba(0, 0, 0, 0.1);
19+
--bg-hover-light: rgba(60, 60, 60, 0.1);
2020
--bg-hover-dark: rgba(0, 0, 0, 0.3);
2121
--bg-selected-light: rgba(209, 209, 209, 0.8);
2222
--bg-selected-dark: rgba(0, 0, 0, 0.5);

ui/components/SideBar/sideBar.vue

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,13 @@ const debouncedSidebarSearch = useDebounceFn(emitSearch, 200);
161161
<style>
162162
.light .menu .menu-item {
163163
&[data-active] {
164-
background-color: var(--bg-hover-light);
165-
opacity: 0.8;
164+
background-color: transparent;
165+
166+
&::before {
167+
background-color: var(--bg-hover-light);
168+
}
169+
170+
/* opacity: 0.8; */
166171
font-weight: 500;
167172
}
168173
@@ -172,7 +177,7 @@ const debouncedSidebarSearch = useDebounceFn(emitSearch, 200);
172177
}
173178
174179
.light .search-input input {
175-
background-color: var(--bg-hover-light);
180+
background-color: var(--bg-hover-light);
176181
}
177182
178183
.menu nav[data-collapsed="true"] {

0 commit comments

Comments
 (0)