From b0357e9fdbe52362bba3a9fe087cc0a23454db80 Mon Sep 17 00:00:00 2001 From: izumiiAoba <39220621+izumiiAoba@users.noreply.github.com> Date: Wed, 26 Jul 2023 16:22:36 +0800 Subject: [PATCH] =?UTF-8?q?fix(plugin-layout):=20=E4=BF=AE=E5=A4=8D=20Menu?= =?UTF-8?q?=E3=80=81CustomNaviGuard=20=E7=B1=BB=E5=9E=8B=20(#204)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/fes-plugin-layout/types.d.ts | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/fes-plugin-layout/types.d.ts b/packages/fes-plugin-layout/types.d.ts index 880878b5..cefee502 100644 --- a/packages/fes-plugin-layout/types.d.ts +++ b/packages/fes-plugin-layout/types.d.ts @@ -1,5 +1,6 @@ import { Component, VNode, Ref } from 'vue'; -import { Router, RouteLocationNormalized, NavigationGuardNext, NavigationGuardReturn, NavigationGuard } from 'vue-router'; +import { Router, RouteLocationNormalized, NavigationGuardNext, NavigationGuard } from 'vue-router'; +import { MenuOption } from '@fesjs/fes-design/es/menu/interface'; interface CustomNavigationGuardOption { router: Router; @@ -9,15 +10,15 @@ interface CustomNavigationGuardOption { } interface CustomNavigationGuard { - (option: CustomNavigationGuardOption): NavigationGuardReturn | Promise; + (option: CustomNavigationGuardOption): ReturnType; } interface Menu { - name: string; - path: string; - match: string[]; - title: string; - icon: string | Component; + name?: string; + path?: string; + match?: string[]; + title?: MenuOption['label']; + icon?: string | Component; children?: Menu[]; }