Explorar o código

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

chenhao %!s(int64=2) %!d(string=hai) anos
pai
achega
9265d9e420
Modificáronse 1 ficheiros con 8 adicións e 3 borrados
  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)
   }
 }