global.less 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627
  1. @import './index.less';
  2. body {
  3. &.colorWeak {
  4. filter: invert(80%);
  5. }
  6. &.userLayout {
  7. overflow: auto;
  8. }
  9. &.small{
  10. .ant-form,.ant-form label,.ant-form-item,.ant-card,.ant-table,.ant-btn-sm,.ant-btn,.ant-btn-primary.button-error,
  11. .ant-alert,.ant-collapse,.ant-descriptions-item-label,.ant-descriptions-item-content,.ant-checkbox-wrapper,.ant-radio-wrapper,
  12. .table-page-search-wrapper .ant-form.ant-form-inline .ant-form-item .ant-input, .table-page-search-wrapper .ant-form.ant-form-inline .ant-form-item .ant-select-selection,
  13. .ant-cascader-menus,.ant-select-dropdown,.ant-select-dropdown-menu-item,.ant-collapse,.ant-page-header-heading-sub-title,.ant-input-affix-wrapper,.ant-input,.ant-select,
  14. .ant-menu-vertical .ant-menu-item, .ant-menu-vertical-left .ant-menu-item, .ant-menu-vertical-right .ant-menu-item, .ant-menu-inline .ant-menu-item, .ant-menu-vertical .ant-menu-submenu-title,
  15. .ant-menu-vertical-left .ant-menu-submenu-title, .ant-menu-vertical-right .ant-menu-submenu-title, .ant-menu-inline .ant-menu-submenu-title,.ant-tabs-nav-container,
  16. .ant-badge,.layout.ant-layout .header .user-wrapper .action, .layout.ant-layout .top-nav-header-index .user-wrapper .action,.ant-dropdown,.ant-dropdown-menu-item, .ant-dropdown-menu-submenu-title,
  17. .content-box,.ant-modal-body,.ant-modal-confirm-body .ant-modal-confirm-title,.ant-modal-confirm-body .ant-modal-confirm-content,.ant-modal-title,.ant-cascader-picker{
  18. font-size: 12px!important;
  19. }
  20. }
  21. &.middle{
  22. .ant-form,.ant-form label,.ant-form-item,.ant-card,.ant-table,.ant-btn-sm,.ant-btn,.ant-btn-primary.button-error,
  23. .ant-alert,.ant-collapse,.ant-descriptions-item-label,.ant-descriptions-item-content,.ant-checkbox-wrapper,.ant-radio-wrapper,
  24. .table-page-search-wrapper .ant-form.ant-form-inline .ant-form-item .ant-input, .table-page-search-wrapper .ant-form.ant-form-inline .ant-form-item .ant-select-selection,
  25. .ant-cascader-menus,.ant-select-dropdown,.ant-select-dropdown-menu-item,.ant-collapse,.ant-page-header-heading-sub-title,.ant-input-affix-wrapper,.ant-input,.ant-select,
  26. .ant-menu-vertical .ant-menu-item, .ant-menu-vertical-left .ant-menu-item, .ant-menu-vertical-right .ant-menu-item, .ant-menu-inline .ant-menu-item, .ant-menu-vertical .ant-menu-submenu-title,
  27. .ant-menu-vertical-left .ant-menu-submenu-title, .ant-menu-vertical-right .ant-menu-submenu-title, .ant-menu-inline .ant-menu-submenu-title,.ant-tabs-nav-container,
  28. .ant-badge,.layout.ant-layout .header .user-wrapper .action, .layout.ant-layout .top-nav-header-index .user-wrapper .action,.ant-dropdown,.ant-dropdown-menu-item, .ant-dropdown-menu-submenu-title,
  29. .content-box,.ant-modal-body,.ant-modal-confirm-body .ant-modal-confirm-title,.ant-modal-confirm-body .ant-modal-confirm-content,.ant-modal-title,.ant-modal-close-x,.ant-cascader-picker{
  30. font-size: 14px!important;
  31. }
  32. }
  33. &.large{
  34. .ant-form,.ant-form label,.ant-form-item,.ant-card,.ant-table,.ant-btn-sm,.ant-btn,.ant-btn-primary.button-error,
  35. .ant-alert,.ant-collapse,.ant-descriptions-item-label,.ant-descriptions-item-content,.ant-checkbox-wrapper,.ant-radio-wrapper,
  36. .table-page-search-wrapper .ant-form.ant-form-inline .ant-form-item .ant-input, .table-page-search-wrapper .ant-form.ant-form-inline .ant-form-item .ant-select-selection,
  37. .ant-cascader-menus,.ant-select-dropdown,.ant-select-dropdown-menu-item,.ant-collapse,.ant-page-header-heading-sub-title,.ant-input-affix-wrapper,.ant-input,.ant-select,
  38. .ant-menu-vertical .ant-menu-item, .ant-menu-vertical-left .ant-menu-item, .ant-menu-vertical-right .ant-menu-item, .ant-menu-inline .ant-menu-item, .ant-menu-vertical .ant-menu-submenu-title,
  39. .ant-menu-vertical-left .ant-menu-submenu-title, .ant-menu-vertical-right .ant-menu-submenu-title, .ant-menu-inline .ant-menu-submenu-title,.ant-tabs-nav-container,
  40. .ant-badge,.layout.ant-layout .header .user-wrapper .action, .layout.ant-layout .top-nav-header-index .user-wrapper .action,.ant-dropdown,.ant-dropdown-menu-item, .ant-dropdown-menu-submenu-title,
  41. .content-box,.ant-modal-body,.ant-modal-confirm-body .ant-modal-confirm-title,.ant-modal-confirm-body .ant-modal-confirm-content,.ant-modal-title,.ant-modal-close-x,.ant-cascader-picker{
  42. font-size: 16px!important;
  43. }
  44. }
  45. }
  46. .layout.ant-layout {
  47. height: auto;
  48. overflow-x: hidden;
  49. &.mobile,
  50. &.tablet {
  51. .ant-layout-content {
  52. .content {
  53. margin: 12px 0 0;
  54. }
  55. }
  56. /**
  57. * ant-table-wrapper
  58. * 覆盖的表格手机模式样式,如果想修改在手机上表格最低宽度,可以在这里改动
  59. */
  60. .ant-table-wrapper {
  61. .ant-table-content {
  62. overflow-y: auto;
  63. }
  64. .ant-table-body {
  65. min-width: 800px;
  66. }
  67. }
  68. .topmenu {
  69. /* 必须为 topmenu 才能启用流式布局 */
  70. &.content-width-Fluid {
  71. .header-index-wide {
  72. margin-left: 0;
  73. }
  74. }
  75. }
  76. }
  77. &.mobile {
  78. .sidemenu {
  79. .ant-header-fixedHeader {
  80. &.ant-header-side-opened,
  81. &.ant-header-side-closed {
  82. width: 100%;
  83. }
  84. }
  85. }
  86. }
  87. &.ant-layout-has-sider {
  88. flex-direction: row;
  89. }
  90. .trigger {
  91. font-size: 20px;
  92. line-height: 44px;
  93. padding: 0 24px;
  94. cursor: pointer;
  95. transition: color 0.3s;
  96. &:hover {
  97. background: rgba(0, 0, 0, 0.025);
  98. }
  99. }
  100. .topmenu {
  101. .ant-header-fixedHeader {
  102. position: fixed;
  103. top: 0;
  104. right: 0;
  105. z-index: 9;
  106. width: 100%;
  107. transition: width 0.2s;
  108. &.ant-header-side-opened {
  109. width: 100%;
  110. }
  111. &.ant-header-side-closed {
  112. width: 100%;
  113. }
  114. }
  115. .ant-header-multiTab{
  116. margin: auto;
  117. }
  118. .ant-header-fixedMultiTab{
  119. position: fixed;
  120. z-index: 8;
  121. width: 100%;
  122. top: 44px;
  123. right:0;
  124. margin: auto;
  125. }
  126. /* 必须为 topmenu 才能启用流式布局 */
  127. &.content-width-Fluid {
  128. .header-index-wide {
  129. max-width: unset;
  130. .header-index-left {
  131. flex: 1 1 1000px;
  132. .logo{
  133. margin:0 25px;
  134. }
  135. .ant-menu.ant-menu-horizontal{
  136. max-width: calc(100vw - 160px - 238px - 25px);
  137. flex: 1 1 calc(100vw - 160px - 238px - 25px);
  138. }
  139. }
  140. .header-index-right{
  141. margin-right:25px;
  142. }
  143. }
  144. .page-header-index-wide {
  145. max-width: unset;
  146. }
  147. }
  148. }
  149. .sidemenu {
  150. .ant-header-fixedHeader {
  151. position: fixed;
  152. top: 0;
  153. right: 0;
  154. z-index: 9;
  155. width: 100%;
  156. transition: width 0.2s;
  157. &.ant-header-side-opened {
  158. width: calc(100% - 160px);
  159. }
  160. &.ant-header-side-closed {
  161. width: calc(100% - 80px);
  162. }
  163. }
  164. .ant-header-multiTab{
  165. margin: auto;
  166. }
  167. .ant-header-fixedMultiTab{
  168. position: fixed;
  169. z-index: 8;
  170. width: 100%;
  171. top: 44px;
  172. right:0;
  173. margin: auto;
  174. &.ant-header-side-opened {
  175. width: calc(100% - 160px);
  176. }
  177. &.ant-header-side-closed {
  178. width: calc(100% - 80px);
  179. }
  180. }
  181. }
  182. .header {
  183. height: 44px;
  184. padding: 0 12px 0 0;
  185. background: #fff;
  186. box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
  187. position: relative;
  188. display: flex;
  189. align-items: center;
  190. justify-content: space-between;
  191. }
  192. .ant-layout-header{
  193. height: 44px;
  194. line-height: 44px;
  195. }
  196. .header,
  197. .top-nav-header-index {
  198. .hleft{
  199. display:flex;
  200. }
  201. .user-wrapper {
  202. flex-grow:1;
  203. overflow: auto;
  204. height: 46px;
  205. .content-box{
  206. float:right;
  207. text-align: right;
  208. }
  209. .action {
  210. cursor: pointer;
  211. padding: 0 12px;
  212. display: inline-block;
  213. transition: all 0.3s;
  214. height: 100%;
  215. color: rgba(0, 0, 0);
  216. &:hover {
  217. background: rgba(0, 0, 0, 0.025);
  218. }
  219. .avatar {
  220. margin: 20px 8px 20px 0;
  221. color: #1890ff;
  222. background: hsla(0, 0%, 100%, 0.85);
  223. vertical-align: middle;
  224. }
  225. .icon {
  226. font-size: 16px;
  227. padding: 4px;
  228. }
  229. }
  230. }
  231. &.dark {
  232. .user-wrapper {
  233. .action {
  234. color: rgba(255, 255, 255, 0.85);
  235. a {
  236. color: rgba(255, 255, 255, 0.85);
  237. }
  238. &:hover {
  239. background: rgba(255, 255, 255, 0.16);
  240. }
  241. }
  242. }
  243. }
  244. }
  245. &.mobile,
  246. &.tablet {
  247. .top-nav-header-index {
  248. .header-index-wide {
  249. .header-index-left {
  250. .trigger {
  251. color: rgba(255, 255, 255, 0.85);
  252. padding: 0 12px;
  253. }
  254. .logo.top-nav-header {
  255. flex: 0 0 36px;
  256. text-align: center;
  257. line-height: 38px;
  258. h1 {
  259. display: none;
  260. }
  261. }
  262. }
  263. }
  264. &.light {
  265. .header-index-wide {
  266. .header-index-left {
  267. .trigger {
  268. color: rgba(0, 0, 0);
  269. }
  270. }
  271. }
  272. //
  273. }
  274. }
  275. }
  276. &.tablet {
  277. // overflow: hidden; text-overflow:ellipsis; white-space: nowrap;
  278. .top-nav-header-index {
  279. .header-index-wide {
  280. .header-index-left {
  281. .logo > a {
  282. overflow: hidden;
  283. text-overflow: ellipsis;
  284. white-space: nowrap;
  285. }
  286. }
  287. .ant-menu.ant-menu-horizontal {
  288. flex: 1 1 auto;
  289. white-space: normal;
  290. }
  291. }
  292. }
  293. }
  294. .top-nav-header-index {
  295. box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
  296. position: relative;
  297. transition: background 0.3s, width 0.2s;
  298. .header-index-wide {
  299. max-width: 1200px;
  300. margin: auto;
  301. padding-left: 0;
  302. display: flex;
  303. height: 44px;
  304. .ant-menu.ant-menu-horizontal {
  305. max-width: 835px;
  306. flex: 0 1 835px;
  307. border: none;
  308. height: 44px;
  309. line-height: 44px;
  310. }
  311. .header-index-left {
  312. flex: 0 1 1000px;
  313. display: flex;
  314. .logo.top-nav-header {
  315. flex: 0 0 auto;
  316. width: auto;
  317. height: 44px;
  318. position: relative;
  319. line-height: 44px;
  320. transition: all 0.3s;
  321. overflow: hidden;
  322. img,
  323. svg {
  324. display: inline-block;
  325. vertical-align: middle;
  326. height: 42px;
  327. width: 42px;
  328. }
  329. h1 {
  330. color: #fff;
  331. display: inline-block;
  332. vertical-align: top;
  333. font-size: 16px;
  334. margin: 0 0 0 12px;
  335. font-weight: 400;
  336. }
  337. }
  338. }
  339. .header-index-right {
  340. flex: 0 0 238px;
  341. align-self: flex-end;
  342. height: 44px;
  343. overflow: hidden;
  344. .content-box {
  345. float: right;
  346. }
  347. }
  348. }
  349. &.light {
  350. background-color: #fff;
  351. .header-index-wide {
  352. .header-index-left {
  353. .logo {
  354. h1 {
  355. color: #002140;
  356. }
  357. }
  358. }
  359. }
  360. }
  361. }
  362. // 内容区
  363. .layout-content {
  364. margin: 24px 24px 0px;
  365. height: 100%;
  366. height: 64px;
  367. padding: 0 12px 0 0;
  368. }
  369. // footer
  370. .ant-layout-footer {
  371. padding: 0;
  372. }
  373. }
  374. .topmenu {
  375. .page-header-index-wide {
  376. max-width: 1200px;
  377. margin: 0 auto;
  378. }
  379. }
  380. // drawer-sider 自定义
  381. .ant-drawer.drawer-sider {
  382. .sider {
  383. box-shadow: none;
  384. }
  385. &.dark {
  386. .ant-drawer-content {
  387. background-color: rgb(0, 21, 41);
  388. }
  389. }
  390. &.light {
  391. box-shadow: none;
  392. .ant-drawer-content {
  393. background-color: #fff;
  394. }
  395. }
  396. .ant-drawer-body {
  397. padding: 0;
  398. }
  399. }
  400. // 菜单样式
  401. .sider {
  402. box-shadow: 2px 0 6px rgba(0, 21, 41, 0.35);
  403. position: relative;
  404. z-index: @ant-global-sider-zindex;
  405. min-height: 100vh;
  406. .ant-layout-sider-children {
  407. overflow-y: hidden;
  408. &:hover {
  409. overflow-y: auto;
  410. }
  411. }
  412. &.ant-fixed-sidemenu {
  413. position: fixed;
  414. height: 100%;
  415. }
  416. .logo {
  417. position: relative;
  418. height: 44px;
  419. padding-left: 10px;
  420. overflow: hidden;
  421. line-height: 44px;
  422. background: #002140;
  423. transition: all .3s;
  424. img,
  425. svg,
  426. h1 {
  427. display: inline-block;
  428. vertical-align: middle;
  429. }
  430. img,
  431. svg {
  432. height: 42px;
  433. width: 42px;
  434. }
  435. h1 {
  436. color: #fff;
  437. font-size: 16px;
  438. margin: 0 0 0 6px;
  439. font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif;
  440. font-weight: 600;
  441. vertical-align: middle;
  442. }
  443. }
  444. &.ant-layout-sider-collapsed{
  445. .logo{
  446. // padding-left: 20px;
  447. }
  448. .ant-menu-inline-collapsed > .ant-menu-item .anticon,
  449. .ant-menu-inline-collapsed > .ant-menu-item-group > .ant-menu-item-group-list > .ant-menu-item .anticon,
  450. .ant-menu-inline-collapsed > .ant-menu-item-group > .ant-menu-item-group-list > .ant-menu-submenu > .ant-menu-submenu-title .anticon,
  451. .ant-menu-inline-collapsed > .ant-menu-submenu > .ant-menu-submenu-title .anticon{
  452. font-size: 18px;
  453. }
  454. }
  455. &.light {
  456. background-color: #fff;
  457. box-shadow: 2px 0px 8px 0px rgba(29, 35, 41, 0.05);
  458. .logo {
  459. background: #fff;
  460. box-shadow: 1px 1px 0px 0px #e8e8e8;
  461. h1 {
  462. color: unset;
  463. }
  464. }
  465. .ant-menu:not(.ant-menu-horizontal) .ant-menu-item-selected{
  466. background-color: #eef5ff;
  467. }
  468. .ant-menu-light {
  469. border-right-color: transparent;
  470. }
  471. }
  472. }
  473. // 外置的样式控制
  474. .user-dropdown-menu {
  475. span {
  476. user-select: none;
  477. }
  478. }
  479. .user-dropdown-menu-wrapper.ant-dropdown-menu {
  480. padding: 4px 0;
  481. .ant-dropdown-menu-item {
  482. // width: 160px;
  483. width: 100%;
  484. }
  485. .ant-dropdown-menu-item > .anticon:first-child,
  486. .ant-dropdown-menu-item > a > .anticon:first-child,
  487. .ant-dropdown-menu-submenu-title > .anticon:first-child .ant-dropdown-menu-submenu-title > a > .anticon:first-child {
  488. min-width: 12px;
  489. margin-right: 8px;
  490. }
  491. }
  492. /*
  493. * The following styles are auto-applied to elements with
  494. * transition="page-transition" when their visibility is toggled
  495. * by Vue.js.
  496. *
  497. * You can easily play with the page transition by editing
  498. * these styles.
  499. */
  500. .vidio_cont .ant-modal-body {
  501. padding: 0;
  502. }
  503. .vidio_cont .ant-modal-close-x {
  504. width: 36px;
  505. height: 36px;
  506. text-align: center;
  507. line-height: 36px;
  508. color: #fff;
  509. background-color: rgba(0, 0, 0, 0.6);
  510. border-radius: 50%;
  511. position: absolute;
  512. top: 10px;
  513. right: 10px;
  514. }
  515. .page-transition-enter {
  516. opacity: 0;
  517. }
  518. .page-transition-leave-active {
  519. opacity: 0;
  520. }
  521. .page-transition-enter .page-transition-container,
  522. .page-transition-leave-active .page-transition-container {
  523. -webkit-transform: scale(1.1);
  524. transform: scale(1.1);
  525. }
  526. .setting-drawer-content{
  527. .ant-drawer-content{
  528. overflow: visible
  529. }
  530. }
  531. // 数据列表 样式
  532. .table-alert {
  533. margin-bottom: 16px;
  534. }
  535. .table-page-search-wrapper {
  536. .ant-form-inline {
  537. .ant-form-item {
  538. display: flex;
  539. margin-bottom: 24px;
  540. margin-right: 0;
  541. .ant-form-item-control-wrapper {
  542. flex: 1 1;
  543. display: inline-block;
  544. vertical-align: middle;
  545. }
  546. > .ant-form-item-label {
  547. line-height: 32px;
  548. padding-right: 8px;
  549. width: auto;
  550. }
  551. .ant-form-item-control {
  552. height: 32px;
  553. line-height: 32px;
  554. }
  555. }
  556. }
  557. .table-page-search-submitButtons {
  558. display: block;
  559. margin-bottom: 24px;
  560. white-space: nowrap;
  561. }
  562. }