You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.0 KiB
TypeScript

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

import type { VueNodeOrRender } from '#/types'
export type WithFalse<T> = T | false
export type MenuDataItem = {
/** 子菜单 */
children?: MenuDataItem[]
/** 在菜单中隐藏子节点 */
hideChildrenInMenu?: boolean
/** 在菜单中隐藏自己和子节点 */
hideInMenu?: boolean
/** 菜单的icon */
icon?: VueNodeOrRender
/** 自定义菜单的国际化 key */
locale?: string | false
/** 菜单的名字 */
name?: string
/** 用于标定选中的值,默认是 path */
key?: string
/** disable 菜单选项 */
disabled?: boolean
/** 路径,可以设定为网页链接 */
path?: string
/**
* 当此节点被选中的时候也会选中 parentKeys 的节点
*
* 自定义父节点
*/
parentKeys?: string[]
/** 隐藏自己,并且将子节点提升到与自己平级 */
flatMenu?: boolean
/** 指定外链打开形式同a标签 */
target?: string
[key: string]: any
}
export type MessageDescriptor = {
id: any
description?: string
defaultMessage?: string
}