Parcourir la source

解决类型传参问题

mrh il y a 1 an
Parent
commit
e1578867a3
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  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);
   }
 };