啊鑫
7 天以前 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
59
60
@import '../style/var';
 
.van-sidebar-item {
  position: relative;
  display: block;
  box-sizing: border-box;
  padding: @sidebar-padding;
  overflow: hidden;
  color: @sidebar-text-color;
  font-size: @sidebar-font-size;
  line-height: @sidebar-line-height;
  background-color: @sidebar-background-color;
  cursor: pointer;
  user-select: none;
 
  &:active {
    background-color: @sidebar-active-color;
  }
 
  &__text {
    position: relative;
    display: inline-block;
    // https://github.com/vant-ui/vant/issues/7455
    word-break: break-all;
  }
 
  &:not(:last-child)::after {
    border-bottom-width: 1px;
  }
 
  &--select {
    color: @sidebar-selected-text-color;
    font-weight: @sidebar-selected-font-weight;
 
    &,
    &:active {
      background-color: @sidebar-selected-background-color;
    }
 
    &::before {
      position: absolute;
      top: 50%;
      left: 0;
      width: @sidebar-selected-border-width;
      height: @sidebar-selected-border-height;
      background-color: @sidebar-selected-border-color;
      transform: translateY(-50%);
      content: '';
    }
  }
 
  &--disabled {
    color: @sidebar-disabled-text-color;
    cursor: not-allowed;
 
    &:active {
      background-color: @sidebar-background-color;
    }
  }
}