theme.less 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696
  1. //header相关
  2. // @headerHeight: 65px;
  3. // @headerBg: #164489;
  4. // @docColor: #f52323;
  5. // 蓝湖UI规范 颜色、字体大小 less变量设置
  6. @themeColor: #3397FF; //链接/按钮 #409EFF#DA3947
  7. @greenA: #67C239;
  8. @greenBgA: #F0F9EA;
  9. @orangeA: #CB7C2C;
  10. @orangeBgA: #FFE9CE;
  11. @lightBlueA: #2CA8CB;
  12. @lightBlueBgA: #E8F9FE;
  13. @purpleA: #7B2CCB;
  14. @purpleBgA: #F3ECFD;
  15. // @fontSize30: 30px; //一般是网站最重要的标题,也可以用于阿拉伯数字等
  16. // @fontSize24: 24px; //一般用于页面标题
  17. // @fontSize16: 16px; //用于二级页面标题或者阅读文段
  18. // @fontSize14: 14px; //用于表头,表单列表,导航,输入框
  19. // @fontSize12: 12px; //用于说明性文字,次要文字信息
  20. // @padding80: 80px; //用于内容区距footer区的距离
  21. // @padding40: 40px; //用于内容区大间距
  22. // @padding24: 24px; //用于同区内中间距
  23. // @padding20: 20px;
  24. // @padding16: 16px; //用于同区内次间距,也可是12px
  25. // @padding12: 12px; //用于同区内次间距
  26. @padding10: 10px; //用于同区内次间距
  27. .padBot60 {
  28. padding-bottom: 60px;
  29. }
  30. .marRt0 {
  31. margin-right: 0;
  32. }
  33. .searchLayoutBox {
  34. padding: 22px 36px 0;
  35. border: 1px solid #dfdfdf;
  36. box-shadow: 0 4px 9px #dcdcdc;
  37. border-radius: 3px;
  38. }
  39. .inputBox {
  40. .label {
  41. display: inline-block;
  42. min-width: 60px;
  43. margin-right: 20px;
  44. line-height: 32px;
  45. text-align: right;
  46. }
  47. }
  48. /deep/ .el-input {
  49. width: 230px;
  50. }
  51. /deep/ .el-pagination__editor.el-input {
  52. width: 50px;
  53. }
  54. .el-table {
  55. // .el-table__cell {
  56. // padding: 0;
  57. // }
  58. .elIcon {
  59. margin-right: 20px;
  60. font-size: 16px;
  61. color: @themeColor;
  62. cursor: pointer;
  63. &:last-child {
  64. margin-right: 0;
  65. }
  66. }
  67. }
  68. .flexBox {
  69. display: flex;
  70. flex: 1;
  71. flex-wrap: wrap;
  72. }
  73. .cursor {
  74. cursor: pointer;
  75. }
  76. .el-dialog {
  77. .el-input,
  78. .el-select {
  79. width: 100%;
  80. /deep/ .el-input {
  81. width: 100%;
  82. }
  83. }
  84. }
  85. .titlePanelBor {
  86. padding-left: 9px;
  87. border-left: 6px solid @themeColor;
  88. font-weight: bold;
  89. line-height: 1.08;
  90. color: @themeColor;
  91. }
  92. /deep/ .el-checkbox {
  93. margin-right: 48px;
  94. }
  95. [class*=" my-icon-"],
  96. [class^=my-icon-] {
  97. font-family: element-icons !important;
  98. font-style: normal;
  99. font-weight: 400;
  100. font-variant: normal;
  101. text-transform: none;
  102. line-height: 1;
  103. vertical-align: baseline;
  104. display: inline-block;
  105. -webkit-font-smoothing: antialiased;
  106. -moz-osx-font-smoothing: grayscale;
  107. }
  108. .themeColor {
  109. color: @themeColor;
  110. }
  111. .shadowBox {
  112. border: 1px solid #dfdfdf;
  113. padding: 12px 24px;
  114. box-shadow: 0 4px 9px #dcdcdc;
  115. border-radius: 3px;
  116. }
  117. .myTabsBox {
  118. position: relative;
  119. overflow: hidden;
  120. .addBtn {
  121. position: absolute;
  122. right: 40px;
  123. top: 45px;
  124. }
  125. .el-tabs {
  126. width: 285px;
  127. margin: 45px 40px 15px;
  128. color: @themeColor;
  129. .el-tabs__content {
  130. display: none;
  131. }
  132. .el-tabs__nav-scroll {
  133. padding-left: 25px;
  134. position: relative;
  135. &:before {
  136. content: "";
  137. display: block;
  138. position: absolute;
  139. left: 0;
  140. bottom: 0;
  141. width: 25px;
  142. height: 1px;
  143. border-bottom: 1px solid @themeColor;
  144. }
  145. &:after {
  146. content: "";
  147. display: block;
  148. position: absolute;
  149. right: 0;
  150. bottom: 0;
  151. width: 60px;
  152. height: 1px;
  153. border-bottom: 1px solid @themeColor;
  154. }
  155. }
  156. }
  157. }
  158. .el-tabs--card>.el-tabs__header {
  159. border-bottom: none;
  160. }
  161. .el-tabs--card>.el-tabs__header .el-tabs__nav {
  162. border: none;
  163. }
  164. .addBtn {
  165. &.el-button {
  166. background: #F5F7FA;
  167. border: 1px solid #DEE6F3;
  168. color: #BABABA;
  169. }
  170. }
  171. .el-range-editor.el-input__inner {
  172. padding: 0 10px;
  173. }
  174. .el-date-editor .el-range-separator {
  175. width: 6%;
  176. }
  177. /**
  178. * **xx提供的UI优化代码
  179. */
  180. // element 主题色
  181. @--color-primary: #3397FF;
  182. // @--font-path: '~element-ui/lib/theme-chalk/fonts';
  183. // @import "~element-ui/packages/theme-chalk/src/index.scss";
  184. @grayLine: #e5e5e5;
  185. @lightColor: #3397FF;
  186. @tableTitleBg: #f5f6fa;
  187. @gray: #b2b2b2;
  188. @color: #666666;
  189. @grayBg: #cccccc;
  190. .el-form-item__content {
  191. line-height: 32px;
  192. }
  193. .el-form-item__label {
  194. line-height: 32px;
  195. padding: 0 20px 0 0;
  196. }
  197. // elemen ui 表单 input样式更改
  198. .el-input__inner {
  199. height: 32px;
  200. line-height: normal;
  201. border: 1px solid @grayLine;
  202. }
  203. .el-input__icon {
  204. line-height: 32px;
  205. }
  206. // elemen ui 表单 textarea样式更改
  207. .el-textarea__inner {
  208. height: 80px;
  209. border: 1px solid @grayLine;
  210. }
  211. // elemen ui 表单 单选按钮样式更改
  212. .el-radio__input {
  213. line-height: 16px;
  214. }
  215. .el-radio__inner {
  216. width: 16px;
  217. height: 16px;
  218. border: 1px solid @grayLine;
  219. }
  220. .el-radio__input.is-checked .el-radio__inner {
  221. background: transparent;
  222. }
  223. .el-radio__inner:after {
  224. width: 10px;
  225. height: 10px;
  226. background-color: @lightColor;
  227. }
  228. .el-radio__input.is-disabled .el-radio__inner {
  229. background-color: @tableTitleBg;
  230. border-color: #E5E5E5;
  231. }
  232. .el-radio__input.is-disabled .el-radio__inner {
  233. border-color: #E5E5E5;
  234. background-color: #F5F6Fa;
  235. }
  236. // elemen ui 表单 多选按钮样式更改
  237. .el-checkbox-group {
  238. font-size: 12px;
  239. }
  240. .el-checkbox__inner {
  241. border: 1px solid @gray;
  242. }
  243. // elemen ui 表格样式更改
  244. .el-table::before {
  245. background-color: @grayLine;
  246. }
  247. .el-table td {
  248. border-bottom: 1px solid @grayLine;
  249. }
  250. .el-table th {
  251. padding: 0;
  252. background-color: @tableTitleBg;
  253. border-bottom: none !important;
  254. color: @color;
  255. .cell {
  256. line-height: 40px;
  257. font-size: 12px;
  258. }
  259. }
  260. .el-table td {
  261. padding: 8px 0;
  262. font-size: 12px;
  263. height: 40px;
  264. }
  265. // .el-table tr:hover td {
  266. // background: #fff !important;
  267. // }
  268. .el-table .cell {
  269. overflow: hidden;
  270. // text-overflow: ellipsis;
  271. // white-space: nowrap;
  272. }
  273. // table filer
  274. .el-table-filter__list {
  275. max-height: 200px;
  276. overflow: auto;
  277. li {
  278. max-width: 200px;
  279. overflow: hidden;
  280. text-overflow: ellipsis;
  281. white-space: nowrap;
  282. word-break: normal;
  283. word-wrap: normal;
  284. line-height: 30px;
  285. font-size: 12px;
  286. }
  287. li:hover,
  288. .el-table-filter__list-item.is-active {
  289. background-color: @grayBg;
  290. color: @lightColor;
  291. }
  292. }
  293. // elemen ui 表单 划过 样式更改
  294. .el-input__inner:hover,
  295. .el-radio__inner:hover,
  296. .el-textarea__inner:hover,
  297. .el-checkbox__inner:hover,
  298. .el-select .el-input__inner:hover {
  299. border: 1px solid @gray;
  300. }
  301. .el-select-dropdown__item.hover,
  302. .el-select-dropdown__item:hover,
  303. .el-dropdown-menu__item:not(.is-disabled):hover,
  304. .el-dropdown-menu__item:focus {
  305. background: @grayBg;
  306. }
  307. /*按钮样式更改*/
  308. //按钮最小宽度更改 默认按钮
  309. .el-button {
  310. padding: 8px 15px;
  311. min-width: 88px;
  312. color: @color;
  313. border-color: @grayLine;
  314. }
  315. .el-button:focus {
  316. color: @color;
  317. border-color: @grayLine;
  318. background-color: #fff;
  319. }
  320. .el-button:hover,
  321. .el-button:active {
  322. color: #fff;
  323. border-color: @grayLine;
  324. background-color: @gray;
  325. }
  326. // 蓝色朴素按钮
  327. .el-button--primary.is-plain {
  328. background: #fff;
  329. border-color: @lightColor;
  330. color: @lightColor;
  331. }
  332. .el-button--primary.is-plain:active {
  333. background: @lightColor;
  334. border-color: @lightColor;
  335. color: #fff;
  336. }
  337. .el-button--primary.is-plain:focus {
  338. background: #fff;
  339. border-color: @lightColor;
  340. color: @lightColor;
  341. }
  342. .el-button--primary.is-plain:hover {
  343. background: @lightColor;
  344. border-color: @lightColor;
  345. color: #fff;
  346. ;
  347. }
  348. // 蓝色主要按钮
  349. .el-button--primary {
  350. color: #fff;
  351. border-color: @lightColor;
  352. }
  353. .el-button--primary:hover,
  354. .el-button--primary:active,
  355. .el-button--primary:focus {
  356. color: #fff;
  357. border-color: @lightColor;
  358. background-color: @lightColor;
  359. }
  360. //.el-button--primary:hover, .el-button--primary:focus{background:@lightColor;}
  361. //灰色按钮
  362. .el-button--info.is-plain {
  363. background: #fff;
  364. border-color: @gray;
  365. color: #666;
  366. &:hover {
  367. color: #fff;
  368. background: @gray;
  369. }
  370. &:active {
  371. background: #a2a2a2;
  372. color: #fff;
  373. }
  374. }
  375. .el-button--primary.is-disabled.disabledBtn {
  376. color: #666;
  377. background: #f1f1f1;
  378. border: 1px solid #dedede;
  379. cursor: default;
  380. }
  381. // 禁用按钮
  382. .el-button--info.is-plain.is-disabled,
  383. .el-button--info.is-plain.is-disabled:hover,
  384. .el-button--info.is-plain.is-disabled:focus,
  385. .el-button--info.is-plain.is-disabled:active {
  386. color: @gray;
  387. background-color: @tableTitleBg;
  388. border-color: #e5e5e5;
  389. }
  390. // 文字按钮
  391. .el-button--text {
  392. border-color: transparent;
  393. color: @lightColor;
  394. min-width: 0;
  395. background: transparent;
  396. padding-left: 0;
  397. padding-right: 0;
  398. }
  399. .el-button--text:hover,
  400. .el-button--text:active,
  401. .el-button--text:focus {
  402. color: @lightColor;
  403. background-color: transparent;
  404. border-color: transparent;
  405. }
  406. .el-button--small {
  407. padding: 9px 15px;
  408. }
  409. //修改tab切换 样式
  410. .el-tabs__item {
  411. width: 100px;
  412. text-align: center;
  413. padding: 0;
  414. color: @color;
  415. }
  416. .el-tabs__nav-wrap::after {
  417. height: 1px;
  418. background-color: @grayLine;
  419. }
  420. .el-tabs--border-card {
  421. box-shadow: 0 0 0 0;
  422. -webkit-box-shadow: 0 0 0 0;
  423. }
  424. .el-tabs--top.el-tabs--border-card>.el-tabs__header .el-tabs__item:nth-child(2) {
  425. padding-left: 0 !important;
  426. }
  427. // 修改表单边框颜色(验证,focus)
  428. .el-form-item.is-error .el-input__inner,
  429. .el-form-item.is-error .el-input__inner:focus,
  430. .el-form-item.is-error .el-textarea__inner,
  431. .el-form-item.is-error .el-textarea__inner:focus {
  432. border-color: @grayLine;
  433. }
  434. .el-form-item.is-success .el-input__inner,
  435. .el-form-item.is-success .el-input__inner:focus,
  436. .el-form-item.is-success .el-textarea__inner,
  437. .el-form-item.is-success .el-textarea__inner:focus {
  438. border-color: @grayLine;
  439. }
  440. .el-form-item.is-error .el-input__inner:hover,
  441. .el-form-item.is-error .el-textarea__inner:hover,
  442. s {
  443. border-color: @gray;
  444. }
  445. .el-form-item.is-success .el-input__inner:hover,
  446. .el-form-item.is-success .el-textarea__inner:hover {
  447. border-color: @gray;
  448. }
  449. .el-input__inner:focus,
  450. .el-textarea__inner:focus,
  451. .el-select .el-input__inner:focus,
  452. .el-select .el-input.is-focus .el-input__inner {
  453. border-color: @grayLine;
  454. }
  455. //修改复选框字体颜色
  456. .el-checkbox {
  457. color: @color;
  458. margin-right: 0;
  459. }
  460. .el-checkbox__input.is-checked+.el-checkbox__label {
  461. color: @color;
  462. }
  463. .el-message {
  464. top: 60px;
  465. min-width: 0;
  466. padding-right: 20px;
  467. }
  468. .el-message-box {
  469. width: 460px;
  470. padding: 5px 5px 20px 5px;
  471. .el-message-box__content {
  472. color: @color;
  473. padding: 20px 15px 25px;
  474. }
  475. .el-message-box__header {
  476. .el-message-box__title {
  477. font-size: 16px;
  478. color: @color;
  479. }
  480. .el-message-box__headerbtn {
  481. top: 12px;
  482. }
  483. }
  484. .el-message-box__message {
  485. p {
  486. word-break: break-all;
  487. }
  488. }
  489. }
  490. .el-message-box__btns button:nth-child(1) {
  491. margin-left: 10px;
  492. float: right;
  493. }
  494. .cancel-left {
  495. float: right;
  496. margin-left: 15px;
  497. font-size: 14px;
  498. }
  499. .size14 {
  500. font-size: 14px;
  501. }
  502. // dialog
  503. .el-dialog__title {
  504. font-size: 16px;
  505. color: @color;
  506. }
  507. .el-dialog__body {
  508. padding: 20px 20px;
  509. }
  510. // 不加粗
  511. .el-pagination {
  512. font-weight: normal;
  513. }
  514. .el-select-dropdown__item.selected {
  515. font-weight: normal;
  516. }
  517. // loding 颜色
  518. .el-upload .el-loading-mask {
  519. background-color: rgba(255, 255, 255, 0.5);
  520. }
  521. .el-loading-spinner {
  522. .el-loading-text {
  523. color: #fff;
  524. }
  525. }
  526. .el-loading-spinner {
  527. i {
  528. color: #fff;
  529. }
  530. }
  531. .el-upload-list__item-name {
  532. margin-right: 110px;
  533. }
  534. /* tree划过选中样式 */
  535. .el-tree .el-tree-node .el-tree-node__content {
  536. height: 30px;
  537. line-height: 30px;
  538. }
  539. .el-tree .el-tree-node__label {
  540. font-size: 12px;
  541. }
  542. .el-tree .el-tree-node[aria-disabled=true] {
  543. color: #ccc;
  544. }
  545. .el-tree-node__content:hover {
  546. background-color: transparent;
  547. }
  548. .el-tree-node:focus>.el-tree-node__content {
  549. background-color: transparent;
  550. }
  551. .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content {
  552. background-color: transparent;
  553. color: @lightColor;
  554. }
  555. .classify-select {
  556. .el-tree-node__content {
  557. cursor: default;
  558. }
  559. }
  560. //截图回显隐藏对勾图标
  561. .el-upload-list__item.is-success .el-upload-list__item-status-label {
  562. display: none;
  563. }
  564. //抽屉弹框的标题样式修改
  565. .el-drawer__header {
  566. font-size: 16px;
  567. color: @color;
  568. }