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
.cl-input-number {
    display: inline-flex;
    align-items: center;
    height: $cl-input-number-size;
    line-height: 1;
 
    &__plus,
    &__minus {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        height: $cl-input-number-size;
        width: $cl-input-number-size;
        border-radius: $cl-input-number-radius;
        background-color: #f1f7ff;
 
        text {
            font-size: 28rpx;
            font-weight: bold;
        }
 
        &:active {
            opacity: 0.8;
        }
    }
 
    &__plus {
        background-color: $cl-color-primary;
        color: #fff;
    }
 
    &__value {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100%;
        font-size: 28rpx;
        text-align: center;
        color: $cl-color-primary;
        position: relative;
        margin: 0 20rpx;
 
        input {
            height: 100%;
            width: 100%;
            position: absolute;
            top: 0;
            left: 0;
            font-size: inherit;
            background-color: #fff;
        }
 
        .unit {
            font-size: 20rpx;
            position: relative;
            z-index: 9;
 
            &:nth-child(1) {
                opacity: 0;
            }
        }
 
        .num {
            margin: 0 20rpx;
            visibility: hidden;
        }
    }
 
    &.is-disabled {
        .cl-input-number__plus,
        .cl-input-number__minus {
            background-color: $cl-color-disabled-bg;
            color: $cl-color-disabled;
        }
        .cl-input-number__value {
            color: $cl-color-disabled;
        }
    }
 
    &.disabled-plus {
        .cl-input-number__plus {
            background-color: $cl-color-disabled-bg;
            color: $cl-color-disabled;
        }
    }
 
    &.disabled-minus {
        .cl-input-number__minus {
            background-color: $cl-color-disabled-bg;
            color: $cl-color-disabled;
        }
    }
}