Browse Source

解决类型传参问题

mrh 9 months ago
parent
commit
e1578867a3
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/App.vue

+ 2 - 2
src/App.vue

@@ -119,7 +119,7 @@ const description = [
 //   loading: false,
 
 // })
-const onSubmit = (e: any, answer = undefined) => {
+const onSubmit = (e: any, ) => {
   if (!e.trim()) {
     return;
   }
@@ -194,7 +194,7 @@ const getAIAnswer = async () => {
 const onItemClick = (item:any) => {
   if (mockAnswer[item.value]) {
     // 使用 mock 数据
-    onSubmit(item.label, mockAnswer[item.value]);
+    onSubmit(item.label);
   }
 };