@umijs/plugins 4.6.1 → 4.6.3
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 +9 -4
- package/package.json +4 -4
package/dist/layout.js
CHANGED
|
@@ -66,8 +66,13 @@ var layout_default = (api) => {
|
|
|
66
66
|
} catch (e) {
|
|
67
67
|
}
|
|
68
68
|
const packageName = api.pkg.name || "plugin-layout";
|
|
69
|
-
const
|
|
70
|
-
|
|
69
|
+
const isModern = import_plugin_utils.semver.satisfies(
|
|
70
|
+
antdVersion,
|
|
71
|
+
"^5.0.0 || ^6.0.0",
|
|
72
|
+
// 两者都还在维护周期中,允许使用预发布版本. eg. 6.1.0-alpha.0
|
|
73
|
+
{ includePrerelease: true }
|
|
74
|
+
);
|
|
75
|
+
const layoutFile = isModern ? "Layout.css" : "Layout.less";
|
|
71
76
|
api.describe({
|
|
72
77
|
key: "layout",
|
|
73
78
|
config: {
|
|
@@ -547,8 +552,8 @@ export function getRightRenderContent (opts: {
|
|
|
547
552
|
api.writeTmpFile({
|
|
548
553
|
path: layoutFile,
|
|
549
554
|
content: `
|
|
550
|
-
${// antd@5里面没有这个样式了
|
|
551
|
-
|
|
555
|
+
${// antd@5、@6 里面没有这个样式了
|
|
556
|
+
isModern ? "" : "@import '~antd/es/style/themes/default.less';"}
|
|
552
557
|
@media screen and (max-width: 480px) {
|
|
553
558
|
/* 在小屏幕的时候可以有更好的体验 */
|
|
554
559
|
.umi-plugin-layout-container {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umijs/plugins",
|
|
3
|
-
"version": "4.6.
|
|
3
|
+
"version": "4.6.3",
|
|
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",
|
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
"styled-components": "6.1.1",
|
|
46
46
|
"tslib": "^2",
|
|
47
47
|
"warning": "^4.0.3",
|
|
48
|
-
"@umijs/
|
|
49
|
-
"@umijs/
|
|
48
|
+
"@umijs/bundler-utils": "4.6.3",
|
|
49
|
+
"@umijs/valtio": "1.0.4"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"antd": "^4.24.1",
|
|
53
|
-
"umi": "4.6.
|
|
53
|
+
"umi": "4.6.3"
|
|
54
54
|
},
|
|
55
55
|
"publishConfig": {
|
|
56
56
|
"access": "public"
|