@umijs/plugins 4.0.0-rc.11 → 4.0.0-rc.12
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/access.js +3 -3
- package/dist/initial-state.js +1 -1
- package/package.json +7 -7
package/dist/access.js
CHANGED
|
@@ -45,9 +45,9 @@ export function accessProvider(container) {
|
|
|
45
45
|
}
|
|
46
46
|
`,
|
|
47
47
|
});
|
|
48
|
-
// index.
|
|
48
|
+
// index.tsx
|
|
49
49
|
api.writeTmpFile({
|
|
50
|
-
path: 'index.
|
|
50
|
+
path: 'index.tsx',
|
|
51
51
|
content: `
|
|
52
52
|
import React from 'react';
|
|
53
53
|
import { AccessContext } from './context';
|
|
@@ -66,7 +66,7 @@ export const Access: React.FC<AccessProps> = (props) => {
|
|
|
66
66
|
throw new Error('[access] the \`accessible\` property on <Access /> should be a boolean');
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
return props.accessible ? props.children : props.fallback
|
|
69
|
+
return <>{ props.accessible ? props.children : props.fallback }</>;
|
|
70
70
|
};
|
|
71
71
|
|
|
72
72
|
export const useAccessMarkedRoutes = (routes: IRoute[]) => {
|
package/dist/initial-state.js
CHANGED
|
@@ -31,7 +31,7 @@ import React from 'react';
|
|
|
31
31
|
import { useModel } from '@@/plugin-model';
|
|
32
32
|
${loading
|
|
33
33
|
? `import Loading from '${loading}'`
|
|
34
|
-
: `function Loading() { return <div
|
|
34
|
+
: `function Loading() { return <div />; }`}
|
|
35
35
|
export default function InitialStateProvider(props: any) {
|
|
36
36
|
const appLoaded = React.useRef(false);
|
|
37
37
|
const { loading = false } = useModel("@@initialState") || {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umijs/plugins",
|
|
3
|
-
"version": "4.0.0-rc.
|
|
3
|
+
"version": "4.0.0-rc.12",
|
|
4
4
|
"description": "@umijs/plugins",
|
|
5
5
|
"homepage": "https://github.com/umijs/umi-next/tree/master/packages/plugins#readme",
|
|
6
6
|
"bugs": "https://github.com/umijs/umi-next/issues",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@ahooksjs/use-request": "^2.0.0",
|
|
26
26
|
"@ant-design/icons": "^4.7.0",
|
|
27
|
-
"@ant-design/pro-layout": "^6.34.
|
|
28
|
-
"@umijs/bundler-utils": "4.0.0-rc.
|
|
27
|
+
"@ant-design/pro-layout": "^6.34.9",
|
|
28
|
+
"@umijs/bundler-utils": "4.0.0-rc.12",
|
|
29
29
|
"antd-dayjs-webpack-plugin": "^1.0.6",
|
|
30
30
|
"axios": "^0.26.1",
|
|
31
31
|
"babel-plugin-import": "^1.13.3",
|
|
@@ -36,15 +36,15 @@
|
|
|
36
36
|
"event-emitter": "~0.3.5",
|
|
37
37
|
"fast-deep-equal": "3.1.3",
|
|
38
38
|
"lodash": "^4.17.21",
|
|
39
|
-
"moment": "^2.29.
|
|
40
|
-
"qiankun": "^2.
|
|
39
|
+
"moment": "^2.29.2",
|
|
40
|
+
"qiankun": "^2.7.0",
|
|
41
41
|
"react-intl": "3.12.1",
|
|
42
|
-
"react-redux": "^7.2.
|
|
42
|
+
"react-redux": "^7.2.8",
|
|
43
43
|
"redux": "^4.1.2",
|
|
44
44
|
"warning": "^4.0.3"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"umi": "4.0.0-rc.
|
|
47
|
+
"umi": "4.0.0-rc.12"
|
|
48
48
|
},
|
|
49
49
|
"publishConfig": {
|
|
50
50
|
"access": "public"
|