You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
1023 B

3 years ago
  1. <template>
  2. <view class="mix-icon-loading">
  3. <view
  4. class="loading-icon"
  5. :style="{
  6. width: size,
  7. height: size,
  8. borderRightColor: color
  9. }"
  10. ></view>
  11. </view>
  12. </template>
  13. <script>
  14. /**
  15. * 菊花loading小图标
  16. * @prop size 尺寸单位rpx
  17. * @prop color 颜色
  18. */
  19. export default {
  20. name: 'MixIconLoading',
  21. data() {
  22. return {
  23. };
  24. },
  25. props: {
  26. size: {
  27. type: String,
  28. default: '26rpx'
  29. },
  30. color: {
  31. type: String,
  32. default: '#999'
  33. }
  34. },
  35. methods: {
  36. }
  37. }
  38. </script>
  39. <style scoped lang='scss'>
  40. .mix-icon-loading{
  41. display: flex;
  42. align-items: center;
  43. justify-content: center;
  44. width: auto;
  45. height: auto;
  46. }
  47. .loading-icon{
  48. width: 28rpx;
  49. height: 28rpx;
  50. border: 4rpx solid #ddd;
  51. animation: mix-loading 1.8s steps(12) infinite;
  52. border-radius: 100rpx;
  53. }
  54. @keyframes mix-loading{
  55. from {
  56. transform:rotate(0deg)
  57. }
  58. to {
  59. transform: rotate(1turn)
  60. }
  61. }
  62. </style>