Skip to content

Commit a2d434f

Browse files
chenshuai2144kaodingafc163510846tkvern
authored
ant design pro v5 发布 (#8642)
* init * remove Authorized * remove login * remove request * remove path-to-regexp" * remove create-umi * clean dependencies * remove unused less * better login mock * add ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION=site env * support settings dynamic * support umi-plugin-setting-drawer * 🎨 format: clean code * remove clean fetch:blocks * add NoticeIcon * add NoticeIcon * use "@ant-design/pro-layout": "6.0.0-1" * support errorHandler * remove SelectLang * update version * PageHeaderWrapper to PageContainer * PageHeaderWrapper to PageContainer (#6622) * 📌 versions: use alpha version (#6634) * use alpha version 5.0.0 no yet * less test * fix lint error * rename setting Co-authored-by: chenshuai2144 <[email protected]> * fix 401 do not to login error * 405 start:no-mock * siderWidth: 208 * side * false * username * remove resolutions * update list demo * correct the text * fix tabs style in [email protected] * fix login error * use "@ant-design/pro-layout": "6.0.0-5" * eslint * access * pro-layout 6.0.0-7 * merge master * up layout version * 💄 UI: fix login style warning * upgrade dependency * delete throw error * versions: up @umijs/fabric * change login * do not open defaultOpenAll * rebase error * update demos * deps upgreade * 🐛 修复切换不同权限的账户登录后,access的鉴权不生效问题 (#6997) * 🐛 修复切换不同权限的账户登录后,access的鉴权不生效问题 * 🎨 prettier code * 修改hash路由下search参数在hash之前,search最后一个参数错误bug (#6908) * 🐛 bug: fix tsc error * config.js里面 history.type 为 hash时,退出重登录后,拼接返回路径时,#号前路径会重复 * prettier all code * merge master * 🐛 bug: fix the problem that modifying URL can bypass permissions * reset hash * fix infinite loop of login page (#7095) * merge master * rm unuse code * rm unuse code * remove unuse code * 🐛 bug: fix redirect error in hash mode * fix redirect * 💥 feat: support defaultSettings close #7407 * sort * sorter * default close umi ui * goto reload window.location.href * add setupTests.js * add localStorageMock init * open esbuild * add exportStatic * better code * add initialStateConfig * remove unuse code * login 翻译 * add key * update siderWidth close #7585 * fix redirect error close #7632 * add childrenRender type * better styles * better styles * remove unuse code close #7648 * default use browser history * close * support unAccessible * up @umijs/preset-react version * merge master * support dumi function * ✨ feat: add react-dev-inspector plugins * 🚑 hotfix: support InspectorWrapper * 🚑 hotfix: support InspectorWrapper * add dumi docs href * 👷 CI: fix Deploy CI * 👷 CI : fix azure-pipelines * fix keys error * fix: version (#7789) * fix lint * fix lint * fix typo * fix type * better code * add openAPI plugins * use openapi plugins * support schemaPath = url * add umi-plugins * add dumi doc * add plugin doc * add config doc * fix: outLogin request method (#8059) (#8061) Co-authored-by: luqili <[email protected]> * 非 dev 环境不展示 openapi * locale pt_br Pages added (#8088) * revert surge preview * test: update rebase action * add persian local and fix menu direction for rtl display (#8079) * up @umijs/preset-dumi version * up typescript verison * add waterMark * default open webpack5 * default open webpack5 * support webpack5 * support openAPI is array * upgrade deps * dir * 页面代码结构推荐 * Update global.tsx * Update index.tsx * refactor(app.tsx): dev links use Link * loginPath * fix ci * fix tsc * fix tsc * fix(app.tsx): dev links use umi Link * fix tes * fix warn * refactor(app.tsx): optimization import Link * resetv5-app-tsx-links #8226 * use link to hash * default open fastRefresh * Update README.md (#8356) Ant Design Pro V5 is not released yet. `trial` is often used for released paid product, and `preview` is the regularly used word for pre-release version. * Fixing a few issues with internationalization on the login (#7945) Co-authored-by: chenshuai2144 <[email protected]> * Update api.ts (#8424) * chore: support verify commit * fix locale error * support all block * locale: 增加标记,以便删除国际化脚本识别 * fix(locale): 删除request错误捕捉 * chore: remove tag * chore: use fabric verify-commit * chore: up to 5.0.0-beta.3 * chore: remove home page png * use latest * merge master * fix conflict type and eslint waring! (#8644) * chore: open mfsu and webpack5 * try fix ci * fix ci * try fix ci * add test * add test * 增加加载时间 * fix test * prettier all code * docs: change oneapi doc * chore: add umi * rmeove unuse code Co-authored-by: lijiehua <[email protected]> Co-authored-by: 偏右 <[email protected]> Co-authored-by: Jerry <[email protected]> Co-authored-by: Vern Brandl <[email protected]> Co-authored-by: Lee Fan <[email protected]> Co-authored-by: zhangshuling <Zsl0516> Co-authored-by: Justin <[email protected]> Co-authored-by: Jeff Tian <[email protected]> Co-authored-by: luqili <[email protected]> Co-authored-by: luqili <[email protected]> Co-authored-by: Thiago Tognoli <[email protected]> Co-authored-by: abolfazl <[email protected]> Co-authored-by: HouKunLin <[email protected]> Co-authored-by: SHINCHVEN <[email protected]> Co-authored-by: Scott Goci <[email protected]> Co-authored-by: _XiaoTian <[email protected]> Co-authored-by: 丁田秀 <[email protected]> Co-authored-by: Jiankian <[email protected]>
1 parent 09ca467 commit a2d434f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+3178
-2510
lines changed

.github/workflows/ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: ${{ matrix.os }}
88
strategy:
99
matrix:
10-
node_version: [10.x, 12.x]
10+
node_version: [12.x, 14.x]
1111
os: [ubuntu-latest, windows-latest, macOS-latest]
1212
steps:
1313
- uses: actions/checkout@v1
@@ -16,7 +16,7 @@ jobs:
1616
with:
1717
node-version: ${{ matrix.node_version }}
1818
- run: echo ${{github.ref}}
19-
- run: npm install
19+
- run: yarn
2020
- run: yarn run lint
2121
- run: yarn run tsc
2222
- run: yarn run build

.github/workflows/deploy.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,13 @@ jobs:
1212
uses: actions/checkout@master
1313

1414
- name: install
15-
run: npm install
15+
run: yarn
1616

1717
- name: plugins
18-
run: yarn add umi-plugin-antd-theme umi-plugin-pro
18+
run: yarn add umi-plugin-antd-theme umi-plugin-pro umi-plugin-setting-drawer
19+
20+
- name: fetch-blocks
21+
run: yarn run pro fetch-blocks --branch=v5
1922

2023
- name: site
2124
run: npm run site

.github/workflows/preview-build.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ jobs:
1515

1616
- name: build
1717
run: |
18-
npm install
19-
npm install umi-plugin-pro --save
20-
npm run build
18+
yarn
19+
yarn add umi-plugin-pro --save
20+
yarn build
2121
2222
- name: upload dist artifact
2323
uses: actions/upload-artifact@v2

.github/workflows/preview-deploy.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Preview Deploy
22

33
on:
44
workflow_run:
5-
workflows: ["Preview Build"]
5+
workflows: ['Preview Build']
66
types:
77
- completed
88

.github/workflows/rebase.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ jobs:
88
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase')
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@master
12-
with:
13-
fetch-depth: 0
14-
- name: Automatic Rebase
15-
uses: cirrus-actions/[email protected]
16-
env:
17-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
11+
- uses: actions/checkout@master
12+
with:
13+
fetch-depth: 0
14+
- name: Automatic Rebase
15+
uses: cirrus-actions/[email protected]
16+
env:
17+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ An out-of-box UI solution for enterprise applications as a React boilerplate.
2121
- FAQ: http://pro.ant.design/docs/faq
2222
- Mirror Site in China: http://ant-design-pro.gitee.io
2323

24-
## 5.0 is ready for trial! 🎉🎉🎉
24+
## 5.0 is ready for preview! 🎉🎉🎉
2525

2626
[Try Ant Design Pro 5.0.0](https://beta-pro.ant.design/docs/upgrade-v5-cn)
2727

config/config.dev.ts

+4
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,8 @@ export default defineConfig({
1212
babelPlugins: [],
1313
babelOptions: {},
1414
},
15+
// mfsu: {},
16+
// webpack5: {
17+
// lazyCompilation: {},
18+
// },
1519
});

config/config.ts

+30-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// https://umijs.org/config/
22
import { defineConfig } from 'umi';
3+
import { join } from 'path';
4+
35
import defaultSettings from './defaultSettings';
46
import proxy from './proxy';
57
import routes from './routes';
@@ -12,9 +14,13 @@ export default defineConfig({
1214
dva: {
1315
hmr: true,
1416
},
15-
history: {
16-
type: 'browser',
17+
layout: {
18+
// https://umijs.org/zh-CN/plugins/plugin-layout
19+
locale: true,
20+
siderWidth: 208,
21+
...defaultSettings,
1722
},
23+
// https://umijs.org/zh-CN/plugins/plugin-locale
1824
locale: {
1925
// default zh-CN
2026
default: 'zh-CN',
@@ -23,7 +29,7 @@ export default defineConfig({
2329
baseNavigator: true,
2430
},
2531
dynamicImport: {
26-
loading: '@/components/PageLoading/index',
32+
loading: '@ant-design/pro-layout/es/PageLoading',
2733
},
2834
targets: {
2935
ie: 11,
@@ -34,14 +40,33 @@ export default defineConfig({
3440
theme: {
3541
'primary-color': defaultSettings.primaryColor,
3642
},
43+
// esbuild is father build tools
44+
// https://umijs.org/plugins/plugin-esbuild
45+
esbuild: {},
3746
title: false,
3847
ignoreMomentLocale: true,
3948
proxy: proxy[REACT_APP_ENV || 'dev'],
4049
manifest: {
4150
basePath: '/',
4251
},
43-
// 快速刷新功能 https://umijs.org/config#fastrefresh
52+
// Fast Refresh 热更新
4453
fastRefresh: {},
45-
esbuild: {},
54+
openAPI: [
55+
{
56+
requestLibPath: "import { request } from 'umi'",
57+
// 或者使用在线的版本
58+
// schemaPath: "https://gw.alipayobjects.com/os/antfincdn/M%24jrzTTYJN/oneapi.json"
59+
schemaPath: join(__dirname, 'oneapi.json'),
60+
mock: false,
61+
},
62+
{
63+
requestLibPath: "import { request } from 'umi'",
64+
schemaPath: 'https://gw.alipayobjects.com/os/antfincdn/CA1dOm%2631B/openapi.json',
65+
projectName: 'swagger',
66+
},
67+
],
68+
nodeModulesTransform: { type: 'none' },
69+
mfsu: {},
4670
webpack5: {},
71+
exportStatic: {},
4772
});

config/defaultSettings.ts

+9-11
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
1-
import { Settings as ProSettings } from '@ant-design/pro-layout';
1+
import { Settings as LayoutSettings } from '@ant-design/pro-layout';
22

3-
type DefaultSettings = Partial<ProSettings> & {
4-
pwa: boolean;
5-
};
6-
7-
const proSettings: DefaultSettings = {
8-
navTheme: 'dark',
3+
const Settings: LayoutSettings & {
4+
pwa?: boolean;
5+
logo?: string;
6+
} = {
7+
navTheme: 'light',
98
// 拂晓蓝
109
primaryColor: '#1890ff',
11-
layout: 'side',
10+
layout: 'mix',
1211
contentWidth: 'Fluid',
1312
fixedHeader: false,
1413
fixSiderbar: true,
1514
colorWeak: false,
1615
title: 'Ant Design Pro',
1716
pwa: false,
17+
logo: 'https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg',
1818
iconfontUrl: '',
1919
};
2020

21-
export type { DefaultSettings };
22-
23-
export default proSettings;
21+
export default Settings;

0 commit comments

Comments
 (0)