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