bkui-vue 0.0.1-beta.192 → 0.0.1-beta.194
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/dist/index.cjs.js +28 -28
- package/dist/index.esm.js +17 -6
- package/dist/index.umd.js +28 -28
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/upload/index.js +1 -1
- package/lib/upload/upload.css +3 -0
- package/lib/upload/upload.less +3 -0
- package/lib/upload/upload.variable.css +3 -0
- package/lib/upload/use-file-handler.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
@@ -30212,7 +30212,9 @@ var UploadList = defineComponent({
|
|
30212
30212
|
return createVNode("li", {
|
30213
30213
|
"key": file.uid,
|
30214
30214
|
"class": classNames2
|
30215
|
-
}, [(slots == null ? void 0 : slots.file) ? slots.file(
|
30215
|
+
}, [(slots == null ? void 0 : slots.file) ? slots.file({
|
30216
|
+
file
|
30217
|
+
}) : PhotoItem(file)]);
|
30216
30218
|
})) ? _slot : {
|
30217
30219
|
default: () => [_slot]
|
30218
30220
|
});
|
@@ -30249,7 +30251,9 @@ var UploadList = defineComponent({
|
|
30249
30251
|
return createVNode("li", {
|
30250
30252
|
"key": file.uid,
|
30251
30253
|
"class": classNames2
|
30252
|
-
}, [(slots == null ? void 0 : slots.file) ? slots.file(
|
30254
|
+
}, [(slots == null ? void 0 : slots.file) ? slots.file({
|
30255
|
+
file
|
30256
|
+
}) : NormalItem(file)]);
|
30253
30257
|
})) ? _slot2 : {
|
30254
30258
|
default: () => [_slot2]
|
30255
30259
|
});
|
@@ -31252,12 +31256,13 @@ var useFileHandler = (props2, hooks) => {
|
|
31252
31256
|
remove(uploadFile);
|
31253
31257
|
}
|
31254
31258
|
}
|
31255
|
-
async function handleError(err, rawFile) {
|
31259
|
+
async function handleError(err, rawFile, res) {
|
31256
31260
|
const file = findFile(rawFile);
|
31257
31261
|
if (!file)
|
31258
31262
|
return;
|
31259
31263
|
file.status = "fail";
|
31260
31264
|
file.statusText = err.message;
|
31265
|
+
file.response = res;
|
31261
31266
|
}
|
31262
31267
|
async function handleSuccess(res, rawFile) {
|
31263
31268
|
const file = findFile(rawFile);
|
@@ -31298,7 +31303,8 @@ var Component$1 = defineComponent({
|
|
31298
31303
|
emits: ["exceed", "progress", "success", "error", "delete", "done"],
|
31299
31304
|
setup(props2, {
|
31300
31305
|
slots,
|
31301
|
-
emit
|
31306
|
+
emit,
|
31307
|
+
expose
|
31302
31308
|
}) {
|
31303
31309
|
const requests = shallowRef({});
|
31304
31310
|
const isPhotowall = computed(() => props2.theme === EThemes.PICTURE);
|
@@ -31420,7 +31426,7 @@ var Component$1 = defineComponent({
|
|
31420
31426
|
emit("success", res, file, fileList.value);
|
31421
31427
|
} else {
|
31422
31428
|
const err = new Error((result == null ? void 0 : result.message) || "unknow error");
|
31423
|
-
handleError(err, file);
|
31429
|
+
handleError(err, file, res);
|
31424
31430
|
emit("error", file, fileList.value, err);
|
31425
31431
|
}
|
31426
31432
|
delete requests.value[uid];
|
@@ -31469,6 +31475,10 @@ var Component$1 = defineComponent({
|
|
31469
31475
|
URL.revokeObjectURL(url);
|
31470
31476
|
});
|
31471
31477
|
});
|
31478
|
+
expose({
|
31479
|
+
handleRemove,
|
31480
|
+
handleRetry
|
31481
|
+
});
|
31472
31482
|
return () => createVNode("div", {
|
31473
31483
|
"class": classNames.value
|
31474
31484
|
}, [!isPhotowall.value && createVNode(UploadTrigger, mergeProps(triggerProps, {
|
@@ -31487,7 +31497,8 @@ var Component$1 = defineComponent({
|
|
31487
31497
|
"file": file,
|
31488
31498
|
"onChange": handleFiles,
|
31489
31499
|
"onRemove": handleRemove
|
31490
|
-
}), slots)
|
31500
|
+
}), slots),
|
31501
|
+
file: slots.file
|
31491
31502
|
})]);
|
31492
31503
|
}
|
31493
31504
|
});
|