diff --git a/src/plugins/upload/components/upload-item/index.vue b/src/plugins/upload/components/upload-item/index.vue index 5b305be..aba3c12 100644 --- a/src/plugins/upload/components/upload-item/index.vue +++ b/src/plugins/upload/components/upload-item/index.vue @@ -111,7 +111,7 @@ import { ZoomIn, Delete, VideoPause, VideoPlay } from "@element-plus/icons-vue"; import { ContextMenu } from "@cool-vue/crud"; import { useCool } from "/@/cool"; import { extname } from "/@/cool/utils"; -import { fileName, getRule } from "../../utils"; +import { download, fileName, getRule } from "../../utils"; import { ElMessage } from "element-plus"; import { useClipboard } from "@vueuse/core"; import Viewer from "./viewer.vue"; @@ -172,6 +172,16 @@ function onContextMenu(e: any) { done(); } }, + { + label: "下载", + callback(done) { + if (props.item.url) { + download(props.item.url); + } + + done(); + } + }, { label: "复制链接", callback(done) { diff --git a/src/plugins/upload/components/upload-item/viewer.vue b/src/plugins/upload/components/upload-item/viewer.vue index 38a53e5..d4d8771 100644 --- a/src/plugins/upload/components/upload-item/viewer.vue +++ b/src/plugins/upload/components/upload-item/viewer.vue @@ -11,18 +11,34 @@ - + + +
-