Learn.Archives.Web/src/api/menu.ts

25 lines
497 B
TypeScript

import { http } from "@/utils/http";
import type { Res } from "@/utils/http/types";
// 定义菜单项接口
export interface MenuItem {
id: number;
name: string;
path?: string;
isButton: boolean;
title: string;
icon?: string;
auths?: string;
rank: number;
showLink: boolean;
parentId: number;
children?: MenuItem[];
}
/**
* @description 获取所有的菜单
* @return {object}
*/
export function MenuAll() {
return http.request<Res<MenuItem[]>>("get", `Menu/All`);
}