@vc-shell/framework 1.1.80 → 1.1.81
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/CHANGELOG.md +4 -0
- package/dist/framework.js +2111 -2095
- package/dist/shared/modules/assets-manager/components/assets-manager/assets-manager.vue.d.ts +2 -1
- package/dist/shared/modules/assets-manager/components/assets-manager/assets-manager.vue.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/shared/modules/assets-manager/components/assets-manager/assets-manager.vue +24 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vc-shell/framework",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.81",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/framework.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -90,9 +90,9 @@
|
|
|
90
90
|
"@fullhuman/postcss-purgecss": "^7.0.2",
|
|
91
91
|
"@laynezh/vite-plugin-lib-assets": "v1.1.0",
|
|
92
92
|
"@types/dompurify": "^3.0.5",
|
|
93
|
-
"@vc-shell/api-client-generator": "^1.1.
|
|
94
|
-
"@vc-shell/config-generator": "^1.1.
|
|
95
|
-
"@vc-shell/ts-config": "^1.1.
|
|
93
|
+
"@vc-shell/api-client-generator": "^1.1.81",
|
|
94
|
+
"@vc-shell/config-generator": "^1.1.81",
|
|
95
|
+
"@vc-shell/ts-config": "^1.1.81",
|
|
96
96
|
"@vitejs/plugin-vue": "^5.2.3",
|
|
97
97
|
"@vue/test-utils": "^2.4.5",
|
|
98
98
|
"cypress-signalr-mock": "^1.5.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<VcBlade
|
|
3
|
-
:title="
|
|
3
|
+
:title="bladeTitle"
|
|
4
4
|
:expanded="expanded"
|
|
5
5
|
:closable="closable"
|
|
6
6
|
:toolbar-items="bladeToolbar"
|
|
@@ -165,6 +165,7 @@ export interface Props {
|
|
|
165
165
|
expanded?: boolean;
|
|
166
166
|
closable?: boolean;
|
|
167
167
|
options: {
|
|
168
|
+
title?: string;
|
|
168
169
|
assets: ICommonAsset[];
|
|
169
170
|
loading: Ref<boolean>;
|
|
170
171
|
assetsEditHandler: (assets: ICommonAsset[]) => ICommonAsset[];
|
|
@@ -197,6 +198,8 @@ const { t } = useI18n({ useScope: "global" });
|
|
|
197
198
|
|
|
198
199
|
const defaultAssets = ref<ICommonAsset[]>([]);
|
|
199
200
|
|
|
201
|
+
const bladeTitle = computed(() => props.options.title || t("ASSETS_MANAGER.TITLE"));
|
|
202
|
+
|
|
200
203
|
const isDragging = ref(false);
|
|
201
204
|
const uploader = ref();
|
|
202
205
|
const selectedItems: Ref<ICommonAsset[]> = ref([]);
|
|
@@ -310,7 +313,13 @@ async function onDrop(event: DragEvent) {
|
|
|
310
313
|
const fileList = event.dataTransfer?.files;
|
|
311
314
|
|
|
312
315
|
if (fileList && fileList.length) {
|
|
313
|
-
|
|
316
|
+
try {
|
|
317
|
+
await upload(fileList);
|
|
318
|
+
} catch (error) {
|
|
319
|
+
console.error(error);
|
|
320
|
+
throw error;
|
|
321
|
+
}
|
|
322
|
+
|
|
314
323
|
}
|
|
315
324
|
isDragging.value = false;
|
|
316
325
|
}
|
|
@@ -349,7 +358,12 @@ async function upload(files: FileList) {
|
|
|
349
358
|
modifiedFileList.items.add(file);
|
|
350
359
|
});
|
|
351
360
|
if (props.options.assetsUploadHandler && typeof props.options.assetsUploadHandler === "function")
|
|
361
|
+
try {
|
|
352
362
|
defaultAssets.value = await props.options.assetsUploadHandler(modifiedFileList.files);
|
|
363
|
+
} catch (error) {
|
|
364
|
+
console.error(error);
|
|
365
|
+
throw error;
|
|
366
|
+
}
|
|
353
367
|
}
|
|
354
368
|
}
|
|
355
369
|
|
|
@@ -358,7 +372,13 @@ async function inputUpload(event: Event) {
|
|
|
358
372
|
const fileList = target.files;
|
|
359
373
|
|
|
360
374
|
if (fileList && fileList.length) {
|
|
361
|
-
|
|
375
|
+
try {
|
|
376
|
+
await upload(fileList);
|
|
377
|
+
} catch (error) {
|
|
378
|
+
console.error(error);
|
|
379
|
+
throw error;
|
|
380
|
+
}
|
|
381
|
+
|
|
362
382
|
}
|
|
363
383
|
}
|
|
364
384
|
|
|
@@ -403,7 +423,7 @@ const actionBuilder = (): IActionBuilderResult<ICommonAsset>[] => {
|
|
|
403
423
|
};
|
|
404
424
|
|
|
405
425
|
defineExpose({
|
|
406
|
-
title:
|
|
426
|
+
title: bladeTitle,
|
|
407
427
|
});
|
|
408
428
|
</script>
|
|
409
429
|
|