Przeglądaj źródła

fix: [4544] bug: 专家挑选卷中删除试卷页面未刷新

chenhao 2 lat temu
rodzic
commit
9265d9e420
1 zmienionych plików z 8 dodań i 3 usunięć
  1. 8 3
      src/modules/expert/expert/index.vue

+ 8 - 3
src/modules/expert/expert/index.vue

@@ -107,9 +107,14 @@ const onRefresh = () => {
 }
 
 /** 删除 */
-const onDelete = () => {
-  if (currentExpertPaper.value) {
-    useFetch('deletePaper').fetch({ id: currentExpertPaper.value.id })
+const onDelete = async () => {
+  try {
+    if (currentExpertPaper.value) {
+      await useFetch('deletePaper').fetch({ id: currentExpertPaper.value.id })
+      await onSearch()
+    }
+  } catch (error) {
+    console.error(error)
   }
 }