mirror of
https://github.com/WeBankFinTech/fes.js.git
synced 2025-04-06 03:59:53 +08:00
feat: 优化plugin-layout对没有权限的处理
This commit is contained in:
parent
74233961d2
commit
7be71341f7
@ -1,4 +1,5 @@
|
|||||||
import { plugin, ApplyPluginsType } from '@@/core/coreExports';
|
import { plugin, ApplyPluginsType } from '@@/core/coreExports';
|
||||||
|
// eslint-disable-next-line import/extensions
|
||||||
import { access as accessApi } from '../plugin-access/core';
|
import { access as accessApi } from '../plugin-access/core';
|
||||||
import Exception404 from './views/404';
|
import Exception404 from './views/404';
|
||||||
import Exception403 from './views/403';
|
import Exception403 from './views/403';
|
||||||
@ -25,7 +26,7 @@ const handle = (type, router) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export const access = {
|
export const access = memo => ({
|
||||||
unAccessHandler({
|
unAccessHandler({
|
||||||
router, to, from, next
|
router, to, from, next
|
||||||
}) {
|
}) {
|
||||||
@ -65,5 +66,6 @@ export const access = {
|
|||||||
}
|
}
|
||||||
handle(404, router);
|
handle(404, router);
|
||||||
next('/404');
|
next('/404');
|
||||||
}
|
},
|
||||||
};
|
...memo
|
||||||
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user