Skip to content

Commit

Permalink
feat(menu): Restore side bar settings and added menu mouse move in mo…
Browse files Browse the repository at this point in the history
…de light style (#3295)

* feat(menu):  Added menu mouse move in style

* feat: 恢复菜单主题设置

* type(setting): change the function name to a more appropriate one

---------

Co-authored-by: invalid w <[email protected]>
  • Loading branch information
zwtvip and wangjue666 authored Nov 18, 2023
1 parent 3575106 commit 003a951
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 19 deletions.
16 changes: 13 additions & 3 deletions src/components/SimpleMenu/src/components/menu.less
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,9 @@
white-space: nowrap;
cursor: pointer;

&:hover {
color: @primary-color;
}
// &:hover {
// color: @primary-color;
// }

.@{menu-prefix-cls}-tooltip {
width: calc(100% - 0px);
Expand Down Expand Up @@ -226,6 +226,16 @@
&-active.@{menu-prefix-cls}-submenu {
color: @primary-color;
}

&:not(&-selected):hover {
background-color: rgb(0 0 0 / 6%);
}
}

&-light&-vertical &-submenu-title {
&:not(&-selected):hover {
background-color: rgb(0 0 0 / 6%);
}
}

&-light&-vertical&-collapse {
Expand Down
27 changes: 14 additions & 13 deletions src/layouts/default/setting/SettingDrawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { BasicDrawer } from '/@/components/Drawer/index';
import { Divider } from 'ant-design-vue';
import {
TypePicker,
// ThemeColorPicker,
ThemeColorPicker,
SettingFooter,
SwitchItem,
SelectItem,
Expand Down Expand Up @@ -38,6 +38,7 @@ import {
// SIDE_BAR_BG_COLOR_LIST,
// APP_PRESET_COLOR_LIST,
// } from '/@/settings/designSetting';
import { SIDE_BAR_BG_COLOR_LIST } from '/@/settings/designSetting';

const { t } = useI18n();

Expand Down Expand Up @@ -73,7 +74,7 @@ export default defineComponent({
getTopMenuAlign,
getAccordion,
getMenuWidth,
// getMenuBgColor,
getMenuBgColor,
getIsTopMenu,
getSplit,
getIsMixSidebar,
Expand Down Expand Up @@ -124,15 +125,15 @@ export default defineComponent({
// );
// }

// function renderSiderTheme() {
// return (
// <ThemeColorPicker
// colorList={SIDE_BAR_BG_COLOR_LIST}
// def={unref(getMenuBgColor)}
// event={HandlerEnum.MENU_THEME}
// />
// );
// }
function renderSideBarTheme() {
return (
<ThemeColorPicker
colorList={SIDE_BAR_BG_COLOR_LIST}
def={unref(getMenuBgColor)}
event={HandlerEnum.MENU_THEME}
/>
);
}

// function renderMainTheme() {
// return (
Expand Down Expand Up @@ -417,9 +418,9 @@ export default defineComponent({
{/* <Divider>{() => t('layout.setting.sysTheme')}</Divider>
{renderMainTheme()}
<Divider>{() => t('layout.setting.headerTheme')}</Divider>
{renderHeaderTheme()}
{renderHeaderTheme()} */}
<Divider>{() => t('layout.setting.sidebarTheme')}</Divider>
{renderSiderTheme()} */}
{renderSideBarTheme()}
<Divider>{() => t('layout.setting.interfaceFunction')}</Divider>
{renderFeatures()}
<Divider>{() => t('layout.setting.interfaceDisplay')}</Divider>
Expand Down
10 changes: 7 additions & 3 deletions src/layouts/default/sider/MixSider.vue
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,10 @@
background-color: unset;
color: @primary-color;
}
&:not(&--active):hover {
background-color: rgb(0 0 0 / 6%);
}
}
}
.@{prefix-cls}-menu-list {
Expand All @@ -424,9 +428,9 @@
&.dark {
&.open {
.@{prefix-cls}-logo {
// border-bottom: 1px solid @border-color;
}
// .@{prefix-cls}-logo {
// border-bottom: 1px solid @border-color;
// }
> .scrollbar {
border-right: 1px solid @border-color;
Expand Down

0 comments on commit 003a951

Please sign in to comment.