mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2024-11-01 22:20:27 +08:00
优化
This commit is contained in:
parent
00468cdc20
commit
f66d2e8764
@ -27,7 +27,7 @@ const img = reactive({
|
|||||||
});
|
});
|
||||||
|
|
||||||
function open(item: Eps.SpaceInfoEntity, list: Eps.SpaceInfoEntity[]) {
|
function open(item: Eps.SpaceInfoEntity, list: Eps.SpaceInfoEntity[]) {
|
||||||
if (item.type) {
|
if (item?.type) {
|
||||||
if (item.type == "image") {
|
if (item.type == "image") {
|
||||||
img.visible = true;
|
img.visible = true;
|
||||||
img.urls = list.filter((e) => e.type == "image").map((e) => e.url || "");
|
img.urls = list.filter((e) => e.type == "image").map((e) => e.url || "");
|
||||||
|
@ -351,14 +351,7 @@ function clear() {
|
|||||||
|
|
||||||
// 预览
|
// 预览
|
||||||
function preview(item: Upload.Item) {
|
function preview(item: Upload.Item) {
|
||||||
if (item.type == "image") {
|
refs.viewer?.open(item, list.value);
|
||||||
refs.viewer?.open(
|
|
||||||
item.preload,
|
|
||||||
list.value.map((e) => e.preload)
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
window.open(item.url);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 文件上传请求
|
// 文件上传请求
|
||||||
|
Loading…
Reference in New Issue
Block a user