@umijs/plugins 4.0.17 → 4.0.18
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/dist/layout.js +14 -10
- package/dist/qiankun/slave.js +1 -1
- package/package.json +4 -4
package/dist/layout.js
CHANGED
|
@@ -53,7 +53,11 @@ var layout_default = (api) => {
|
|
|
53
53
|
},
|
|
54
54
|
enableBy: api.EnableBy.config
|
|
55
55
|
});
|
|
56
|
-
const depList = [
|
|
56
|
+
const depList = [
|
|
57
|
+
"@alipay/tech-ui",
|
|
58
|
+
"@ant-design/pro-components",
|
|
59
|
+
"@ant-design/pro-layout"
|
|
60
|
+
];
|
|
57
61
|
const pkgHasDep = depList.find((dep) => {
|
|
58
62
|
var _a, _b;
|
|
59
63
|
const { pkg } = api;
|
|
@@ -70,7 +74,7 @@ var layout_default = (api) => {
|
|
|
70
74
|
if (pkgHasDep && api.cwd !== cwd && (0, import_fs.existsSync)((0, import_path.join)(cwd, "node_modules", pkgHasDep, "package.json"))) {
|
|
71
75
|
return (0, import_path.join)(cwd, "node_modules", pkgHasDep);
|
|
72
76
|
}
|
|
73
|
-
return (0, import_path.dirname)(require.resolve("@ant-design/pro-
|
|
77
|
+
return (0, import_path.dirname)(require.resolve("@ant-design/pro-components/package.json"));
|
|
74
78
|
};
|
|
75
79
|
const pkgPath = (0, import_plugin_utils.winPath)(getPkgPath());
|
|
76
80
|
api.modifyAppData((memo) => {
|
|
@@ -83,7 +87,8 @@ var layout_default = (api) => {
|
|
|
83
87
|
});
|
|
84
88
|
api.modifyConfig((memo) => {
|
|
85
89
|
if (!pkgHasDep) {
|
|
86
|
-
|
|
90
|
+
const name = require(`${pkgPath}/package.json`).name;
|
|
91
|
+
memo.alias[name] = pkgPath;
|
|
87
92
|
}
|
|
88
93
|
return memo;
|
|
89
94
|
});
|
|
@@ -97,7 +102,7 @@ import type { IRoute } from 'umi';
|
|
|
97
102
|
import React, { useMemo } from 'react';
|
|
98
103
|
import {
|
|
99
104
|
ProLayout,
|
|
100
|
-
} from "${pkgPath || "@ant-design/pro-
|
|
105
|
+
} from "${pkgPath || "@ant-design/pro-components"}";
|
|
101
106
|
import './Layout.less';
|
|
102
107
|
import Logo from './Logo';
|
|
103
108
|
import Exception from './Exception';
|
|
@@ -259,7 +264,7 @@ const { formatMessage } = useIntl();
|
|
|
259
264
|
api.writeTmpFile({
|
|
260
265
|
path: "types.d.ts",
|
|
261
266
|
content: `
|
|
262
|
-
import type { ProLayoutProps, HeaderProps } from "${pkgPath || "@ant-design/pro-
|
|
267
|
+
import type { ProLayoutProps, HeaderProps } from "${pkgPath || "@ant-design/pro-components"}";
|
|
263
268
|
${hasInitialStatePlugin ? `import type InitialStateType from '@@/plugin-initialState/@@initialState';
|
|
264
269
|
type InitDataType = ReturnType<typeof InitialStateType>;
|
|
265
270
|
` : "type InitDataType = any;"}
|
|
@@ -439,8 +444,7 @@ export function getRightRenderContent (opts: {
|
|
|
439
444
|
path: "Layout.less",
|
|
440
445
|
content: `
|
|
441
446
|
${antdVersion.startsWith("5") ? "" : "@import '~antd/es/style/themes/default.less';"}
|
|
442
|
-
@
|
|
443
|
-
@media screen and (max-width: @screen-xs) {
|
|
447
|
+
@media screen and (max-width: 480px) {
|
|
444
448
|
// \u5728\u5C0F\u5C4F\u5E55\u7684\u65F6\u5019\u53EF\u4EE5\u6709\u66F4\u597D\u7684\u4F53\u9A8C
|
|
445
449
|
.umi-plugin-layout-container {
|
|
446
450
|
width: 100% !important;
|
|
@@ -471,14 +475,14 @@ ${antdVersion.startsWith("5") ? "" : "@import '~antd/es/style/themes/default.les
|
|
|
471
475
|
cursor: pointer;
|
|
472
476
|
transition: all 0.3s;
|
|
473
477
|
> i {
|
|
474
|
-
color:
|
|
478
|
+
color: rgba(255, 255, 255, 0.85);
|
|
475
479
|
vertical-align: middle;
|
|
476
480
|
}
|
|
477
481
|
&:hover {
|
|
478
|
-
background:
|
|
482
|
+
background: rgba(0, 0, 0, 0.025);
|
|
479
483
|
}
|
|
480
484
|
&:global(.opened) {
|
|
481
|
-
background:
|
|
485
|
+
background: rgba(0, 0, 0, 0.025);
|
|
482
486
|
}
|
|
483
487
|
}
|
|
484
488
|
.umi-plugin-layout-search {
|
package/dist/qiankun/slave.js
CHANGED
|
@@ -25,7 +25,7 @@ __export(slave_exports, {
|
|
|
25
25
|
default: () => slave_default
|
|
26
26
|
});
|
|
27
27
|
module.exports = __toCommonJS(slave_exports);
|
|
28
|
-
var import_http_proxy_middleware = require("@umijs/bundler-
|
|
28
|
+
var import_http_proxy_middleware = require("@umijs/bundler-utils/compiled/http-proxy-middleware");
|
|
29
29
|
var import_utils = require("@umijs/utils");
|
|
30
30
|
var import_assert = __toESM(require("assert"));
|
|
31
31
|
var import_fs = require("fs");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umijs/plugins",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.18",
|
|
4
4
|
"description": "@umijs/plugins",
|
|
5
5
|
"homepage": "https://github.com/umijs/umi/tree/master/packages/plugins#readme",
|
|
6
6
|
"bugs": "https://github.com/umijs/umi/issues",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"@ahooksjs/use-request": "^2.0.0",
|
|
27
27
|
"@ant-design/antd-theme-variable": "^1.0.0",
|
|
28
28
|
"@ant-design/icons": "^4.7.0",
|
|
29
|
-
"@ant-design/pro-
|
|
30
|
-
"@umijs/bundler-utils": "4.0.
|
|
29
|
+
"@ant-design/pro-components": "^2.0.1",
|
|
30
|
+
"@umijs/bundler-utils": "4.0.18",
|
|
31
31
|
"antd-dayjs-webpack-plugin": "^1.0.6",
|
|
32
32
|
"axios": "^0.27.2",
|
|
33
33
|
"babel-plugin-import": "^1.13.5",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"warning": "^4.0.3"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"umi": "4.0.
|
|
49
|
+
"umi": "4.0.18"
|
|
50
50
|
},
|
|
51
51
|
"publishConfig": {
|
|
52
52
|
"access": "public"
|