Files
Web_Template_Vue3_Dev/AI-Coding/openspec-lite/modules/router.yaml

38 lines
1.2 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Module Specrouter路由与权限守卫
module:
id: router
name: 路由与页面组织
entrypoints:
- src/router/index.ts
- src/router/permissions.ts
public_api:
exports:
- constantRoutes
- asyncRoutes
- setupPermissions(router)
usage_examples:
- "新增页面:在 src/views/<module>/ 添加 Vue 文件,并在 asyncRoutes 中挂载到 Layout children"
dependency_closure:
runtime:
- "routervue-routerbeforeEach/afterEach"
- "store-usertoken/getUserInfo/resetAll/setVirtualRoles"
- "store-routessetRoutes(authentication)"
- "store-settingstheme.showProgressBar"
- "configauthentication/loginInterception/routesWhiteList/supportVisit"
- "utils/pageTitlegetPageTitle(to.meta.title)"
- "utils/routestoLoginRoute"
- "nprogressVabProgress含 nprogress.css"
acceptance:
- "路由可跳转"
- "刷新后路由仍可恢复"
pitfalls:
- "如涉及权限/菜单,需同步 metatitle/icon/...);同时注意 routesWhiteList/loginInterception/authentication 等开关影响守卫逻辑"
- "permissions.ts 直接写 document.title若新项目改为 useHead 等方式需统一"