free-fe-core-modules 0.0.36 → 0.0.37
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.
|
@@ -366,9 +366,7 @@ export default defineComponent({
|
|
|
366
366
|
|
|
367
367
|
images_upload_handler: (
|
|
368
368
|
blobInfo,
|
|
369
|
-
|
|
370
|
-
failure,
|
|
371
|
-
) => {
|
|
369
|
+
) => new Promise((resolve, reject) => {
|
|
372
370
|
const formData = new FormData();
|
|
373
371
|
formData.append('file', blobInfo.blob(), blobInfo.filename());
|
|
374
372
|
|
|
@@ -379,18 +377,20 @@ export default defineComponent({
|
|
|
379
377
|
},
|
|
380
378
|
}).then((res) => {
|
|
381
379
|
if (res && res.data && res.data.id) {
|
|
382
|
-
|
|
380
|
+
resolve(`${vm.ctx.config.imageUrlBase}${res.data.id}`);
|
|
383
381
|
} else {
|
|
384
|
-
|
|
382
|
+
reject({
|
|
383
|
+
message: '上传失败',
|
|
385
384
|
remove: true,
|
|
386
385
|
});
|
|
387
386
|
}
|
|
388
387
|
}).catch((err) => {
|
|
389
|
-
|
|
388
|
+
reject({
|
|
389
|
+
message: err,
|
|
390
390
|
remove: true,
|
|
391
391
|
});
|
|
392
392
|
});
|
|
393
|
-
},
|
|
393
|
+
}),
|
|
394
394
|
};
|
|
395
395
|
},
|
|
396
396
|
});
|