diff --git a/src/views/user/app/index.vue b/src/views/user/app/index.vue index c16bf16..cfe821f 100644 --- a/src/views/user/app/index.vue +++ b/src/views/user/app/index.vue @@ -6,7 +6,8 @@
ChatGPT Next Web
最常用的GPT Web客户端,只需填入本平台KEY即可使用
- 直接使用 + 直接使用
+ (KEY已经复制进剪切板,直接在设置中粘贴即可)
@@ -76,6 +77,18 @@ } function goGptWeb() { + // 获取需要复制的元素以及元素内的文本内容 + const text = userKey.value; + // 添加一个input元素放置需要的文本内容 + const input = document.createElement("input"); + input.value = text; + document.body.appendChild(input); + // 选中并复制文本到剪切板 + input.select(); + document.execCommand("copy"); + // 移除input元素 + document.body.removeChild(input); + proxy.$modal.msgSuccess("复制成功"); window.open("https://next.api2gpt.com/") }