37 lines
735 B
TypeScript
Raw Normal View History

2023-04-02 01:01:56 +08:00
import { RouteRecordRaw } from 'vue-router';
declare module 'vue-router' {
2023-06-06 20:55:23 +08:00
declare type RouteOption = {
2023-04-03 00:05:09 +08:00
hidden?: boolean;
permissions?: string[];
roles?: string[];
component?: any;
children?: RouteOption[];
alwaysShow?: boolean;
parentPath?: string;
meta?: {
title: string;
icon: string;
};
query?: string;
2023-04-03 00:05:09 +08:00
} & RouteRecordRaw;
2023-04-02 01:01:56 +08:00
2023-06-06 20:55:23 +08:00
declare interface _RouteLocationBase {
2023-04-03 00:05:09 +08:00
children?: RouteOption[];
}
2023-04-02 01:01:56 +08:00
2023-06-06 20:55:23 +08:00
declare interface RouteLocationOptions {
2023-04-03 00:05:09 +08:00
fullPath?: string;
}
2023-04-02 01:01:56 +08:00
2023-06-06 20:55:23 +08:00
declare interface TagView extends Partial<_RouteLocationBase> {
2023-04-03 00:05:09 +08:00
title?: string;
meta?: {
link?: string;
title?: string;
affix?: boolean;
noCache?: boolean;
};
}
2023-04-02 01:01:56 +08:00
}