From 23614c01f69553208e25b2437d955f76c9bbb476 Mon Sep 17 00:00:00 2001 From: yosong <2404559603@qq.com> Date: Mon, 14 Oct 2024 12:16:22 +0800 Subject: [PATCH] fix: The menu scroll bar style is not uniform --- src/layouts/dashboard/index.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/layouts/dashboard/index.tsx b/src/layouts/dashboard/index.tsx index 12339c50..8407fb0c 100644 --- a/src/layouts/dashboard/index.tsx +++ b/src/layouts/dashboard/index.tsx @@ -89,6 +89,16 @@ const StyleWrapper = styled.div<{ $themeMode?: ThemeMode }>` background: ${(props) => (props.$themeMode === ThemeMode.Dark ? '#6b6b6b' : '#C1C1C1')}; } + /* 设置菜单滚动条样式 */ + .simplebar-scrollbar::before { + background: ${(props) => (props.$themeMode === ThemeMode.Dark ? '#6b6b6b' : '#C1C1C1')}; + } + + /* 设置菜单滚动条透明度统一 */ + .simplebar-scrollbar.simplebar-visible:before { + opacity: 1; + } + /* 设置鼠标悬停在滚动条上的样式 */ ::-webkit-scrollbar-thumb:hover { background: ${(props) => (props.$themeMode === ThemeMode.Dark ? '#939393' : '##7D7D7D')};