Skip to content

route alias causes activeClass not working properly #30340

Open
@a1mersnow

Description

Environment

  • Operating System: Darwin
  • Node Version: v20.10.0
  • Nuxt Version: 3.14.1592
  • CLI Version: 3.16.0
  • Nitro Version: 2.10.4
  • Package Manager: pnpm@9.12.1
  • Builder: -
  • User Config: default
  • Runtime Modules: @unocss/nuxt@0.65.2, @nuxt/eslint@0.7.3, @nuxt/icon@1.10.2, @nuxt/image@1.8.1, @vueuse/nuxt@12.0.0
  • Build Modules: -

Reproduction

https://stackblitz.com/edit/github-xyfrn9ic?file=pages%2Fparent%2Fchild1.vue

Describe the bug

Before I define an alias for /parent in child1.vue, whether I navigate to /parent/child1 or /parent/child2, the /parent link will be active.

However, after I define the alias, when I navigate to /parent/child2, the /parent link will not be active.

Additional context

I tested this behavior with vue-router, which works normally. I guess this is an issue with nuxt.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions