From 15e91f5ecd8aca0eb05e8ab67186a931efc91645 Mon Sep 17 00:00:00 2001 From: jerry Date: Wed, 10 Apr 2024 23:05:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=99=BB=E5=BD=95=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E7=9A=84=E6=98=BE=E7=A4=BA=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/HeaderImg.vue | 2 +- components/MemoInput.vue | 24 +++++++++++++++++++++--- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/components/HeaderImg.vue b/components/HeaderImg.vue index 6153f49f..1367fca0 100644 --- a/components/HeaderImg.vue +++ b/components/HeaderImg.vue @@ -15,7 +15,7 @@
-
+
diff --git a/components/MemoInput.vue b/components/MemoInput.vue index 90644820..3dcbe6a3 100644 --- a/components/MemoInput.vue +++ b/components/MemoInput.vue @@ -34,7 +34,8 @@
嵌入网易云音乐 - 如何获取? + 如何获取?
@@ -60,7 +61,8 @@
嵌入B站视频 - 如何获取? + 如何获取?
@@ -101,7 +103,8 @@ - +
😊
@@ -201,6 +204,21 @@ const logout = () => { navigateTo('/', { replace: true }) } + +const pasteImg = async (event: ClipboardEvent) => { + var items = event.clipboardData?.files + if (!items || items.length === 0) { + return; + } + await useUpload(items[0], async (res) => { + if (res.success) { + imgs.value = [...imgs.value, res.filename] + } else { + toast.warning(res.message || '上传失败') + } + }) +} + const uploadImgs = async (event: Event) => { const file = (event.target as HTMLInputElement).files?.[0] if (!file) {