Files
ruoyi-plus-vben5/apps/web-antd/src/api/core/menu.ts

46 lines
936 B
TypeScript
Raw Normal View History

import { requestClient } from '#/api/request';
2024-08-07 08:57:56 +08:00
/**
* @description: meta
* @param title
* @param icon
* @param noCache
* @param link
*/
export interface MenuMeta {
icon: string;
link?: string;
noCache: boolean;
title: string;
}
/**
* @description:
* @param name
* @param path
* @param hidden
* @param component Layout
2024-08-07 08:57:56 +08:00
* @param alwaysShow
* @param query (json形式)
* @param meta
* @param children
*/
export interface Menu {
alwaysShow?: boolean;
children: Menu[];
component: string;
hidden: boolean;
meta: MenuMeta;
name: string;
path: string;
query?: string;
redirect?: string;
}
/**
*
*/
2024-08-07 13:42:33 +08:00
export async function getAllMenusApi() {
2024-08-07 08:57:56 +08:00
return requestClient.get<Menu[]>('/system/menu/getRouters');
}