We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 00468cd commit f66d2e8Copy full SHA for f66d2e8
src/modules/upload/components/items/viewer.vue
@@ -27,7 +27,7 @@ const img = reactive({
27
});
28
29
function open(item: Eps.SpaceInfoEntity, list: Eps.SpaceInfoEntity[]) {
30
- if (item.type) {
+ if (item?.type) {
31
if (item.type == "image") {
32
img.visible = true;
33
img.urls = list.filter((e) => e.type == "image").map((e) => e.url || "");
src/modules/upload/components/upload.vue
@@ -351,14 +351,7 @@ function clear() {
351
352
// 预览
353
function preview(item: Upload.Item) {
354
- if (item.type == "image") {
355
- refs.viewer?.open(
356
- item.preload,
357
- list.value.map((e) => e.preload)
358
- );
359
- } else {
360
- window.open(item.url);
361
- }
+ refs.viewer?.open(item, list.value);
362
}
363
364
// 文件上传请求
0 commit comments