Skip to content

Commit 51bc0ca

Browse files
committed
fix: 解决合并冲突,清理无用代码,更新依赖项版本
1 parent 102ddf8 commit 51bc0ca

14 files changed

Lines changed: 2 additions & 265 deletions

File tree

biome.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,4 @@
5252
}
5353
}
5454
}
55-
<<<<<<< HEAD
5655
}
57-
=======
58-
}
59-
>>>>>>> origin/rsbuild

package.json

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,12 @@
4040
"react-hotkeys-hook": "^5.1.0",
4141
"react-i18next": "^15.6.1",
4242
"react-is": "^19.1.1",
43-
<<<<<<< HEAD
44-
"react-router": "7.8.1",
45-
=======
4643
"react-router": "^7.8.1",
47-
>>>>>>> origin/rsbuild
4844
"screenfull": "^6.0.2",
4945
"tailwind-merge": "^3.3.1",
5046
"zustand": "^5.0.7"
5147
},
5248
"devDependencies": {
53-
<<<<<<< HEAD
54-
"@biomejs/biome": "2.2.0",
55-
"@iconify-icon/react": "^3.0.0",
56-
"@tailwindcss/vite": "^4.1.12",
57-
=======
5849
"@biomejs/biome": "^2.2.0",
5950
"@iconify-icon/react": "^3.0.0",
6051
"@rsbuild/core": "^1.4.15",
@@ -65,7 +56,6 @@
6556
"@rsbuild/plugin-svgr": "^1.2.2",
6657
"@rsdoctor/rspack-plugin": "^1.2.2",
6758
"@tailwindcss/postcss": "^4.1.12",
68-
>>>>>>> origin/rsbuild
6959
"@types/crypto-js": "^4.2.2",
7060
"@types/lodash-es": "^4.17.12",
7161
"@types/node": "^22.17.2",
@@ -74,21 +64,10 @@
7464
"@types/react-is": "^19.0.0",
7565
"@types/react-resizable": "^3.0.8",
7666
"babel-plugin-react-compiler": "^19.1.0-rc.2",
77-
<<<<<<< HEAD
78-
"globals": "^16.3.0",
79-
"sass-embedded": "^1.90.0",
80-
"tailwindcss": "^4.1.12",
81-
"terser": "^5.43.1",
82-
"typescript": "~5.9.2",
83-
"vite": "npm:rolldown-vite@7.1.2",
84-
"vite-plugin-compression": "^0.5.1",
85-
"vite-plugin-mock-dev-server": "^1.9.3"
86-
=======
8767
"rsbuild-plugin-html-minifier-terser": "^1.1.2",
8868
"rspack-plugin-mock": "^1.2.0",
8969
"tailwindcss": "^4.1.12",
9070
"typescript": "^5.9.2"
91-
>>>>>>> origin/rsbuild
9271
},
9372
"engines": {
9473
"node": ">=22.12.0"

src/GlobalConfigProvider.tsx

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,3 @@
1-
<<<<<<< HEAD
2-
import { ConfigProvider, App as AntdApp } from 'antd';
3-
import type React from 'react';
4-
import App from './App';
5-
import zhCN from 'antd/locale/zh_CN';
6-
import enUS from 'antd/locale/en_US';
7-
import 'dayjs/locale/zh-cn';
8-
import 'dayjs/locale/en';
9-
import dayjs from 'dayjs';
10-
import { usePreferencesStore } from './stores/store';
11-
import { useShallow } from 'zustand/shallow';
12-
=======
131
import { ConfigProvider, App as AntdApp } from "antd";
142
import type React from "react";
153
import App from "./App";
@@ -20,7 +8,6 @@ import "dayjs/locale/en";
208
import dayjs from "dayjs";
219
import { usePreferencesStore } from "./stores/store";
2210
import { useShallow } from "zustand/shallow";
23-
>>>>>>> origin/rsbuild
2411
/**
2512
* 全局配置组件(为了将antd的ConfigProvider和App嵌套,不然App中的antdUtil中的组件无法使用全局配置)
2613
*/

src/layouts/Content/index.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,8 @@ import type React from "react";
33
import { Suspense } from "react";
44
import { ErrorBoundary } from "react-error-boundary";
55
import { Outlet, useLocation } from "react-router";
6-
<<<<<<< HEAD
7-
import AuthRouter from "@/router/AuthRouter";
8-
import { ErrorFallback } from "@/router/ErrorBoundary";
9-
=======
106
import { ErrorFallback } from "@/router/ErrorBoundary";
117
import AuthRouter from "@/router/AuthRouter";
12-
>>>>>>> origin/rsbuild
138

149
/**
1510
* 中间主内容区域

src/layouts/Header/component/SearchMenuModal/index.tsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,10 @@ import { SearchOutlined } from '@ant-design/icons';
22
import { Input, Modal } from 'antd';
33
import { useState } from 'react';
44
import { useTranslation } from 'react-i18next';
5-
<<<<<<< HEAD
6-
import { usePlatformHotkey } from '@/hooks/usePlatformHotkey';
7-
import { getShortcutLabel } from '@/utils/utils';
8-
=======
9-
>>>>>>> origin/rsbuild
105
import Footer from './footer';
116
import Title from './title';
7+
import { usePlatformHotkey } from '@/hooks/usePlatformHotkey';
8+
import { getShortcutLabel } from '@/utils/utils';
129

1310
/**
1411
* 搜索菜单模态框组件
@@ -50,10 +47,7 @@ const SearchMenuModal: React.FC = () => {
5047
/>
5148
<Modal
5249
open={openModal}
53-
<<<<<<< HEAD
54-
=======
5550
width={600}
56-
>>>>>>> origin/rsbuild
5751
footer={<Footer />}
5852
title={<Title />}
5953
styles={{

src/layouts/Header/index.tsx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,7 @@ const Header = () => {
3232
* 跳转到github
3333
*/
3434
const routeGitHub = useCallback(() => {
35-
<<<<<<< HEAD
36-
window.open('https://github.com/yecongling/nexus-admin', '_blank');
37-
=======
3835
window.open("https://github.com/yecongling/nexus-admin", "_blank");
39-
>>>>>>> origin/rsbuild
4036
}, []);
4137

4238
return (
@@ -58,14 +54,10 @@ const Header = () => {
5854
{/* 全局搜索 */}
5955
{globalSearch && <SearchMenuModal />}
6056
<Tooltip placement="bottom" title="github">
61-
<<<<<<< HEAD
62-
<GithubOutlined style={{ cursor: 'pointer', fontSize: '18px' }} onClick={routeGitHub} />
63-
=======
6457
<GithubOutlined
6558
style={{ cursor: "pointer", fontSize: "18px" }}
6659
onClick={routeGitHub}
6760
/>
68-
>>>>>>> origin/rsbuild
6961
</Tooltip>
7062
{/* 锁屏 */}
7163
{lockScreen && (

src/locales/en-US/menu.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
const menu = {
2-
dashboard: {
3-
main: 'Dashboard',
4-
workbench: 'Workbench',
5-
monitor: 'Monitor',
6-
},
72
home: 'Home',
83
dashboard: {
94
main: 'Dashboard',

src/locales/zh-CN/menu.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
const menu = {
2-
dashboard: {
3-
main: '仪表盘',
4-
workbench: '工作台',
5-
monitor: '监控',
6-
},
72
home: '首页',
83
dashboard: {
94
main: '仪表盘',

src/main.tsx

Lines changed: 0 additions & 34 deletions
This file was deleted.

src/router/router.tsx

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,32 @@
11
import React, { useMemo, type ReactNode } from "react";
2-
<<<<<<< HEAD
3-
import { Navigate, redirect, useLocation, useRoutes } from "react-router";
4-
=======
52
import {
63
Navigate,
74
useRoutes
85
} from "react-router";
9-
>>>>>>> origin/rsbuild
106
import { useMenuStore } from "@/stores/store";
117
import type { RouteObject } from "@/types/route";
128
import { handleRouter } from "@/utils/utils";
139
import { LazyLoad } from "./lazyLoad";
14-
<<<<<<< HEAD
15-
import { useUserStore } from "@/stores/userStore";
16-
=======
17-
>>>>>>> origin/rsbuild
1810

1911
// 默认的错误路由
2012
const errorRoutes: RouteObject[] = [
2113
{
2214
path: "/500",
23-
<<<<<<< HEAD
24-
component: LazyLoad("error/500.tsx").type,
25-
=======
2615
component: LazyLoad("error/500.tsx"),
27-
>>>>>>> origin/rsbuild
2816
handle: {
2917
menuKey: "500",
3018
},
3119
},
3220
{
3321
path: "/404",
34-
<<<<<<< HEAD
35-
component: LazyLoad("error/404.tsx").type,
36-
=======
3722
component: LazyLoad("error/404.tsx"),
38-
>>>>>>> origin/rsbuild
3923
handle: {
4024
menuKey: "404",
4125
},
4226
},
4327
{
4428
path: "/403",
45-
<<<<<<< HEAD
46-
component: LazyLoad("error/403.tsx").type,
47-
=======
4829
component: LazyLoad("error/403.tsx"),
49-
>>>>>>> origin/rsbuild
5030
handle: {
5131
menuKey: "403",
5232
},
@@ -74,11 +54,7 @@ export const dynamicRoutes: RouteObject[] = [
7454
},
7555
{
7656
path: "/login",
77-
<<<<<<< HEAD
78-
component: LazyLoad("Login").type,
79-
=======
8057
component: LazyLoad("Login"),
81-
>>>>>>> origin/rsbuild
8258
handle: {
8359
menuKey: "login",
8460
},
@@ -91,30 +67,10 @@ const generateRouter = (routers: RouteObject[]) => {
9167
if (item.index) {
9268
return item;
9369
}
94-
<<<<<<< HEAD
95-
item.element = <item.component />;
96-
item.loader = async () => {
97-
const { isLogin, homePath } = useUserStore();
98-
const location = useLocation();
99-
100-
if (!isLogin) {
101-
// 未登录,允许访问登录页
102-
if (location.pathname !== "/login") {
103-
throw redirect("/login");
104-
}
105-
} else {
106-
// 已登录访问 "/",自动跳转到首页
107-
if (location.pathname === "/") {
108-
throw redirect(homePath);
109-
}
110-
}
111-
};
112-
=======
11370
/**
11471
* 错误边界组件(用于单个页面渲染错误的时候显示,单个模块渲染失败不应该影响整个系统的渲染失败)
11572
*/
11673
item.element = <item.component />;
117-
>>>>>>> origin/rsbuild
11874
item.handle = {
11975
menuKey: item?.handle?.menuKey,
12076
};

0 commit comments

Comments
 (0)