@jiangood/open-admin 2.0.0 → 2.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config/config.js +9 -22
- package/package.json +5 -1
- package/src/.umi-production/appData.json +67 -108
- package/src/.umi-production/core/route.tsx +1 -2
- package/src/.umi-production/umi.ts +2 -2
- package/src/framework/components/Gap/index.tsx +37 -41
- package/src/framework/components/Page/index.less +1 -1
- package/src/framework/components/Page/index.tsx +19 -22
- package/src/framework/components/ViewRange/index.tsx +12 -17
- package/src/framework/components/system/ButtonList.tsx +12 -32
- package/src/framework/fields/FieldEditor/index.tsx +3 -2
- package/src/framework/fields/FieldUploadFile/index.tsx +8 -4
- package/src/framework/utils/MessageUtils.tsx +21 -99
- package/src/framework/utils/system/HttpUtils.ts +2 -1
- package/src/framework/utils/system/SysUtils.ts +8 -0
- package/src/layouts/PageRender.d.ts +2 -17
- package/src/layouts/PageRender.jsx +14 -76
- package/src/layouts/admin/TabPageRender.jsx +138 -158
- package/src/layouts/admin/index.jsx +120 -17
- package/src/layouts/admin/index.less +123 -5
- package/src/layouts/index.jsx +78 -161
- package/src/loading.jsx +17 -16
- package/src/pages/404.jsx +7 -5
- package/src/pages/about.jsx +3 -3
- package/src/pages/index.jsx +4 -5
- package/src/pages/login.jsx +16 -9
- package/src/pages/login.less +0 -1
- package/src/pages/system/dict/index.jsx +7 -10
- package/src/pages/system/file/index.jsx +5 -5
- package/src/pages/system/job/index.jsx +9 -7
- package/src/pages/system/log/index.jsx +4 -5
- package/src/pages/system/manual/index.jsx +6 -4
- package/src/pages/system/org/index.jsx +4 -2
- package/src/pages/system/role/index.jsx +9 -7
- package/src/pages/system/role/perm.jsx +3 -4
- package/src/pages/system/user/index.jsx +8 -6
- package/src/pages/userCenter/index.jsx +1 -1
- package/src/pages/userCenter/message.jsx +4 -2
- package/src/pages/system/api/index.jsx +0 -279
package/config/config.js
CHANGED
|
@@ -19,35 +19,22 @@ function getPluginDir() {
|
|
|
19
19
|
|
|
20
20
|
const pluginDir = getPluginDir();
|
|
21
21
|
|
|
22
|
+
const SERVLET_CONTEXT = process.env.SERVLET_CONTEXT || '/change-this-servlet-context'; // 见 .env
|
|
23
|
+
|
|
22
24
|
const proxyConfig = {
|
|
23
|
-
|
|
24
|
-
target: `http://${host}`,
|
|
25
|
-
changeOrigin: true,
|
|
26
|
-
},
|
|
27
|
-
'/preview': {
|
|
28
|
-
target: `http://${host}`,
|
|
29
|
-
changeOrigin: true,
|
|
30
|
-
},
|
|
31
|
-
'/ureport': {
|
|
32
|
-
target: `http://${host}`,
|
|
33
|
-
changeOrigin: true,
|
|
34
|
-
},
|
|
35
|
-
'/swagger-ui': {
|
|
36
|
-
target: `http://${host}`,
|
|
37
|
-
changeOrigin: true,
|
|
38
|
-
},
|
|
39
|
-
'/v3/api-docs': {
|
|
25
|
+
[SERVLET_CONTEXT]: {
|
|
40
26
|
target: `http://${host}`,
|
|
41
27
|
changeOrigin: true,
|
|
42
28
|
},
|
|
43
|
-
'/admin/ws': {
|
|
44
|
-
target: `ws://${host}`,
|
|
45
|
-
changeOrigin: true,
|
|
46
|
-
ws: true,
|
|
47
|
-
},
|
|
48
29
|
};
|
|
49
30
|
|
|
50
31
|
export default defineConfig({
|
|
32
|
+
// 注入全局变量,前端代码可直接使用 SERVLET_CONTEXT
|
|
33
|
+
define: {
|
|
34
|
+
SERVLET_CONTEXT: SERVLET_CONTEXT,
|
|
35
|
+
},
|
|
36
|
+
// 资源使用相对路径,部署到任意 context-path 下都无需重新构建
|
|
37
|
+
publicPath: process.env.NODE_ENV === 'production' ? './' : '/',
|
|
51
38
|
// 配置是否让生成的文件包含 hash 后缀,通常用于增量发布和避免浏览器加载缓存
|
|
52
39
|
hash: true,
|
|
53
40
|
// 使用 hash 模式的路由
|
package/package.json
CHANGED
|
@@ -22,6 +22,10 @@
|
|
|
22
22
|
"umi": "^4.0.0"
|
|
23
23
|
},
|
|
24
24
|
"name": "@jiangood/open-admin",
|
|
25
|
+
"repository": {
|
|
26
|
+
"type": "git",
|
|
27
|
+
"url": "https://github.com/jiangood/open-admin"
|
|
28
|
+
},
|
|
25
29
|
"description": "open-admin",
|
|
26
30
|
"files": [
|
|
27
31
|
"src/*",
|
|
@@ -34,5 +38,5 @@
|
|
|
34
38
|
"dev": "umi dev",
|
|
35
39
|
"build": "umi build"
|
|
36
40
|
},
|
|
37
|
-
"version": "2.
|
|
41
|
+
"version": "2.2.4"
|
|
38
42
|
}
|