@umijs/plugins 4.0.30 → 4.0.31
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/antd.js +6 -0
- package/dist/layout.js +6 -3
- package/package.json +3 -3
package/dist/antd.js
CHANGED
|
@@ -154,6 +154,12 @@ export function rootContainer(container) {
|
|
|
154
154
|
prefixCls: \`\${finalConfig.prefixCls}-notification\`
|
|
155
155
|
});
|
|
156
156
|
}
|
|
157
|
+
if (finalConfig.iconPrefixCls) {
|
|
158
|
+
// Icons in message need to set iconPrefixCls via ConfigProvider.config()
|
|
159
|
+
ConfigProvider.config({
|
|
160
|
+
iconPrefixCls: finalConfig.iconPrefixCls,
|
|
161
|
+
});
|
|
162
|
+
}
|
|
157
163
|
return <ConfigProvider {...finalConfig}>{container}</ConfigProvider>;
|
|
158
164
|
}
|
|
159
165
|
`.trim(), {
|
package/dist/layout.js
CHANGED
|
@@ -93,10 +93,12 @@ var layout_default = (api) => {
|
|
|
93
93
|
return memo;
|
|
94
94
|
});
|
|
95
95
|
api.onGenerateFiles(() => {
|
|
96
|
+
const PKG_TYPE_REFERENCE = `/// <reference types="${pkgPath || "@ant-design/pro-components"}" />`;
|
|
96
97
|
const hasInitialStatePlugin = api.config.initialState;
|
|
97
98
|
api.writeTmpFile({
|
|
98
99
|
path: "Layout.tsx",
|
|
99
100
|
content: `
|
|
101
|
+
${PKG_TYPE_REFERENCE}
|
|
100
102
|
import { Link, useLocation, useNavigate, Outlet, useAppData, useRouteData, matchRoutes } from 'umi';
|
|
101
103
|
import type { IRoute } from 'umi';
|
|
102
104
|
import React, { useMemo } from 'react';
|
|
@@ -186,13 +188,13 @@ const { formatMessage } = useIntl();
|
|
|
186
188
|
},
|
|
187
189
|
});
|
|
188
190
|
|
|
189
|
-
|
|
191
|
+
|
|
190
192
|
// \u73B0\u5728\u7684 layout \u53CA wrapper \u5B9E\u73B0\u662F\u901A\u8FC7\u7236\u8DEF\u7531\u7684\u5F62\u5F0F\u5B9E\u73B0\u7684, \u4F1A\u5BFC\u81F4\u8DEF\u7531\u6570\u636E\u591A\u4E86\u5197\u4F59\u5C42\u7EA7, proLayout \u6D88\u8D39\u65F6, \u65E0\u6CD5\u6B63\u786E\u5C55\u793A\u83DC\u5355, \u8FD9\u91CC\u5BF9\u5197\u4F59\u6570\u636E\u8FDB\u884C\u8FC7\u6EE4\u64CD\u4F5C
|
|
191
193
|
const newRoutes = filterRoutes(clientRoutes.filter(route => route.id === 'ant-design-pro-layout'), (route) => {
|
|
192
194
|
return (!!route.isLayout && route.id !== 'ant-design-pro-layout') || !!route.isWrapper;
|
|
193
195
|
})
|
|
194
196
|
const [route] = useAccessMarkedRoutes(mapRoutes(newRoutes));
|
|
195
|
-
|
|
197
|
+
|
|
196
198
|
const matchedRoute = useMemo(() => matchRoutes(route.children, location.pathname)?.pop?.()?.route, [location.pathname]);
|
|
197
199
|
|
|
198
200
|
return (
|
|
@@ -274,6 +276,7 @@ const { formatMessage } = useIntl();
|
|
|
274
276
|
api.writeTmpFile({
|
|
275
277
|
path: "types.d.ts",
|
|
276
278
|
content: `
|
|
279
|
+
${PKG_TYPE_REFERENCE}
|
|
277
280
|
import type { ProLayoutProps, HeaderProps } from "${pkgPath || "@ant-design/pro-components"}";
|
|
278
281
|
${hasInitialStatePlugin ? `import type InitialStateType from '@@/plugin-initialState/@@initialState';
|
|
279
282
|
type InitDataType = ReturnType<typeof InitialStateType>;
|
|
@@ -306,7 +309,7 @@ const { formatMessage } = useIntl();
|
|
|
306
309
|
runtimeConfig: RunTimeLayoutConfig,
|
|
307
310
|
) => JSX.Element;
|
|
308
311
|
};
|
|
309
|
-
|
|
312
|
+
`.trimStart()
|
|
310
313
|
});
|
|
311
314
|
api.writeTmpFile({
|
|
312
315
|
path: import_umi.RUNTIME_TYPE_FILE_NAME,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umijs/plugins",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.31",
|
|
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",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@ant-design/antd-theme-variable": "^1.0.0",
|
|
28
28
|
"@ant-design/icons": "^4.7.0",
|
|
29
29
|
"@ant-design/pro-components": "^2.0.1",
|
|
30
|
-
"@umijs/bundler-utils": "4.0.
|
|
30
|
+
"@umijs/bundler-utils": "4.0.31",
|
|
31
31
|
"@umijs/valtio": "^1.0.0",
|
|
32
32
|
"antd-dayjs-webpack-plugin": "^1.0.6",
|
|
33
33
|
"axios": "^0.27.2",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"antd": "^4.24.1",
|
|
52
|
-
"umi": "4.0.
|
|
52
|
+
"umi": "4.0.31"
|
|
53
53
|
},
|
|
54
54
|
"publishConfig": {
|
|
55
55
|
"access": "public"
|