From 20d7a9d2db003a2d8f7aef67e95c17f89f3c238f Mon Sep 17 00:00:00 2001 From: "xiaoqi.cxq" Date: Tue, 11 Apr 2023 09:30:15 +0800 Subject: [PATCH] =?UTF-8?q?ChatGPT=E8=BE=85=E5=8A=A9=E5=86=99=E4=BD=9C?= =?UTF-8?q?=E7=AA=97=E5=8F=A3=E6=8E=A7=E5=88=B6=E5=8F=B0=E6=8A=A5=E9=94=99?= =?UTF-8?q?bugfix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/modals/ChatGptConfigModal.vue | 12 ++++++------ src/components/modals/ChatGptModal.vue | 8 ++++---- src/components/modals/common/FormEntry.vue | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/components/modals/ChatGptConfigModal.vue b/src/components/modals/ChatGptConfigModal.vue index 644d694b..5a074e5e 100644 --- a/src/components/modals/ChatGptConfigModal.vue +++ b/src/components/modals/ChatGptConfigModal.vue @@ -30,13 +30,9 @@ import modalTemplate from './common/modalTemplate'; export default modalTemplate({ data: () => ({ - apiKey: this.config.apiKey, - proxyHost: this.config.proxyHost, + apiKey: null, + proxyHost: null, }), - computedLocalSettings: { - apiKey: 'chatgptApiKey', - proxyHost: 'chatgptProxyHost', - }, methods: { resolve() { if (!this.apiKey) { @@ -48,5 +44,9 @@ export default modalTemplate({ this.config.resolve({ apiKey: this.apiKey, proxyHost: this.proxyHost }); }, }, + mounted() { + this.apiKey = this.config.apiKey; + this.proxyHost = this.config.proxyHost; + }, }); diff --git a/src/components/modals/ChatGptModal.vue b/src/components/modals/ChatGptModal.vue index 2fba924d..c3afae9d 100644 --- a/src/components/modals/ChatGptModal.vue +++ b/src/components/modals/ChatGptModal.vue @@ -6,7 +6,7 @@

ChatGPT内容生成
生成时长受ChatGPT服务响应与网络响应时长影响,时间可能较长

- +