index.less 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. @import (reference) '../../style/themes/index.less';
  2. @import '../../style/mixins/hairline.less';
  3. .formItemLabelHorizontal() {
  4. width: 170 * @rpx;
  5. margin-right: 24 * @rpx;
  6. color: @COLOR_TEXT_SECONDARY;
  7. font-size: 34 * @rpx;
  8. line-height: 48 * @rpx;
  9. }
  10. .formItemLabelVertical() {
  11. font-size: 34 * @rpx;
  12. line-height: 42 * @rpx;
  13. color: @COLOR_TEXT_SECONDARY;
  14. margin-bottom: 8 * @rpx;
  15. }
  16. .formItemContentHorizontal() {
  17. display: flex;
  18. align-items: center;
  19. }
  20. .formItemFieldHorizontal() {
  21. text-align: right;
  22. }
  23. @formItemPrefix: ant-form-item;
  24. .@{formItemPrefix} {
  25. background-color: @COLOR_CARD;
  26. padding: 24 * @rpx 24 * @rpx 24 * @rpx 32 * @rpx;
  27. position: relative;
  28. .hairline('bottom');
  29. &-line {
  30. display: flex;
  31. flex: 1;
  32. align-items: center;
  33. align-self: stretch;
  34. max-width: 100%;
  35. position: relative;
  36. }
  37. &-content {
  38. flex: 1;
  39. &-horizontal {
  40. .formItemContentHorizontal();
  41. }
  42. }
  43. &-error-info {
  44. font-size: 13px;
  45. color: @COLOR_RED;
  46. line-height: 37 * @rpx;
  47. text-align: left;
  48. margin-top: 8 * @rpx;
  49. }
  50. &-help-info {
  51. font-size: 13px;
  52. color: @COLOR_TEXT_SECONDARY;
  53. line-height: 37 * @rpx;
  54. text-align: left;
  55. margin-top: 8 * @rpx;
  56. }
  57. &-label {
  58. display: flex;
  59. align-items: center;
  60. font-size: 34 * @rpx;
  61. line-height: 48 * @rpx;
  62. overflow: visible;
  63. position: relative;
  64. &-text {
  65. display: flex;
  66. align-items: center;
  67. position: relative;
  68. }
  69. &-help-content {
  70. font-size: 30 * @rpx;
  71. text-align: center;
  72. white-space: nowrap;
  73. }
  74. &-horizontal {
  75. .formItemLabelHorizontal();
  76. }
  77. &-vertical {
  78. .formItemLabelVertical();
  79. }
  80. }
  81. &-field {
  82. flex: 1;
  83. &-horizontal {
  84. .formItemFieldHorizontal();
  85. }
  86. }
  87. // &-other {
  88. // display: flex;
  89. // align-items: center;
  90. // }
  91. &-extra {
  92. display: flex;
  93. align-items: center;
  94. font-size: 32 * @rpx;
  95. color: @COLOR_TEXT_ASSIST;
  96. }
  97. &-asterisk {
  98. .@{formItemPrefix}-label-required .@{formItemPrefix}-label-text {
  99. &::before {
  100. content: '*';
  101. position: absolute;
  102. left: -18 * @rpx;
  103. font-size: 30 * @rpx;
  104. color: @COLOR_TEXT_WARNING;
  105. }
  106. }
  107. }
  108. &-text-required {
  109. .@{formItemPrefix}-label-required .@{formItemPrefix}-label-text {
  110. &::after {
  111. padding-left: 4 * @rpx;
  112. content: '(必填)';
  113. display: block;
  114. left: -18 * @rpx;
  115. font-size: 30 * @rpx;
  116. color: @COLOR_TEXT_WEAK;
  117. }
  118. }
  119. }
  120. &-text-optional {
  121. .@{formItemPrefix}-label .@{formItemPrefix}-label-text {
  122. &::after {
  123. padding-left: 4 * @rpx;
  124. content: '(选填)';
  125. display: block;
  126. left: -18 * @rpx;
  127. font-size: 30 * @rpx;
  128. color: @COLOR_TEXT_WEAK;
  129. }
  130. }
  131. .@{formItemPrefix}-label-required .@{formItemPrefix}-label-text {
  132. &::after {
  133. content: none;
  134. }
  135. }
  136. }
  137. }