绿满眶商城微信小程序-uniapp
peng
2025-06-25 28167c45044ddb9ceff22b44e48a7ab496b8839a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<template>
  <view class="animations">
    <view class="box" :style="{ '--color': color }">
      <view class="atom"></view>
      <view class="atom"></view>
      <view class="atom"></view>
      <view class="dot"></view>
    </view>
  </view>
</template>
 
<script>
export default {
  name: "loading-atom",
  props: {
    color: {
      type: String,
      default: "#0396FF",
    },
  },
  data() {
    return {};
  },
};
</script>
 
<style lang="scss" scoped>
.box {
  position: relative;
  width: 120rpx;
  height: 120rpx;
}
.dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--color);
  animation: dotbreath 2s linear infinite;
}
.atom {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border-left-width: 6rpx;
  border-top-width: 6rpx;
  border-left-color: var(--color);
  border-left-style: solid;
  border-top-style: solid;
  border-top-color: transparent;
}
.atom:nth-of-type(1) {
  left: 0%;
  top: 0%;
  animation: atom1 1s linear infinite;
}
.atom:nth-of-type(2) {
  right: 0%;
  top: 0%;
  animation: atom2 1s linear infinite;
}
.atom:nth-of-type(3) {
  right: 0%;
  bottom: 0%;
  animation: atom3 1s linear infinite;
}
@keyframes dotbreath {
  0% {
    opacity: 1;
  }
 
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}
@keyframes atom1 {
  0% {
    transform: rotateZ(120deg) rotateX(66deg) rotateZ(0deg);
  }
  100% {
    transform: rotateZ(120deg) rotateX(66deg) rotateZ(360deg);
  }
}
@keyframes atom2 {
  0% {
    transform: rotateZ(240deg) rotateX(66deg) rotateZ(0deg);
  }
  100% {
    transform: rotateZ(240deg) rotateX(66deg) rotateZ(360deg);
  }
}
 
@keyframes atom3 {
  0% {
    transform: rotateZ(360deg) rotateX(66deg) rotateZ(0deg);
  }
  100% {
    transform: rotateZ(360deg) rotateX(66deg) rotateZ(360deg);
  }
}
</style>