style.less 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396
  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. &-item {
  206. transition: font-weight 0.2s ease;
  207. &-selected, &-active {
  208. font-weight: 600 !important;
  209. color: @primary-color !important;
  210. }
  211. }
  212. }
  213. &-menu {
  214. width: 100%;
  215. height: calc(100vh - 100px);
  216. overflow-x: hidden;
  217. overflow-y: auto;
  218. }
  219. &-bottom {
  220. width: 100%;
  221. height: 50px;
  222. display: flex;
  223. justify-content: center;
  224. align-items: center;
  225. }
  226. }
  227. .main-content {
  228. padding-bottom: 40px;
  229. display: flex;
  230. flex-direction: column;
  231. height: calc(100vh - 114px); /* 减去Header(64px)和面包屑(50px) */
  232. background: #fff;
  233. .breadcrumb-container {
  234. width: 100%;
  235. height: 50px;
  236. padding: 16px 20px;
  237. display: flex;
  238. justify-content: space-between;
  239. align-items: center;
  240. border-bottom: 1px solid #f0f0f0;
  241. background: #fff;
  242. position: sticky;
  243. top: 0;
  244. z-index: 999;
  245. }
  246. .breadcrumb {
  247. flex: 1;
  248. font-weight: 600;
  249. .ant-breadcrumb-link {
  250. a {
  251. &:hover {
  252. color: @primary-color !important;
  253. font-weight: 600;
  254. }
  255. }
  256. }
  257. }
  258. .breadcrumb-actions {
  259. display: flex;
  260. align-items: center;
  261. gap: 8px;
  262. }
  263. /* 内容区域滚动 */
  264. .content-scroll-area {
  265. flex: 1;
  266. overflow-y: auto;
  267. background: #fff;
  268. position: relative;
  269. }
  270. }
  271. .model-selector-modal {
  272. .ant-modal-body {
  273. padding: 20px;
  274. }
  275. }
  276. .route-option {
  277. border-radius: 8px;
  278. overflow: hidden;
  279. transition: all 0.3s;
  280. height: 480px;
  281. display: flex;
  282. flex-direction: column;
  283. .ant-card-cover {
  284. display: flex;
  285. justify-content: center;
  286. padding: 60px 0;
  287. background: #f0f5ff;
  288. flex: 0 0 auto;
  289. }
  290. .ant-card-body {
  291. display: flex;
  292. flex-direction: column;
  293. height: 100%;
  294. padding-bottom: 0;
  295. }
  296. .logo-container {
  297. display: flex;
  298. justify-content: center;
  299. align-items: center;
  300. width: 100%;
  301. }
  302. .option-icon {
  303. font-size: 64px;
  304. color: #1890ff;
  305. }
  306. .ant-card-meta {
  307. text-align: center;
  308. margin-bottom: 0;
  309. flex: 1;
  310. display: flex;
  311. flex-direction: column;
  312. justify-content: center;
  313. &-title {
  314. font-size: 18px;
  315. font-weight: 500;
  316. margin-bottom: 8px;
  317. }
  318. &-description {
  319. color: #666;
  320. padding: 0 16px;
  321. }
  322. }
  323. .select-button {
  324. margin: 24px 0;
  325. height: 48px;
  326. font-weight: 500;
  327. font-size: 16px;
  328. flex: 0 0 auto;
  329. }
  330. &:hover {
  331. transform: translateY(-5px);
  332. box-shadow: 0 6px 16px 0 rgba(0, 0, 0, 0.08);
  333. }
  334. }