97 lines
2.0 KiB
TypeScript
97 lines
2.0 KiB
TypeScript
import { MenuCategory } from '@/common/app/contants'
|
|
import type { IconName } from '@/components/a-icon/iconfont.ts'
|
|
|
|
export {}
|
|
|
|
declare global {
|
|
namespace MenuTypes {
|
|
// 菜单
|
|
interface SysMenu extends G.TreeNode {
|
|
// Id
|
|
id: string
|
|
sn?: string
|
|
// 上级 Id; 层级为 1 的节点值为 0
|
|
pid: string
|
|
// 菜单名称
|
|
title?: string
|
|
// 图标
|
|
icon?: string
|
|
// 层级; >= 1
|
|
tier?: number
|
|
// 排序
|
|
sort?: number
|
|
// 路由名称
|
|
routeName?: string
|
|
routePath?: string
|
|
// 面包路径
|
|
breadcrumb?: string[]
|
|
menuCategory?: MenuCategory
|
|
hasChildren?: boolean
|
|
children?: SysMenu[]
|
|
}
|
|
|
|
interface SearchForm {
|
|
pid?: string
|
|
// 菜单名称
|
|
title?: string
|
|
// 路由名称
|
|
routeName?: string
|
|
}
|
|
|
|
interface MenuForm {
|
|
// Id
|
|
id?: string
|
|
sn?: string
|
|
// 上级 Id; 层级为 1 的节点值为 0
|
|
pid?: string
|
|
// 菜单名称
|
|
title?: string
|
|
// 图标
|
|
icon?: IconName
|
|
iconName?: string
|
|
// 排序
|
|
sort?: number
|
|
clients?: number[]
|
|
clientCode?: number
|
|
// 路由名称
|
|
routeName?: string
|
|
routePath?: string
|
|
menuCategory?: MenuCategory
|
|
}
|
|
|
|
interface AddForm {
|
|
sn?: string
|
|
// 上级 Id; 层级为 1 的节点值为 0
|
|
pid?: string
|
|
// 菜单名称
|
|
title?: string
|
|
// 图标
|
|
icon?: string
|
|
// 排序
|
|
sort?: number
|
|
// 路由名称
|
|
routeName?: string
|
|
routePath?: string
|
|
menuCategory?: MenuCategory
|
|
}
|
|
|
|
interface ModifyForm {
|
|
id?: string
|
|
sn?: string
|
|
// 上级 Id; 层级为 1 的节点值为 0
|
|
pid?: string
|
|
// 菜单名称
|
|
title?: string
|
|
// 图标
|
|
icon?: string
|
|
// 排序
|
|
sort?: number
|
|
// 路由名称
|
|
routeName?: string
|
|
routePath?: string
|
|
menuCategory?: MenuCategory
|
|
}
|
|
}
|
|
}
|
|
|