fix: page structure

umi
Dawn1Ocean 2024-03-28 11:29:34 +08:00
parent 860d85fc8b
commit 6095375771
6 changed files with 10 additions and 10 deletions

View File

@ -7,7 +7,7 @@ export default defineConfig({
initialState: {},
request: {},
layout: {
title: '@umijs/max',
title: 'EVA Tea',
},
routes: [
{
@ -20,14 +20,14 @@ export default defineConfig({
component: './Home',
},
{
name: '权限演示',
path: '/access',
component: './Access',
name: '主席团管理',
path: '/admin',
component: './Admin',
},
{
name: ' CRUD 示例',
path: '/table',
component: './Table',
name: '日志',
path: '/log',
component: './Log',
},
],
npmClient: 'pnpm',

View File

@ -4,14 +4,14 @@
import React from 'react';
export async function getRoutes() {
const routes = {"1":{"path":"/","redirect":"/home","parentId":"ant-design-pro-layout","id":"1"},"2":{"name":"首页","path":"/home","parentId":"ant-design-pro-layout","id":"2"},"3":{"name":"权限演示","path":"/access","parentId":"ant-design-pro-layout","id":"3"},"4":{"name":" CRUD 示例","path":"/table","parentId":"ant-design-pro-layout","id":"4"},"ant-design-pro-layout":{"id":"ant-design-pro-layout","path":"/","isLayout":true}} as const;
const routes = {"1":{"path":"/","redirect":"/home","parentId":"ant-design-pro-layout","id":"1"},"2":{"name":"首页","path":"/home","parentId":"ant-design-pro-layout","id":"2"},"3":{"name":"主席团管理","path":"/admin","parentId":"ant-design-pro-layout","id":"3"},"4":{"name":"日志","path":"/log","parentId":"ant-design-pro-layout","id":"4"},"ant-design-pro-layout":{"id":"ant-design-pro-layout","path":"/","isLayout":true}} as const;
return {
routes,
routeComponents: {
'1': React.lazy(() => import( './EmptyRoute')),
'2': React.lazy(() => import(/* webpackChunkName: "p__Home__index" */'@/pages/Home/index.tsx')),
'3': React.lazy(() => import(/* webpackChunkName: "p__Access__index" */'@/pages/Access/index.tsx')),
'4': React.lazy(() => import(/* webpackChunkName: "p__Table__index" */'@/pages/Table/index.tsx')),
'3': React.lazy(() => import(/* webpackChunkName: "p__Admin__index" */'@/pages/Admin/index.tsx')),
'4': React.lazy(() => import(/* webpackChunkName: "p__Log__index" */'@/pages/Log/index.tsx')),
'ant-design-pro-layout': React.lazy(() => import(/* webpackChunkName: "umi__plugin-layout__Layout" */'/home/dean/Coding/EVA Tea/Notify-Admin/src/.umi/plugin-layout/Layout.tsx')),
},
};