Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

activeMatch只生效于展开菜单内 #4163

Open
4 tasks done
BlazeSnow opened this issue Aug 27, 2024 · 1 comment
Open
4 tasks done

activeMatch只生效于展开菜单内 #4163

BlazeSnow opened this issue Aug 27, 2024 · 1 comment
Labels
bug: pending triage Maybe a bug, waiting for confirmation

Comments

@BlazeSnow
Copy link

Describe the bug

效果图如下

侧边栏选中第一个条目时,activeMatch正常显示于展开菜单以及导航栏

1

选中第二个及以后的条目时,activeMatch正常显示于展开菜单,但是不显示于导航栏

2

Reproduction

个人测试

经过测试,此现象与ASCII字符无关,使用/test/index.md/test/test.md也会出现此现象

源代码

nav

{

                text: '关于',

                items: [

                    {

                        text: '更新日志',

                        link: '/更新日志/',

                        activeMatch: '/更新日志/'

                    },

                    {

                        text: '关于本站',

                        link: '/about'

                    }

                ]

            }

sidebar

'/更新日志/': [

                {

                    text: '更新日志',

                    items: [

                        { text: '2024年8月', link: '/更新日志/' },

                        { text: '2024年7月', link: '/更新日志/2024年7月' },

                        { text: '2024年6月', link: '/更新日志/2024年6月' },

                        { text: '2024年5月', link: '/更新日志/2024年5月' },

                    ]

                }

            ],

Expected behavior

侧边栏选中任何条目时,activeMatch正常显示于展开菜单以及导航栏

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (20) x64 12th Gen Intel(R) Core(TM) i7-12700H
    Memory: 7.42 GB / 15.69 GB
  Binaries:
    Node: 22.6.0 - C:\Program Files\nodejs\node.EXE
    npm: 10.8.2 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Chromium (127.0.2651.74)
    Internet Explorer: 11.0.22621.3527
  npmPackages:
    vitepress: ^1.3.4 => 1.3.4

Additional context

No response

Validations

@BlazeSnow BlazeSnow added the bug: pending triage Maybe a bug, waiting for confirmation label Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: pending triage Maybe a bug, waiting for confirmation
Projects
None yet
Development

No branches or pull requests

9 participants
@BlazeSnow and others