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服务响应与网络响应时长影响,时间可能较长

- +
未配置apiKey,请点击 配置 apiKey。 @@ -20,8 +20,8 @@