global.less 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439
  1. @import '~ant-design-vue/es/style/themes/default.less';
  2. @import './utils/utils.less';
  3. // 滚动条样式
  4. ::-webkit-scrollbar {
  5. width: 5px;
  6. height: 5px;
  7. }
  8. ::-webkit-scrollbar-thumb {
  9. border-radius: 10px;
  10. background-color: #bdbdbd;
  11. -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, .3);
  12. }
  13. html,
  14. body,
  15. #app,
  16. #root {
  17. height: 100%;
  18. }
  19. body {
  20. text-rendering: optimizeLegibility;
  21. -webkit-font-smoothing: antialiased;
  22. -moz-osx-font-smoothing: grayscale;
  23. ul,
  24. ol {
  25. list-style: none;
  26. }
  27. p {
  28. margin: 0;
  29. margin-bottom: 0;
  30. }
  31. canvas {
  32. display: block;
  33. }
  34. }
  35. iframe {
  36. border: 0;
  37. }
  38. .colorWeak {
  39. filter: invert(80%);
  40. }
  41. .ant-layout.layout-basic {
  42. height: 100vh;
  43. min-height: 100vh;
  44. }
  45. // 数据列表 样式
  46. .table-alert {
  47. margin-bottom: 16px;
  48. }
  49. // 数据列表 操作
  50. .table-operator {
  51. margin-bottom: 18px;
  52. .search-btn {
  53. margin-right: 8px;
  54. }
  55. .actions {
  56. .action-item {
  57. display: inline-block;
  58. }
  59. .action-item,
  60. .ant-btn {
  61. margin-right: 10px;
  62. }
  63. .action-item .ant-btn {
  64. margin-right: 0;
  65. }
  66. }
  67. }
  68. // 数据列表 搜索条件
  69. .table-page-search-wrapper {
  70. .ant-form-inline {
  71. .ant-form-item {
  72. display: flex;
  73. margin-bottom: 24px;
  74. margin-right: 0;
  75. .ant-form-item-control-wrapper {
  76. flex: 1 1;
  77. display: inline-block;
  78. vertical-align: middle;
  79. }
  80. >.ant-form-item-label {
  81. line-height: 32px;
  82. padding-right: 8px;
  83. width: auto;
  84. }
  85. .ant-form-item-control {
  86. height: 32px;
  87. line-height: 32px;
  88. }
  89. }
  90. }
  91. .table-page-search-submitButtons {
  92. display: block;
  93. margin-bottom: 24px;
  94. white-space: nowrap;
  95. }
  96. }
  97. // 内容页card组件标题
  98. .card-title {
  99. font-size: 14.5px;
  100. margin-bottom: 18px;
  101. color: rgba(0, 0, 0, 0.75);
  102. // 选项卡模式
  103. &.tabs {
  104. border-bottom: 1px solid #f3f3f3;
  105. margin-bottom: 23px;
  106. .title-item {
  107. position: relative;
  108. display: inline-block;
  109. margin-right: 15px;
  110. padding: 0 15px;
  111. padding-bottom: 10px;
  112. cursor: pointer;
  113. transition: color .3s cubic-bezier(.645, .045, .355, 1);
  114. &:hover {
  115. color: @primary-color;
  116. }
  117. &.active {
  118. border-bottom: 2px solid @primary-color;
  119. }
  120. // 火热图标
  121. &.fire-icon {
  122. &::before {
  123. content: "";
  124. display: block;
  125. position: absolute;
  126. right: -8px;
  127. top: 1px;
  128. width: 20px;
  129. height: 20px;
  130. background-image: url('~@/assets/img/fire.png');
  131. background-position: center;
  132. background-size: contain;
  133. background-repeat: no-repeat;
  134. }
  135. }
  136. }
  137. }
  138. // 右侧操作 (例如刷新)
  139. .right-action {
  140. float: right;
  141. font-size: 13px;
  142. }
  143. }
  144. @media (max-width: @screen-xs) {
  145. .ant-table {
  146. width: 100%;
  147. overflow-x: auto;
  148. &-thead>tr,
  149. &-tbody>tr {
  150. >th,
  151. >td {
  152. white-space: pre;
  153. >span {
  154. display: block;
  155. }
  156. }
  157. }
  158. }
  159. }
  160. // 图标按钮样式
  161. .ant-btn>.anticon+span,
  162. .ant-btn>span+.anticon {
  163. margin-left: 5px;
  164. }
  165. // 表单
  166. .ant-form {
  167. .ant-form-explain,
  168. .ant-form-extra {
  169. font-size: 12.5px;
  170. }
  171. .form-item-help {
  172. font-size: 12px;
  173. // line-height: 2;
  174. line-height: 1.5;
  175. padding-top: 4px;
  176. min-height: 22px;
  177. // margin-top: -2px;
  178. transition: color 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
  179. a {
  180. margin: 0 3px;
  181. }
  182. .extra,
  183. small {
  184. color: rgba(0, 0, 0, 0.45);
  185. font-size: 12.5px !important;
  186. }
  187. .extra {
  188. margin-bottom: 4px !important;
  189. }
  190. }
  191. }
  192. // 级联选择器
  193. .ant-cascader-menu {
  194. height: 225px;
  195. }
  196. // 分割线
  197. .ant-divider {
  198. margin: 30px 0 !important;
  199. .ant-divider-inner-text {
  200. font-size: @font-size-base;
  201. color: rgba(0, 0, 0, 0.61);
  202. }
  203. }
  204. .ant-divider-horizontal.ant-divider-with-text-left::before {
  205. width: 5%;
  206. }
  207. // modal弹窗
  208. .ant-modal {
  209. // 解决控制台中aria-hidden的报错
  210. [aria-hidden="true"][tabindex="0"] {
  211. display: none;
  212. }
  213. }
  214. .ant-modal-header {
  215. border-bottom: none;
  216. padding-bottom: 12px;
  217. }
  218. .ant-modal-body {
  219. padding: 14px 24px 6px 24px;
  220. font-size: 13.5px;
  221. .ant-form-item {
  222. .ant-form-item {
  223. margin-bottom: 0;
  224. }
  225. &:last-child {
  226. margin-bottom: 0;
  227. }
  228. }
  229. .ant-form-item-control {
  230. padding-left: 10px;
  231. .ant-form-item-control {
  232. padding-left: 0;
  233. }
  234. }
  235. }
  236. .ant-modal-footer {
  237. border-top: none;
  238. padding-top: 12px;
  239. }
  240. //# 兼容外部样式
  241. // ueditor
  242. .edui-default {
  243. .edui-editor {
  244. // z-index: 2 !important;
  245. font-size: 14px;
  246. line-height: normal;
  247. border-radius: 0;
  248. -webkit-border-radius: 0;
  249. -moz-border-radius: 0;
  250. pre {
  251. overflow: unset;
  252. }
  253. }
  254. .edui-editor-toolbarboxouter {
  255. box-shadow: unset;
  256. background-image: linear-gradient(to bottom, #ffffff, #fbfbfb);
  257. }
  258. .edui-editor-toolbarbox {
  259. box-shadow: unset;
  260. }
  261. // 自定义图片按钮
  262. .edui-for-image-button .edui-icon {
  263. background-position: -380px 0px;
  264. }
  265. }
  266. // ## 自定义模块 ##
  267. .ant-table {
  268. // 操作栏 项目间距
  269. .actions>a {
  270. margin-right: 8px;
  271. &:last-child {
  272. margin-right: 0;
  273. }
  274. }
  275. }
  276. // 搜索表单
  277. .search-form {
  278. margin-bottom: 5px;
  279. .ant-form-item {
  280. margin-bottom: 10px;
  281. }
  282. .ant-form-item-control-wrapper {
  283. min-width: 220px;
  284. }
  285. .search-btn {
  286. .ant-form-item-control-wrapper {
  287. width: auto;
  288. min-width: auto;
  289. }
  290. }
  291. }
  292. // 列表页-操作按钮组
  293. .row-item-tab {
  294. &>button {
  295. margin-right: 5px;
  296. }
  297. }
  298. // 无边框的modal
  299. .ant-modal-root {
  300. &.noborder {
  301. .ant-modal-header {
  302. border-bottom: none;
  303. }
  304. .ant-modal-footer {
  305. border-top: none;
  306. }
  307. .ant-modal-body {
  308. padding: 5px 24px 15px 24px;
  309. }
  310. }
  311. }
  312. // 表格不允许换行
  313. .ant-table {
  314. td,
  315. th {
  316. white-space: nowrap;
  317. }
  318. }
  319. // Alert 警告提示 (banner)
  320. .ant-alert-banner {
  321. margin-bottom: 15px;
  322. padding-left: 40px;
  323. .ant-alert-message {
  324. font-size: @font-size-base;
  325. }
  326. // 黄色警告
  327. &.ant-alert-warning {
  328. background-color: #fffcee;
  329. border: 1px solid #fff0c1;
  330. }
  331. // 标题+描述
  332. &.ant-alert-with-description {
  333. padding-left: 55px;
  334. .ant-alert-icon {
  335. font-size: 18px;
  336. top: 16px;
  337. left: 25px;
  338. }
  339. .ant-alert-message {
  340. font-size: @font-size-base;
  341. margin-bottom: 6px;
  342. }
  343. .ant-alert-description {
  344. font-size: 12.3px;
  345. }
  346. }
  347. }
  348. span.ant-radio+* {
  349. color: rgba(0, 0, 0, .5)
  350. }