Skip to content

Commit

Permalink
refactor: 修改了菜单选中和Table hover颜色
Browse files Browse the repository at this point in the history
  • Loading branch information
guguji5 committed Jan 2, 2025
1 parent ca89070 commit edbb0ab
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions scripts/generate_antd_dark_less.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ function saveLess(filePath, filename, callback) {
'border-color-split': 'rgb(57, 60, 77)',
'component-background': 'rgb(24 27 31)', //fc-fill-2
'table-header-bg': 'rgb(34 37 43)',//fc-fill-3
'table-row-hover-bg': '#303340',
'table-header-sort-bg': '#303340',
'table-row-hover-bg': 'rgba(204, 204, 220, 0.08)',
'table-header-sort-bg': 'rgba(204, 204, 220, 0.08)',
'popover-background': 'rgb(24 27 31)', //fc-fill-2
'normal-color': 'rgb(79, 82, 99)',
},
Expand Down
5 changes: 3 additions & 2 deletions src/components/menu/SideMenu/MenuList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,11 @@ function MenuItem(props: { item: IMenuItem; isSub?: boolean } & IMenuProps) {
to={item.key}
className={cn(
'group flex h-9 cursor-pointer items-center relative rounded px-3.5 transition-colors transition-spacing duration-75',
isActive ? (isCustomBg ? 'bg-gray-200/20' : 'bg-fc-200') : '',
isCustomBg ? 'hover:bg-gray-200/20' : 'hover:bg-fc-200',
isActive ? (isCustomBg ? '' : 'bg-fc-200') : '',
'hover:bg-[rgba(204,204,220,0.12)]',
isCustomBg ? 'text-[#fff]' : 'text-main',
)}
style={{background: isActive && isCustomBg ?'rgba(204, 204, 220, 0.08)':undefined }}
>
{!isSub ? (
<div className={cn('h-4.5 children-icon2:h-4.5 children-icon2:w-4.5', isActive ? (props.isCustomBg ? 'text-[#fff]' : 'text-title') : '', !collapsed ? 'mr-4' : '')}>
Expand Down
2 changes: 1 addition & 1 deletion src/components/pageLayout/SideMenuColorSetting/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const getSideMenuBgColor = (color: SideMenuColors) => {
case 'light':
return '#fff';
case 'dark':
return 'var(--fc-fill-2)';
return 'rgb(24,27,31)';
case 'theme':
return THEME_COLOR;
default:
Expand Down
4 changes: 2 additions & 2 deletions src/theme/antd.dark.less
Original file line number Diff line number Diff line change
Expand Up @@ -21955,7 +21955,7 @@ span.ant-radio + * {
}
.ant-table-tbody > tr.ant-table-row:hover > td,
.ant-table-tbody > tr > td.ant-table-cell-row-hover {
background: #303340;
background: rgba(204, 204, 220, 0.08);
}
.ant-table-tbody > tr.ant-table-row-selected > td {
background: #1e1e30;
Expand Down Expand Up @@ -22015,7 +22015,7 @@ div.ant-table-summary {
background: #222;
}
.ant-table-thead th.ant-table-column-sort {
background: #303340;
background: rgba(204, 204, 220, 0.08);
}
.ant-table-thead th.ant-table-column-sort::before {
background-color: transparent !important;
Expand Down

0 comments on commit edbb0ab

Please sign in to comment.