global.less 10 KB

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