wangzhibo
4 天以前 10595d8632f959d0954d1939243196f4eed02372
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
.cl-tabs {
    width: 100%;
 
    &__inner {
        display: flex;
        position: relative;
    }
 
    &__bar {
        white-space: nowrap;
        box-sizing: border-box;
        flex: 1;
 
        .uni-scroll-view::-webkit-scrollbar {
            display: none;
        }
 
        &-box {
            display: inline-flex;
            position: relative;
            height: 100%;
            width: 100%;
        }
 
        &-item {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            height: 100%;
            font-size: 28rpx;
            box-sizing: border-box;
            position: relative;
            z-index: 1;
            transition: color 0.3s;
 
            .cl-tabs__icon {
                font-size: 30rpx;
 
                &.is-prefix {
                    margin-right: 10rpx;
                }
 
                &.is--suffix {
                    margin-left: 10rpx;
                }
            }
 
            .cl-tabs__label {
                white-space: nowrap;
            }
 
            &.is-active {
                color: $cl-color-primary;
            }
        }
    }
 
    &__dropdown {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 100rpx;
        background-color: transparent;
 
        &-box {
            position: absolute;
            top: 80rpx;
            left: 0;
            width: 100%;
            box-sizing: border-box;
            background-color: #fff;
            transition: all 0.3s;
            z-index: 99;
        }
    }
 
    &__line {
        height: 4rpx;
        width: 16px;
        position: absolute;
        bottom: 2rpx;
        border-radius: 20rpx;
        transition: all 0.5s;
        background-color: $cl-color-primary;
    }
 
    &__slider {
        height: 100%;
        width: 100%;
        position: absolute;
        top: 0;
        transition: all 0.3s;
        background-color: $cl-color-primary;
        border-radius: $cl-tabs-slider-radius;
    }
 
    &.is-content {
        height: 100%;
    }
 
    &.is-fill {
        .cl-tabs__bar-item {
            flex: 1;
        }
    }
 
    &.is-border {
        .cl-tabs__header {
            border-bottom: $cl-border-width solid #eee;
        }
    }
 
    &.is-dropdown {
        .cl-tabs__bar {
            width: calc(100% - 100rpx);
        }
    }
 
    &.is-checkable {
        .cl-tabs__label {
            background-color: rgba($cl-color-primary, 0.05);
            color: $cl-color-primary;
            padding: 8rpx 20rpx;
            border-radius: 8rpx;
        }
 
        .cl-tabs__bar-item {
            padding: 0 !important;
            margin-right: 20rpx;
 
            &.is-active {
                .cl-tabs__label {
                    background-color: $cl-color-primary;
                    color: #fff;
                }
            }
        }
    }
}