style.less 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619
  1. .header {
  2. width: 100%;
  3. height: 64px;
  4. padding: 0 24px;
  5. background: #FFFFFF;
  6. display: flex;
  7. justify-content: space-between;
  8. align-items: center;
  9. border-bottom: 1px solid #f0f0f0;
  10. box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  11. position: fixed;
  12. top: 0;
  13. left: 0;
  14. z-index: 1000;
  15. font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  16. // 用户区域样式
  17. &-user-section {
  18. display: flex;
  19. align-items: center;
  20. gap: 8px;
  21. }
  22. // 登出按钮样式
  23. &-logout-btn {
  24. color: #666;
  25. border: none;
  26. padding: 4px 8px;
  27. border-radius: 6px;
  28. transition: all 0.3s ease;
  29. &:hover {
  30. color: #ff4d4f;
  31. background: rgba(255, 77, 79, 0.1);
  32. }
  33. &:active {
  34. color: #cf1322;
  35. background: rgba(255, 77, 79, 0.2);
  36. }
  37. }
  38. // 用户操作区域样式优化
  39. &-operation {
  40. display: flex;
  41. align-items: center;
  42. cursor: pointer;
  43. padding: 4px 8px; // 增加点击区域
  44. border-radius: 6px;
  45. transition: background-color 0.3s ease;
  46. &-picture {
  47. width: 30px;
  48. height: 30px;
  49. background: @primary-color;
  50. border-radius: 50%;
  51. display: flex;
  52. justify-content: center;
  53. align-items: center;
  54. margin-right: 8px;
  55. color: #FFFFFF;
  56. }
  57. &-name {
  58. font-weight: 500;
  59. color: @primary-color;
  60. }
  61. }
  62. // &-nav {
  63. // display: flex;
  64. // align-items: center;
  65. // gap: 40px;
  66. // margin-left: 40px;
  67. // &-item {
  68. // color: #666;
  69. // font-weight: 500;
  70. // position: relative;
  71. // transition: color 0.3s;
  72. // &:hover {
  73. // color: @primary-color;
  74. // }
  75. // &.active {
  76. // color: @primary-color;
  77. // &::after {
  78. // content: '';
  79. // position: absolute;
  80. // bottom: -22px;
  81. // left: 0;
  82. // right: 0;
  83. // height: 2px;
  84. // background: @primary-color;
  85. // }
  86. // }
  87. // }
  88. // }
  89. &-logo {
  90. display: flex;
  91. align-items: center;
  92. cursor: pointer;
  93. margin-right: 40px;
  94. &-picture {
  95. width: 30px;
  96. height: 30px;
  97. margin-right: 10px;
  98. }
  99. &-text {
  100. font-size: 18px;
  101. font-weight: 500;
  102. color: #000000;
  103. margin-right: 24px;
  104. }
  105. }
  106. &-platform-selector {
  107. width: 200px;
  108. margin-left: 20px;
  109. // 基础样式
  110. .ant-select-selector {
  111. border: 1px solid #e8e8e8;
  112. border-radius: 6px;
  113. background: #fafafa;
  114. &:hover {
  115. border-color: #1890ff;
  116. background: #fff;
  117. }
  118. }
  119. }
  120. }
  121. // 响应式处理
  122. @media (max-width: 1200px) {
  123. .header {
  124. // 优化logo区域在中等屏幕下的显示
  125. &-logo {
  126. margin-right: 20px;
  127. &-text {
  128. font-size: 16px; // 稍微减小字体
  129. margin-right: 16px; // 减少右边距
  130. }
  131. }
  132. // 优化Select组件在中等屏幕下的显示
  133. .ant-select {
  134. width: 160px !important; // 减小Select宽度
  135. }
  136. }
  137. }
  138. @media (max-width: 768px) {
  139. .header {
  140. padding: 0 16px;
  141. &-logo {
  142. margin-right: 12px;
  143. &-text {
  144. font-size: 14px; // 进一步减小字体
  145. margin-right: 12px; // 进一步减少右边距
  146. white-space: nowrap; // 防止换行
  147. overflow: hidden; // 隐藏溢出内容
  148. text-overflow: ellipsis; // 显示省略号
  149. max-width: 120px; // 限制最大宽度
  150. }
  151. }
  152. // 优化Select组件在移动端的显示
  153. .ant-select {
  154. width: 120px !important; // 进一步减小Select宽度
  155. margin-left: 8px !important; // 减少左边距
  156. }
  157. &-operation {
  158. padding: 2px 4px;
  159. &-name {
  160. display: none; // 在移动端隐藏用户名
  161. }
  162. }
  163. &-logout-btn {
  164. padding: 2px 4px;
  165. }
  166. }
  167. }
  168. // 超小屏幕优化
  169. @media (max-width: 480px) {
  170. .header {
  171. padding: 0 12px;
  172. &-logo {
  173. margin-right: 8px;
  174. &-text {
  175. font-size: 12px; // 最小字体
  176. margin-right: 8px;
  177. max-width: 80px; // 进一步限制宽度
  178. }
  179. &-picture {
  180. width: 24px; // 减小logo尺寸
  181. height: 24px;
  182. margin-right: 6px;
  183. }
  184. }
  185. // 超小屏幕下的Select组件优化
  186. .ant-select {
  187. width: 80px !important; // 最小宽度
  188. margin-left: 4px !important; // 最小边距
  189. }
  190. }
  191. }
  192. .nav {
  193. width: 200px !important;
  194. height: calc(100vh - 64px) !important;
  195. background: #F9FAFB !important;
  196. border-right: 1px solid #f0f0f0;
  197. position: fixed;
  198. top: 64px;
  199. left: 0;
  200. z-index: 999;
  201. .ant-menu {
  202. background-color: transparent !important;
  203. overflow-x: hidden;
  204. overflow-y: auto;
  205. border-right: none !important;
  206. width: 100% !important; // 确保菜单占满容器宽度
  207. &-item {
  208. transition: all 0.2s ease;
  209. margin: 4px 6px !important; // 减少左右边距
  210. border-radius: 6px !important;
  211. height: 40px !important;
  212. line-height: 40px !important;
  213. position: relative;
  214. // 默认状态:透明边框,保持布局稳定
  215. border-left: 3px solid transparent !important;
  216. padding-left: 13px !important;
  217. padding-right: 8px !important; // 添加右内边距
  218. // 确保菜单项不会超出容器宽度
  219. box-sizing: border-box !important;
  220. width: calc(100% - 12px) !important; // 减去左右边距的宽度
  221. max-width: calc(100% - 12px) !important;
  222. // 悬停状态 - 浅色背景,保持透明边框
  223. &:hover:not(&-selected) {
  224. background-color: rgba(24, 144, 255, 0.04) !important;
  225. color: @primary-color !important;
  226. // 移除位移效果,保持菜单宽度稳定
  227. border-left: 3px solid transparent !important; // 保持透明边框,避免闪烁
  228. padding-left: 13px !important; // 保持一致的内边距
  229. padding-right: 8px !important; // 保持右内边距
  230. }
  231. // 选中状态 - 深色背景,左侧蓝色边框,字体加粗
  232. &-selected {
  233. font-weight: 600 !important;
  234. color: @primary-color !important;
  235. background: linear-gradient(90deg, rgba(24, 144, 255, 0.12) 0%, rgba(24, 144, 255, 0.06) 100%) !important;
  236. border-left: 3px solid #1890ff !important; // 使用您指定的颜色
  237. padding-left: 13px !important; // 减少左内边距以补偿边框
  238. padding-right: 8px !important; // 保持右内边距
  239. box-shadow: 0 1px 3px rgba(24, 144, 255, 0.1);
  240. &::after {
  241. display: none !important;
  242. }
  243. // 选中状态下的悬停效果 - 保持蓝条
  244. &:hover {
  245. background: linear-gradient(90deg, rgba(24, 144, 255, 0.15) 0%, rgba(24, 144, 255, 0.08) 100%) !important;
  246. transform: none; // 选中状态不需要位移效果
  247. box-shadow: 0 2px 6px rgba(24, 144, 255, 0.15);
  248. border-left: 3px solid #1890ff !important; // 悬停时保持蓝条
  249. padding-left: 13px !important; // 保持左内边距
  250. padding-right: 8px !important; // 保持右内边距
  251. }
  252. }
  253. &-active {
  254. font-weight: 500 !important;
  255. color: @primary-color !important;
  256. background-color: rgba(24, 144, 255, 0.06) !important;
  257. }
  258. }
  259. // 图标颜色控制
  260. &-item {
  261. .anticon {
  262. transition: all 0.2s ease;
  263. font-size: 16px;
  264. }
  265. // 悬停时图标颜色
  266. &:hover:not(&-selected) .anticon {
  267. color: @primary-color !important;
  268. transform: scale(1.05);
  269. }
  270. // 选中状态图标颜色和效果
  271. &-selected .anticon {
  272. color: @primary-color !important;
  273. font-weight: bold;
  274. }
  275. &-active .anticon {
  276. color: @primary-color !important;
  277. }
  278. }
  279. }
  280. &-menu {
  281. width: 100%;
  282. height: calc(100vh - 100px);
  283. overflow-x: hidden;
  284. overflow-y: auto;
  285. }
  286. &-bottom {
  287. width: 100%;
  288. height: 50px;
  289. display: flex;
  290. justify-content: center;
  291. align-items: center;
  292. }
  293. }
  294. .main-content {
  295. // padding-bottom: 40px;
  296. display: flex;
  297. flex-direction: column;
  298. height: calc(100vh - 114px); /* 减去Header(64px)和面包屑(50px) */
  299. background: #fff;
  300. .breadcrumb-container {
  301. width: 100%;
  302. height: 50px;
  303. padding: 16px 20px;
  304. display: flex;
  305. justify-content: space-between;
  306. align-items: center;
  307. border-bottom: 1px solid #f0f0f0;
  308. background: #fff;
  309. position: sticky;
  310. top: 0;
  311. z-index: 999;
  312. }
  313. .breadcrumb {
  314. flex: 1;
  315. font-weight: 600;
  316. .ant-breadcrumb-link {
  317. a {
  318. &:hover {
  319. color: @primary-color !important;
  320. font-weight: 600;
  321. }
  322. }
  323. }
  324. }
  325. .breadcrumb-actions {
  326. display: flex;
  327. align-items: center;
  328. gap: 8px;
  329. .help-button {
  330. color: #606266;
  331. background-color: #f5f7fa;
  332. border: none;
  333. border-radius: 6px;
  334. font-weight: 500;
  335. box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  336. transition: all 0.3s ease;
  337. &:hover {
  338. background-color: #e9ecef;
  339. color: #409eff;
  340. box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  341. transform: translateY(-2px);
  342. }
  343. &:active {
  344. background-color: #d6d9dc;
  345. }
  346. .anticon {
  347. margin-right: 4px;
  348. }
  349. }
  350. .ant-btn-primary {
  351. border-radius: 6px;
  352. font-weight: 500;
  353. box-shadow: 0 2px 4px rgba(24, 144, 255, 0.2);
  354. transition: all 0.3s ease;
  355. &:hover {
  356. transform: translateY(-2px);
  357. box-shadow: 0 4px 8px rgba(24, 144, 255, 0.3);
  358. }
  359. }
  360. }
  361. /* 内容区域滚动 */
  362. .content-scroll-area {
  363. flex: 1;
  364. overflow-y: auto;
  365. background: #fff;
  366. position: relative;
  367. }
  368. }
  369. .model-selector-modal {
  370. .ant-modal-body {
  371. padding: 20px;
  372. }
  373. }
  374. .route-option {
  375. border-radius: 8px;
  376. overflow: hidden;
  377. transition: all 0.3s;
  378. height: 480px;
  379. display: flex;
  380. flex-direction: column;
  381. .ant-card-cover {
  382. display: flex;
  383. justify-content: center;
  384. padding: 60px 0;
  385. background: #f0f5ff;
  386. flex: 0 0 auto;
  387. }
  388. .ant-card-body {
  389. display: flex;
  390. flex-direction: column;
  391. height: 100%;
  392. padding-bottom: 0;
  393. }
  394. .logo-container {
  395. display: flex;
  396. justify-content: center;
  397. align-items: center;
  398. width: 100%;
  399. }
  400. .option-icon {
  401. font-size: 64px;
  402. color: #1890ff;
  403. }
  404. .ant-card-meta {
  405. text-align: center;
  406. margin-bottom: 0;
  407. flex: 1;
  408. display: flex;
  409. flex-direction: column;
  410. justify-content: center;
  411. &-title {
  412. font-size: 18px;
  413. font-weight: 500;
  414. margin-bottom: 8px;
  415. }
  416. &-description {
  417. color: #666;
  418. padding: 0 16px;
  419. }
  420. }
  421. .select-button {
  422. margin: 24px 0;
  423. height: 48px;
  424. font-weight: 500;
  425. font-size: 16px;
  426. flex: 0 0 auto;
  427. }
  428. &:hover {
  429. transform: translateY(-5px);
  430. box-shadow: 0 6px 16px 0 rgba(0, 0, 0, 0.08);
  431. }
  432. }
  433. // 帮助文档菜单样式 - 与主菜单保持一致
  434. .help-layout {
  435. .ant-layout-sider .ant-menu {
  436. background-color: transparent !important;
  437. border-right: none !important;
  438. // 子菜单样式
  439. .ant-menu-submenu {
  440. .ant-menu-submenu-title {
  441. transition: all 0.2s ease !important;
  442. margin: 4px 6px !important;
  443. border-radius: 6px !important;
  444. height: 40px !important;
  445. line-height: 40px !important;
  446. position: relative;
  447. border-left: 3px solid transparent !important;
  448. padding-left: 13px !important;
  449. padding-right: 8px !important;
  450. box-sizing: border-box !important;
  451. width: calc(100% - 12px) !important;
  452. &:hover {
  453. background-color: rgba(24, 144, 255, 0.04) !important;
  454. color: @primary-color !important;
  455. border-left: 3px solid transparent !important; // 悬停时无蓝条
  456. }
  457. }
  458. // 子菜单内容区域
  459. .ant-menu-sub {
  460. background-color: transparent !important;
  461. }
  462. }
  463. // 统一处理所有菜单项(包括子菜单项)
  464. .ant-menu-item {
  465. transition: all 0.2s ease !important;
  466. margin: 4px 6px !important;
  467. border-radius: 6px !important;
  468. height: 40px !important;
  469. line-height: 40px !important;
  470. position: relative;
  471. border-left: 3px solid transparent !important;
  472. padding-left: 13px !important;
  473. padding-right: 8px !important;
  474. box-sizing: border-box !important;
  475. width: calc(100% - 12px) !important;
  476. max-width: calc(100% - 12px) !important;
  477. // 子菜单项特殊样式
  478. .ant-menu-sub & {
  479. margin: 2px 6px 2px 20px !important; // 增加左边距以显示层级
  480. height: 36px !important; // 稍微小一点
  481. line-height: 36px !important;
  482. font-size: 13px !important; // 稍微小一点的字体
  483. width: calc(100% - 26px) !important; // 减去增加的左边距
  484. }
  485. // 悬停状态 - 无蓝条
  486. &:hover:not(.ant-menu-item-selected) {
  487. background-color: rgba(24, 144, 255, 0.04) !important;
  488. color: @primary-color !important;
  489. border-left: 3px solid transparent !important;
  490. padding-left: 13px !important;
  491. padding-right: 8px !important;
  492. }
  493. // 选中状态 - 有蓝条和选中效果
  494. &.ant-menu-item-selected {
  495. font-weight: 600 !important;
  496. color: #1890ff !important;
  497. background: linear-gradient(90deg, rgba(24, 144, 255, 0.12) 0%, rgba(24, 144, 255, 0.06) 100%) !important;
  498. border-left: 3px solid #1890ff !important;
  499. padding-left: 13px !important;
  500. padding-right: 8px !important;
  501. box-shadow: 0 1px 3px rgba(24, 144, 255, 0.1) !important;
  502. &::after {
  503. display: none !important;
  504. }
  505. &:hover {
  506. background: linear-gradient(90deg, rgba(24, 144, 255, 0.15) 0%, rgba(24, 144, 255, 0.08) 100%) !important;
  507. box-shadow: 0 2px 6px rgba(24, 144, 255, 0.15) !important;
  508. border-left: 3px solid #1890ff !important;
  509. padding-left: 13px !important;
  510. padding-right: 8px !important;
  511. }
  512. }
  513. }
  514. // 图标颜色控制
  515. .ant-menu-item, .ant-menu-submenu-title {
  516. .anticon {
  517. transition: all 0.2s ease;
  518. font-size: 16px;
  519. }
  520. &:hover:not(.ant-menu-item-selected) .anticon {
  521. color: @primary-color !important;
  522. }
  523. &.ant-menu-item-selected .anticon {
  524. color: @primary-color !important;
  525. font-weight: bold;
  526. }
  527. }
  528. }
  529. }