Skip to content

Commit

Permalink
feat: 🕵️‍♂️ 修改文件目录
Browse files Browse the repository at this point in the history
  • Loading branch information
iamzwq committed Nov 11, 2024
1 parent 20cc6c2 commit 82bb953
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 13 deletions.
9 changes: 4 additions & 5 deletions src/router/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { createBrowserRouter, Navigate, type RouteObject } from "react-router-dom";

import { echartsDemoRoute } from "@/pages/echarts-demo/routes";
import { landingRoute } from "@/pages/landing/routes";
import { navRoute } from "@/pages/nav/routes";
import { userManagerRoute } from "@/pages/user-management/routes";
import { echartsDemoRoute } from "./modules/echarts-demo";
import { landingRoute } from "./modules/landing";
import { navRoute } from "./modules/nav";
import { userManagerRoute } from "./modules/user-management";

const routes: RouteObject[] = [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Link, type RouteObject } from "react-router-dom";
export const echartsDemoRoute: RouteObject = {
path: "/echarts-demo",
lazy: async () => ({
Component: (await import("./layout")).default,
Component: (await import("@/pages/echarts-demo/layout")).default,
}),
handle: {
crumb: () => <Link to="/echarts-demo">Echarts Demo</Link>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ import { type RouteObject } from "react-router-dom";
export const landingRoute: RouteObject = {
path: "/landing",
lazy: async () => ({
Component: (await import("./index")).default,
Component: (await import("@/pages/landing")).default,
}),
};
6 changes: 3 additions & 3 deletions src/pages/nav/routes.tsx → src/router/modules/nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Link, type RouteObject } from "react-router-dom";
export const navRoute: RouteObject = {
path: "nav",
lazy: async () => ({
Component: (await import("./index")).default,
Component: (await import("@/pages/nav")).default,
}),
handle: {
crumb: () => "一级菜单",
Expand All @@ -12,7 +12,7 @@ export const navRoute: RouteObject = {
{
path: "sub-1",
lazy: async () => ({
Component: (await import("./sub-nav-1")).default,
Component: (await import("@/pages/nav/sub-nav-1")).default,
}),
handle: {
crumb: () => <Link to="/nav/sub-1">二级菜单-1</Link>,
Expand All @@ -21,7 +21,7 @@ export const navRoute: RouteObject = {
{
path: "sub-2",
lazy: async () => ({
Component: (await import("./sub-nav-2")).default,
Component: (await import("@/pages/nav/sub-nav-2")).default,
}),
handle: {
crumb: () => <Link to="/nav/sub-2">二级菜单-2</Link>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Link, type RouteObject } from "react-router-dom";
export const userManagerRoute: RouteObject = {
path: "user-management",
lazy: async () => ({
Component: (await import("./index")).default,
Component: (await import("@/pages/user-management")).default,
}),
handle: {
crumb: () => <Link to="/user-management">用户管理</Link>,
Expand Down
4 changes: 2 additions & 2 deletions src/stores/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export * from "./modules/settings";
export * from "./modules/test";
export * from "./selectors";
export * from "./settings";
export * from "./test";
File renamed without changes.
File renamed without changes.

0 comments on commit 82bb953

Please sign in to comment.