啊鑫
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
@import '../style/var';
 
.van-stepper {
  font-size: 0;
  user-select: none;
 
  &__minus,
  &__plus {
    position: relative;
    box-sizing: border-box;
    width: @stepper-input-height;
    height: @stepper-input-height;
    margin: 0;
    padding: 0;
    color: @stepper-button-icon-color;
    vertical-align: middle;
    background-color: @stepper-background-color;
    border: 0;
    cursor: pointer;
 
    &::before {
      width: 50%;
      height: 1px;
    }
 
    &::after {
      width: 1px;
      height: 50%;
    }
 
    &::before,
    &::after {
      position: absolute;
      top: 50%;
      left: 50%;
      background-color: currentColor;
      transform: translate(-50%, -50%);
      content: '';
    }
 
    &:active {
      background-color: @stepper-active-color;
    }
 
    &--disabled {
      color: @stepper-button-disabled-icon-color;
      background-color: @stepper-button-disabled-color;
      cursor: not-allowed;
 
      &:active {
        background-color: @stepper-button-disabled-color;
      }
    }
  }
 
  &__minus {
    border-radius: @stepper-border-radius 0 0 @stepper-border-radius;
 
    &::after {
      display: none;
    }
  }
 
  &__plus {
    border-radius: 0 @stepper-border-radius @stepper-border-radius 0;
  }
 
  &__input {
    box-sizing: border-box;
    width: @stepper-input-width;
    height: @stepper-input-height;
    margin: 0 2px;
    padding: 0;
    color: @stepper-input-text-color;
    font-size: @stepper-input-font-size;
    line-height: @stepper-input-line-height;
    text-align: center;
    vertical-align: middle;
    background-color: @stepper-background-color;
    border: 0;
    border-width: 1px 0;
    border-radius: 0;
    -webkit-appearance: none;
 
    &:disabled {
      color: @stepper-input-disabled-text-color;
      background-color: @stepper-input-disabled-background-color;
      // fix disabled color in iOSF
      -webkit-text-fill-color: @stepper-input-disabled-text-color;
      opacity: 1;
    }
 
    &:read-only {
      cursor: default;
    }
  }
 
  &--round {
    .van-stepper__input {
      background-color: transparent;
    }
 
    .van-stepper__plus,
    .van-stepper__minus {
      border-radius: 100%;
 
      &:active {
        opacity: @active-opacity;
      }
 
      &--disabled {
        &,
        &:active {
          opacity: 0.3;
        }
      }
    }
 
    .van-stepper__plus {
      color: @white;
      background-color: @stepper-button-round-theme-color;
    }
 
    .van-stepper__minus {
      color: @stepper-button-round-theme-color;
      background-color: @white;
      border: 1px solid @stepper-button-round-theme-color;
    }
  }
}