啊鑫
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
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
@import '../style/var';
 
.van-tab {
  position: relative;
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 0 @padding-base;
  color: @tab-text-color;
  font-size: @tab-font-size;
  line-height: @tab-line-height;
  cursor: pointer;
 
  &--active {
    color: @tab-active-text-color;
    font-weight: @font-weight-bold;
  }
 
  &--disabled {
    color: @tab-disabled-text-color;
    cursor: not-allowed;
  }
 
  &__text {
    &--ellipsis {
      display: -webkit-box;
      overflow: hidden;
      -webkit-line-clamp: 1;
      -webkit-box-orient: vertical;
    }
  }
 
  &__text-wrapper {
    position: relative;
  }
}
 
.van-tabs {
  position: relative;
 
  &__wrap {
    overflow: hidden;
 
    &--page-top {
      position: fixed;
    }
 
    &--content-bottom {
      top: auto;
      bottom: 0;
    }
 
    &--scrollable {
      .van-tab {
        flex: 1 0 auto;
        padding: 0 @padding-sm;
      }
 
      .van-tabs__nav {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
 
        &::-webkit-scrollbar {
          display: none;
        }
      }
    }
  }
 
  &__nav {
    position: relative;
    display: flex;
    background-color: @tabs-nav-background-color;
    user-select: none;
 
    &--line {
      box-sizing: content-box;
      height: 100%;
      padding-bottom: 15px; /* 15px padding to hide scrollbar in mobile safari */
    }
 
    &--line&--complete {
      padding-right: @padding-xs;
      padding-left: @padding-xs;
    }
 
    &--card {
      box-sizing: border-box;
      height: @tabs-card-height;
      margin: 0 @padding-md;
      border: @border-width-base solid @tabs-default-color;
      border-radius: @border-radius-sm;
 
      .van-tab {
        color: @tabs-default-color;
        border-right: @border-width-base solid @tabs-default-color;
 
        &:last-child {
          border-right: none;
        }
 
        &.van-tab--active {
          color: @white;
          background-color: @tabs-default-color;
        }
 
        &--disabled {
          color: @tab-disabled-text-color;
        }
      }
    }
  }
 
  &__line {
    position: absolute;
    bottom: 15px;
    left: 0;
    z-index: 1;
    width: @tabs-bottom-bar-width;
    height: @tabs-bottom-bar-height;
    background-color: @tabs-bottom-bar-color;
    border-radius: @tabs-bottom-bar-height;
  }
 
  &__track {
    position: relative;
    display: flex;
    width: 100%;
    height: 100%;
    will-change: left;
  }
 
  &__content {
    &--animated {
      overflow: hidden;
    }
  }
 
  &--line {
    .van-tabs__wrap {
      height: @tabs-line-height;
    }
  }
 
  &--card {
    > .van-tabs__wrap {
      height: @tabs-card-height;
    }
  }
}