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
.cl-tree {
    &-item {
        &__content {
            display: flex;
            align-items: center;
            height: 100%;
            position: relative;
            border-radius: $cl-border-radius;
            padding: 0 10rpx;
            box-sizing: border-box;
 
            &:active {
                background-color: $cl-color-active;
            }
        }
 
        &__expand {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            height: 100%;
 
            .icon-caret {
                display: inline-block;
                transform: rotate(-90deg);
                transition: transform 0.3s;
            }
        }
 
        &__label {
            font-size: $cl-font-size;
            flex: 1;
            position: relative;
            padding: 0 50rpx 0 4rpx;
        }
 
        &__check {
            display: none;
        }
 
        &__children {
            overflow: hidden;
            transition: all 0.3s;
        }
 
        &.is-expand {
            & > .cl-tree-item__content .icon-caret {
                transform: rotate(0deg);
            }
        }
 
        &.is-checked {
            & > .cl-tree-item__content {
                color: $cl-color-primary;
 
                .cl-tree-item__check {
                    display: block;
                }
            }
        }
    }
}
 
.cl-tree-select {
    padding: 10rpx;
}