From 07c9e97bf579519403dfd0376593875bb4a894fd Mon Sep 17 00:00:00 2001 From: pixelmaxQM Date: Mon, 7 Apr 2025 17:31:31 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E5=A4=8D=E5=88=B6?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/view/systemTools/autoCode/picture.vue | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/web/src/view/systemTools/autoCode/picture.vue b/web/src/view/systemTools/autoCode/picture.vue index 047fc7c5..9ad55755 100644 --- a/web/src/view/systemTools/autoCode/picture.vue +++ b/web/src/view/systemTools/autoCode/picture.vue @@ -70,6 +70,8 @@ import { createWeb } from '@/api/autoCode' import {ref} from 'vue' import WarningBar from '@/components/warningBar/warningBar.vue' +import { ElMessage } from 'element-plus' + defineOptions({ name: 'Picture' @@ -91,6 +93,24 @@ const handleKeydown = (event) => { } } +// 复制方法:把某个字符串写进剪贴板 +const copySnippet = (htmlString) => { + navigator.clipboard.writeText(htmlString) + .then(() => { + ElMessage({ + message: '复制成功', + type: 'success', + }) + }) + .catch(err => { + ElMessage({ + message: '复制失败', + type: 'warning', + }) + }) +} + + const prompt = ref('') // 判断是否返回的标志