啊鑫
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
154
155
156
157
158
159
160
161
162
163
@import '../style/var';
 
.van-uploader {
  position: relative;
  display: inline-block;
 
  &__wrapper {
    display: flex;
    flex-wrap: wrap;
 
    &--disabled {
      opacity: @uploader-disabled-opacity;
    }
  }
 
  &__input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; // to clip file-upload-button
    cursor: pointer;
    opacity: 0;
 
    &-wrapper {
      position: relative;
    }
 
    &:disabled {
      cursor: not-allowed;
    }
  }
 
  &__upload {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: @uploader-size;
    height: @uploader-size;
    margin: 0 @padding-xs @padding-xs 0;
    background-color: @uploader-upload-background-color;
 
    &:active {
      background-color: @uploader-upload-active-color;
    }
 
    &--readonly:active {
      background-color: @uploader-upload-background-color;
    }
 
    &-icon {
      color: @uploader-icon-color;
      font-size: @uploader-icon-size;
    }
 
    &-text {
      margin-top: @padding-xs;
      color: @uploader-text-color;
      font-size: @uploader-text-font-size;
    }
  }
 
  &__preview {
    position: relative;
    margin: 0 @padding-xs @padding-xs 0;
    cursor: pointer;
 
    &-image {
      display: block;
      width: @uploader-size;
      height: @uploader-size;
      overflow: hidden;
    }
 
    &-delete {
      position: absolute;
      top: 0;
      right: 0;
      width: @uploader-delete-icon-size;
      height: @uploader-delete-icon-size;
      background-color: @uploader-delete-background-color;
      border-radius: 0 0 0 12px;
 
      &-icon {
        position: absolute;
        top: -2px;
        right: -2px;
        color: #fff;
        color: @uploader-delete-color;
        font-size: 16px;
        transform: scale(0.5);
      }
    }
 
    &-cover {
      position: absolute;
      top: 0;
      right: 0;
      bottom: 0;
      left: 0;
    }
  }
 
  &__mask {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: @white;
    background-color: @uploader-mask-background-color;
 
    &-icon {
      font-size: @uploader-mask-icon-size;
    }
 
    &-message {
      margin-top: 6px;
      padding: 0 @padding-base;
      font-size: @uploader-mask-message-font-size;
      line-height: @uploader-mask-message-line-height;
    }
  }
 
  &__loading {
    width: @uploader-loading-icon-size;
    height: @uploader-loading-icon-size;
    color: @uploader-loading-icon-color;
  }
 
  &__file {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: @uploader-size;
    height: @uploader-size;
    background-color: @uploader-file-background-color;
 
    &-icon {
      color: @uploader-file-icon-color;
      font-size: @uploader-file-icon-size;
    }
 
    &-name {
      box-sizing: border-box;
      width: 100%;
      margin-top: @uploader-file-name-margin-top;
      padding: @uploader-file-name-padding;
      color: @uploader-file-name-text-color;
      font-size: @uploader-file-name-font-size;
      text-align: center;
    }
  }
}