form.scss 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. .cl-form {
  2. .cl-form-item {
  3. min-height: 70rpx;
  4. padding: 20rpx 0;
  5. position: relative;
  6. &--required {
  7. .cl-form-item__label::before {
  8. content: "*";
  9. color: $cl-color-error;
  10. margin-right: 10rpx;
  11. }
  12. }
  13. &--suffix {
  14. .cl-form-item__content {
  15. margin-right: 20rpx;
  16. }
  17. }
  18. &__container {
  19. display: flex;
  20. &:first-child {
  21. padding-left: 180rpx;
  22. }
  23. }
  24. &__label {
  25. padding: 0 20rpx 0 0;
  26. font-size: 28rpx;
  27. text-align: right;
  28. vertical-align: middle;
  29. float: left;
  30. line-height: 70rpx;
  31. }
  32. &__content {
  33. /* #ifndef MP-TOUTIAO */
  34. display: flex;
  35. /* #endif */
  36. flex: 1;
  37. font-size: 26rpx;
  38. line-height: 70rpx;
  39. &.is-justify-center {
  40. justify-content: center;
  41. /* #ifdef MP-TOUTIAO */
  42. text-align: left;
  43. /* #endif */
  44. picker {
  45. text-align: center;
  46. }
  47. }
  48. &.is-justify-end {
  49. justify-content: flex-end;
  50. /* #ifdef MP-TOUTIAO */
  51. text-align: right;
  52. /* #endif */
  53. picker {
  54. text-align: right;
  55. }
  56. }
  57. &.is-justify-space-between {
  58. justify-content: space-between;
  59. }
  60. &.is-justify-space-around {
  61. justify-content: space-around;
  62. }
  63. picker {
  64. font-size: 26rpx;
  65. }
  66. label {
  67. font-size: 26rpx;
  68. switch,
  69. radio,
  70. checkbox {
  71. margin-right: 14rpx;
  72. }
  73. radio,
  74. checkbox {
  75. top: -2rpx;
  76. }
  77. switch {
  78. top: -4rpx;
  79. }
  80. }
  81. checkbox-group,
  82. radio-group {
  83. label {
  84. padding-right: 30rpx;
  85. }
  86. }
  87. cl-textarea,
  88. cl-select-region,
  89. cl-select,
  90. cl-input {
  91. width: 100%;
  92. }
  93. }
  94. &__message {
  95. display: block;
  96. color: $cl-color-error;
  97. font-size: 24rpx;
  98. text-align: right;
  99. margin-top: 6rpx;
  100. }
  101. &__suffix {
  102. display: flex;
  103. align-items: center;
  104. font-size: 26rpx;
  105. i {
  106. display: inline-block;
  107. }
  108. }
  109. }
  110. .cl-form-item {
  111. &--top {
  112. padding: 0 0 20rpx 0;
  113. .cl-form-item__label {
  114. padding: 0 0 10rpx 0;
  115. float: none;
  116. text-align: left;
  117. }
  118. }
  119. &--left {
  120. .cl-form-item__label {
  121. text-align: left;
  122. }
  123. }
  124. &--right {
  125. .cl-form-item__label {
  126. text-align: right;
  127. }
  128. }
  129. }
  130. &--border {
  131. .cl-form-item {
  132. border-bottom: 1rpx solid #eee;
  133. }
  134. }
  135. }