This commit is contained in:
ahjung
2024-09-14 22:39:11 +08:00
parent 1ae5372396
commit 7a62de39c2
62 changed files with 1996 additions and 2938 deletions

View File

@@ -1,7 +1,19 @@
import { defineMock } from '@alova/mock';
import { resultSuccess } from '../_util';
export interface ListDate {
label: string;
key: string;
type: number;
subtitle: string;
openType: number;
auth: string;
path: string;
children?: ListDate[];
}
const menuList = () => {
const result: any[] = [
const result: ListDate[] = [
{
label: 'Dashboard',
key: 'dashboard',
@@ -74,16 +86,11 @@ const menuList = () => {
return result;
};
export default [
{
url: '/api/menu/list',
timeout: 1000,
method: 'get',
response: () => {
const list = menuList();
return resultSuccess({
list,
});
},
export default defineMock({
'/api/menu/list': () => {
const list = menuList();
return resultSuccess({
list,
});
},
];
});