button.wxss 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  1. .t-float-left {
  2. float: left;
  3. }
  4. .t-float-right {
  5. float: right;
  6. }
  7. @keyframes tdesign-fade-out {
  8. from {
  9. opacity: 1;
  10. }
  11. to {
  12. opacity: 0;
  13. }
  14. }
  15. .hotspot-expanded.relative {
  16. position: relative;
  17. }
  18. .hotspot-expanded::after {
  19. content: '';
  20. display: block;
  21. position: absolute;
  22. left: 0;
  23. top: 0;
  24. right: 0;
  25. bottom: 0;
  26. transform: scale(1.5);
  27. }
  28. .t-button {
  29. display: inline-flex;
  30. align-items: center;
  31. justify-content: center;
  32. position: relative;
  33. white-space: nowrap;
  34. text-align: center;
  35. background-image: none;
  36. border: 1px solid transparent;
  37. cursor: pointer;
  38. transition: all 0.3s;
  39. user-select: none;
  40. touch-action: manipulation;
  41. font-size: 28rpx;
  42. height: 80rpx;
  43. border-radius: 8rpx;
  44. color: rgba(0, 0, 0, 0.9);
  45. border-color: #dcdcdc;
  46. background-color: #fff;
  47. outline: none;
  48. font-family: PingFang SC, Microsoft YaHei, Arial Regular;
  49. /* stylelint-disable-next-line */
  50. -webkit-appearance: none;
  51. }
  52. .t-button::after {
  53. background-color: #000;
  54. content: ' ';
  55. opacity: 0;
  56. top: 0;
  57. right: 0;
  58. bottom: 0;
  59. left: 0;
  60. position: absolute;
  61. }
  62. .t-button:not(.t-is-disabled):active::after {
  63. opacity: 0.1;
  64. }
  65. .t-button__wrapper {
  66. display: flex;
  67. height: inherit;
  68. align-items: center;
  69. justify-content: center;
  70. }
  71. .t-button--default {
  72. color: rgba(0, 0, 0, 0.9);
  73. background-color: #ffffff;
  74. border: 1px solid #dcdcdc;
  75. }
  76. .t-button--default.t-is-disabled {
  77. color: rgba(0, 0, 0, 0.26);
  78. }
  79. .t-button--primary {
  80. color: #fff;
  81. background-color: #0052d9;
  82. border: 1px solid #0052d9;
  83. }
  84. .t-button--primary.t-is-disabled {
  85. background-color: #bbd3fb;
  86. border-color: #bbd3fb;
  87. }
  88. .t-button--danger {
  89. color: #fff;
  90. background-color: #e34d59;
  91. border: 1px solid #e34d59;
  92. }
  93. .t-button--danger.t-is-disabled {
  94. background-color: #f8b9be;
  95. border-color: #f8b9be;
  96. }
  97. .t-button--text {
  98. color: #0052d9;
  99. background: none;
  100. border: 0;
  101. }
  102. .t-button--text.t-button--size-default {
  103. width: auto;
  104. height: auto;
  105. line-height: normal;
  106. padding: 0;
  107. }
  108. .t-button--text.t-is-disabled {
  109. color: #bbd3fb;
  110. }
  111. .t-button--ghost {
  112. background-color: transparent;
  113. border: 1px solid #fff;
  114. color: #fff;
  115. }
  116. .t-button--ghost.t-is-disabled {
  117. color: rgba(255, 255, 255, 0.35);
  118. border-color: rgba(255, 255, 255, 0.35);
  119. }
  120. .t-button--plain {
  121. background-color: transparent;
  122. }
  123. .t-button--plain.t-button--primary {
  124. color: #0052d9;
  125. }
  126. .t-button--plain.t-button--primary.t-is-disabled {
  127. background-color: transparent;
  128. color: #bbd3fb;
  129. }
  130. .t-button--plain.t-button--danger {
  131. color: #e34d59;
  132. }
  133. .t-button--plain.t-button--danger.t-is-disabled {
  134. background-color: transparent;
  135. color: #f8b9be;
  136. }
  137. .t-button--base {
  138. height: 80rpx;
  139. line-height: 80rpx;
  140. padding-left: 31rpx;
  141. padding-right: 31rpx;
  142. font-size: 28rpx;
  143. }
  144. .t-button--size-l {
  145. height: 88rpx;
  146. line-height: 88rpx;
  147. }
  148. .t-button--size-l .t-button__icon {
  149. font-size: 48rpx;
  150. }
  151. .t-button--size-l .t-button--loading {
  152. width: 48rpx;
  153. height: 48rpx;
  154. }
  155. .t-button--size-l .t-button--loading + .t-button__content:not(:empty),
  156. .t-button--size-l .t-button__icon + .t-button__content:not(:empty) {
  157. margin-left: 16rpx;
  158. }
  159. .t-button--size-m .t-button__icon {
  160. font-size: 44rpx;
  161. }
  162. .t-button--size-m .t-button--loading {
  163. width: 44rpx;
  164. height: 44rpx;
  165. }
  166. .t-button--size-m .t-button--loading + .t-button__content:not(:empty),
  167. .t-button--size-m .t-button__icon + .t-button__content:not(:empty) {
  168. margin-left: 8rpx;
  169. }
  170. .t-button--size-s {
  171. height: 72rpx;
  172. line-height: 72rpx;
  173. }
  174. .t-button--size-s .t-button__icon {
  175. font-size: 40rpx;
  176. }
  177. .t-button--size-s .t-button--loading {
  178. width: 40rpx;
  179. height: 40rpx;
  180. }
  181. .t-button--size-s .t-button--loading + .t-button__content:not(:empty),
  182. .t-button--size-s .t-button__icon + .t-button__content:not(:empty) {
  183. margin-left: 8rpx;
  184. }
  185. .t-button__icon {
  186. border-radius: 8rpx;
  187. }
  188. .t-button--round.t-button--size-l {
  189. border-radius: 44rpx;
  190. }
  191. .t-button--round.t-button--size-m {
  192. border-radius: 40rpx;
  193. }
  194. .t-button--round.t-button--size-s {
  195. border-radius: 36rpx;
  196. }
  197. .t-button--square {
  198. padding: 0;
  199. }
  200. .t-button--square.t-button--size-l {
  201. width: 88rpx;
  202. }
  203. .t-button--square.t-button--size-m {
  204. width: 80rpx;
  205. }
  206. .t-button--square.t-button--size-s {
  207. width: 72rpx;
  208. }
  209. .t-button--circle {
  210. padding: 0;
  211. }
  212. .t-button--circle.t-button--size-l {
  213. border-radius: 50%;
  214. width: 88rpx;
  215. }
  216. .t-button--circle.t-button--size-m {
  217. border-radius: 50%;
  218. width: 80rpx;
  219. }
  220. .t-button--circle.t-button--size-s {
  221. border-radius: 50%;
  222. width: 72rpx;
  223. }
  224. .t-button.t-is-block {
  225. display: block;
  226. width: 100%;
  227. }
  228. .t-button.t-is-disabled {
  229. cursor: not-allowed;
  230. }
  231. .t-button--loading {
  232. box-sizing: border-box;
  233. animation: rotate 0.8s linear infinite;
  234. }
  235. .t-button--loading .t-button__circular {
  236. border-radius: 50%;
  237. width: 100%;
  238. height: 100%;
  239. opacity: 1;
  240. background: conic-gradient(from 90deg at 50% 50%, rgba(255, 255, 255, 0) 0% 0deg, currentColor 360deg, #ffffff 100% 360deg);
  241. mask: radial-gradient(transparent calc(50% - 1rpx), #fff 50%);
  242. /* stylelint-disable-next-line */
  243. -webkit-mask: radial-gradient(transparent calc(50% - 1rpx), #fff 50%);
  244. }
  245. .t-button.button-hover:after {
  246. border-radius: 8rpx;
  247. }
  248. .t-button-group .t-button {
  249. border: 0;
  250. border-radius: 0;
  251. box-shadow: 0;
  252. width: 100%;
  253. height: 100%;
  254. }