UNPKG

@kfl-ui/utils

Version:

Vue 工具集合,包含自动路由生成器

19 lines (16 loc) 481 B
import { Router } from 'vue-router'; interface PageConfig { title?: string; icon?: string; meta?: any; redirect?: string; requiresAuth?: boolean; children?: { path: string; name: string; meta?: any; }[]; [key: string]: any; } declare function createRouterFromGlobs(pages: Record<string, PageConfig>, components: Record<string, () => Promise<any>>, base?: string): Router; export { type PageConfig, createRouterFromGlobs };