Skip to content

Commit

Permalink
fix: 🧩 解决config取消按钮控制台错误
Browse files Browse the repository at this point in the history
  • Loading branch information
limuen committed Apr 24, 2024
1 parent fc84fde commit d3bf95d
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions src/hooks/useHandleData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,18 @@ export const useHandleData = (
cancelButtonText: "取消",
type: confirmType,
draggable: true
}).then(async () => {
const res = await api(params);
if (!res) return reject(false);
ElMessage({
type: "success",
message: `${message}成功!`
})
.then(async () => {
const res = await api(params);
if (!res) return reject(false);
ElMessage({
type: "success",
message: `${message}成功!`
});
resolve(true);
})
.catch(() => {
// cancel operation
});
resolve(true);
});
});
};

0 comments on commit d3bf95d

Please sign in to comment.