关于 vue-router-v3
面向 Vue 2 项目的 Vue Router v3 技能,按指南和 API 文档提供安装、路由配置与导航相关参考,内容对应 v3 官方文档。
主要功能
- 01安装配置参考
- 02动态与嵌套路由指南
- 03导航、命名路由和视图
- 04导航守卫与路由元信息
- 05历史模式与懒加载
- 06API 文档映射
适用场景
- 01为 Vue 2 应用配置路由
- 02实现导航守卫
- 03设置历史模式或懒加载路由
- 04查阅 Vue Router v3 API
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ partme-ai/ full-stack-skills --skill vue-router-v3安装后在 Claude Code 中输入/vue-router-v3确认已加载。
包含的文件
除 SKILL.md 外,安装时一起下载的参考资料和脚本。
api/navigation-guards.mdroute-config.mdroute-object.mdrouter-instance.mdrouter-link.mdrouter-options.mdrouter-view.mdexamples/installation.mdexamples/guide/index.mdexamples/guide/advanced/data-fetching.mdlazy-loading.mdmeta.mdnavigation-failures.mdnavigation-guards.mdscroll-behavior.mdtransitions.mdexamples/guide/essentials/dynamic-matching.mdhistory-mode.mdnamed-routes.mdnamed-views.mdnavigation.mdnested-routes.mdpassing-props.mdredirect-and-alias.mdtemplates/route-config.mdrouter-config.md详细介绍
适用场景
当用户希望执行以下操作时,请使用此技能:
- 安装并配置 Vue Router v3
- 为 Vue 2 应用实现路由模式
- 使用导航守卫、history 模式或路由懒加载
- 查阅 Vue Router v3 API 详情
使用方法
- 确定主题:根据用户的请求判断主题。
- 打开匹配的指南示例:在
examples/中打开对应文件。 - 查阅 API 详情:在
api/中打开对应文件。 - 遵循官方指南:确保输出与 v3 文档保持一致。
安装映射
examples/installation.md→ https://v3.router.vuejs.org/installation.html
指南映射(一一对应 https://v3.router.vuejs.org/guide/)
基础内容
examples/guide/index.md→ https://v3.router.vuejs.org/guide/examples/guide/essentials/dynamic-matching.md→ https://v3.router.vuejs.org/guide/essentials/dynamic-matching.htmlexamples/guide/essentials/nested-routes.md→ https://v3.router.vuejs.org/guide/essentials/nested-routes.htmlexamples/guide/essentials/navigation.md→ https://v3.router.vuejs.org/guide/essentials/navigation.htmlexamples/guide/essentials/named-routes.md→ https://v3.router.vuejs.org/guide/essentials/named-routes.htmlexamples/guide/essentials/named-views.md→ https://v3.router.vuejs.org/guide/essentials/named-views.htmlexamples/guide/essentials/redirect-and-alias.md→ https://v3.router.vuejs.org/guide/essentials/redirect-and-alias.htmlexamples/guide/essentials/passing-props.md→ https://v3.router.vuejs.org/guide/essentials/passing-props.htmlexamples/guide/essentials/history-mode.md→ https://v3.router.vuejs.org/guide/essentials/history-mode.html
进阶内容
examples/guide/advanced/navigation-guards.md→ https://v3.router.vuejs.org/guide/advanced/navigation-guards.htmlexamples/guide/advanced/meta.md→ https://v3.router.vuejs.org/guide/advanced/meta.htmlexamples/guide/advanced/transitions.md→ https://v3.router.vuejs.org/guide/advanced/transitions.htmlexamples/guide/advanced/data-fetching.md→ https://v3.router.vuejs.org/guide/advanced/data-fetching.htmlexamples/guide/advanced/scroll-behavior.md→ https://v3.router.vuejs.org/guide/advanced/scroll-behavior.htmlexamples/guide/advanced/lazy-loading.md→ https://v3.router.vuejs.org/guide/advanced/lazy-loading.htmlexamples/guide/advanced/navigation-failures.md→ https://v3.router.vuejs.org/guide/advanced/navigation-failures.html
API 映射(一一对应 https://v3.router.vuejs.org/api/)
api/router-link.md→ https://v3.router.vuejs.org/api/#router-linkapi/router-view.md→ https://v3.router.vuejs.org/api/#router-viewapi/router-instance.md→ https://v3.router.vuejs.org/api/#router-instanceapi/router-options.md→ https://v3.router.vuejs.org/api/#router-optionsapi/route-object.md→ https://v3.router.vuejs.org/api/#the-route-objectapi/route-config.md→ https://v3.router.vuejs.org/api/#routesapi/navigation-guards.md→ https://v3.router.vuejs.org/api/#navigation-guards
资源
- 安装:https://v3.router.vuejs.org/installation.html
- 指南:https://v3.router.vuejs.org/guide/
- API:https://v3.router.vuejs.org/api/
关键词
vue-router v3、vue 2 router、路由、导航守卫、history 模式、router-link、router-view、路由配置、路由对象
评论
支持 Markdown