File tree Expand file tree Collapse file tree 2 files changed +2
-9
lines changed
src/modules/upload/components Expand file tree Collapse file tree 2 files changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ const img = reactive({
27
27
});
28
28
29
29
function open(item : Eps .SpaceInfoEntity , list : Eps .SpaceInfoEntity []) {
30
- if (item .type ) {
30
+ if (item ? .type ) {
31
31
if (item .type == " image" ) {
32
32
img .visible = true ;
33
33
img .urls = list .filter ((e ) => e .type == " image" ).map ((e ) => e .url || " " );
Original file line number Diff line number Diff line change @@ -351,14 +351,7 @@ function clear() {
351
351
352
352
// 预览
353
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
- }
354
+ refs .viewer ?.open (item , list .value );
362
355
}
363
356
364
357
// 文件上传请求
You can’t perform that action at this time.
0 commit comments