-
Notifications
You must be signed in to change notification settings - Fork 7.2k
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
fix: activePath not working in menu, fixed: #4112 #4113
Conversation
|
WalkthroughThe recent updates enhance the logic of determining the active menu item in the application. By prioritizing Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Router
participant MenuComponent
User->>Router: Navigate to a route
Router->>MenuComponent: Update route information
MenuComponent->>MenuComponent: Check active path
MenuComponent->>MenuComponent: Set active menu item based on `route.meta?.activePath`
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- packages/effects/layouts/src/basic/menu/extra-menu.vue (1 hunks)
- packages/effects/layouts/src/basic/menu/use-extra-menu.ts (1 hunks)
- packages/effects/layouts/src/basic/menu/use-mixed-menu.ts (1 hunks)
Additional comments not posted (3)
packages/effects/layouts/src/basic/menu/extra-menu.vue (1)
33-33
: LGTM! Verify the impact on the UI.The change to use
route.meta?.activePath || route.path
fordefault-active
is a sound improvement. It allows for more flexible route handling. Ensure that this change does not introduce any unexpected behavior in the UI.packages/effects/layouts/src/basic/menu/use-extra-menu.ts (1)
84-84
: LGTM! Verify the impact on routing logic.The change to use
route.meta?.activePath || path
forcurrentPath
enhances the routing context. It should improve the handling of active paths. Ensure that this change does not introduce any unexpected behavior in the routing logic.packages/effects/layouts/src/basic/menu/use-mixed-menu.ts (1)
116-116
: LGTM! Verify the impact on side menu calculation.The change to use
route.meta?.activePath || route.path
incalcSideMenus
is a sound improvement. It should enhance the calculation of side menus. Ensure that this change does not introduce any unexpected behavior in the side menu logic.
Description
修复路由元数据中的activePath不起作用的问题。
该问题导致切换到使用了hideInMenu的路由时,混合菜单和和双列菜单会出现空白的现象。
Type of change
Please delete options that are not relevant.
Summary by CodeRabbit