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

chore: Nav 组件调用 isCurrentUrl 传递菜单信息 #6899

Merged
merged 1 commit into from
May 16, 2023

Conversation

2betop
Copy link
Collaborator

@2betop 2betop commented May 16, 2023

What

🤖 Generated by Copilot at 0f104dd

This pull request enhances the Nav renderer to allow links to open in new windows. It updates the logic for finding and highlighting the active link or child based on the jumpOut property.

🤖 Generated by Copilot at 0f104dd

Oh, we're the coders of the Nav renderer
And we like to make our links more clever
We added a jumpOut property
To open them in a new window, you see

Why

How

🤖 Generated by Copilot at 0f104dd

  • Add link argument to env.isCurrentUrl function call to check link's jumpOut property for active state (link)
  • Add link argument to findIndex function call to find active index of navs array based on link's jumpOut property (link)
  • Add item argument to findTree function call to find active child of link object based on child's jumpOut property (link)

@github-actions github-actions bot added the chore label May 16, 2023
@github-actions
Copy link

👍 Thanks for this!
🏷 I have applied any labels matching special text in your issue.

Please review the labels and make any necessary changes.

@2betop 2betop merged commit 47762b7 into baidu:master May 16, 2023
5 checks passed
@2betop 2betop deleted the chore-nav branch July 4, 2023 02:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants