index.wxss 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. .nut-button {
  2. position: relative;
  3. display: inline-block;
  4. width: auto;
  5. flex-shrink: 0;
  6. height: 38px;
  7. box-sizing: border-box;
  8. margin: 0;
  9. padding: 0;
  10. line-height: 36px;
  11. font-size: 14px;
  12. text-align: center;
  13. cursor: pointer;
  14. transition: opacity 0.2s;
  15. appearance: none;
  16. user-select: none;
  17. touch-action: manipulation;
  18. vertical-align: bottom;
  19. -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  20. -webkit-tap-highlight-color: transparent;
  21. }
  22. .nut-button .text {
  23. margin-left: 5px;
  24. }
  25. .nut-button::before {
  26. position: absolute;
  27. top: 50%;
  28. left: 50%;
  29. width: 100%;
  30. height: 100%;
  31. background-color: #000;
  32. border: inherit;
  33. border-color: #000;
  34. border-radius: inherit;
  35. transform: translate(-50%, -50%);
  36. opacity: 0;
  37. content: " ";
  38. }
  39. .nut-button::after {
  40. border: none;
  41. }
  42. .nut-button:active::before {
  43. opacity: 0.1;
  44. }
  45. .nut-button__warp {
  46. height: 100%;
  47. width: 100%;
  48. display: flex;
  49. align-items: center;
  50. justify-content: center;
  51. }
  52. .nut-button--loading::before, .nut-button--disabled::before {
  53. display: none;
  54. }
  55. .nut-button--default {
  56. color: rgb(102, 102, 102);
  57. background: #fff;
  58. border: 1px solid rgb(204, 204, 204);
  59. }
  60. .nut-button--primary {
  61. color: #fff;
  62. background: linear-gradient(135deg, #fa2c19 0%, #fa6419 100%);
  63. border: 1px solid transparent;
  64. }
  65. .nut-button--info {
  66. color: #fff;
  67. background: linear-gradient(315deg, rgb(73, 143, 242) 0%, rgb(73, 101, 242) 100%);
  68. border: 1px solid transparent;
  69. }
  70. .nut-button--success {
  71. color: #fff;
  72. background: linear-gradient(135deg, rgb(38, 191, 38) 0%, rgb(39, 197, 48) 45%, rgb(40, 207, 63) 83%, rgb(41, 212, 70) 100%);
  73. border: 1px solid transparent;
  74. }
  75. .nut-button--danger {
  76. color: #fff;
  77. background: rgb(250, 44, 25);
  78. border: 1px solid transparent;
  79. }
  80. .nut-button--warning {
  81. color: #fff;
  82. background: linear-gradient(135deg, rgb(255, 158, 13) 0%, rgb(255, 167, 13) 45%, rgb(255, 182, 13) 83%, rgb(255, 190, 13) 100%);
  83. border: 1px solid transparent;
  84. }
  85. .nut-button--plain {
  86. background: #fff;
  87. }
  88. .nut-button--plain.nut-button--primary {
  89. color: #fa2c19;
  90. border-color: #fa2c19;
  91. }
  92. .nut-button--plain.nut-button--info {
  93. color: rgb(73, 106, 242);
  94. border-color: rgb(73, 106, 242);
  95. }
  96. .nut-button--plain.nut-button--success {
  97. color: rgb(38, 191, 38);
  98. border-color: rgb(38, 191, 38);
  99. }
  100. .nut-button--plain.nut-button--danger {
  101. color: rgb(250, 44, 25);
  102. border-color: rgb(250, 44, 25);
  103. }
  104. .nut-button--plain.nut-button--warning {
  105. color: rgb(255, 158, 13);
  106. border-color: rgb(255, 158, 13);
  107. }
  108. .nut-button--large {
  109. width: 100%;
  110. height: 48px;
  111. line-height: 46px;
  112. font-size: 14px;
  113. }
  114. .nut-button--normal {
  115. padding: 0 18px;
  116. font-size: 14px;
  117. }
  118. .nut-button--small {
  119. height: 28px;
  120. line-height: 26px;
  121. padding: 0 12px;
  122. font-size: 12px;
  123. }
  124. .nut-button--small.nut-button--round {
  125. border-radius: 25px;
  126. }
  127. .nut-button--mini {
  128. height: 24px;
  129. line-height: 1.2;
  130. padding: 0 12px;
  131. font-size: 12px;
  132. }
  133. .nut-button--block {
  134. display: block;
  135. width: 100%;
  136. }
  137. .nut-button--disabled {
  138. cursor: not-allowed;
  139. opacity: 0.68;
  140. }
  141. .nut-button--loading {
  142. cursor: default;
  143. opacity: 0.9;
  144. }
  145. .nut-button--round {
  146. border-radius: 25px;
  147. }
  148. .nut-button--square {
  149. border-radius: 0;
  150. }