global.less 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. @primary-color: #2152d1;
  2. @success-color: #52C41A;
  3. @warning-color: #FAAD14;
  4. @error-color: #FF4D4F;
  5. @text-color: #303133;
  6. @border-color: #DCDFE6;
  7. @background-color: #F7F8FA;
  8. @font-size-base: 14px;
  9. @border-radius-base: 4px;
  10. @border-radius-large: 12px;
  11. *,
  12. *::before,
  13. *::after {
  14. box-sizing: border-box;
  15. }
  16. html,
  17. body {
  18. width: 100%;
  19. height: 100%;
  20. padding: 0;
  21. margin: 0;
  22. }
  23. #root {
  24. height: 100%;
  25. width: 100%;
  26. font-size: @font-size-base;
  27. color: @text-color;
  28. // Ant-Design主题-属性
  29. --primary-color: @primary-color;
  30. --text-color: @text-color;
  31. --border-radius: @border-radius-base;
  32. }
  33. a,
  34. a:hover,
  35. a:active {
  36. cursor: pointer;
  37. font-size: @font-size-base;
  38. color: @primary-color;
  39. text-decoration: none;
  40. }
  41. ul {
  42. margin: 0;
  43. padding: 0;
  44. }
  45. ul li {
  46. list-style-type: none;
  47. }
  48. .text-primary,
  49. .text-primary:hover {
  50. color: @primary-color;
  51. }
  52. .text-success,
  53. .text-success:hover {
  54. color: @success-color;
  55. }
  56. .text-warning,
  57. .text-warning:hover {
  58. color: @warning-color;
  59. }
  60. .text-error,
  61. .text-error:hover {
  62. color: @error-color;
  63. }
  64. .router-lazyLoad {
  65. position: absolute;
  66. top: 50%;
  67. left: 50%;
  68. transform: translate(-50%, -50%);
  69. }
  70. // Ant-Design主题
  71. .ant-menu-inline {
  72. border: none !important;
  73. }
  74. .ant-menu-inline-collapsed {
  75. border: none !important;
  76. }
  77. // 禁用
  78. //.ant-form-item {
  79. // margin-bottom: 16px !important;
  80. //}
  81. // 全局按钮样式
  82. .ant-btn-primary {
  83. background: #1890ff;
  84. border: 1px solid #1890ff;
  85. color: #ffffff;
  86. transition: all 0.3s ease;
  87. box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  88. &:hover {
  89. background: #40a9ff;
  90. border-color: #40a9ff;
  91. color: #ffffff;
  92. box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  93. transform: translateY(-1px);
  94. }
  95. &:active {
  96. background: #096dd9;
  97. border-color: #096dd9;
  98. color: #ffffff;
  99. box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  100. transform: translateY(0);
  101. }
  102. &:focus {
  103. background: #1890ff;
  104. border-color: #1890ff;
  105. color: #ffffff;
  106. box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
  107. }
  108. &:disabled {
  109. background: #f5f5f5;
  110. border-color: #d9d9d9;
  111. color: rgba(0, 0, 0, 0.25);
  112. box-shadow: none;
  113. transform: none;
  114. }
  115. }