global.less 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503
  1. @import './index.less';
  2. body {
  3. }
  4. #app {
  5. height: 100%;
  6. &.colorWeak {
  7. filter: invert(80%);
  8. }
  9. &.userLayout {
  10. overflow: auto;
  11. }
  12. }
  13. .layout.ant-layout {
  14. height: auto;
  15. overflow-x: hidden;
  16. &.mobile,
  17. &.tablet {
  18. .ant-layout-content {
  19. .content {
  20. margin: 24px 0 0;
  21. }
  22. }
  23. .topmenu {
  24. /* 必须为 topmenu 才能启用流式布局 */
  25. &.content-width-Fluid {
  26. .header-index-wide {
  27. margin-left: 0;
  28. }
  29. }
  30. }
  31. }
  32. &.mobile {
  33. .sidemenu {
  34. .ant-header-fixedHeader {
  35. &.ant-header-side-opened,
  36. &.ant-header-side-closed {
  37. width: 100%;
  38. }
  39. }
  40. }
  41. }
  42. &.ant-layout-has-sider {
  43. flex-direction: row;
  44. }
  45. .trigger {
  46. font-size: 20px;
  47. line-height: 55px;
  48. padding: 0 24px;
  49. cursor: pointer;
  50. transition: color 0.3s;
  51. &:hover {
  52. background: rgba(0, 0, 0, 0.025);
  53. }
  54. }
  55. .topmenu {
  56. .ant-header-fixedHeader {
  57. position: fixed;
  58. top: 0;
  59. right: 0;
  60. z-index: 9;
  61. width: 100%;
  62. transition: width 0.2s;
  63. &.ant-header-side-opened {
  64. width: 100%;
  65. }
  66. &.ant-header-side-closed {
  67. width: 100%;
  68. }
  69. }
  70. /* 必须为 topmenu 才能启用流式布局 */
  71. &.content-width-Fluid {
  72. .header-index-wide {
  73. max-width: unset;
  74. .header-index-left {
  75. flex: 1 1 1000px;
  76. .logo{
  77. margin-left: 25px;
  78. }
  79. .ant-menu.ant-menu-horizontal{
  80. max-width: calc(100vw - 190px - 238px - 25px);
  81. flex: 1 1 calc(100vw - 190px - 238px - 25px);
  82. }
  83. }
  84. .header-index-right{
  85. margin-right:25px;
  86. }
  87. }
  88. .page-header-index-wide {
  89. max-width: unset;
  90. }
  91. }
  92. }
  93. .sidemenu {
  94. .ant-header-fixedHeader {
  95. position: fixed;
  96. top: 0;
  97. right: 0;
  98. z-index: 9;
  99. width: 100%;
  100. transition: width 0.2s;
  101. &.ant-header-side-opened {
  102. width: calc(100% - 230px);
  103. }
  104. &.ant-header-side-closed {
  105. width: calc(100% - 80px);
  106. }
  107. }
  108. }
  109. .header {
  110. height: 55px;
  111. // padding: 0 12px 0 0;
  112. background: #fff;
  113. box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
  114. position: relative;
  115. }
  116. .header,
  117. .top-nav-header-index {
  118. .user-wrapper {
  119. float: right;
  120. height: 100%;
  121. .action {
  122. line-height: 55px;
  123. cursor: pointer;
  124. padding: 0 12px;
  125. display: inline-block;
  126. transition: all 0.3s;
  127. height: 100%;
  128. color: rgba(0, 0, 0, 0.65);
  129. &:hover {
  130. background: rgba(0, 0, 0, 0.025);
  131. }
  132. .avatar {
  133. margin: 15px 8px 15px 0;
  134. color: #1890ff;
  135. background: hsla(0, 0%, 100%, 0.85);
  136. vertical-align: middle;
  137. }
  138. .icon {
  139. font-size: 16px;
  140. padding: 4px;
  141. }
  142. }
  143. }
  144. &.dark {
  145. .user-wrapper {
  146. .action {
  147. color: rgba(255, 255, 255, 0.85);
  148. a {
  149. color: rgba(255, 255, 255, 0.85);
  150. }
  151. &:hover {
  152. background: rgba(255, 255, 255, 0.16);
  153. }
  154. }
  155. }
  156. }
  157. }
  158. &.mobile,
  159. &.tablet {
  160. .top-nav-header-index {
  161. .header-index-wide {
  162. .header-index-left {
  163. .trigger {
  164. color: rgba(255, 255, 255, 0.85);
  165. padding: 0 12px;
  166. }
  167. .logo.top-nav-header {
  168. flex: 0 0 56px;
  169. text-align: center;
  170. line-height: 58px;
  171. h1 {
  172. display: none;
  173. }
  174. }
  175. }
  176. }
  177. &.light {
  178. .header-index-wide {
  179. .header-index-left {
  180. .trigger {
  181. color: rgba(0, 0, 0, 0.65);
  182. }
  183. }
  184. }
  185. }
  186. }
  187. }
  188. &.tablet {
  189. // overflow: hidden; text-overflow:ellipsis; white-space: nowrap;
  190. .top-nav-header-index {
  191. .header-index-wide {
  192. .header-index-left {
  193. .logo > a {
  194. overflow: hidden;
  195. text-overflow: ellipsis;
  196. white-space: nowrap;
  197. }
  198. }
  199. .ant-menu.ant-menu-horizontal {
  200. flex: 1 1 auto;
  201. white-space: normal;
  202. }
  203. }
  204. }
  205. }
  206. .top-nav-header-index {
  207. box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
  208. position: relative;
  209. transition: background 0.3s, width 0.2s;
  210. .header-index-wide {
  211. max-width: 1200px;
  212. margin: auto;
  213. padding-left: 0;
  214. display: flex;
  215. height: 55px;
  216. .ant-menu.ant-menu-horizontal {
  217. max-width: 835px;
  218. flex: 0 1 835px;
  219. border: none;
  220. height: 55px;
  221. line-height: 55px;
  222. }
  223. .header-index-left {
  224. flex: 0 1 1000px;
  225. display: flex;
  226. .logo.top-nav-header {
  227. flex: 0 0 165px;
  228. width: 165px;
  229. height: 55px;
  230. position: relative;
  231. line-height: 55px;
  232. transition: all 0.3s;
  233. overflow: hidden;
  234. img,
  235. svg {
  236. display: inline-block;
  237. vertical-align: middle;
  238. height: 32px;
  239. width: 32px;
  240. }
  241. h1 {
  242. color: #fff;
  243. display: inline-block;
  244. vertical-align: top;
  245. font-size: 16px;
  246. margin: 0 0 0 12px;
  247. font-weight: 400;
  248. }
  249. }
  250. }
  251. .header-index-right {
  252. flex: 0 0 238px;
  253. align-self: flex-end;
  254. height: 55px;
  255. overflow: hidden;
  256. .content-box {
  257. float: right;
  258. .action {
  259. max-width: 140px;
  260. overflow: hidden;
  261. text-overflow:ellipsis;
  262. white-space:nowrap;
  263. }
  264. }
  265. }
  266. }
  267. &.light {
  268. background-color: #fff;
  269. .header-index-wide {
  270. .header-index-left {
  271. .logo {
  272. h1 {
  273. color: #002140;
  274. }
  275. }
  276. }
  277. }
  278. }
  279. }
  280. // 内容区
  281. .layout-content {
  282. margin: 24px 24px 0px;
  283. //height: 100%;
  284. //height: 64px;
  285. padding: 0 12px 0 0;
  286. }
  287. // footer
  288. .ant-layout-footer {
  289. padding: 0;
  290. }
  291. }
  292. .topmenu {
  293. .page-header-index-wide {
  294. max-width: 1200px;
  295. margin: 0 auto;
  296. }
  297. }
  298. // drawer-sider 自定义
  299. .ant-drawer.drawer-sider {
  300. .sider {
  301. box-shadow: none;
  302. }
  303. &.dark {
  304. .ant-drawer-content {
  305. background-color: rgb(0, 21, 41);
  306. }
  307. }
  308. &.light {
  309. box-shadow: none;
  310. .ant-drawer-content {
  311. background-color: #fff;
  312. }
  313. }
  314. .ant-drawer-body {
  315. padding: 0;
  316. }
  317. }
  318. // 菜单样式
  319. .sider {
  320. box-shadow: 2px 0 6px rgba(0, 21, 41, 0.35);
  321. position: relative;
  322. z-index: @ant-global-sider-zindex;
  323. min-height: 100vh;
  324. .ant-layout-sider-children {
  325. overflow-y: hidden;
  326. &:hover {
  327. overflow-y: auto;
  328. }
  329. }
  330. &.ant-fixed-sidemenu {
  331. position: fixed;
  332. height: 100%;
  333. }
  334. // logo区域样式
  335. .logo {
  336. position: relative;
  337. height: 55px;
  338. padding-left: 24px;
  339. overflow: hidden;
  340. line-height: 55px;
  341. background: #002140;
  342. transition: all .3s;
  343. img,
  344. svg,
  345. h1 {
  346. display: inline-block;
  347. vertical-align: middle;
  348. }
  349. img,
  350. svg {
  351. height: 32px;
  352. width: 32px;
  353. }
  354. h1 {
  355. color: #fff;
  356. font-size: 20px;
  357. margin: 0 0 0 12px;
  358. font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif;
  359. font-weight: 600;
  360. vertical-align: middle;
  361. }
  362. }
  363. &.light {
  364. background-color: #fff;
  365. box-shadow: 2px 0px 8px 0px rgba(29, 35, 41, 0.05);
  366. .logo {
  367. background: #fff;
  368. box-shadow: 1px 1px 0px 0px #e8e8e8;
  369. h1 {
  370. color: unset;
  371. }
  372. }
  373. .ant-menu-light {
  374. border-right-color: transparent;
  375. }
  376. }
  377. }
  378. // 外置的样式控制
  379. .user-dropdown-menu {
  380. span {
  381. user-select: none;
  382. }
  383. }
  384. .user-dropdown-menu-wrapper.ant-dropdown-menu {
  385. padding: 4px 0;
  386. .ant-dropdown-menu-item {
  387. width: 160px;
  388. }
  389. .ant-dropdown-menu-item > .anticon:first-child,
  390. .ant-dropdown-menu-item > a > .anticon:first-child,
  391. .ant-dropdown-menu-submenu-title > .anticon:first-child .ant-dropdown-menu-submenu-title > a > .anticon:first-child {
  392. min-width: 12px;
  393. margin-right: 8px;
  394. }
  395. }
  396. // 数据列表 样式
  397. .table-alert {
  398. margin-bottom: 16px;
  399. }
  400. .table-page-search-wrapper {
  401. .ant-form-inline {
  402. .ant-form-item {
  403. display: flex;
  404. margin-bottom: 24px;
  405. margin-right: 0;
  406. .ant-form-item-control-wrapper {
  407. flex: 1 1;
  408. display: inline-block;
  409. vertical-align: middle;
  410. }
  411. > .ant-form-item-label {
  412. line-height: 32px;
  413. padding-right: 8px;
  414. width: auto;
  415. }
  416. .ant-form-item-control {
  417. height: 32px;
  418. line-height: 32px;
  419. }
  420. }
  421. }
  422. .table-page-search-submitButtons {
  423. display: block;
  424. margin-bottom: 24px;
  425. white-space: nowrap;
  426. }
  427. }
  428. .content {
  429. .table-operator {
  430. margin-bottom: 18px;
  431. button {
  432. margin-right: 8px;
  433. }
  434. }
  435. }