import { MenuMeta, MenuItem, TabItem, LevelItem, CurrentRoute, WindowListenerOption, MatchedResult, MixActiveResult } from './types'; import { ProLayoutProps } from './props'; import { RouteLocationMatched } from 'vue-router'; /** * 判断路由是否是主页 * @param route 路由信息 * @param homePath 主页地址 */ export declare function isHomeRoute(route: CurrentRoute, homePath: string): boolean; /** * 获取主页路由地址 * @param path 路由地址 */ export declare function getHomePath(path?: string | null): string; /** * 获取路由匹配的菜单数据 * @param path 路由地址 * @param fullPath 路由完整地址 * @param meta 路由元数据 * @param menus 菜单数据 */ export declare function getRouteMatched(path: string, fullPath: string, meta: MenuMeta, menus: MenuItem[]): MatchedResult; /** * 根据菜单地址获取菜单 * @param path 菜单地址 * @param menus 菜单数据 */ export declare function findMenuByPath(path?: string, menus?: MenuItem[]): MenuItem | undefined; /** * 根据菜单地址获取菜单及所有父级 * @param path 菜单地址 * @param menus 菜单数据 */ export declare function getMatchedMenus(path: string, menus: MenuItem[], parents?: MenuItem[]): MenuItem[] | undefined; /** * 获取面包屑导航数据 * @param matched 匹配的菜单数据 * @param activeOther 是否选中非本身 * @param route 路由信息 * @param menus 菜单数据 * @param tabs 页签数据 */ export declare function getMatchedLevels(matched: MenuItem[] | undefined, activeOther: boolean, route: CurrentRoute, menus: MenuItem[], tabs: TabItem[]): LevelItem[]; /** * 根据路由地址获取页签数据 * @param path 路由地址 * @param tabs 全部页签数据 */ export declare function findTabByPath(path?: string, tabs?: TabItem[]): TabItem | undefined; /** * 获取路由对应的组件名称 * @param matched 路由匹配数据 */ export declare function getMatchedComponents(matched: RouteLocationMatched[]): string[]; /** * 返回路由对应的页签数据 * @param current 路由信息 * @param tabs 当前页签数据 * @param homePath 主页地址 * @param repeatableTabs 可重复打开的页签 * @param routeTitle 路由对应的标题 */ export declare function getRouteTab(current: CurrentRoute, tabs: TabItem[], homePath: string, routeTitle?: string): TabItem; /** * 获取混合导航布局选中 * @param matched 路由匹配的菜单层级数据 */ export declare function getMixActive(matched?: MenuItem[]): MixActiveResult; /** * 获取选中菜单的子级 * @param menus 菜单数据 * @param active 选中地址 * @param childrenName 子级字段名称 */ export declare function getActiveChilds(menus: MenuItem[], active?: string, childrenName?: string): MenuItem[]; /** * 绑定窗口事件监听 */ export declare function useWindowListener(option: WindowListenerOption, props: ProLayoutProps): void; /** * 菜单滚动到选中位置 */ export declare function useMenuScroll(getEl: () => HTMLDivElement | null): { scrollIntoView: () => void; }; /** * 禁用过渡动画 */ export declare function useDisableTransition(): { disableTransition: () => void; }; /** * 菜单数据转换 * @param menus 菜单数据 * @param link 是否使用超链接 */ export declare function getMenuItems(menus: MenuItem[], link: boolean): Partial[];