feat: 统一函数命名
This commit is contained in:
@@ -9,7 +9,7 @@ const MenuIconKeySchema = z.custom<MenuIconKeyValues>(
|
||||
},
|
||||
)
|
||||
|
||||
export const sysMenuSchema = z.object({
|
||||
export const menuSchema = z.object({
|
||||
id: z.number().int(),
|
||||
name: z.string(),
|
||||
path: z.string(),
|
||||
@@ -25,13 +25,13 @@ export const sysMenuSchema = z.object({
|
||||
updated_at: z.string(),
|
||||
})
|
||||
|
||||
export type SysMenu = z.infer<typeof sysMenuSchema>
|
||||
export type Menu = z.infer<typeof menuSchema>
|
||||
|
||||
export interface SysMenuTree extends SysMenu {
|
||||
children?: SysMenuTree[]
|
||||
export interface MenuTree extends Menu {
|
||||
children?: MenuTree[]
|
||||
}
|
||||
|
||||
export const sysMenuFormSchema = z
|
||||
export const menuFormSchema = z
|
||||
.object({
|
||||
id: z.number().optional(),
|
||||
name: z.string().min(1, '菜单名称不能为空').max(16, '菜单名称不能超过16个字符'),
|
||||
@@ -63,4 +63,4 @@ export const sysMenuFormSchema = z
|
||||
return data
|
||||
})
|
||||
|
||||
export type SysMenuForm = z.infer<typeof sysMenuFormSchema>
|
||||
export type MenuForm = z.infer<typeof menuFormSchema>
|
||||
|
||||
Reference in New Issue
Block a user