This commit is contained in:
icssoa 2023-05-22 20:20:40 +08:00
parent 00468cdc20
commit f66d2e8764
2 changed files with 2 additions and 9 deletions

View File

@ -27,7 +27,7 @@ const img = reactive({
});
function open(item: Eps.SpaceInfoEntity, list: Eps.SpaceInfoEntity[]) {
if (item.type) {
if (item?.type) {
if (item.type == "image") {
img.visible = true;
img.urls = list.filter((e) => e.type == "image").map((e) => e.url || "");

View File

@ -351,14 +351,7 @@ function clear() {
//
function preview(item: Upload.Item) {
if (item.type == "image") {
refs.viewer?.open(
item.preload,
list.value.map((e) => e.preload)
);
} else {
window.open(item.url);
}
refs.viewer?.open(item, list.value);
}
//