绿满眶商城微信小程序-uniapp
peng
2025-06-27 3f7acbae32700d7c3c2f883968ea33d436df5219
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
<template>
    <view class="animations">
      <view class="loader" :style="{ '--color': color }"></view>
    </view>
  </template>
  
  <script>
  export default {
    name: "loading-locating",
    props: {
      color: {
        type: String,
        default: "#0396FF",
      },
    },
    data() {
      return {};
    },
  };
  </script>
  
  <style lang="scss" scoped>
  
  .loader {
    width: 96rpx;
    height: 96rpx;
    display: block;
    margin: 40rpx auto;
    box-sizing: border-box;
    position: relative;
  }
 
  .loader::after {
    content: '';
    width: 96rpx;
    height: 96rpx;
    left: 0;
    bottom: 0;
    position: absolute;
    border-radius: 50% 50% 0;
    border: 30rpx solid var(--color);
    transform: rotate(45deg) translate(0, 0);
    box-sizing: border-box;
    animation: animMarker 0.4s ease-in-out infinite alternate;
  }
 
  .loader::before {
    content: '';
    box-sizing: border-box;
    position: absolute;
    left: 0;
    right: 0;
    margin: auto;
    top: 150%;
    width: 48rpx;
    height: 8rpx;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    animation: animShadow 0.4s ease-in-out infinite alternate;
  }
 
  @keyframes animMarker {
    0% {
      transform: rotate(45deg) translate(10rpx, 10rpx);
    }
 
    100% {
      transform: rotate(45deg) translate(-10rpx, -10rpx);
    }
  }
 
  @keyframes animShadow {
    0% {
      transform: scale(0.5);
    }
 
    100% {
      transform: scale(1);
    }
  }
</style>