336 行
6.7 KiB
CSS
可执行文件
336 行
6.7 KiB
CSS
可执行文件
/* 现代化左侧菜单样式 - Bootstrap 5 */
|
|
|
|
:root {
|
|
--sidebar-width: 280px;
|
|
--sidebar-bg: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
|
|
--sidebar-text: #e2e8f0;
|
|
--sidebar-text-hover: #ffffff;
|
|
--sidebar-active: #3b82f6;
|
|
--sidebar-hover-bg: rgba(255, 255, 255, 0.1);
|
|
--topbar-height: 70px;
|
|
}
|
|
|
|
/* 主布局 */
|
|
.menu-index-box {
|
|
display: flex;
|
|
min-height: 100vh;
|
|
background-color: #f8fafc;
|
|
}
|
|
|
|
/* 左侧菜单 */
|
|
.menu-index-left {
|
|
width: var(--sidebar-width);
|
|
background: var(--sidebar-bg);
|
|
position: fixed;
|
|
left: 0;
|
|
top: 0;
|
|
height: 100vh;
|
|
z-index: 1000;
|
|
box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
|
|
transition: all 0.3s ease;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.menu-index-left-logo {
|
|
height: var(--topbar-height);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
|
padding: 0 20px;
|
|
}
|
|
|
|
.menu-index-left-logo img {
|
|
max-height: 40px;
|
|
max-width: 200px;
|
|
object-fit: contain;
|
|
}
|
|
|
|
/* Element UI 菜单现代化样式 */
|
|
.el-menu {
|
|
border-right: none !important;
|
|
background-color: transparent !important;
|
|
padding: 10px 0;
|
|
}
|
|
|
|
.el-submenu__title,
|
|
.el-menu-item {
|
|
height: 48px !important;
|
|
line-height: 48px !important;
|
|
color: var(--sidebar-text) !important;
|
|
background-color: transparent !important;
|
|
margin: 2px 12px !important;
|
|
border-radius: 8px !important;
|
|
transition: all 0.3s ease !important;
|
|
font-size: 14px !important;
|
|
font-weight: 500 !important;
|
|
}
|
|
|
|
.el-submenu__title:hover,
|
|
.el-menu-item:hover {
|
|
background-color: var(--sidebar-hover-bg) !important;
|
|
color: var(--sidebar-text-hover) !important;
|
|
}
|
|
|
|
.el-menu-item.is-active,
|
|
.menu-index-active {
|
|
background-color: var(--sidebar-active) !important;
|
|
color: white !important;
|
|
box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3) !important;
|
|
}
|
|
|
|
.el-submenu.is-active > .el-submenu__title,
|
|
.el-submenu.is-opened > .el-submenu__title {
|
|
background-color: var(--sidebar-hover-bg) !important;
|
|
color: var(--sidebar-text-hover) !important;
|
|
}
|
|
|
|
.el-submenu .el-menu-item {
|
|
height: 40px !important;
|
|
line-height: 40px !important;
|
|
padding: 0 0 0 50px !important;
|
|
margin: 1px 12px !important;
|
|
font-size: 13px !important;
|
|
font-weight: 400 !important;
|
|
}
|
|
|
|
.el-submenu .el-menu.el-menu--inline {
|
|
background-color: rgba(255, 255, 255, 0.05) !important;
|
|
border-radius: 8px !important;
|
|
margin: 4px 12px !important;
|
|
padding: 4px 0 !important;
|
|
}
|
|
|
|
.menu-index-list-con {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
}
|
|
|
|
.menu-index-list-con i {
|
|
font-size: 16px;
|
|
width: 20px;
|
|
text-align: center;
|
|
}
|
|
|
|
.el-submenu__title i {
|
|
color: var(--sidebar-text) !important;
|
|
font-size: 16px !important;
|
|
margin-right: 12px !important;
|
|
}
|
|
|
|
/* 右侧内容区域 */
|
|
.menu-index-right {
|
|
margin-left: var(--sidebar-width);
|
|
width: calc(100% - var(--sidebar-width));
|
|
min-height: 100vh;
|
|
background-color: #f8fafc;
|
|
}
|
|
|
|
/* 顶部栏样式 */
|
|
.menu-index-right-title {
|
|
height: var(--topbar-height);
|
|
background: white;
|
|
border-bottom: 1px solid #e5e7eb;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 0 24px;
|
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 999;
|
|
}
|
|
|
|
.menu-index-user-name {
|
|
font-size: 18px;
|
|
font-weight: 600;
|
|
color: #1f2937;
|
|
}
|
|
|
|
.menu-index-user-name span {
|
|
color: #1f2937;
|
|
}
|
|
|
|
.menu-index-right-title > div {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 16px;
|
|
}
|
|
|
|
.menu-index-right-title-nickname {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
cursor: pointer;
|
|
padding: 8px 12px;
|
|
border-radius: 8px;
|
|
transition: background-color 0.2s;
|
|
}
|
|
|
|
.menu-index-right-title-nickname:hover {
|
|
background-color: #f3f4f6;
|
|
}
|
|
|
|
.menu-index-right-title-nickname img {
|
|
width: 32px;
|
|
height: 32px;
|
|
border-radius: 50%;
|
|
object-fit: cover;
|
|
}
|
|
|
|
.menu-index-right-title-nickname span {
|
|
color: #374151;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.menu-index-right-title-quit {
|
|
padding: 8px;
|
|
border-radius: 8px;
|
|
cursor: pointer;
|
|
transition: background-color 0.2s;
|
|
}
|
|
|
|
.menu-index-right-title-quit:hover {
|
|
background-color: #fee2e2;
|
|
}
|
|
|
|
.menu-index-right-title-quit img {
|
|
width: 20px;
|
|
height: 20px;
|
|
}
|
|
|
|
/* 公告样式 */
|
|
.menu-index-notice {
|
|
display: flex;
|
|
align-items: center;
|
|
background-color: #fef3c7;
|
|
border: 1px solid #f59e0b;
|
|
border-radius: 6px;
|
|
padding: 8px 12px;
|
|
max-width: 300px;
|
|
}
|
|
|
|
.menu-index-notice-left {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
color: #92400e;
|
|
font-weight: 500;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.menu-index-notice-right {
|
|
flex: 1;
|
|
margin-left: 8px;
|
|
}
|
|
|
|
.menu-index-notice-right marquee {
|
|
color: #92400e;
|
|
font-size: 12px;
|
|
}
|
|
|
|
/* 右侧操作菜单 */
|
|
.menu-index-right-list-box {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 16px;
|
|
}
|
|
|
|
.menu-index-right-list {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
padding: 8px 12px;
|
|
border-radius: 6px;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
color: #6b7280;
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.menu-index-right-list:hover {
|
|
background-color: #f3f4f6;
|
|
color: #374151;
|
|
}
|
|
|
|
.menu-index-right-list i {
|
|
font-size: 14px;
|
|
}
|
|
|
|
/* 内容区域样式 */
|
|
.menu-index-right-content {
|
|
padding: 24px;
|
|
min-height: calc(100vh - var(--topbar-height));
|
|
}
|
|
|
|
/* 刷新按钮样式 */
|
|
.menu-index-refresh-child-window {
|
|
position: fixed;
|
|
top: 80px;
|
|
right: 24px;
|
|
background: white;
|
|
border: 1px solid #e5e7eb;
|
|
border-radius: 8px;
|
|
padding: 8px 16px;
|
|
cursor: pointer;
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
z-index: 998;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
font-size: 14px;
|
|
color: #6b7280;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.menu-index-refresh-child-window:hover {
|
|
background-color: #f9fafb;
|
|
border-color: #d1d5db;
|
|
color: #374151;
|
|
}
|
|
|
|
/* 响应式设计 */
|
|
@media (max-width: 768px) {
|
|
.menu-index-left {
|
|
width: 260px;
|
|
transform: translateX(-100%);
|
|
}
|
|
|
|
.menu-index-left.show {
|
|
transform: translateX(0);
|
|
}
|
|
|
|
.menu-index-right {
|
|
margin-left: 0;
|
|
width: 100%;
|
|
}
|
|
|
|
.menu-index-right-title {
|
|
padding: 0 16px;
|
|
}
|
|
|
|
.menu-index-right-content {
|
|
padding: 16px;
|
|
}
|
|
}
|
|
|
|
/* 滚动条样式 */
|
|
.menu-index-left::-webkit-scrollbar {
|
|
width: 6px;
|
|
}
|
|
|
|
.menu-index-left::-webkit-scrollbar-track {
|
|
background: rgba(255, 255, 255, 0.1);
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.menu-index-left::-webkit-scrollbar-thumb {
|
|
background: rgba(255, 255, 255, 0.3);
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.menu-index-left::-webkit-scrollbar-thumb:hover {
|
|
background: rgba(255, 255, 255, 0.5);
|
|
} |