index.vue
4.3 KB
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
<!-- @auth kahu -->
<template>
<view class="loading_box mask flex-center"
@touchmove.stop.prevent="HandlePageMove">
<!-- 点动画 -->
<view class="dot_box theOuterRotation"
v-if="false">
<view class="dot_item"
v-for="item in 4"></view>
</view>
<!-- 进度条动画 -->
<view class="progress_box" v-if="false">
<view class="progress_item progress_roll_center"></view>
</view>
Loading....
</view>
</template>
<script>
export default {
name: "index",
data() {
return {}
},
onPageScroll(e) {
return false
},
mounted() {
console.log(getCurrentPages())
//#ifdef H5
//#endif
},
methods: {
HandlePageMove() {
return false
}
}
}
</script>
<style lang="scss"
scoped>
.mask {
width: 100vw;
height: 100vh;
background: rgba(0, 0, 0, 0.5);
color: #fff;
}
.flex-center {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
}
.loading_box {
width: 100vw;
height: 100vh;
position: fixed;
top: 0;
bottom: 0;
z-index: 9999;
/** 点动画*/
.theOuterRotation {
animation: rotate 2s ease-in-out .5s infinite normal;
}
.dot_box {
width: 80rpx;
height: 80rpx;
//background: #fff;
border-radius: 20rpx;
margin: 20rpx 0;
position: relative;
// 原始dot
.dot_item {
width: 30rpx;
height: 30rpx;
background: #fff;
border-radius: 50%;
position: absolute;
transition: all .6s;
box-shadow: 0 0 2rpx #b4b4b4;
&:nth-child(1) {
top: 0;
left: 0;
}
&:nth-child(2) {
top: 0;
right: 0;
}
&:nth-child(3) {
bottom: 0;
right: 0;
}
&:nth-child(4) {
bottom: 0;
left: 0;
}
}
// 单双放大动画
.dot_scale {
&:nth-child(1) {
top: 0;
left: 0;
animation: magnify 2s ease-in-out 0s infinite alternate;
}
&:nth-child(2) {
top: 0;
right: 0;
animation: magnify 2s ease-in-out 1s infinite alternate;
}
&:nth-child(3) {
bottom: 0;
right: 0;
animation: magnify 2s ease-in-out 0s infinite alternate;
}
&:nth-child(4) {
bottom: 0;
left: 0;
animation: magnify 2s ease-in-out 1s infinite alternate;
}
}
// 单点移动动画
.dot_move {
&:nth-child(1) {
z-index: 2;
animation: moveDot 2s ease-in-out 0s infinite normal;
}
}
// 单偶放大
@keyframes magnify {
0% {
transform: scale(1);
background: rgba(0, 255, 228, 0.82);
}
25% {
background: #32b5cc;
}
50% {
transform: scale(1.4);
background: #73e34e;
}
75% {
background: #0ec469;
}
100% {
transform: scale(1);
background: #868686;
}
}
// 移动单点
@keyframes moveDot {
0% {
top: 0;
left: 0;
background: #d0f598;
}
25% {
top: 0;
left: 100%;
transform: translateX(-100%);
background: #f5e298;
}
50% {
top: 100%;
left: 100%;
transform: translate(-100%, -100%);
background: #6bea91;
}
75% {
top: 100%;
left: 0;
transform: translateY(-100%);
background: #e84c7a;
}
100% {
top: 0;
left: 0;
}
}
@keyframes rotate {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
}
/** 进度条动画*/
.progress_box{
width: 300rpx;
height: 25rpx;
margin: 20rpx 0;
border-radius: 25rpx;
background-color: #fff;
position: relative;
overflow: hidden;
.progress_item{
width: 0%;
height: 100%;
background: #f68686;
border-radius: 25rpx;
}
.progress_roll{
animation: roll 1s ease-in-out 0s infinite alternate-reverse;
}
.progress_roll_center{
width: 5%;
transition: all .6s;
margin: 0 auto;
animation: roll 1s cubic-bezier(.15,.2,.05,.4) 0s infinite alternate-reverse;
}
}
@keyframes roll {
from{
width: 5%;
}
to{
width: 100%;
}
}
}
</style>