From 998531f8785c35d2c958752569ff5608be88dcc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=87=E7=BA=AF?= Date: Wed, 3 Mar 2021 19:45:48 +0800 Subject: [PATCH] =?UTF-8?q?feat(plugin-access):=20=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E8=B7=AF=E7=94=B1=E5=88=87=E6=8D=A2=E6=97=B6=E6=97=A0=E6=9D=83?= =?UTF-8?q?=E9=99=90=E7=9A=84=E5=A4=84=E7=90=86=EF=BC=9A=E5=AD=98=E5=9C=A8?= =?UTF-8?q?=E5=A4=84=E7=90=86=E5=99=A8=E6=97=B6=E4=B8=8D=E9=BB=98=E8=AE=A4?= =?UTF-8?q?next(false)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/fes-plugin-access/src/runtime/runtime.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/fes-plugin-access/src/runtime/runtime.js b/packages/fes-plugin-access/src/runtime/runtime.js index 85da5720..01d19641 100644 --- a/packages/fes-plugin-access/src/runtime/runtime.js +++ b/packages/fes-plugin-access/src/runtime/runtime.js @@ -19,9 +19,12 @@ export function onRouterCreated({ router }) { initialValue: {} }); if (runtimeConfig.noAccessHandler && typeof runtimeConfig.noAccessHandler === 'function') { - runtimeConfig.noAccessHandler(router, to, from); + runtimeConfig.noAccessHandler({ + router, to, from, next + }); + } else { + next(false); } - next(false); } }); }