From 4475d54c16e83fe4fb82d011538168dabfc98fa6 Mon Sep 17 00:00:00 2001 From: CaIon <1808837298@qq.com> Date: Mon, 27 Nov 2023 20:12:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E8=AE=BE=E7=BD=AE=E5=8F=AF?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E5=A4=8D=E5=88=B6=E6=A8=A1=E5=9E=8B=E5=90=8D?= =?UTF-8?q?=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/components/PersonalSetting.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/web/src/components/PersonalSetting.js b/web/src/components/PersonalSetting.js index 41ff804..dca259a 100644 --- a/web/src/components/PersonalSetting.js +++ b/web/src/components/PersonalSetting.js @@ -257,6 +257,15 @@ const PersonalSetting = () => { setOpenTransfer(false); } + const copyText = async (text) => { + if (await copy(text)) { + showSuccess('已复制:' + text); + } else { + // setSearchKeyword(text); + Modal.error({title: '无法复制到剪贴板,请手动复制', content: text}); + } + } + return (
@@ -313,7 +322,9 @@ const PersonalSetting = () => {
{models.map((model) => ( - + { + copyText(model) + }}> {model} ))}