antfu / vitesse

🏕 Opinionated Vite + Vue Starter Template

Home Page:https://vitesse.netlify.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Two route records for one real route

ShroXd opened this issue · comments

Overview

When I check the value of useRouter().getRoutes(), I found there are two record for one real route. They are similar, but some fields have different values.

image

Necessary Information

Repetition step

  1. Clone the vitesse
  2. Open the src/pages/index.vue
  3. Add following code:
// ...

const router = useRouter()
const go = () => {
  if (name.value)
    router.push(`/hi/${encodeURIComponent(name.value)}`)
}

// Add this line
console.log(router.getRoutes())

// ...
  1. Run the project, check the console tab of browser

Thank you for any help!! I almost punch my screen