From 61fa8be45ecc3b85854f99ba6cc86a0954f8807a Mon Sep 17 00:00:00 2001 From: izumiiAoba <39220621+izumiiAoba@users.noreply.github.com> Date: Tue, 1 Aug 2023 16:06:50 +0800 Subject: [PATCH] =?UTF-8?q?fix(plugin-access):=20=E8=A1=A5=E5=85=85=20Runt?= =?UTF-8?q?imeConfig['access']=20=E5=AD=97=E6=AE=B5=20(#205)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/fes-plugin-access/types.d.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/fes-plugin-access/types.d.ts b/packages/fes-plugin-access/types.d.ts index 3e874b2f..57f5e39f 100644 --- a/packages/fes-plugin-access/types.d.ts +++ b/packages/fes-plugin-access/types.d.ts @@ -1,4 +1,4 @@ -import { Router, RouteLocationNormalized, NavigationGuardNext, NavigationGuardReturn, NavigationGuard } from 'vue-router'; +import { Router, RouteLocationNormalized, NavigationGuardNext, NavigationGuard } from 'vue-router'; import { Ref } from 'vue'; export const access: { @@ -19,7 +19,7 @@ interface CustomNavigationGuardOption { } interface CustomNavigationGuard { - (option: CustomNavigationGuardOption): NavigationGuardReturn | Promise; + (option: CustomNavigationGuardOption): ReturnType; } declare module '@fesjs/fes' { @@ -33,8 +33,9 @@ declare module '@fesjs/fes' { interface PluginRuntimeConfig { access?: { - noFoundHandler: NavigationGuard; - unAccessHandler: CustomNavigationGuard; + noFoundHandler?: CustomNavigationGuard; + unAccessHandler?: CustomNavigationGuard; + ignoreAccess?: string[]; }; } }