fix(plugin-layout): 修复 Menu、CustomNaviGuard 类型 (#204)

This commit is contained in:
izumiiAoba 2023-07-26 16:22:36 +08:00 committed by GitHub
parent 8b409f8f10
commit 7e3c8975c6

View File

@ -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<NavigationGuardReturn>;
(option: CustomNavigationGuardOption): ReturnType<NavigationGuard>;
}
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[];
}