diff --git a/src/components/viewPost/tp-vod.vue b/src/components/viewPost/tp-vod.vue index cd74ad37..bf7c0173 100644 --- a/src/components/viewPost/tp-vod.vue +++ b/src/components/viewPost/tp-vod.vue @@ -23,6 +23,7 @@ import showLoading from "@comp/func/loading.js"; import useAppStore from "@store/app.js"; import { getCurrentWindow } from "@tauri-apps/api/window"; +import { openUrl } from "@tauri-apps/plugin-opener"; import { getImageBuffer, saveCanvasImg, saveImgLocal } from "@utils/TGShare.js"; import { getVideoDuration } from "@utils/toolFunc.js"; import Artplayer, { type Option } from "artplayer"; @@ -106,7 +107,7 @@ onMounted(async () => { name: "download-cover", index: 0, position: "right", - html: ``, + html: ``, tooltip: "下载封面", click: async () => { await showLoading.start("正在下载封面", props.data.insert.vod.cover); @@ -117,6 +118,17 @@ onMounted(async () => { await showLoading.end(); }, }, + { + name: "download-video", + index: 0, + position: "right", + html: ``, + tooltip: "下载视频", + click: async () => { + if (!container.value) return; + await openUrl(container.value.url); + }, + }, ], }; container.value = new Artplayer(option);