소스 검색

fix 修复 请假提交未取消按钮loading问题

疯狂的狮子Li 1 년 전
부모
커밋
35b90aa746
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/views/workflow/leave/leaveEdit.vue

+ 2 - 2
src/views/workflow/leave/leaveEdit.vue

@@ -212,9 +212,9 @@ const submitForm = (status: string) => {
         buttonLoading.value = true;
         let res: AxiosResponse<LeaveVO>;
         if (form.value.id) {
-          res = await updateLeave(form.value);
+          res = await updateLeave(form.value).finally(() => (buttonLoading.value = false));
         } else {
-          res = await addLeave(form.value);
+          res = await addLeave(form.value).finally(() => (buttonLoading.value = false));
         }
         form.value = res.data;
         if (status === 'draft') {