@douyinfe/semi-foundation 2.32.0 → 2.32.1-alpha.2
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.
|
@@ -295,6 +295,9 @@ class UploadFoundation extends _foundation.default {
|
|
|
295
295
|
_sizeInvalid,
|
|
296
296
|
status
|
|
297
297
|
} = fileInstance;
|
|
298
|
+
const {
|
|
299
|
+
renderThumbnail
|
|
300
|
+
} = this.getProps();
|
|
298
301
|
|
|
299
302
|
try {
|
|
300
303
|
// can't use ... to get rest property on File Object
|
|
@@ -309,7 +312,7 @@ class UploadFoundation extends _foundation.default {
|
|
|
309
312
|
uid: fileInstance.uid,
|
|
310
313
|
percent: 0,
|
|
311
314
|
fileInstance,
|
|
312
|
-
url: this._createURL(fileInstance)
|
|
315
|
+
url: renderThumbnail ? '' : this._createURL(fileInstance)
|
|
313
316
|
};
|
|
314
317
|
|
|
315
318
|
if (_sizeInvalid) {
|
|
@@ -281,6 +281,9 @@ class UploadFoundation extends BaseFoundation {
|
|
|
281
281
|
_sizeInvalid,
|
|
282
282
|
status
|
|
283
283
|
} = fileInstance;
|
|
284
|
+
const {
|
|
285
|
+
renderThumbnail
|
|
286
|
+
} = this.getProps();
|
|
284
287
|
|
|
285
288
|
try {
|
|
286
289
|
// can't use ... to get rest property on File Object
|
|
@@ -295,7 +298,7 @@ class UploadFoundation extends BaseFoundation {
|
|
|
295
298
|
uid: fileInstance.uid,
|
|
296
299
|
percent: 0,
|
|
297
300
|
fileInstance,
|
|
298
|
-
url: this._createURL(fileInstance)
|
|
301
|
+
url: renderThumbnail ? '' : this._createURL(fileInstance)
|
|
299
302
|
};
|
|
300
303
|
|
|
301
304
|
if (_sizeInvalid) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-foundation",
|
|
3
|
-
"version": "2.32.
|
|
3
|
+
"version": "2.32.1-alpha.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build:lib": "node ./scripts/compileLib.js",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"*.scss",
|
|
24
24
|
"*.css"
|
|
25
25
|
],
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "34e404c2ef3d92be254109cd9c29ac72547de9bb",
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@babel/plugin-transform-runtime": "^7.15.8",
|
|
29
29
|
"@babel/preset-env": "^7.15.8",
|
package/upload/foundation.ts
CHANGED
|
@@ -261,6 +261,7 @@ class UploadFoundation<P = Record<string, any>, S = Record<string, any>> extends
|
|
|
261
261
|
|
|
262
262
|
buildFileItem(fileInstance: CustomFile, uploadTrigger: string): BaseFileItem {
|
|
263
263
|
const { _sizeInvalid, status } = fileInstance;
|
|
264
|
+
const { renderThumbnail } = this.getProps();
|
|
264
265
|
try {
|
|
265
266
|
// can't use ... to get rest property on File Object
|
|
266
267
|
delete fileInstance._sizeInvalid;
|
|
@@ -274,7 +275,7 @@ class UploadFoundation<P = Record<string, any>, S = Record<string, any>> extends
|
|
|
274
275
|
uid: fileInstance.uid,
|
|
275
276
|
percent: 0,
|
|
276
277
|
fileInstance,
|
|
277
|
-
url: this._createURL(fileInstance),
|
|
278
|
+
url: renderThumbnail ? '' : this._createURL(fileInstance),
|
|
278
279
|
};
|
|
279
280
|
|
|
280
281
|
if (_sizeInvalid) {
|
|
@@ -322,7 +323,7 @@ class UploadFoundation<P = Record<string, any>, S = Record<string, any>> extends
|
|
|
322
323
|
|
|
323
324
|
// 插入多个文件到指定位置
|
|
324
325
|
// Insert files to the specified location
|
|
325
|
-
insertFileToList(files: Array<CustomFile>, index:number): void {
|
|
326
|
+
insertFileToList(files: Array<CustomFile>, index: number): void {
|
|
326
327
|
const { limit, transformFile, accept, uploadTrigger } = this.getProps();
|
|
327
328
|
const { fileList } = this.getStates();
|
|
328
329
|
|