vue-router-best-practices

Vue Router 最佳实践、常见陷阱和导航模式。

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "vue-router-best-practices" with this command: npx skills add hello-lizhihua/skills_zh-cn/hello-lizhihua-skills-zh-cn-vue-router-best-practices

Vue Router 最佳实践、常见陷阱和导航模式。

导航守卫

  • 在具有不同参数的同一路由之间导航 → 参见 router-beforeenter-no-param-trigger

  • 在 beforeRouteEnter 守卫中访问组件实例 → 参见 router-beforerouteenter-no-this

  • 导航守卫在不等待的情况下进行 API 调用 → 参见 router-guard-async-await-pattern

  • 用户陷入无限重定向循环 → 参见 router-navigation-guard-infinite-loop

  • 导航守卫使用已弃用的 next() 函数 → 参见 router-navigation-guard-next-deprecated

路由生命周期

  • 在同一路由之间导航时数据陈旧 → 参见 router-param-change-no-lifecycle

  • 组件卸载后事件监听器仍然存在 → 参见 router-simple-routing-cleanup

设置

  • 构建生产单页应用程序 → 参见 router-use-vue-router-for-production

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

vue-best-practices

No summary provided by upstream source.

Repository SourceNeeds Review
General

vue-options-api-best-practices

No summary provided by upstream source.

Repository SourceNeeds Review
General

vue-jsx-best-practices

No summary provided by upstream source.

Repository SourceNeeds Review
General

vue-pinia-best-practices

No summary provided by upstream source.

Repository SourceNeeds Review