global.less 11 KB

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