mirror of
https://github.com/ccmjga/zhilu-admin
synced 2026-04-07 22:17:34 +00:00
fix z
This commit is contained in:
@@ -86,18 +86,8 @@ const handleSubmit = async () => {
|
||||
.max(15, "权限代码最多15个字符"),
|
||||
});
|
||||
|
||||
try {
|
||||
const validatedData = permissionSchema.parse(formData.value);
|
||||
await onSubmit(validatedData);
|
||||
updateFormData(undefined);
|
||||
} catch (error) {
|
||||
if (error instanceof z.ZodError) {
|
||||
alertStore.showAlert({
|
||||
level: "error",
|
||||
content: error.errors[0].message,
|
||||
});
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
const validatedData = permissionSchema.parse(formData.value);
|
||||
await onSubmit(validatedData);
|
||||
updateFormData(undefined);
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user