Skip to content

Commit d3b284c

Browse files
authored
Merge pull request #537 from huxianc/fix/top_nav_style
fix: 修复导航栏浅色主题颜色固定的问题
2 parents 77ca6ee + 8fcda4f commit d3b284c

File tree

3 files changed

+25
-9
lines changed

3 files changed

+25
-9
lines changed

template-packages/leek-center/src/components/layout/Header.module.less

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
margin-top: 4px;
55
font-size: 18px;
66
line-height: 42px;
7-
color: #fff;
7+
// color: #fff;
88
display: flex;
99
align-items: center;
1010
box-sizing: border-box;
@@ -34,12 +34,28 @@
3434
&-horizontal {
3535
background: none;
3636
}
37-
.ant-menu-item-selected {
38-
background-color: var(--vscode-tab-activeBackground, #282c34);
39-
}
40-
.ant-menu-item:hover {
41-
background-color: var(--vscode-tab-hoverBackground, #323842);
42-
}
37+
// .ant-menu-item-selected {
38+
// background-color: var(--vscode-tab-activeBackground, #282c34);
39+
// }
40+
// .ant-menu-item:hover {
41+
// background-color: var(--vscode-tab-hoverBackground, #323842);
42+
// }
43+
}
44+
.ant-menu-horizontal:not(.ant-menu-dark) > .ant-menu-item:hover,
45+
.ant-menu-horizontal:not(.ant-menu-dark) > .ant-menu-submenu:hover,
46+
.ant-menu-horizontal:not(.ant-menu-dark) > .ant-menu-item-active,
47+
.ant-menu-horizontal:not(.ant-menu-dark) > .ant-menu-submenu-active,
48+
.ant-menu-horizontal:not(.ant-menu-dark) > .ant-menu-item-open,
49+
.ant-menu-horizontal:not(.ant-menu-dark) > .ant-menu-submenu-open,
50+
.ant-menu-horizontal:not(.ant-menu-dark) > .ant-menu-item-selected,
51+
.ant-menu-horizontal:not(.ant-menu-dark) > .ant-menu-submenu-selected {
52+
border-color: transparent;
53+
background-color: var(--vscode-list-activeSelectionBackground, #094771);
54+
color: #fff;
55+
}
56+
57+
.ant-menu-horizontal:not(.ant-menu-dark) > .ant-menu-item, .ant-menu-horizontal:not(.ant-menu-dark) > .ant-menu-submenu {
58+
padding: 0 20px !important;
4359
}
4460
}
4561
}

template-packages/leek-center/src/components/layout/Header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export default function LHeader() {
2929
<div className={Styles.logo}>韭菜中心</div>
3030
<Menu
3131
onClick={handleClick}
32-
theme="dark"
32+
// theme="dark"
3333
mode="horizontal"
3434
selectedKeys={[defaultSelectedKeys]}
3535
>

template-packages/leek-center/src/view/data-center/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export default function DataCenter({ children }: { children: ReactElement }) {
2929
}}
3030
>
3131
<Menu
32-
theme="dark"
32+
// theme="dark"
3333
style={{
3434
height: 'calc(100vh - 86px)',
3535
}}

0 commit comments

Comments
 (0)