Skip to content

Commit 1c58b9e

Browse files
committed
update web
1 parent 6493c75 commit 1c58b9e

33 files changed

+614
-1050
lines changed

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ SpringBoot DDD Architecture | SpringBoot DDD 框架图
2626
## 管理系统界面
2727

2828
![login](docs/img/login.png)
29-
![login](docs/img/home.png)
29+
![home](docs/img/home.png)
30+
![node](docs/img/node.png)
3031

3132
### antd-pro
3233
antd-pro基于react的管理系统界面框架,提供了丰富的组件,可以快速的开发管理系统界面。本项目基于antd-pro umi@4版本开发。

docs/img/home.png

-13.5 KB
Loading

docs/img/login.png

-19.6 KB
Loading

docs/img/node.png

39.5 KB
Loading

web/.husky/commit-msg

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
# Export Git hook params
5+
export GIT_PARAMS=$*
6+
7+
npx --no-install fabric verify-commit

web/.husky/pre-commit

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx --no-install lint-staged

web/config/config.ts

+9-29
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,9 @@ import defaultSettings from './defaultSettings';
55
import proxy from './proxy';
66
import routes from './routes';
77

8-
const { REACT_APP_ENV = 'dev',MOCK } = process.env;
9-
10-
let proxyEnv = REACT_APP_ENV;
11-
if (!MOCK) {
12-
proxyEnv = 'none';
13-
}
8+
const { REACT_APP_ENV = 'dev' } = process.env;
149

1510
export default defineConfig({
16-
esbuildMinifyIIFE: true,
1711
/**
1812
* @name 开启 hash 模式
1913
* @description 让 build 之后的产物包含 hash 后缀。通常用于增量发布和避免浏览器加载缓存。
@@ -22,7 +16,7 @@ export default defineConfig({
2216
hash: true,
2317

2418
// 默认是 browser
25-
history: {type: 'hash'},
19+
history: { type: 'hash' },
2620

2721
/**
2822
* @name 兼容性设置
@@ -63,7 +57,7 @@ export default defineConfig({
6357
* @doc 代理介绍 https://umijs.org/docs/guides/proxy
6458
* @doc 代理配置 https://umijs.org/docs/api/config#proxy
6559
*/
66-
proxy: proxy[proxyEnv as keyof typeof proxy],
60+
proxy: proxy[REACT_APP_ENV as keyof typeof proxy],
6761
/**
6862
* @name 快速热更新配置
6963
* @description 一个不错的热更新组件,更新时可以保留 state
@@ -85,7 +79,7 @@ export default defineConfig({
8579
* @name layout 插件
8680
* @doc https://umijs.org/docs/max/layout-menu
8781
*/
88-
title: 'ShadowBrowser',
82+
title: 'Ant Design Pro',
8983
layout: {
9084
locale: true,
9185
...defaultSettings,
@@ -138,27 +132,13 @@ export default defineConfig({
138132
],
139133
//================ pro 插件配置 =================
140134
presets: ['umi-presets-pro'],
141-
/**
142-
* @name openAPI 插件的配置
143-
* @description 基于 openapi 的规范生成serve 和mock,能减少很多样板代码
144-
* @doc https://pro.ant.design/zh-cn/docs/openapi/
145-
*/
146-
openAPI: [
147-
{
148-
requestLibPath: "import { request } from '@umijs/max'",
149-
// 或者使用在线的版本
150-
// schemaPath: "https://gw.alipayobjects.com/os/antfincdn/M%24jrzTTYJN/oneapi.json"
151-
schemaPath: join(__dirname, 'oneapi.json'),
152-
mock: false,
153-
},
154-
{
155-
requestLibPath: "import { request } from '@umijs/max'",
156-
schemaPath: 'https://gw.alipayobjects.com/os/antfincdn/CA1dOm%2631B/openapi.json',
157-
projectName: 'swagger',
158-
},
159-
],
160135
mfsu: {
161136
strategy: 'normal',
162137
},
163138
requestRecord: {},
139+
lessLoader: {
140+
modifyVars: {
141+
settingDrawer: REACT_APP_ENV==='dev'?'flex':'none',
142+
}
143+
},
164144
});

web/config/defaultSettings.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ const Settings: ProLayoutProps & {
88
logo?: string;
99
} = {
1010
navTheme: 'light',
11-
// 拂晓蓝
12-
colorPrimary: '#1890ff',
11+
// 极光绿
12+
colorPrimary: '#52C41A',
1313
layout: 'mix',
1414
contentWidth: 'Fluid',
1515
fixedHeader: false,
1616
fixSiderbar: true,
1717
colorWeak: false,
18-
title: 'SpringBootExample',
18+
title: 'Ant Design Pro',
1919
pwa: true,
2020
logo: 'https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg',
2121
iconfontUrl: '',
@@ -26,3 +26,4 @@ const Settings: ProLayoutProps & {
2626
};
2727

2828
export default Settings;
29+

0 commit comments

Comments
 (0)