/* * @Author: 李佐宁 lizuoning@yuan-info.com * @Date: 2022-07-11 17:35:04 * @LastEditors: 李佐宁 lizuoning@yuan-info.com * @LastEditTime: 2022-07-22 10:35:43 * @FilePath: \safe-product-authority-browser\src\router\types.ts * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE */ import type { RouteRecordRaw, RouteMeta } from "vue-router"; import { defineComponent } from "vue"; export type Component = | ReturnType | (() => Promise) | (() => Promise); // @ts-ignore export interface AppRouteRecordRaw extends Omit { name: string; meta?: RouteMeta; component?: Component | string; components?: Component; children?: AppRouteRecordRaw[]; props?: Recordable; fullPath?: string; } export interface MenuTag { type?: "primary" | "error" | "warn" | "success"; content?: string; dot?: boolean; } export interface Menu { name: string; icon?: string; path: string; // path contains param, auto assignment. paramPath?: string; disabled?: boolean; children?: Menu[]; orderNo?: number; // roles?: RoleEnum[]; meta?: Partial; tag?: MenuTag; hideMenu?: boolean; } export interface MenuModule { orderNo?: number; menu: Menu; } export type AppRouteModule = AppRouteRecordRaw;