浏览代码

解决类型传参问题

mrh 1 年之前
父节点
当前提交
195566f322
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/App.vue

+ 2 - 2
src/App.vue

@@ -139,9 +139,9 @@ const onSubmit = (e: any, answer = undefined) => {
       behavior: 'smooth',
       behavior: 'smooth',
     });
     });
   });
   });
-  getAIAnswer(answer ?? e);
+  getAIAnswer();
 };
 };
-const getAIAnswer = async (content: string) => {
+const getAIAnswer = async () => {
   const newMessage = {
   const newMessage = {
     from: 'ai-model',
     from: 'ai-model',
     content: '',
     content: '',