router

Generates src/router/index.ts with Vue Router configuration, hash-based routing, and navigation guards for route protection.

📖 中文导读:Generates src/router/index.ts with Vue Router configuration, hash-based routing, and navigation guards for route protection. 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。

name: router description: Generates src/router/index.ts with Vue Router configuration, hash-based routing, and navigation guards for route protection.

Router Skill

Purpose

Generate the src/router/index.ts file with Vue Router configuration and navigation guards.

Output

Create the file: src/router/index.ts

Notes

  • Uses hash-based routing
  • Implements a navigation guards for example of usage
  • Create 2 routes for home screen and page not found screen. If the view components skill mentions other files, create route for those files instead.
  • All pages expect page not found page should have navigation guards.