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) {