mixin.less 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738
  1. // 公共的mixin混入(可以把重复的样式封装为mixin 混入到复用的地方)
  2. // .iconBg(@width: 3rem, @height: 3rem, @bgUrl: 'icons.png') {
  3. // /*图片背景,大小作为参数传递,默认是30*30*/
  4. // display: inline-block;
  5. // width: @width;
  6. // height: @height;
  7. // cursor: pointer;
  8. // background-image: url('../images/@{bgUrl}');
  9. // background-color: transparent;
  10. // }
  11. .position(@position: static, @top: auto, @right: auto, @bottom: auto, @left: auto) {
  12. // 定位方式
  13. position: @position;
  14. top: @top;
  15. right: @right;
  16. bottom: @bottom;
  17. left: @left;
  18. }
  19. .boxShadow(@color, @xWdh, @yWdh, @wdh) {
  20. box-shadow: @color @xWdh @yWdh @wdh;
  21. -webkit-box-shadow: @color @xWdh @yWdh @wdh;
  22. -moz-box-shadow: @color @xWdh @yWdh @wdh;
  23. }
  24. .link-colors(@normal: @black-color, @hover-color: @hover-color, @visited: @black-color) {
  25. /*a标签经过以及访问颜色变化混合器*/
  26. color: @normal;
  27. &:hover {
  28. color: @hover-color;
  29. }
  30. &:visited {
  31. color: @visited;
  32. }
  33. }
  34. .rounded-corners(@border-radius: 5px, @border-radius1: @border-radius, @border-radius2: @border-radius, @border-radius3: @border-radius) {
  35. /*圆角兼容性*/
  36. -moz-border-radius: @border-radius @border-radius1 @border-radius2 @border-radius3;
  37. -webkit-border-radius: @border-radius @border-radius1 @border-radius2 @border-radius3;
  38. border-radius: @border-radius @border-radius1 @border-radius2 @border-radius3;
  39. }
  40. // 线性渐变
  41. .linearGradient(@point, @start, @stop) {
  42. background-color: @stop;
  43. background: linear-gradient(@point, @start, @stop);
  44. background: -moz-linear-gradient(@point, @start, @stop);
  45. background: -webkit-linear-gradient(@point, @start, @stop);
  46. }
  47. .transition-animation(@property: all, @duration: 0.2s, @timing-function: linear) {
  48. /*过渡动画*/
  49. transition: @property @duration @timing-function;
  50. -webkit-transition: @property @duration @timing-function;
  51. -moz-transition: @property @duration @timing-function;
  52. }
  53. .borderStyle(@width: 1px, @style: solid, @color: #181d1f) {
  54. border: @width @style @color;
  55. }
  56. .resetElement(@border: 0, @background: transparent, @radius: 0) {
  57. border: @border;
  58. background-color: @background;
  59. border-radius: @radius;
  60. }
  61. /* 定制宽高按钮 */
  62. .btn(@width: @width, @height: @height) {
  63. width: @width;
  64. height: @height;
  65. line-height: @height;
  66. cursor: pointer;
  67. }
  68. // flex弹性布局兼容性
  69. .flex {
  70. display: -webkit-box; /* Chrome 4+, Safari 3.1, iOS Safari 3.2+ */
  71. display: -moz-box; /* Firefox 17- */
  72. display: -webkit-flex; /* Chrome 21+, Safari 6.1+, iOS Safari 7+, Opera 15/16 */
  73. display: -moz-flex; /* Firefox 18+ */
  74. display: -ms-flexbox; /* IE 10 */
  75. display: flex; /* Chrome 29+, Firefox 22+, IE 11+, Opera 12.1/17/18, Android 4.4+ */
  76. }
  77. // 行内flex 弹性布局兼容性
  78. .inlineflex {
  79. display: -webkit-inline-box; /* Chrome 4+, Safari 3.1, iOS Safari 3.2+ */
  80. display: -moz-inline-box; /* Firefox 17- */
  81. display: -webkit-inline-flex; /* Chrome 21+, Safari 6.1+, iOS Safari 7+, Opera 15/16 */
  82. display: -moz-inline-flex; /* Firefox 18+ */
  83. display: -ms-inline-flexbox; /* IE 10 */
  84. display: inline-flex; /* Chrome 29+, Firefox 22+, IE 11+, Opera 12.1/17/18, Android 4.4+ */
  85. }
  86. // 行内元素span强转块元素
  87. .specailSpan(@width: 50%, @height: 2.6rem) {
  88. display: inline-block;
  89. text-align: center;
  90. float: left;
  91. width: @width;
  92. height: @height;
  93. line-height: @height;
  94. cursor: pointer;
  95. }
  96. .inputStyle(@height: 2.8rem, @fontSize: 1.3rem) {
  97. height: @height;
  98. line-height: @height;
  99. border-color: @money-border-color;
  100. color: @black-color;
  101. font-size: @fontSize;
  102. @if @skin == 'black' {
  103. background-color: transparent;
  104. } @else if @skin == 'white' {
  105. background-color: @white-color;
  106. }
  107. }
  108. .ellipse {
  109. // 一行显示,超过显示省略号
  110. white-space: nowrap;
  111. text-overflow: ellipsis;
  112. overflow: hidden;
  113. }
  114. .dateInputStyle(@width: 12rem, @height: 2.2rem, @fontSize: 1.3rem) {
  115. width: @width;
  116. height: @height;
  117. line-height: @height;
  118. @if @skin == 'black' {
  119. background-color: transparent;
  120. } @else if @skin == 'white' {
  121. background-color: @white-color;
  122. }
  123. border-color: @money-border-color;
  124. font-size: @fontSize;
  125. }
  126. .submitBtnStyle(@width: 12rem, @height: 2.8rem, @fontSize: 1.4rem, @rounded: 2px) {
  127. width: @width;
  128. height: @height;
  129. line-height: @height;
  130. padding: 0;
  131. color: @white-color;
  132. background-color: @hover-color;
  133. border-color: @hover-color;
  134. font-size: @fontSize;
  135. .rounded-corners(@rounded);
  136. }
  137. .resetBtnStyle(@width: 7rem, @height: 2.2rem, @fontSize: 1.3rem, @rounded: 2px) {
  138. width: @width;
  139. height: @height;
  140. line-height: @height;
  141. padding: 0;
  142. color: @hover-color;
  143. background-color: transparent;
  144. border-color: @hover-color;
  145. font-size: @fontSize;
  146. .rounded-corners(@rounded);
  147. }
  148. .ant-input {
  149. &::placeholder {
  150. color: @m-grey10;
  151. }
  152. }
  153. .commonInput {
  154. background: #15202B;
  155. border: 1px solid @m-grey14;
  156. border-radius: 3px;
  157. color: #E5E5E5;
  158. .ant-input {
  159. color: #E5E5E5;
  160. background: transparent;
  161. }
  162. .ant-input-suffix {
  163. color: #E5E5E5;
  164. }
  165. &:hover, &:focus {
  166. border-color:#0C95FF;
  167. }
  168. }
  169. .tableConditionInput {
  170. width: 140px;
  171. height: 30px;
  172. line-height: 30px;
  173. background: @m-grey9;
  174. .rounded-corners(3px);
  175. border: 0;
  176. color: @m-white1;
  177. font-size: 14px;
  178. }
  179. .tableConditionInput+.tableConditionInput {
  180. margin-left: 10px;
  181. }
  182. .ant-select-dropdown {
  183. background: #424E59;
  184. border: 1px solid #48545F;
  185. box-shadow: 0px 10px 10px 0px rgba(18, 22, 24, 0.36);
  186. border-radius: 5px;
  187. .ant-select-item {
  188. color:@m-grey1;
  189. }
  190. .ant-select-item-option-active,.ant-select-item-option-selected,.ant-select-item-option-hover {
  191. background: @m-blue0;
  192. color: @m-white1;
  193. }
  194. }
  195. // 上面表格样式
  196. .topTable {
  197. .ant-table {
  198. width: 100%;
  199. table {
  200. border: 0;
  201. }
  202. .ant-table-thead {
  203. tr {
  204. box-shadow: 0px 1px 0px 0px #2E3539;
  205. th {
  206. line-height: 34px;
  207. background: @m-black8;
  208. padding-top: 0;
  209. padding-bottom: 0;
  210. color: @m-grey17;
  211. font-size: 14px;
  212. border-right: 1px solid @m-black9;
  213. border-bottom: 1px solid @m-black9;
  214. white-space: nowrap;
  215. text-overflow: ellipsis;
  216. overflow: hidden;
  217. }
  218. }
  219. }
  220. .ant-table-tbody {
  221. tr {
  222. td {
  223. height: 34px;
  224. line-height: 34px;
  225. padding: 0 8px;
  226. border-right: 1px solid @m-black9;
  227. border-bottom: 1px solid @m-black9;
  228. font-size: 16px;
  229. color: @m-white1;
  230. white-space: nowrap;
  231. text-overflow: ellipsis;
  232. overflow: hidden;
  233. }
  234. }
  235. tr.ant-table-expanded-row:hover { //tr.ant-table-expanded-row,
  236. td {
  237. background-color: @m-blue3;
  238. }
  239. }
  240. tr.ant-table-expanded-row {
  241. td {
  242. text-align: right;
  243. }
  244. }
  245. }
  246. .ant-table-placeholder {
  247. border: 0;
  248. background: @m-black2;
  249. }
  250. }
  251. }
  252. // 弹窗表格
  253. .dialogTable {
  254. .ant-table {
  255. width: 100%;
  256. background: transparent;
  257. table {
  258. border: 1px solid @m-grey20;
  259. border-radius: 0;
  260. }
  261. .ant-table-thead {
  262. tr {
  263. box-shadow: 0px 1px 0px 0px #2E3539;
  264. th {
  265. line-height: 36px;
  266. background: @m-grey11;
  267. padding-top: 0;
  268. padding-bottom: 0;
  269. color: @m-grey2;
  270. font-size: 16px;
  271. border-right: 1px solid @m-grey20;
  272. border-bottom: 1px solid @m-grey20;
  273. white-space: nowrap;
  274. text-overflow: ellipsis;
  275. overflow: hidden;
  276. }
  277. }
  278. }
  279. .ant-table-tbody {
  280. tr {
  281. td {
  282. height: 36px;
  283. line-height: 36px;
  284. padding: 0 8px;
  285. border-right: 1px solid @m-grey20;
  286. border-bottom: 1px solid @m-grey20;
  287. font-size: 14px;
  288. color: @m-white1;
  289. white-space: nowrap;
  290. text-overflow: ellipsis;
  291. overflow: hidden;
  292. background: @m-grey11;
  293. }
  294. }
  295. }
  296. .ant-table-placeholder {
  297. border: 0;
  298. background: @m-grey11;
  299. }
  300. }
  301. }
  302. .ant-empty-normal {
  303. color: @m-grey17;
  304. }
  305. .ant-empty-img-simple-path,.ant-empty-img-simple-ellipse {
  306. fill: @m-grey17;
  307. }
  308. .ant-empty-img-simple-g {
  309. stroke: @m-grey17;
  310. }
  311. .ant-modal-wrap {
  312. overflow: hidden;
  313. }
  314. .add-custom,.commonModal {
  315. top: 0;
  316. max-height: 100%;
  317. padding-bottom: 0;
  318. .ant-modal-content {
  319. background: #0F1A25;
  320. border-radius: 5px;
  321. height: 100%;
  322. .ant-modal-close {
  323. .ant-modal-close-x {
  324. width: 40px;
  325. height: 40px;
  326. line-height: 40px;
  327. .ant-modal-close-icon {
  328. color: #1271BA;
  329. }
  330. }
  331. }
  332. .ant-modal-header {
  333. height: 40px;
  334. background: linear-gradient(0deg, #112C43, #084258);
  335. border-radius: 5px;
  336. padding: 0;
  337. text-align: center;
  338. border-bottom: 0;
  339. .ant-modal-title {
  340. line-height: 40px;
  341. font-size: 16px;
  342. color: @m-white0;
  343. }
  344. }
  345. .ant-modal-body {
  346. min-height: 380px;
  347. max-height: calc(100vh - 115px);
  348. overflow-y: auto;
  349. }
  350. .ant-modal-footer {
  351. border-top: 0;
  352. text-align: center;
  353. padding-bottom: 31px;
  354. height: 75px;
  355. .ant-btn-primary {
  356. width: 200px;
  357. height: 34px;
  358. line-height: 32px;
  359. border: 0;
  360. background: linear-gradient(0deg, @m-blue8 0%, @m-blue9 100%);
  361. border-radius: 3px;
  362. font-size: 16px;
  363. color: @m-white0;
  364. &:hover {
  365. background: linear-gradient(0deg, @m-blue8-hover 0%, @m-blue9-hover 100%);
  366. color: @m-white0-hover;
  367. }
  368. }
  369. .ant-btn.cancelBtn {
  370. width: 200px;
  371. height: 34px;
  372. line-height: 32px;
  373. border: 1px solid @m-blue10;
  374. border-radius: 3px;
  375. background: transparent;
  376. font-size: 16px;
  377. color: @m-blue10;
  378. margin-right: 20px;
  379. &:hover {
  380. border-color: rgba(@m-blue10, .8);
  381. }
  382. }
  383. }
  384. }
  385. }
  386. .ant-form.inlineForm {
  387. .ant-row.ant-form-item {
  388. margin-bottom: 21px;
  389. .ant-form-item-label {
  390. position: relative;
  391. width: 130px;
  392. line-height: 30px;
  393. text-align: left;
  394. label {
  395. color: @m-grey1;
  396. padding-left: 16px;
  397. &::after {
  398. content: ''
  399. }
  400. &::before {
  401. .position(absolute, 0, auto, auto, 0);
  402. font-size: 16px;
  403. line-height: 21px;
  404. color: @m-red1;
  405. }
  406. }
  407. }
  408. .ant-form-item-control-wrapper {
  409. .ant-form-item-control {
  410. line-height: 30px;
  411. }
  412. }
  413. }
  414. .relative.ant-form-item {
  415. position: relative;
  416. .tip {
  417. position: absolute;
  418. font-size: 14px;
  419. color: @m-grey1;
  420. }
  421. .ant-form-item-control {
  422. width: 200px;
  423. .unit {
  424. float: right;
  425. color: @m-grey2;
  426. }
  427. }
  428. }
  429. .tc.ant-form-item {
  430. .ant-form-item-control-wrapper {
  431. margin: 0 auto;
  432. }
  433. }
  434. }
  435. .ant-select-single {
  436. .ant-select-selector {
  437. height: 30px;
  438. padding: 0 8px;
  439. background: #15202B;
  440. border: 1px solid #0C95FF;
  441. border-radius: 3px;
  442. color: #E5E5E5;
  443. }
  444. .ant-select-arrow {
  445. right: 8px;
  446. color: #3A87F7;
  447. }
  448. }
  449. .inlineFormSelect.ant-select-single {
  450. .rounded-corners(3px);
  451. border: 1px solid #2B3F52;
  452. &:hover, &:focus {
  453. border-color:#0C95FF;
  454. }
  455. .ant-select-selector {
  456. height: 30px;
  457. padding: 0 8px;
  458. background: #15202B;
  459. border: 0;
  460. color: #E5E5E5;
  461. .ant-select-selection-placeholder {
  462. color: @m-grey10;
  463. }
  464. }
  465. .ant-select-arrow {
  466. right: 8px;
  467. color: #3A87F7 !important;
  468. }
  469. }
  470. .shortSelect.ant-select-single:extend(.inlineFormSelect.ant-select-single) {
  471. margin-right: 0;
  472. .ant-select-selector {
  473. padding: 0 5px;
  474. .ant-select-selection-item {
  475. padding-right: 14px;
  476. }
  477. }
  478. }
  479. .typeSelect.ant-select-single {
  480. .rounded-corners(3px);
  481. border: 1px solid #2B3F52;
  482. &:hover, &:focus {
  483. border-color:#0C95FF;
  484. }
  485. .ant-select-selector {
  486. height: 30px;
  487. padding: 0 8px;
  488. background: #15202B;
  489. border: 0;
  490. color: #E5E5E5;
  491. .ant-select-selection-placeholder {
  492. color: @m-grey10;
  493. }
  494. }
  495. .ant-select-arrow {
  496. right: 8px;
  497. color: @m-blue0;
  498. }
  499. }
  500. .dialogInput {
  501. background: #15202B;
  502. border: 1px solid @m-grey14;
  503. border-radius: 3px;
  504. color: #E5E5E5;
  505. .ant-input {
  506. color: #E5E5E5;
  507. background: transparent
  508. }
  509. .ant-input-suffix {
  510. color: #E5E5E5;
  511. }
  512. &:hover,&:focus {
  513. border-color: @m-blue10;
  514. }
  515. }
  516. .suffixGrey {
  517. .ant-input-suffix {
  518. color: @m-grey2;
  519. }
  520. }
  521. .white {
  522. color: @m-white0;
  523. }
  524. .blue {
  525. color: @m-blue0;
  526. }
  527. .green {
  528. color: @m-green0;
  529. }
  530. .yellow {
  531. color: @m-yellow0;
  532. }
  533. .formFieldSet {
  534. border: 1px solid @m-grey19;
  535. padding: 0 20px 20px;
  536. }
  537. .formFieldSet+.formFieldSet {
  538. margin-top: 35px;
  539. }
  540. .ant-form {
  541. legend {
  542. width: auto;
  543. margin-left: 20px;
  544. font-size: 16px;
  545. color: @m-white0;
  546. border-bottom: 0;
  547. padding: 0 10px;
  548. }
  549. }
  550. // 上传
  551. .upload {
  552. display: inline-flex;
  553. .ant-btn.uploadBtn {
  554. width: 60px;
  555. height: 30px;
  556. background: @m-blue0;
  557. border: 0;
  558. padding: 0;
  559. text-align: center;
  560. font-size: 14px;
  561. color: @m-white0;
  562. .rounded-corners(3px);
  563. &:hover {
  564. background: rgba(@m-blue0, 0.8);
  565. color: rgba(@m-white0, 0.8);
  566. }
  567. }
  568. .look {
  569. color: @m-blue0;
  570. font-size: 14px;
  571. margin-left: 10px;
  572. cursor: pointer;
  573. }
  574. }
  575. .ml10 {
  576. margin-left: 10px;
  577. }
  578. .ml5{
  579. margin-left: 5px;
  580. }
  581. .grey {
  582. color: @m-grey2;
  583. }
  584. .selectBtn.ant-btn {
  585. margin-left: 10px;
  586. width: 80px;
  587. height: 30px;
  588. line-height: 31px;
  589. text-align: center;
  590. background: linear-gradient(0deg, @m-grey15 0%, @m-grey16 98%);
  591. border: 0;
  592. color: @m-white0;
  593. font-size: 14px;
  594. .rounded-corners(3px);
  595. &:hover,
  596. &:focus {
  597. background: linear-gradient(0deg, @m-grey15-hover 0%, @m-grey16-hover 98%);
  598. color: rgba(@m-white0, 0.8);
  599. border: 0;
  600. }
  601. }
  602. .btnPrimary.ant-btn,.operBtn.ant-btn {
  603. margin-left: 10px;
  604. width: 80px;
  605. height: 30px;
  606. line-height: 31px;
  607. text-align: center;
  608. background: linear-gradient(0deg, @m-blue6 0%, @m-blue7 99%);
  609. border: 0;
  610. color: @m-white0;
  611. font-size: 14px;
  612. .rounded-corners(3px);
  613. &:hover,
  614. &:focus {
  615. background: linear-gradient(0deg, @m-blue6-hover 0%, @m-blue7-hover 99%);
  616. color: rgba(@m-white0, 0.8);
  617. border: 0;
  618. }
  619. }
  620. .operBtn.ant-btn {
  621. margin-top: 9px;
  622. margin-bottom: 6px;
  623. }
  624. .ant-table-expanded-row {
  625. .btn-list {
  626. padding-right: 10px;
  627. text-align: right;
  628. }
  629. .btnPrimary.ant-btn {
  630. width: 80px;
  631. height: 26px;
  632. line-height: 27px;
  633. border: 0;
  634. background: linear-gradient(0deg, @m-blue2, @m-blue0);
  635. box-shadow: -1px 0px 0px 0px @m-black10;
  636. .rounded-corners(3px);
  637. &:hover,
  638. &:focus {
  639. background: linear-gradient(0deg, @m-blue2-hover 0%, @m-blue0-hover 99%);
  640. color: rgba(@m-white0, 0.8);
  641. border: 0;
  642. }
  643. }
  644. .btnDanger.ant-btn:extend(.ant-table-expanded-row .btnPrimary.ant-btn) {
  645. background: linear-gradient(0deg, @m-red0, @m-red1);
  646. color: @m-white0;
  647. font-size: 14px;
  648. &:hover,
  649. &:focus {
  650. background: linear-gradient(0deg, @m-red0-hover 0%, @m-red1-hover 99%);
  651. color: rgba(@m-white0, 0.8);
  652. border: 0;
  653. }
  654. }
  655. .btnDeafault.ant-btn:extend(.ant-table-expanded-row .btnPrimary.ant-btn) {
  656. background: linear-gradient(0deg, @m-grey12 0%, @m-grey13 100%);
  657. color: @m-white0;
  658. font-size: 14px;
  659. &:hover,
  660. &:focus {
  661. background: linear-gradient(0deg, @m-grey12-hover 0%, @m-grey13-hover 99%);
  662. color: rgba(@m-white0, 0.8);
  663. border: 0;
  664. }
  665. }
  666. .ant-btn+.ant-btn {
  667. margin-left: 10px;
  668. }
  669. }
  670. .hiddenFirstCol {
  671. .ant-table {
  672. .ant-table-content {
  673. .ant-table-body {
  674. table {
  675. .ant-table-thead {
  676. .ant-table-expand-icon-th {
  677. display: none;
  678. }
  679. }
  680. .ant-table-tbody {
  681. .ant-table-row {
  682. .ant-table-row-expand-icon-cell {
  683. display: none;
  684. }
  685. }
  686. }
  687. }
  688. }
  689. }
  690. }
  691. }
  692. .to {
  693. font-size: 14px;
  694. color: @m-grey2;
  695. margin-left: -8px;
  696. margin-right: 2px;
  697. }
  698. .filterTable {
  699. display: inline-flex;
  700. width: 100%;
  701. }
  702. .ant-row.dialogRowTitle {
  703. margin-left: 0 !important;
  704. margin-right: 0 !important;
  705. border: 1px solid @m-grey20;
  706. .ant-col {
  707. border-top: 1px solid @m-grey20;
  708. border-right: 1px solid @m-grey20;
  709. padding-left: 0 !important;
  710. padding-right: 0 !important;
  711. height: 34px;
  712. line-height: 34px;
  713. font-size: 16px;
  714. color: @m-grey2;
  715. .red {
  716. color: @m-red1;
  717. }
  718. }
  719. .ant-col:nth-child(1),.ant-col:nth-child(2),.ant-col:nth-child(3),.ant-col:nth-child(4){
  720. border-top: 0;
  721. text-align: center;
  722. }
  723. .ant-col:last-child {
  724. border-right: 1px solid @m-grey20;
  725. }
  726. }