@cloudbase/weda-ui 0.2.8 → 0.2.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +62 -41
- package/src/configs/.DS_Store +0 -0
- package/src/configs/components/button.json +7 -3
- package/src/configs/components/form/richText.json +1 -1
- package/src/configs/components/form/uploader.json +29 -1
- package/src/configs/components/form/uploaderFile.json +158 -0
- package/src/configs/components/image.json +12 -3
- package/src/configs/components/link.json +3 -3
- package/src/configs/components/richtextview.json +2 -2
- package/src/configs/components/scrollVeiw.json +5 -5
- package/src/configs/components/swiper.json +6 -6
- package/src/configs/components/tabs.json +3 -3
- package/src/configs/components/text.json +39 -4
- package/src/configs/index.js +6 -5
- package/src/mp/components/button/index.js +1 -0
- package/src/mp/components/button/index.wxss +8 -0
- package/src/mp/components/form/select/index.js +18 -0
- package/src/mp/components/form/uploader/index.js +26 -29
- package/src/mp/components/form/uploaderFile/index.js +247 -0
- package/src/mp/components/form/uploaderFile/index.json +9 -0
- package/src/mp/components/form/uploaderFile/index.wxml +46 -0
- package/src/mp/components/form/uploaderFile/index.wxss +104 -0
- package/src/mp/components/text/index.js +33 -0
- package/src/mp/components/text/index.wxml +1 -1
- package/src/mp/components/text/index.wxss +18 -0
- package/src/mp/index.json +1 -0
- package/src/mp/utils/platform.js +20 -0
- package/src/mp/utils/tcb.js +11 -0
- package/src/web/actions/showModal/{index.jsx → index.tsx} +53 -3
- package/src/web/components/auth/index.js +2 -2
- package/src/web/components/button/index.css +9 -0
- package/src/web/components/button/{index.jsx → index.tsx} +27 -41
- package/src/web/components/container/{index.jsx → index.tsx} +6 -10
- package/src/web/components/drawer/index.tsx +57 -0
- package/src/web/components/form/checkbox/{index.jsx → index.tsx} +24 -48
- package/src/web/components/form/enumSelect/MultipleSelect.jsx +89 -0
- package/src/web/components/form/enumSelect/NormalSelect.tsx +94 -0
- package/src/web/components/form/enumSelect/SelectContainer.jsx +43 -0
- package/src/web/components/form/enumSelect/index.jsx +9 -0
- package/src/web/components/form/enumSelect/props/defaultProps.js +39 -0
- package/src/web/components/form/enumSelect/props/propsTypes.js +50 -0
- package/src/web/components/form/form/index.tsx +48 -0
- package/src/web/components/form/formcell/{index.jsx → index.tsx} +6 -13
- package/src/web/components/form/input/index.css +4 -0
- package/src/web/components/form/input/{index.jsx → index.tsx} +33 -67
- package/src/web/components/form/radio/{index.jsx → index.tsx} +19 -42
- package/src/web/components/form/{renderDecorator.jsx → renderDecorator.tsx} +1 -3
- package/src/web/components/form/select/{h5.jsx → h5.tsx} +18 -62
- package/src/web/components/form/select/{index.jsx → index.tsx} +51 -94
- package/src/web/components/form/select/region/{cities.js → cities.ts} +1 -1
- package/src/web/components/form/select/region/{index.js → index.ts} +3 -3
- package/src/web/components/form/select/region/{provinces.js → provinces.ts} +1 -1
- package/src/web/components/form/select/region/{regions.js → regions.ts} +1 -1
- package/src/web/components/form/select/time.jsx +2 -2
- package/src/web/components/form/switch/{index.jsx → index.tsx} +30 -47
- package/src/web/components/form/textarea/{index.jsx → index.tsx} +22 -55
- package/src/web/components/form/tips/{index.jsx → index.tsx} +8 -22
- package/src/web/components/form/types.d.ts +12 -0
- package/src/web/components/form/uploader/{index.jsx → index.tsx} +16 -14
- package/src/web/components/form/uploader/{uploader.h5.jsx → uploader.h5.tsx} +67 -57
- package/src/web/components/form/uploader/{uploader.pc.jsx → uploader.pc.tsx} +26 -43
- package/src/web/components/form/uploaderFile/fail.svg +12 -0
- package/src/web/components/form/uploaderFile/index.css +423 -0
- package/src/web/components/form/uploaderFile/index.jsx +30 -0
- package/src/web/components/form/uploaderFile/pending.svg +18 -0
- package/src/web/components/form/uploaderFile/success.svg +12 -0
- package/src/web/components/form/uploaderFile/uploadFile.h5.jsx +562 -0
- package/src/web/components/form/uploaderFile/uploadFile.pc.jsx +487 -0
- package/src/web/components/image/{image.jsx → image.tsx} +8 -21
- package/src/web/components/image/{index.jsx → index.tsx} +22 -37
- package/src/web/components/index.js +36 -1
- package/src/web/components/link/{index.jsx → index.tsx} +19 -36
- package/src/web/components/modal/{index.jsx → index.tsx} +24 -10
- package/src/web/components/picker/{datePicker.jsx → datePicker.tsx} +11 -12
- package/src/web/components/picker/{picker.jsx → picker.tsx} +7 -10
- package/src/web/components/picker/{timePicker.jsx → timePicker.tsx} +8 -16
- package/src/web/components/richText/{const.js → const.ts} +0 -0
- package/src/web/components/richText/index.jsx +5 -2
- package/src/web/components/richTextView/index.tsx +67 -0
- package/src/web/components/scrollView/{index.jsx → index.tsx} +18 -33
- package/src/web/components/slot/{index.jsx → index.tsx} +8 -9
- package/src/web/components/swiper/index.css +1 -1
- package/src/web/components/swiper/{index.jsx → index.tsx} +66 -73
- package/src/web/components/tabs/index.tsx +33 -0
- package/src/web/components/tabs/{tabs.h5.jsx → tabs.h5.tsx} +4 -33
- package/src/web/components/tabs/{tabs.pc.jsx → tabs.pc.tsx} +5 -39
- package/src/web/components/text/index.css +18 -0
- package/src/web/components/text/index.tsx +69 -0
- package/src/web/components/uploaderFileView/index.css +11 -0
- package/src/web/components/uploaderFileView/index.jsx +75 -0
- package/src/web/components/uploaderView/{index.jsx → index.tsx} +12 -15
- package/src/web/types.d.ts +20 -0
- package/src/web/utils/constant.js +2 -0
- package/src/web/utils/loading-fallback.tsx +2 -0
- package/src/web/utils/platform.js +77 -6
- package/src/web/utils/useSetState.ts +14 -0
- package/src/web/utils/useSyncValue.ts +17 -0
- package/src/configs/components/button.svg +0 -18
- package/src/web/components/drawer/index.jsx +0 -64
- package/src/web/components/form/form/index.jsx +0 -76
- package/src/web/components/richTextView/index.jsx +0 -89
- package/src/web/components/tabs/index.jsx +0 -10
- package/src/web/components/text/index.jsx +0 -71
- package/src/web/utils/useSyncValue.js +0 -14
|
@@ -0,0 +1,423 @@
|
|
|
1
|
+
.weda-uploader-pc {
|
|
2
|
+
margin: 0;
|
|
3
|
+
padding: 0;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.weda-uploader-pc .weda-uploader-pc__title {
|
|
7
|
+
color: #000000;
|
|
8
|
+
line-height: 20px;
|
|
9
|
+
font-weight: 400;
|
|
10
|
+
margin-bottom: 4px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/* 单张图片回显 */
|
|
14
|
+
.weda-uploader-pc .weda-uploader-pc__image-box {
|
|
15
|
+
height: 100px;
|
|
16
|
+
width: 100px;
|
|
17
|
+
margin-right: 8px;
|
|
18
|
+
margin-bottom: 8px;
|
|
19
|
+
background: #f2f2f2;
|
|
20
|
+
position: relative;
|
|
21
|
+
display: flex;
|
|
22
|
+
justify-content: center;
|
|
23
|
+
align-items: center;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.weda-uploader-pc .weda-uploader-pc__body {
|
|
28
|
+
margin-bottom: 8px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.weda-uploader-pc .weda-uploader-pc__input-box {
|
|
32
|
+
margin-bottom: 8px;
|
|
33
|
+
}
|
|
34
|
+
.weda-uploader-pc.cloudbase_standard .weda-uploader-pc__body {
|
|
35
|
+
margin-bottom: 0px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.weda-uploader-pc.cloudbase_standard .weda-uploader-pc__input-box {
|
|
39
|
+
margin-bottom: 0px;
|
|
40
|
+
}
|
|
41
|
+
.weda-uploader-pc.cloudbase_standard .weda-uploader-pc__image-list {
|
|
42
|
+
margin-left: 8px;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.weda-uploader-pc .weda-uploader-pc__image-box:hover .weda-uploader-pc__action {
|
|
46
|
+
display: flex;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.weda-uploader-pc .weda-uploader-pc__image {
|
|
50
|
+
max-height: 100%;
|
|
51
|
+
height: auto;
|
|
52
|
+
width: 100%;
|
|
53
|
+
cursor: zoom-in;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.weda-uploader-pc .weda-uploader-pc__action {
|
|
57
|
+
display: none;
|
|
58
|
+
position: absolute;
|
|
59
|
+
top: 0;
|
|
60
|
+
left: 0;
|
|
61
|
+
right: 0;
|
|
62
|
+
bottom: 0;
|
|
63
|
+
justify-content: center;
|
|
64
|
+
align-items: center;
|
|
65
|
+
background-color: rgba(0, 0, 0, 0.6);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.weui-uploader.horizontal {
|
|
69
|
+
display: flex;
|
|
70
|
+
}
|
|
71
|
+
.weui-uploader.horizontal .weui-uploader__hd {
|
|
72
|
+
display: inline-block;
|
|
73
|
+
align-self: center;
|
|
74
|
+
}
|
|
75
|
+
.weda-uploader-pc.horizontal {
|
|
76
|
+
display: flex;
|
|
77
|
+
justify-content: space-between;
|
|
78
|
+
}
|
|
79
|
+
.weui-uploader.horizontal .weui-uploader__bd {
|
|
80
|
+
padding-left: 2.28571rem;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* ----上传文件---- pc */
|
|
84
|
+
.weda-upload-file-pc .weda-upload-file-pc__file-item {
|
|
85
|
+
display: flex;
|
|
86
|
+
flex-wrap: nowrap;
|
|
87
|
+
justify-content: space-between;
|
|
88
|
+
align-items: center;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.weda-upload-file-pc .weda-upload-file-pc__btn-descripe {
|
|
92
|
+
margin-left: 16px;
|
|
93
|
+
font-size: 12px;
|
|
94
|
+
line-height: 20px;
|
|
95
|
+
color: rgba(0, 0, 0, 0.4);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.weda-upload-file-pc .wedatea2td-list--divider > li {
|
|
99
|
+
padding: 0 !important;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.weda-upload-file-pc .wedatea2td-list--divider > li:nth-child(n + 2) {
|
|
103
|
+
border-top: 0;
|
|
104
|
+
border-bottom: 1px solid #e7e7e7;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.weda-upload-file-pc .weda-upload-file-pc--item {
|
|
108
|
+
display: flex;
|
|
109
|
+
font-size: 14px;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.weda-upload-file-pc .weda-upload-file-pc--item-header {
|
|
113
|
+
border: 1px solid #e7e7e7;
|
|
114
|
+
font-size: 14px;
|
|
115
|
+
line-height: 22px;
|
|
116
|
+
color: rgba(0, 0, 0, 0.4);
|
|
117
|
+
margin-top: 16px;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.weda-upload-file-pc .weda-upload-file-pc--item-body {
|
|
121
|
+
border-left: 1px dashed #e7e7e7;
|
|
122
|
+
border-right: 1px dashed #e7e7e7;
|
|
123
|
+
font-size: 14px;
|
|
124
|
+
line-height: 22px;
|
|
125
|
+
color: rgba(0, 0, 0, 0.9);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.weda-upload-file-pc
|
|
129
|
+
.weda-upload-file-pc--item-header
|
|
130
|
+
.weda-upload-file-pc--item-label {
|
|
131
|
+
border-right: 1px solid #e7e7e7;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.weda-upload-file-pc
|
|
135
|
+
.weda-upload-file-pc--item
|
|
136
|
+
.weda-upload-file-pc--item-title {
|
|
137
|
+
width: 220px;
|
|
138
|
+
padding: 10px 12px;
|
|
139
|
+
overflow: hidden;
|
|
140
|
+
text-overflow: ellipsis;
|
|
141
|
+
white-space: nowrap;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.weda-upload-file-pc
|
|
145
|
+
.weda-upload-file-pc--item
|
|
146
|
+
.weda-upload-file-pc--item-size {
|
|
147
|
+
width: 100px;
|
|
148
|
+
padding: 10px 12px;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.weda-upload-file-pc
|
|
152
|
+
.weda-upload-file-pc--item
|
|
153
|
+
.weda-upload-file-pc--item-status {
|
|
154
|
+
width: 150px;
|
|
155
|
+
padding: 10px 12px;
|
|
156
|
+
overflow: hidden;
|
|
157
|
+
text-overflow: ellipsis;
|
|
158
|
+
white-space: nowrap;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.weda-upload-file-pc
|
|
162
|
+
.weda-upload-file-pc--item
|
|
163
|
+
.weda-upload-file-pc--item-action {
|
|
164
|
+
width: 160px;
|
|
165
|
+
padding: 10px 12px;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.weda-upload-file-pc .weda-upload-file-pc__btn--weak {
|
|
169
|
+
border-color: #dcdcdc;
|
|
170
|
+
color: rgba(0, 0, 0, 0.9);
|
|
171
|
+
width: 88px;
|
|
172
|
+
font-size: 14px;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.weda-upload-file-pc
|
|
176
|
+
.weda-upload-file-pc--item
|
|
177
|
+
.weda-upload-file-pc--item-status
|
|
178
|
+
.wedatea2td-icon {
|
|
179
|
+
margin-right: 8px;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.weda-upload-file-pc
|
|
183
|
+
.weda-upload-file-pc--item
|
|
184
|
+
.weda-upload-file-pc--item-status
|
|
185
|
+
.wedatea2td-icon.wedatea2td-icon-pending-gray {
|
|
186
|
+
background-image: url(./pending.svg);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.weda-upload-file-pc
|
|
190
|
+
.weda-upload-file-pc--item
|
|
191
|
+
.weda-upload-file-pc--item-action
|
|
192
|
+
.wedatea2td-btn {
|
|
193
|
+
font-size: 14px;
|
|
194
|
+
line-height: 22px;
|
|
195
|
+
color: #0052d9;
|
|
196
|
+
margin-right: 12px;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.weda-upload-file-pc
|
|
200
|
+
.weda-upload-file-pc--item
|
|
201
|
+
.weda-upload-file-pc--item-action
|
|
202
|
+
.wedatea2td-btn:last-child {
|
|
203
|
+
margin-right: 0;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.weda-upload-file-pc .weda-upload-file-pc--item-empty {
|
|
207
|
+
display: flex;
|
|
208
|
+
justify-content: center;
|
|
209
|
+
align-items: center;
|
|
210
|
+
height: 169px;
|
|
211
|
+
background: #ffffff;
|
|
212
|
+
border: 1px dashed #dcdcdc !important;
|
|
213
|
+
border-top: none !important;
|
|
214
|
+
border-radius: 0 0 2px 2px;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.weda-upload-file-pc
|
|
218
|
+
.weda-upload-file-pc--item-empty
|
|
219
|
+
.weda-upload-file-pc--item {
|
|
220
|
+
font-size: 14px;
|
|
221
|
+
color: rgba(0, 0, 0, 0.4);
|
|
222
|
+
line-height: 22px;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/* ----上传文件---- h5 */
|
|
226
|
+
.weda-upload-file-mobile {
|
|
227
|
+
width: 90%;
|
|
228
|
+
background-color: #f6f6f6;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.weda-upload-file-mobile .weda-upload-file-mobile__hd {
|
|
232
|
+
width: 100%;
|
|
233
|
+
padding: 24px 20px 8px 20px;
|
|
234
|
+
display: flex;
|
|
235
|
+
background-color: #fff;
|
|
236
|
+
}
|
|
237
|
+
.weda-upload-file-mobile .vertical {
|
|
238
|
+
padding: 0 20px 8px 20px;
|
|
239
|
+
}
|
|
240
|
+
.weda-upload-file-mobile .weda-upload-file-mobile__title {
|
|
241
|
+
font-size: 14px;
|
|
242
|
+
line-height: 20px;
|
|
243
|
+
color: #000;
|
|
244
|
+
margin-right: 20px;
|
|
245
|
+
padding-top: 6px;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.weda-upload-file-mobile .weda-upload-file-mobile__btn--weak {
|
|
249
|
+
width: 88px;
|
|
250
|
+
padding: 0 16px;
|
|
251
|
+
font-size: 14px;
|
|
252
|
+
color: rgba(0, 0, 0, 0.9);
|
|
253
|
+
border: 1px solid #dcdcdc;
|
|
254
|
+
border-radius: 3px;
|
|
255
|
+
line-height: 22px;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.weda-upload-file-mobile .weda-upload-file-mobile__tips {
|
|
259
|
+
display: block;
|
|
260
|
+
margin-top: 8px;
|
|
261
|
+
font-size: 12px;
|
|
262
|
+
line-height: 20px;
|
|
263
|
+
color: rgba(0, 0, 0, 0.4);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.weda-upload-file-mobile .weda-upload-file-mobile__bd {
|
|
267
|
+
margin-top: 8px;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.weda-upload-file-mobile .weda-upload-file-mobile__bd .wedatea2td-list > li {
|
|
271
|
+
margin-bottom: 8px;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.weda-upload-file-mobile .weda-upload-file-mobile__item {
|
|
275
|
+
width: 100%;
|
|
276
|
+
padding: 16px;
|
|
277
|
+
background-color: #fff;
|
|
278
|
+
display: flex;
|
|
279
|
+
justify-content: space-between;
|
|
280
|
+
align-items: center;
|
|
281
|
+
box-sizing: border-box;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.weda-upload-file-mobile .weda-upload-file-mobile__btn-group {
|
|
285
|
+
display: flex;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.weda-upload-file-mobile .weda-upload-file-mobile__item .wedatea2td-icon {
|
|
289
|
+
width: 24px;
|
|
290
|
+
height: 24px;
|
|
291
|
+
margin-right: 16px;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
.weda-upload-file-mobile
|
|
295
|
+
.weda-upload-file-mobile__btn-group
|
|
296
|
+
.wedatea2td-icon:last-child {
|
|
297
|
+
margin-right: 0;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.weda-upload-file-mobile
|
|
301
|
+
.weda-upload-file-mobile__item
|
|
302
|
+
.wedatea2td-icon.wedatea2td-icon-delete {
|
|
303
|
+
background-image: url('https://imgcache.qq.com/qcloud/tcloud_dtc/static/static_source_business/2372f6a8-2f6a-4f30-92bf-73c62a5c0ae7.svg');
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.weda-upload-file-mobile
|
|
307
|
+
.weda-upload-file-mobile__item
|
|
308
|
+
.wedatea2td-icon.wedatea2td-icon-download {
|
|
309
|
+
background-image: url('https://imgcache.qq.com/qcloud/tcloud_dtc/static/static_source_business/4cba5da1-cde4-40c6-a075-86eff22858a4.svg');
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.weda-upload-file-mobile
|
|
313
|
+
.weda-upload-file-mobile__item
|
|
314
|
+
.wedatea2td-icon.wedatea2td-icon-refresh {
|
|
315
|
+
background-image: url('https://imgcache.qq.com/qcloud/tcloud_dtc/static/static_source_business/af5486eb-65e0-4536-8e51-6c68a17b71ac.svg');
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.weda-upload-file-mobile
|
|
319
|
+
.weda-upload-file-mobile__item
|
|
320
|
+
.weda-upload-file-mobile__item-left {
|
|
321
|
+
flex: 1;
|
|
322
|
+
margin-right: 16px;
|
|
323
|
+
width: 70%;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
.weda-upload-file-mobile
|
|
327
|
+
.weda-upload-file-mobile__item
|
|
328
|
+
.weda-upload-file-mobile__file-detail {
|
|
329
|
+
display: flex;
|
|
330
|
+
align-items: center;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.weda-upload-file-mobile
|
|
334
|
+
.weda-upload-file-mobile__item
|
|
335
|
+
.weda-upload-file-mobile__file-name {
|
|
336
|
+
font-size: 14px;
|
|
337
|
+
line-height: 22px;
|
|
338
|
+
color: rgba(0, 0, 0, 0.9);
|
|
339
|
+
max-width: 6.5rem;
|
|
340
|
+
overflow: hidden;
|
|
341
|
+
text-overflow: ellipsis;
|
|
342
|
+
white-space: nowrap;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
.weda-upload-file-mobile
|
|
346
|
+
.weda-upload-file-mobile__item
|
|
347
|
+
.weda-upload-file-mobile__file-status {
|
|
348
|
+
margin-left: 24px;
|
|
349
|
+
display: flex;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
.weda-upload-file-mobile
|
|
353
|
+
.weda-upload-file-mobile__item
|
|
354
|
+
.weda-upload-file-mobile__file-status
|
|
355
|
+
.wedatea2td-icon {
|
|
356
|
+
width: 16px;
|
|
357
|
+
height: 16px;
|
|
358
|
+
background-size: 100% 100%;
|
|
359
|
+
margin-right: 0;
|
|
360
|
+
}
|
|
361
|
+
.weda-upload-file-mobile
|
|
362
|
+
.weda-upload-file-mobile__item
|
|
363
|
+
.weda-upload-file-mobile__file-status
|
|
364
|
+
.wedatea2td-icon.wedatea2td-icon-fail {
|
|
365
|
+
background-image: url(./fail.svg);
|
|
366
|
+
}
|
|
367
|
+
.weda-upload-file-mobile
|
|
368
|
+
.weda-upload-file-mobile__item
|
|
369
|
+
.weda-upload-file-mobile__file-status
|
|
370
|
+
.wedatea2td-icon.wedatea2td-icon-success {
|
|
371
|
+
background-image: url(./success.svg);
|
|
372
|
+
}
|
|
373
|
+
.weda-upload-file-mobile
|
|
374
|
+
.weda-upload-file-mobile__item
|
|
375
|
+
.weda-upload-file-mobile__file-status--msg {
|
|
376
|
+
width: 4.2rem;
|
|
377
|
+
margin-left: 4px;
|
|
378
|
+
font-size: 12px;
|
|
379
|
+
line-height: 20px;
|
|
380
|
+
color: rgba(0, 0, 0, 0.9);
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
.weda-upload-file-mobile
|
|
384
|
+
.weda-upload-file-mobile__item
|
|
385
|
+
.weda-upload-file-mobile__file-foot {
|
|
386
|
+
font-size: 12px;
|
|
387
|
+
line-height: 20px;
|
|
388
|
+
color: rgba(0, 0, 0, 0.4);
|
|
389
|
+
margin-top: 8px;
|
|
390
|
+
display: flex;
|
|
391
|
+
justify-content: space-between;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
.weda-upload-file-mobile
|
|
395
|
+
.weda-upload-file-mobile__item
|
|
396
|
+
.weda-upload-file-mobile__file-progress {
|
|
397
|
+
margin-top: 4px;
|
|
398
|
+
border-radius: 0;
|
|
399
|
+
background-color: #e7e7e7;
|
|
400
|
+
height: 3px !important;
|
|
401
|
+
margin-bottom: 0;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
.weda-upload-file-mobile
|
|
405
|
+
.weda-upload-file-mobile__item
|
|
406
|
+
.weda-upload-file-mobile__file-progress
|
|
407
|
+
.wedatea2td-progress__value {
|
|
408
|
+
border-radius: 0;
|
|
409
|
+
height: 3px !important;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
.weda-upload-file-mobile
|
|
413
|
+
.weda-upload-file-mobile__item
|
|
414
|
+
.weda-upload-file-mobile__file-progress
|
|
415
|
+
.wedatea2td-progress__text {
|
|
416
|
+
display: none;
|
|
417
|
+
}
|
|
418
|
+
.weda-upload-file-mobile .weui-uploader-mobile__input {
|
|
419
|
+
position: absolute;
|
|
420
|
+
opacity: 0;
|
|
421
|
+
width: 92px;
|
|
422
|
+
height: 32px;
|
|
423
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/* eslint-disable react/prop-types */
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import * as PropTypes from 'prop-types';
|
|
4
|
+
import { usePlatform } from '../../../utils/platform';
|
|
5
|
+
import { UploadFileH5 as UploaderH5 } from './uploadFile.h5';
|
|
6
|
+
import { UploadFilePc } from './uploadFile.pc';
|
|
7
|
+
|
|
8
|
+
import './index.css';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* 文件组件上传,区分 h5端/pc端
|
|
12
|
+
*/
|
|
13
|
+
export default function UploaderFile(props) {
|
|
14
|
+
const platform = usePlatform();
|
|
15
|
+
if (props?.showType === 'pc') {
|
|
16
|
+
return <UploadFilePc {...props} />;
|
|
17
|
+
}
|
|
18
|
+
if (props?.showType === 'h5') {
|
|
19
|
+
return <UploaderH5 {...props} />;
|
|
20
|
+
}
|
|
21
|
+
return platform === 'h5' ? (
|
|
22
|
+
<UploaderH5 {...props} />
|
|
23
|
+
) : (
|
|
24
|
+
<UploadFilePc {...props} />
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
UploaderFile.propTypes = {
|
|
29
|
+
showType: PropTypes.string, // 强制展示某个平台 pc | h5
|
|
30
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="14px" height="14px" viewBox="0 0 14 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<title>Icon</title>
|
|
4
|
+
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
5
|
+
<g id="pc" transform="translate(-651.000000, -394.000000)">
|
|
6
|
+
<g id="上传/批量上传中备份" transform="translate(372.000000, 147.000000)">
|
|
7
|
+
<g id="内容列" transform="translate(0.000000, 107.000000)">
|
|
8
|
+
<g transform="translate(254.000000, 126.000000)" id="编组">
|
|
9
|
+
<g transform="translate(24.000000, 13.000000)" id="1.Bace基础/3.Icon图标/操作/move">
|
|
10
|
+
<path d="M0,0 L16,0 L16,16 L0,16 L0,0 Z" id="time-filled-(Background)"></path>
|
|
11
|
+
<path d="M15,8 C15,4.13400674 11.8659935,1 8,1 C4.13400674,1 1,4.13400674 1,8 C1,11.8659935 4.13400674,15 8,15 C11.8659935,15 15,11.8659935 15,8 Z M7.5,8.3889246 L10.6466904,11.5356159 L11.3537979,10.8285084 L8.5,7.97471142 L8.5,5 L7.5,5 L7.5,8.3889246 Z" id="time-filled" fill-opacity="0.4" fill="#000000"></path>
|
|
12
|
+
</g>
|
|
13
|
+
</g>
|
|
14
|
+
</g>
|
|
15
|
+
</g>
|
|
16
|
+
</g>
|
|
17
|
+
</g>
|
|
18
|
+
</svg>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="16px" height="16px" viewBox="0 0 14 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<title>1.Bace基础/3.Icon图标/操作/move</title>
|
|
4
|
+
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
5
|
+
<g id="画板" transform="translate(-104.000000, -120.000000)">
|
|
6
|
+
<g id="1.Bace基础/3.Icon图标/操作/move" transform="translate(103.000000, 119.000000)">
|
|
7
|
+
<path d="M0,0 L16,0 L16,16 L0,16 L0,0 Z" id="check-circle-filled-(Background)"></path>
|
|
8
|
+
<path d="M15,8 C15,4.13400674 11.8659935,1 8,1 C4.13400674,1 1,4.13400674 1,8 C1,11.8659935 4.13400674,15 8,15 C11.8659935,15 15,11.8659935 15,8 Z M7,10.7069998 L11.5,6.20749998 L10.7924995,5.5 L7,9.29300022 L5.20650005,7.5 L4.5,8.20650005 L7,10.7069998 Z" id="check-circle-filled" fill="#00A870"></path>
|
|
9
|
+
</g>
|
|
10
|
+
</g>
|
|
11
|
+
</g>
|
|
12
|
+
</svg>
|