-
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: missing route data in guard of web-ele and web-naive, fixed: #41… #4117
Conversation
|
WalkthroughThe recent updates enhance the Changes
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 (2)
- apps/web-ele/src/router/guard.ts (1 hunks)
- apps/web-naive/src/router/guard.ts (1 hunks)
Additional comments not posted (2)
apps/web-ele/src/router/guard.ts (1)
118-121
: LGTM! Verify the usage ofredirectPath
.The changes ensure that the full path, including query parameters, is preserved during redirection. This aligns with the PR objectives.
However, verify that the
redirectPath
logic is correctly used throughout the codebase.Verification successful
Usage of
redirectPath
is consistent and correct across the codebase.The
redirectPath
logic is uniformly applied in theguard.ts
files ofweb-naive
,web-antd
, andweb-ele
applications, ensuring that the full path, including query parameters, is preserved during redirection. This aligns with the PR objectives.
apps/web-naive/src/router/guard.ts
apps/web-antd/src/router/guard.ts
apps/web-ele/src/router/guard.ts
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of `redirectPath` in the codebase. # Test: Search for `redirectPath` usage. Expect: Consistent usage with the new logic. rg --type typescript 'redirectPath'Length of output: 70
Script:
#!/bin/bash # Description: Verify the usage of `redirectPath` in the codebase with correct file type. # Test: Search for `redirectPath` usage in TypeScript files. Expect: Consistent usage with the new logic. rg --type ts 'redirectPath' -A 3Length of output: 1292
apps/web-naive/src/router/guard.ts (1)
118-121
: LGTM! Verify the usage ofredirectPath
.The changes ensure that the full path, including query parameters, is preserved during redirection. This aligns with the PR objectives.
However, verify that the
redirectPath
logic is correctly used throughout the codebase.Verification successful
Usage of
redirectPath
is consistent across the codebase.The
redirectPath
is used consistently in the filesapps/web-naive/src/router/guard.ts
,apps/web-antd/src/router/guard.ts
, andapps/web-ele/src/router/guard.ts
, following the same logic pattern. This confirms that the implementation aligns with the PR objectives.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of `redirectPath` in the codebase. # Test: Search for `redirectPath` usage. Expect: Consistent usage with the new logic. rg --type typescript 'redirectPath'Length of output: 70
Script:
#!/bin/bash # Description: Verify the usage of `redirectPath` in TypeScript files. # Test: Search for `redirectPath` usage. Expect: Consistent usage with the new logic. rg 'redirectPath' --glob '*.ts'Length of output: 631
这些更改已经包含在 #4116 中。 |
…08 (#4115)
Description
此PR解决以下web-ele和web-naive的BUG:
直接在浏览器地址栏输入带query的链接来访问,打开页面时query参数会丢失。如:https://www.vben.pro/#/demos/nested/menu1?id=123
未登录状态访问此链接会转到登录页面,登录成功后重定向时会丢失id=123
已登录状态下访问此链接会被直接重定向到不带query参数的地址
Type of change
Please delete options that are not relevant.
Summary by CodeRabbit