theme.less 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720
  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. &.myTabsBoxThreeTabs {
  158. .el-tabs {
  159. width: 385px;
  160. }
  161. .el-tabs--top.el-tabs--card>.el-tabs__header .el-tabs__item:nth-child(2) {
  162. padding-left: 0;
  163. }
  164. .el-tabs--top.el-tabs--card>.el-tabs__header .el-tabs__item.is-active ~ .el-tabs__item {
  165. border-left-color: transparent;
  166. }
  167. // .el-tabs--top.el-tabs--card>.el-tabs__header .el-tabs__item:nth-child(2).is-active {
  168. // &.el-tabs__item:nth-child(3) {
  169. // border-left-color: transparent;
  170. // }
  171. // }
  172. .el-tabs--top.el-tabs--card>.el-tabs__header .el-tabs__item:last-child {
  173. padding-left: 20px;
  174. }
  175. }
  176. }
  177. .el-tabs--card>.el-tabs__header {
  178. border-bottom: none;
  179. }
  180. .el-tabs--card>.el-tabs__header .el-tabs__nav {
  181. border: none;
  182. }
  183. .addBtn {
  184. &.el-button {
  185. background: #F5F7FA;
  186. border: 1px solid #DEE6F3;
  187. color: #BABABA;
  188. }
  189. }
  190. .el-range-editor.el-input__inner {
  191. padding: 0 10px;
  192. }
  193. .el-date-editor .el-range-separator {
  194. width: 6%;
  195. }
  196. /**
  197. * **xx提供的UI优化代码
  198. */
  199. // element 主题色
  200. @--color-primary: #3397FF;
  201. // @--font-path: '~element-ui/lib/theme-chalk/fonts';
  202. // @import "~element-ui/packages/theme-chalk/src/index.scss";
  203. @grayLine: #e5e5e5;
  204. @lightColor: #3397FF;
  205. @tableTitleBg: #f5f6fa;
  206. @gray: #b2b2b2;
  207. @color: #666666;
  208. @grayBg: #cccccc;
  209. .el-form-item__content {
  210. line-height: 32px;
  211. }
  212. .el-form-item__label {
  213. line-height: 32px;
  214. padding: 0 20px 0 0;
  215. }
  216. // elemen ui 表单 input样式更改
  217. .el-input__inner {
  218. height: 32px;
  219. line-height: normal;
  220. border: 1px solid @grayLine;
  221. }
  222. .el-input__icon {
  223. line-height: 32px;
  224. }
  225. // elemen ui 表单 textarea样式更改
  226. .el-textarea__inner {
  227. height: 80px;
  228. border: 1px solid @grayLine;
  229. }
  230. // elemen ui 表单 单选按钮样式更改
  231. .el-radio__input {
  232. line-height: 16px;
  233. }
  234. .el-radio__inner {
  235. width: 16px;
  236. height: 16px;
  237. border: 1px solid @grayLine;
  238. }
  239. .el-radio__input.is-checked .el-radio__inner {
  240. background: transparent;
  241. }
  242. .el-radio__inner:after {
  243. width: 10px;
  244. height: 10px;
  245. background-color: @lightColor;
  246. }
  247. .el-radio__input.is-disabled .el-radio__inner {
  248. background-color: @tableTitleBg;
  249. border-color: #E5E5E5;
  250. }
  251. .el-radio__input.is-disabled .el-radio__inner {
  252. border-color: #E5E5E5;
  253. background-color: #F5F6Fa;
  254. }
  255. // elemen ui 表单 多选按钮样式更改
  256. .el-checkbox-group {
  257. font-size: 12px;
  258. }
  259. .el-checkbox__inner {
  260. border: 1px solid @gray;
  261. }
  262. // elemen ui 表格样式更改
  263. .el-table::before {
  264. background-color: @grayLine;
  265. }
  266. .el-table td {
  267. border-bottom: 1px solid @grayLine;
  268. }
  269. .el-table th {
  270. padding: 0;
  271. background-color: @tableTitleBg;
  272. border-bottom: none !important;
  273. color: @color;
  274. .cell {
  275. line-height: 40px;
  276. font-size: 12px;
  277. }
  278. }
  279. .el-table td {
  280. padding: 8px 0;
  281. font-size: 12px;
  282. height: 40px;
  283. }
  284. // .el-table tr:hover td {
  285. // background: #fff !important;
  286. // }
  287. .el-table .cell {
  288. overflow: hidden;
  289. // text-overflow: ellipsis;
  290. // white-space: nowrap;
  291. }
  292. // table filer
  293. .el-table-filter__list {
  294. max-height: 200px;
  295. overflow: auto;
  296. li {
  297. max-width: 200px;
  298. overflow: hidden;
  299. text-overflow: ellipsis;
  300. white-space: nowrap;
  301. word-break: normal;
  302. word-wrap: normal;
  303. line-height: 30px;
  304. font-size: 12px;
  305. }
  306. li:hover,
  307. .el-table-filter__list-item.is-active {
  308. background-color: @grayBg;
  309. color: @lightColor;
  310. }
  311. }
  312. // elemen ui 表单 划过 样式更改
  313. .el-input__inner:hover,
  314. .el-radio__inner:hover,
  315. .el-textarea__inner:hover,
  316. .el-checkbox__inner:hover,
  317. .el-select .el-input__inner:hover {
  318. border: 1px solid @gray;
  319. }
  320. .el-select-dropdown__item.hover,
  321. .el-select-dropdown__item:hover,
  322. .el-dropdown-menu__item:not(.is-disabled):hover,
  323. .el-dropdown-menu__item:focus {
  324. background: @grayBg;
  325. }
  326. /*按钮样式更改*/
  327. //按钮最小宽度更改 默认按钮
  328. .el-button {
  329. padding: 8px 15px;
  330. min-width: 88px;
  331. color: @color;
  332. border-color: @grayLine;
  333. }
  334. .el-button:focus {
  335. color: @color;
  336. border-color: @grayLine;
  337. background-color: #fff;
  338. }
  339. .el-button:hover,
  340. .el-button:active {
  341. color: #fff;
  342. border-color: @grayLine;
  343. background-color: @gray;
  344. }
  345. // 蓝色朴素按钮
  346. .el-button--primary.is-plain {
  347. background: #fff;
  348. border-color: @lightColor;
  349. color: @lightColor;
  350. }
  351. .el-button--primary.is-plain:active {
  352. background: @lightColor;
  353. border-color: @lightColor;
  354. color: #fff;
  355. }
  356. .el-button--primary.is-plain:focus {
  357. background: #fff;
  358. border-color: @lightColor;
  359. color: @lightColor;
  360. }
  361. .el-button--primary.is-plain:hover {
  362. background: @lightColor;
  363. border-color: @lightColor;
  364. color: #fff;
  365. ;
  366. }
  367. // 蓝色主要按钮
  368. .el-button--primary {
  369. color: #fff;
  370. border-color: @lightColor;
  371. }
  372. .el-button--primary:hover,
  373. .el-button--primary:active,
  374. .el-button--primary:focus {
  375. color: #fff;
  376. border-color: @lightColor;
  377. background-color: @lightColor;
  378. }
  379. //.el-button--primary:hover, .el-button--primary:focus{background:@lightColor;}
  380. //灰色按钮
  381. .el-button--info.is-plain {
  382. background: #fff;
  383. border-color: @gray;
  384. color: #666;
  385. &:hover {
  386. color: #fff;
  387. background: @gray;
  388. }
  389. &:active {
  390. background: #a2a2a2;
  391. color: #fff;
  392. }
  393. }
  394. .el-button--primary.is-disabled.disabledBtn {
  395. color: #666;
  396. background: #f1f1f1;
  397. border: 1px solid #dedede;
  398. cursor: default;
  399. }
  400. // 禁用按钮
  401. .el-button--info.is-plain.is-disabled,
  402. .el-button--info.is-plain.is-disabled:hover,
  403. .el-button--info.is-plain.is-disabled:focus,
  404. .el-button--info.is-plain.is-disabled:active {
  405. color: @gray;
  406. background-color: @tableTitleBg;
  407. border-color: #e5e5e5;
  408. }
  409. // 文字按钮
  410. .el-button--text {
  411. border-color: transparent;
  412. color: @lightColor;
  413. min-width: 0;
  414. background: transparent;
  415. padding-left: 0;
  416. padding-right: 0;
  417. }
  418. .el-button--text:hover,
  419. .el-button--text:active,
  420. .el-button--text:focus {
  421. color: @lightColor;
  422. background-color: transparent;
  423. border-color: transparent;
  424. }
  425. .el-button--small {
  426. padding: 9px 15px;
  427. }
  428. //修改tab切换 样式
  429. .el-tabs__item {
  430. width: 100px;
  431. text-align: center;
  432. padding: 0;
  433. color: @color;
  434. }
  435. .el-tabs__nav-wrap::after {
  436. height: 1px;
  437. background-color: @grayLine;
  438. }
  439. .el-tabs--border-card {
  440. box-shadow: 0 0 0 0;
  441. -webkit-box-shadow: 0 0 0 0;
  442. }
  443. .el-tabs--top.el-tabs--border-card>.el-tabs__header .el-tabs__item:nth-child(2) {
  444. padding-left: 0 !important;
  445. }
  446. // 修改表单边框颜色(验证,focus)
  447. .el-form-item.is-error .el-input__inner,
  448. .el-form-item.is-error .el-input__inner:focus,
  449. .el-form-item.is-error .el-textarea__inner,
  450. .el-form-item.is-error .el-textarea__inner:focus {
  451. border-color: @grayLine;
  452. }
  453. .el-form-item.is-success .el-input__inner,
  454. .el-form-item.is-success .el-input__inner:focus,
  455. .el-form-item.is-success .el-textarea__inner,
  456. .el-form-item.is-success .el-textarea__inner:focus {
  457. border-color: @grayLine;
  458. }
  459. .el-form-item.is-error .el-input__inner:hover,
  460. .el-form-item.is-error .el-textarea__inner:hover,
  461. s {
  462. border-color: @gray;
  463. }
  464. .el-form-item.is-success .el-input__inner:hover,
  465. .el-form-item.is-success .el-textarea__inner:hover {
  466. border-color: @gray;
  467. }
  468. .el-input__inner:focus,
  469. .el-textarea__inner:focus,
  470. .el-select .el-input__inner:focus,
  471. .el-select .el-input.is-focus .el-input__inner {
  472. border-color: @grayLine;
  473. }
  474. //修改复选框字体颜色
  475. .el-checkbox {
  476. color: @color;
  477. margin-right: 0;
  478. }
  479. .el-checkbox__input.is-checked+.el-checkbox__label {
  480. color: @color;
  481. }
  482. .el-message {
  483. top: 60px;
  484. min-width: 0;
  485. padding-right: 20px;
  486. }
  487. .el-message-box {
  488. width: 460px;
  489. padding: 5px 5px 20px 5px;
  490. .el-message-box__content {
  491. color: @color;
  492. padding: 20px 15px 25px;
  493. }
  494. .el-message-box__header {
  495. .el-message-box__title {
  496. font-size: 16px;
  497. color: @color;
  498. }
  499. .el-message-box__headerbtn {
  500. top: 12px;
  501. }
  502. }
  503. .el-message-box__message {
  504. p {
  505. word-break: break-all;
  506. }
  507. }
  508. }
  509. .el-message-box__btns button:nth-child(1) {
  510. margin-left: 10px;
  511. float: right;
  512. }
  513. .cancel-left {
  514. float: right;
  515. margin-left: 15px;
  516. font-size: 14px;
  517. }
  518. .size14 {
  519. font-size: 14px;
  520. }
  521. // dialog
  522. .el-dialog__title {
  523. font-size: 16px;
  524. color: @color;
  525. }
  526. .el-dialog__body {
  527. padding: 20px 20px;
  528. }
  529. // 不加粗
  530. .el-pagination {
  531. font-weight: normal;
  532. }
  533. .el-select-dropdown__item.selected {
  534. font-weight: normal;
  535. }
  536. // loding 颜色
  537. .el-upload .el-loading-mask {
  538. background-color: rgba(255, 255, 255, 0.5);
  539. }
  540. .el-loading-spinner {
  541. .el-loading-text {
  542. color: #fff;
  543. }
  544. }
  545. .el-loading-spinner {
  546. i {
  547. color: #fff;
  548. }
  549. }
  550. .el-upload-list__item-name {
  551. margin-right: 110px;
  552. }
  553. /* tree划过选中样式 */
  554. .el-tree .el-tree-node .el-tree-node__content {
  555. height: 30px;
  556. line-height: 30px;
  557. }
  558. .el-tree .el-tree-node__label {
  559. font-size: 12px;
  560. }
  561. .el-tree .el-tree-node[aria-disabled=true] {
  562. color: #ccc;
  563. }
  564. .el-tree-node__content:hover {
  565. background-color: transparent;
  566. }
  567. .el-tree-node:focus>.el-tree-node__content {
  568. background-color: transparent;
  569. }
  570. .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content {
  571. background-color: transparent;
  572. color: @lightColor;
  573. }
  574. .classify-select {
  575. .el-tree-node__content {
  576. cursor: default;
  577. }
  578. }
  579. //截图回显隐藏对勾图标
  580. .el-upload-list__item.is-success .el-upload-list__item-status-label {
  581. display: none;
  582. }
  583. //抽屉弹框的标题样式修改
  584. .el-drawer__header {
  585. font-size: 16px;
  586. color: @color;
  587. }