| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619 |
- .header {
- width: 100%;
- height: 64px;
- padding: 0 24px;
- background: #FFFFFF;
- display: flex;
- justify-content: space-between;
- align-items: center;
- border-bottom: 1px solid #f0f0f0;
- box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
- position: fixed;
- top: 0;
- left: 0;
- z-index: 1000;
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
- // 用户区域样式
- &-user-section {
- display: flex;
- align-items: center;
- gap: 8px;
- }
- // 登出按钮样式
- &-logout-btn {
- color: #666;
- border: none;
- padding: 4px 8px;
- border-radius: 6px;
- transition: all 0.3s ease;
-
- &:hover {
- color: #ff4d4f;
- background: rgba(255, 77, 79, 0.1);
- }
-
- &:active {
- color: #cf1322;
- background: rgba(255, 77, 79, 0.2);
- }
- }
- // 用户操作区域样式优化
- &-operation {
- display: flex;
- align-items: center;
- cursor: pointer;
- padding: 4px 8px; // 增加点击区域
- border-radius: 6px;
- transition: background-color 0.3s ease;
- &-picture {
- width: 30px;
- height: 30px;
- background: @primary-color;
- border-radius: 50%;
- display: flex;
- justify-content: center;
- align-items: center;
- margin-right: 8px;
- color: #FFFFFF;
- }
- &-name {
- font-weight: 500;
- color: @primary-color;
- }
- }
- // &-nav {
- // display: flex;
- // align-items: center;
- // gap: 40px;
- // margin-left: 40px;
- // &-item {
- // color: #666;
- // font-weight: 500;
- // position: relative;
- // transition: color 0.3s;
- // &:hover {
- // color: @primary-color;
- // }
- // &.active {
- // color: @primary-color;
- // &::after {
- // content: '';
- // position: absolute;
- // bottom: -22px;
- // left: 0;
- // right: 0;
- // height: 2px;
- // background: @primary-color;
- // }
- // }
- // }
- // }
- &-logo {
- display: flex;
- align-items: center;
- cursor: pointer;
- margin-right: 40px;
- &-picture {
- width: 30px;
- height: 30px;
- margin-right: 10px;
- }
- &-text {
- font-size: 18px;
- font-weight: 500;
- color: #000000;
- margin-right: 24px;
- }
- }
- &-platform-selector {
- width: 200px;
- margin-left: 20px;
-
- // 基础样式
- .ant-select-selector {
- border: 1px solid #e8e8e8;
- border-radius: 6px;
- background: #fafafa;
-
- &:hover {
- border-color: #1890ff;
- background: #fff;
- }
- }
- }
- }
- // 响应式处理
- @media (max-width: 1200px) {
- .header {
-
- // 优化logo区域在中等屏幕下的显示
- &-logo {
- margin-right: 20px;
-
- &-text {
- font-size: 16px; // 稍微减小字体
- margin-right: 16px; // 减少右边距
- }
- }
-
- // 优化Select组件在中等屏幕下的显示
- .ant-select {
- width: 160px !important; // 减小Select宽度
- }
- }
- }
- @media (max-width: 768px) {
- .header {
- padding: 0 16px;
-
- &-logo {
- margin-right: 12px;
-
- &-text {
- font-size: 14px; // 进一步减小字体
- margin-right: 12px; // 进一步减少右边距
- white-space: nowrap; // 防止换行
- overflow: hidden; // 隐藏溢出内容
- text-overflow: ellipsis; // 显示省略号
- max-width: 120px; // 限制最大宽度
- }
- }
-
- // 优化Select组件在移动端的显示
- .ant-select {
- width: 120px !important; // 进一步减小Select宽度
- margin-left: 8px !important; // 减少左边距
- }
-
- &-operation {
- padding: 2px 4px;
-
- &-name {
- display: none; // 在移动端隐藏用户名
- }
- }
-
- &-logout-btn {
- padding: 2px 4px;
- }
- }
- }
- // 超小屏幕优化
- @media (max-width: 480px) {
- .header {
- padding: 0 12px;
-
- &-logo {
- margin-right: 8px;
-
- &-text {
- font-size: 12px; // 最小字体
- margin-right: 8px;
- max-width: 80px; // 进一步限制宽度
- }
-
- &-picture {
- width: 24px; // 减小logo尺寸
- height: 24px;
- margin-right: 6px;
- }
- }
-
- // 超小屏幕下的Select组件优化
- .ant-select {
- width: 80px !important; // 最小宽度
- margin-left: 4px !important; // 最小边距
- }
- }
- }
- .nav {
- width: 200px !important;
- height: calc(100vh - 64px) !important;
- background: #F9FAFB !important;
- border-right: 1px solid #f0f0f0;
- position: fixed;
- top: 64px;
- left: 0;
- z-index: 999;
- .ant-menu {
- background-color: transparent !important;
- overflow-x: hidden;
- overflow-y: auto;
- border-right: none !important;
- width: 100% !important; // 确保菜单占满容器宽度
- &-item {
- transition: all 0.2s ease;
- margin: 4px 6px !important; // 减少左右边距
- border-radius: 6px !important;
- height: 40px !important;
- line-height: 40px !important;
- position: relative;
- // 默认状态:透明边框,保持布局稳定
- border-left: 3px solid transparent !important;
- padding-left: 13px !important;
- padding-right: 8px !important; // 添加右内边距
- // 确保菜单项不会超出容器宽度
- box-sizing: border-box !important;
- width: calc(100% - 12px) !important; // 减去左右边距的宽度
- max-width: calc(100% - 12px) !important;
- // 悬停状态 - 浅色背景,保持透明边框
- &:hover:not(&-selected) {
- background-color: rgba(24, 144, 255, 0.04) !important;
- color: @primary-color !important;
- // 移除位移效果,保持菜单宽度稳定
- border-left: 3px solid transparent !important; // 保持透明边框,避免闪烁
- padding-left: 13px !important; // 保持一致的内边距
- padding-right: 8px !important; // 保持右内边距
- }
- // 选中状态 - 深色背景,左侧蓝色边框,字体加粗
- &-selected {
- font-weight: 600 !important;
- color: @primary-color !important;
- background: linear-gradient(90deg, rgba(24, 144, 255, 0.12) 0%, rgba(24, 144, 255, 0.06) 100%) !important;
- border-left: 3px solid #1890ff !important; // 使用您指定的颜色
- padding-left: 13px !important; // 减少左内边距以补偿边框
- padding-right: 8px !important; // 保持右内边距
- box-shadow: 0 1px 3px rgba(24, 144, 255, 0.1);
-
- &::after {
- display: none !important;
- }
- // 选中状态下的悬停效果 - 保持蓝条
- &:hover {
- background: linear-gradient(90deg, rgba(24, 144, 255, 0.15) 0%, rgba(24, 144, 255, 0.08) 100%) !important;
- transform: none; // 选中状态不需要位移效果
- box-shadow: 0 2px 6px rgba(24, 144, 255, 0.15);
- border-left: 3px solid #1890ff !important; // 悬停时保持蓝条
- padding-left: 13px !important; // 保持左内边距
- padding-right: 8px !important; // 保持右内边距
- }
- }
- &-active {
- font-weight: 500 !important;
- color: @primary-color !important;
- background-color: rgba(24, 144, 255, 0.06) !important;
- }
- }
- // 图标颜色控制
- &-item {
- .anticon {
- transition: all 0.2s ease;
- font-size: 16px;
- }
- // 悬停时图标颜色
- &:hover:not(&-selected) .anticon {
- color: @primary-color !important;
- transform: scale(1.05);
- }
- // 选中状态图标颜色和效果
- &-selected .anticon {
- color: @primary-color !important;
- font-weight: bold;
- }
- &-active .anticon {
- color: @primary-color !important;
- }
- }
- }
- &-menu {
- width: 100%;
- height: calc(100vh - 100px);
- overflow-x: hidden;
- overflow-y: auto;
- }
- &-bottom {
- width: 100%;
- height: 50px;
- display: flex;
- justify-content: center;
- align-items: center;
- }
- }
- .main-content {
- // padding-bottom: 40px;
- display: flex;
- flex-direction: column;
- height: calc(100vh - 114px); /* 减去Header(64px)和面包屑(50px) */
- background: #fff;
- .breadcrumb-container {
- width: 100%;
- height: 50px;
- padding: 16px 20px;
- display: flex;
- justify-content: space-between;
- align-items: center;
- border-bottom: 1px solid #f0f0f0;
- background: #fff;
- position: sticky;
- top: 0;
- z-index: 999;
- }
- .breadcrumb {
- flex: 1;
- font-weight: 600;
- .ant-breadcrumb-link {
- a {
- &:hover {
- color: @primary-color !important;
- font-weight: 600;
- }
- }
- }
- }
- .breadcrumb-actions {
- display: flex;
- align-items: center;
- gap: 8px;
-
- .help-button {
- color: #606266;
- background-color: #f5f7fa;
- border: none;
- border-radius: 6px;
- font-weight: 500;
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
- transition: all 0.3s ease;
-
- &:hover {
- background-color: #e9ecef;
- color: #409eff;
- box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
- transform: translateY(-2px);
- }
-
- &:active {
- background-color: #d6d9dc;
- }
-
- .anticon {
- margin-right: 4px;
- }
- }
-
- .ant-btn-primary {
- border-radius: 6px;
- font-weight: 500;
- box-shadow: 0 2px 4px rgba(24, 144, 255, 0.2);
- transition: all 0.3s ease;
-
- &:hover {
- transform: translateY(-2px);
- box-shadow: 0 4px 8px rgba(24, 144, 255, 0.3);
- }
- }
- }
- /* 内容区域滚动 */
- .content-scroll-area {
- flex: 1;
- overflow-y: auto;
- background: #fff;
- position: relative;
- }
- }
- .model-selector-modal {
- .ant-modal-body {
- padding: 20px;
- }
- }
- .route-option {
- border-radius: 8px;
- overflow: hidden;
- transition: all 0.3s;
- height: 480px;
- display: flex;
- flex-direction: column;
- .ant-card-cover {
- display: flex;
- justify-content: center;
- padding: 60px 0;
- background: #f0f5ff;
- flex: 0 0 auto;
- }
- .ant-card-body {
- display: flex;
- flex-direction: column;
- height: 100%;
- padding-bottom: 0;
- }
- .logo-container {
- display: flex;
- justify-content: center;
- align-items: center;
- width: 100%;
- }
- .option-icon {
- font-size: 64px;
- color: #1890ff;
- }
- .ant-card-meta {
- text-align: center;
- margin-bottom: 0;
- flex: 1;
- display: flex;
- flex-direction: column;
- justify-content: center;
- &-title {
- font-size: 18px;
- font-weight: 500;
- margin-bottom: 8px;
- }
- &-description {
- color: #666;
- padding: 0 16px;
- }
- }
- .select-button {
- margin: 24px 0;
- height: 48px;
- font-weight: 500;
- font-size: 16px;
- flex: 0 0 auto;
- }
- &:hover {
- transform: translateY(-5px);
- box-shadow: 0 6px 16px 0 rgba(0, 0, 0, 0.08);
- }
- }
- // 帮助文档菜单样式 - 与主菜单保持一致
- .help-layout {
- .ant-layout-sider .ant-menu {
- background-color: transparent !important;
- border-right: none !important;
-
- // 子菜单样式
- .ant-menu-submenu {
- .ant-menu-submenu-title {
- transition: all 0.2s ease !important;
- margin: 4px 6px !important;
- border-radius: 6px !important;
- height: 40px !important;
- line-height: 40px !important;
- position: relative;
- border-left: 3px solid transparent !important;
- padding-left: 13px !important;
- padding-right: 8px !important;
- box-sizing: border-box !important;
- width: calc(100% - 12px) !important;
- &:hover {
- background-color: rgba(24, 144, 255, 0.04) !important;
- color: @primary-color !important;
- border-left: 3px solid transparent !important; // 悬停时无蓝条
- }
- }
- // 子菜单内容区域
- .ant-menu-sub {
- background-color: transparent !important;
- }
- }
- // 统一处理所有菜单项(包括子菜单项)
- .ant-menu-item {
- transition: all 0.2s ease !important;
- margin: 4px 6px !important;
- border-radius: 6px !important;
- height: 40px !important;
- line-height: 40px !important;
- position: relative;
- border-left: 3px solid transparent !important;
- padding-left: 13px !important;
- padding-right: 8px !important;
- box-sizing: border-box !important;
- width: calc(100% - 12px) !important;
- max-width: calc(100% - 12px) !important;
- // 子菜单项特殊样式
- .ant-menu-sub & {
- margin: 2px 6px 2px 20px !important; // 增加左边距以显示层级
- height: 36px !important; // 稍微小一点
- line-height: 36px !important;
- font-size: 13px !important; // 稍微小一点的字体
- width: calc(100% - 26px) !important; // 减去增加的左边距
- }
- // 悬停状态 - 无蓝条
- &:hover:not(.ant-menu-item-selected) {
- background-color: rgba(24, 144, 255, 0.04) !important;
- color: @primary-color !important;
- border-left: 3px solid transparent !important;
- padding-left: 13px !important;
- padding-right: 8px !important;
- }
- // 选中状态 - 有蓝条和选中效果
- &.ant-menu-item-selected {
- font-weight: 600 !important;
- color: #1890ff !important;
- background: linear-gradient(90deg, rgba(24, 144, 255, 0.12) 0%, rgba(24, 144, 255, 0.06) 100%) !important;
- border-left: 3px solid #1890ff !important;
- padding-left: 13px !important;
- padding-right: 8px !important;
- box-shadow: 0 1px 3px rgba(24, 144, 255, 0.1) !important;
-
- &::after {
- display: none !important;
- }
- &:hover {
- background: linear-gradient(90deg, rgba(24, 144, 255, 0.15) 0%, rgba(24, 144, 255, 0.08) 100%) !important;
- box-shadow: 0 2px 6px rgba(24, 144, 255, 0.15) !important;
- border-left: 3px solid #1890ff !important;
- padding-left: 13px !important;
- padding-right: 8px !important;
- }
- }
- }
- // 图标颜色控制
- .ant-menu-item, .ant-menu-submenu-title {
- .anticon {
- transition: all 0.2s ease;
- font-size: 16px;
- }
- &:hover:not(.ant-menu-item-selected) .anticon {
- color: @primary-color !important;
- }
- &.ant-menu-item-selected .anticon {
- color: @primary-color !important;
- font-weight: bold;
- }
- }
- }
- }
|