啊鑫
8 天以前 fca192d3c38c5dcfbb6ace8bc71d6078f6a079b2
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
@import '../style/var';
 
.van-swipe {
  position: relative;
  overflow: hidden;
  // https://github.com/vant-ui/vant/issues/9931
  transform: translateZ(0);
  cursor: grab;
  user-select: none;
 
  &__track {
    display: flex;
    height: 100%;
 
    &--vertical {
      flex-direction: column;
    }
  }
 
  &__indicators {
    position: absolute;
    bottom: @swipe-indicator-margin;
    left: 50%;
    display: flex;
    transform: translateX(-50%);
 
    &--vertical {
      top: 50%;
      bottom: auto;
      left: @swipe-indicator-margin;
      flex-direction: column;
      transform: translateY(-50%);
 
      .van-swipe__indicator:not(:last-child) {
        margin-bottom: @swipe-indicator-size;
      }
    }
  }
 
  &__indicator {
    width: @swipe-indicator-size;
    height: @swipe-indicator-size;
    background-color: @swipe-indicator-inactive-background-color;
    border-radius: 100%;
    opacity: @swipe-indicator-inactive-opacity;
    transition: opacity @animation-duration-fast,
      background-color @animation-duration-fast;
 
    &:not(:last-child) {
      margin-right: @swipe-indicator-size;
    }
 
    &--active {
      background-color: @swipe-indicator-active-background-color;
      opacity: @swipe-indicator-active-opacity;
    }
  }
}