Skip to content

Commit

Permalink
update web
Browse files Browse the repository at this point in the history
  • Loading branch information
xlorne committed Jan 2, 2024
1 parent 6493c75 commit 1c58b9e
Show file tree
Hide file tree
Showing 33 changed files with 614 additions and 1,050 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ SpringBoot DDD Architecture | SpringBoot DDD 框架图
## 管理系统界面

![login](docs/img/login.png)
![login](docs/img/home.png)
![home](docs/img/home.png)
![node](docs/img/node.png)

### antd-pro
antd-pro基于react的管理系统界面框架,提供了丰富的组件,可以快速的开发管理系统界面。本项目基于antd-pro umi@4版本开发。
Expand Down
Binary file modified docs/img/home.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/img/login.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/node.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions web/.husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

# Export Git hook params
export GIT_PARAMS=$*

npx --no-install fabric verify-commit
4 changes: 4 additions & 0 deletions web/.husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install lint-staged
38 changes: 9 additions & 29 deletions web/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,9 @@ import defaultSettings from './defaultSettings';
import proxy from './proxy';
import routes from './routes';

const { REACT_APP_ENV = 'dev',MOCK } = process.env;

let proxyEnv = REACT_APP_ENV;
if (!MOCK) {
proxyEnv = 'none';
}
const { REACT_APP_ENV = 'dev' } = process.env;

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

// 默认是 browser
history: {type: 'hash'},
history: { type: 'hash' },

/**
* @name 兼容性设置
Expand Down Expand Up @@ -63,7 +57,7 @@ export default defineConfig({
* @doc 代理介绍 https://umijs.org/docs/guides/proxy
* @doc 代理配置 https://umijs.org/docs/api/config#proxy
*/
proxy: proxy[proxyEnv as keyof typeof proxy],
proxy: proxy[REACT_APP_ENV as keyof typeof proxy],
/**
* @name 快速热更新配置
* @description 一个不错的热更新组件,更新时可以保留 state
Expand All @@ -85,7 +79,7 @@ export default defineConfig({
* @name layout 插件
* @doc https://umijs.org/docs/max/layout-menu
*/
title: 'ShadowBrowser',
title: 'Ant Design Pro',
layout: {
locale: true,
...defaultSettings,
Expand Down Expand Up @@ -138,27 +132,13 @@ export default defineConfig({
],
//================ pro 插件配置 =================
presets: ['umi-presets-pro'],
/**
* @name openAPI 插件的配置
* @description 基于 openapi 的规范生成serve 和mock,能减少很多样板代码
* @doc https://pro.ant.design/zh-cn/docs/openapi/
*/
openAPI: [
{
requestLibPath: "import { request } from '@umijs/max'",
// 或者使用在线的版本
// schemaPath: "https://gw.alipayobjects.com/os/antfincdn/M%24jrzTTYJN/oneapi.json"
schemaPath: join(__dirname, 'oneapi.json'),
mock: false,
},
{
requestLibPath: "import { request } from '@umijs/max'",
schemaPath: 'https://gw.alipayobjects.com/os/antfincdn/CA1dOm%2631B/openapi.json',
projectName: 'swagger',
},
],
mfsu: {
strategy: 'normal',
},
requestRecord: {},
lessLoader: {
modifyVars: {
settingDrawer: REACT_APP_ENV==='dev'?'flex':'none',
}
},
});
7 changes: 4 additions & 3 deletions web/config/defaultSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ const Settings: ProLayoutProps & {
logo?: string;
} = {
navTheme: 'light',
// 拂晓蓝
colorPrimary: '#1890ff',
// 极光绿
colorPrimary: '#52C41A',
layout: 'mix',
contentWidth: 'Fluid',
fixedHeader: false,
fixSiderbar: true,
colorWeak: false,
title: 'SpringBootExample',
title: 'Ant Design Pro',
pwa: true,
logo: 'https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg',
iconfontUrl: '',
Expand All @@ -26,3 +26,4 @@ const Settings: ProLayoutProps & {
};

export default Settings;

Loading

0 comments on commit 1c58b9e

Please sign in to comment.