lisenzhou 2 年之前
父節點
當前提交
69c40bd43a
共有 2 個文件被更改,包括 12 次插入10 次删除
  1. 1
    0
      package.json
  2. 11
    10
      src/app.jsx

+ 1
- 0
package.json 查看文件

46
   "dependencies": {
46
   "dependencies": {
47
     "@ant-design/icons": "^4.7.0",
47
     "@ant-design/icons": "^4.7.0",
48
     "@ant-design/pro-components": "1.1.1",
48
     "@ant-design/pro-components": "1.1.1",
49
+    "@ant-design/pro-layout": "^6.38.13",
49
     "@umijs/route-utils": "^2.0.0",
50
     "@umijs/route-utils": "^2.0.0",
50
     "antd": "^4.20.0",
51
     "antd": "^4.20.0",
51
     "classnames": "^2.3.0",
52
     "classnames": "^2.3.0",

+ 11
- 10
src/app.jsx 查看文件

1
-import Footer from '@/components/Footer';
2
-import RightContent from '@/components/RightContent';
3
-import { currentUser as queryCurrentUser } from '@/services/api/login';
4
 import { requestConfig } from '@/utils/request';
1
 import { requestConfig } from '@/utils/request';
5
-import { SettingDrawer } from '@ant-design/pro-components';
6
 import { history } from '@umijs/max';
2
 import { history } from '@umijs/max';
7
 import defaultSettings from '../config/defaultSettings';
3
 import defaultSettings from '../config/defaultSettings';
8
 
4
 
43
   return {
39
   return {
44
     // rightContentRender: () => <RightContent />,
40
     // rightContentRender: () => <RightContent />,
45
     disableContentMargin: false,
41
     disableContentMargin: false,
42
+    token: {
43
+      sider: {
44
+        menuBackgroundColor: '#001529',
45
+        menuTitleTextColor: '#fff',
46
+        menuTextColor: 'hsla(0,0%,100%,.65);',
47
+        menuSubArrowColor: '#fff',
48
+        menuItemSelectedBgColor: '#1890ff',
49
+        menuSelectedTextColor: '#fff',
50
+      },
51
+    },
46
     // waterMarkProps: {
52
     // waterMarkProps: {
47
     //   content: initialState?.currentUser?.name,
53
     //   content: initialState?.currentUser?.name,
48
     // },
54
     // },
64
     //     ]
70
     //     ]
65
     //   : [],
71
     //   : [],
66
     menuHeaderRender: undefined,
72
     menuHeaderRender: undefined,
67
-
68
     // 自定义 403 页面
73
     // 自定义 403 页面
69
     // unAccessible: <div>unAccessible</div>,
74
     // unAccessible: <div>unAccessible</div>,
70
     // 增加一个 loading 的状态
75
     // 增加一个 loading 的状态
71
     childrenRender: (children, props) => {
76
     childrenRender: (children, props) => {
72
       // if (initialState?.loading) return <PageLoading />;
77
       // if (initialState?.loading) return <PageLoading />;
73
-      return (
74
-        <>
75
-          {children}
76
-        </>
77
-      );
78
+      return <>{children}</>;
78
     },
79
     },
79
 
80
 
80
     ...initialState?.settings,
81
     ...initialState?.settings,