mirror of
https://github.com/ccmjga/zhilu-admin
synced 2026-03-19 08:53:46 +08:00
fix z
This commit is contained in:
@@ -69,17 +69,7 @@ const handleSubmit = async () => {
|
||||
.min(5, "表达式的长度非法"),
|
||||
});
|
||||
|
||||
try {
|
||||
const validatedData = jobSchema.parse(formData.value);
|
||||
await onSubmit(validatedData.cronExpression);
|
||||
} catch (error) {
|
||||
if (error instanceof z.ZodError) {
|
||||
alertStore.showAlert({
|
||||
level: "error",
|
||||
content: error.errors[0].message,
|
||||
});
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
const validatedData = jobSchema.parse(formData.value);
|
||||
await onSubmit(validatedData.cronExpression);
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user