云链智安app
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

index-u.scss 5.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. @import '@/uni_modules/lime-style/index.scss';
  2. $loading-color: create-var(loading-color, $primary-color);
  3. $loading-size: create-var(loading-size, 40rpx);
  4. $loading-text-color: create-var(loading-text-color, $text-color-3);
  5. $loading-font-size: create-var(loading-font-size, $font-size);
  6. /* #ifndef APP */
  7. /* #ifndef MP-ALIPAY */
  8. $loading-duration: var(--l-loading-duration, 2s);
  9. @property --l-loading-start {
  10. syntax: '<length-percentage>';
  11. initial-value: 1%;
  12. inherits: false;
  13. }
  14. @property --l-loading-end {
  15. syntax: '<length-percentage>';
  16. initial-value: 1%;
  17. inherits: false;
  18. }
  19. @property --l-left {
  20. syntax: '<length-percentage>';
  21. initial-value: 1%;
  22. inherits: false;
  23. }
  24. @property --l-loadding-ball-size {
  25. syntax: '<length> | <length-percentage>';
  26. // initial-value: 1%;
  27. inherits: false;
  28. }
  29. /* #endif */
  30. /* #ifdef MP-ALIPAY */
  31. $loading-duration: var(--l-loading-duration, 1s);
  32. /* #endif */
  33. /* #endif */
  34. .l-loading {
  35. display: flex;
  36. position: relative;
  37. flex-direction: row;
  38. align-items: center;
  39. // align-self: flex-start;
  40. /* #ifndef APP */
  41. color: $loading-color;
  42. &--ball{
  43. display: inline-flex;
  44. align-items: center;
  45. .l-loading {
  46. &__ball {
  47. position: relative;
  48. perspective: calc(var(--l-loadding-ball-size) * 4);
  49. transform-style: preserve-3d;
  50. // border: 1px solid;
  51. &:before{
  52. background-color: $primary-color;
  53. left: 0%;
  54. // mix-blend-mode: darken;
  55. animation-name: l-ball-before;
  56. }
  57. &:after{
  58. right: 0;
  59. background-color: red;
  60. // mix-blend-mode: darken;
  61. animation-name: l-ball-after;
  62. }
  63. &:before,&:after{
  64. top: 0;
  65. content: '';
  66. position: absolute;
  67. // width: 100%;
  68. height: 100%;
  69. aspect-ratio: 1/1;
  70. border-radius: 50%;
  71. animation-iteration-count: infinite;
  72. animation-delay: -100ms;
  73. animation-duration: 900ms;
  74. mix-blend-mode: darken;
  75. }
  76. }
  77. }
  78. }
  79. &--circular {
  80. .l-loading {
  81. &__circular {
  82. display: inline-block;
  83. position: relative;
  84. animation: l-rotate $loading-duration linear infinite;
  85. vertical-align: middle;
  86. &:before {
  87. content: '';
  88. display: block;
  89. width: 100%;
  90. height: 100%;
  91. border-radius: 50%;
  92. /* #ifndef MP-ALIPAY */
  93. background: conic-gradient(
  94. transparent 0%,
  95. transparent var(--l-loading-start, 0%), var(--l-loading-color-1, currentColor) var(--l-loading-start, 0%),
  96. var(--l-loading-color-2, currentColor) var(--l-loading-end, 0%), transparent var(--l-loading-end, 0%),
  97. transparent 100%);
  98. /* #endif */
  99. /* #ifdef MP-ALIPAY */
  100. background: conic-gradient(
  101. var(--l-loading-color-1, transparent) 0%,
  102. var(--l-loading-color-2, currentColor) 100%);
  103. /* #endif */
  104. mask: radial-gradient(closest-side, transparent calc(80% - 1px), #fff 80%);
  105. -webkit-mask: radial-gradient(closest-side, transparent calc(80% - 1px), #fff 80%);
  106. animation: l-circular 3s ease-in-out infinite;
  107. transform: rotate(90deg);
  108. }
  109. }
  110. }
  111. }
  112. &--spinner {
  113. .l-loading {
  114. &__spinner {
  115. position: relative;
  116. box-sizing: border-box;
  117. // width: 100%;
  118. // height: 100%;
  119. // max-width: 100%;
  120. // max-height: 100%;
  121. animation-timing-function: steps(12);
  122. animation: l-rotate 1.5s linear infinite;
  123. }
  124. &__dot {
  125. position: absolute;
  126. top: 0;
  127. left: 0;
  128. width: 100%;
  129. height: 100%;
  130. transform: rotate(calc(var(--l-loading-dot, 1) * 30deg));
  131. opacity: calc(var(--l-loading-dot, 1) / 12);
  132. &::before {
  133. display: block;
  134. width: 5rpx;
  135. height: 25%;
  136. margin: 0 auto;
  137. background-color: currentColor;
  138. border-radius: 40%;
  139. content: ' ';
  140. }
  141. }
  142. }
  143. }
  144. /* #endif */
  145. /* #ifdef APP */
  146. &__view{
  147. // background-color: aqua;
  148. // background-color: #1677ff;
  149. // transition-duration: 1.5s;
  150. // transition-property: transform;
  151. // transition-timing-function: linear;
  152. }
  153. /* #endif */
  154. &__text {
  155. margin-left: $spacer-xs;
  156. color: $loading-text-color;
  157. font-size: $loading-font-size;
  158. }
  159. &.is-vertical {
  160. flex-direction: column;
  161. .l-loading__text {
  162. margin: $spacer-tn 0 0;
  163. }
  164. }
  165. &__ball,&__circular,&__spinner {
  166. width: $loading-size;
  167. height: $loading-size;
  168. }
  169. }
  170. /* #ifndef APP */
  171. @keyframes l-circular {
  172. 0% {
  173. --l-loading-start: 0%;
  174. --l-loading-end: 0%;
  175. }
  176. 50% {
  177. --l-loading-start: 0%;
  178. --l-loading-end: 100%;
  179. }
  180. 100% {
  181. --l-loading-start: 100%;
  182. --l-loading-end: 100%;
  183. }
  184. }
  185. @keyframes l-rotate {
  186. to {
  187. transform: rotate(1turn)
  188. }
  189. }
  190. @keyframes l-ball-before {
  191. 0%{
  192. animation-timing-function: ease-in;
  193. }
  194. 25% {
  195. animation-timing-function: ease-out;
  196. --l-left: calc((var(--l-loadding-ball-size,100%) * 2.1 - var(--l-loadding-ball-size,100%)) / 2);
  197. transform: translate3d(var(--l-left), 0, var(--l-loadding-ball-size));
  198. }
  199. 50% {
  200. --l-left: calc((var(--l-loadding-ball-size,100%) * 2.1 - var(--l-loadding-ball-size,100%)));
  201. animation-timing-function:ease-in;
  202. transform: translate3d(var(--l-left), 0, 0);
  203. }
  204. 75% {
  205. animation-timing-function: ease-out;
  206. --l-left: calc((var(--l-loadding-ball-size,100%) * 2.1 - var(--l-loadding-ball-size,100%)) / 2);
  207. transform: translate3d(var(--l-left), 0, calc(var(--l-loadding-ball-size) * -1));
  208. }
  209. }
  210. @keyframes l-ball-after {
  211. 0%{
  212. animation-timing-function: ease-in;
  213. }
  214. 25% {
  215. animation-timing-function: ease-out;
  216. --l-left: calc((var(--l-loadding-ball-size,100%) * 2.1 - var(--l-loadding-ball-size,100%)) / 2 * -1);
  217. transform: translate3d(var(--l-left), 0, calc(var(--l-loadding-ball-size) * -1));
  218. }
  219. 50% {
  220. animation-timing-function:ease-in;
  221. --l-left: calc((var(--l-loadding-ball-size,100%) * 2.1 - var(--l-loadding-ball-size,100%)) * -1);
  222. transform: translate3d(var(--l-left), 0, 0);
  223. }
  224. 75% {
  225. animation-timing-function: ease-out;
  226. --l-left: calc((var(--l-loadding-ball-size,100%) * 2.1 - var(--l-loadding-ball-size,100%)) / 2 * -1);
  227. transform: translate3d(var(--l-left), 0, var(--l-loadding-ball-size));
  228. }
  229. }
  230. /* #endif */