-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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: type Component
is not assignable to RouteMeta
#4140
Conversation
|
WalkthroughThe recent update enhances the Changes
Assessment against linked issues
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 (1)
- packages/@core/base/typings/src/vue-router.d.ts (1 hunks)
Additional comments not posted (1)
packages/@core/base/typings/src/vue-router.d.ts (1)
71-71
: Enhance icon property flexibility inRouteMeta
.The change to the
icon
property type fromstring
toComponent | string
enhances flexibility, allowing both Vue components and strings as icons. This aligns with the PR's goal of improving the routing configuration's expressiveness.
CI 没过 |
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 (5)
- packages/@core/base/typings/src/menu-record.ts (2 hunks)
- packages/@core/ui-kit/menu-ui/src/interface/index.ts (4 hunks)
- packages/@core/ui-kit/menu-ui/src/sub-menu.vue (1 hunks)
- packages/@core/ui-kit/shadcn-ui/src/components/breadcrumb/types.ts (1 hunks)
- packages/effects/layouts/src/widgets/breadcrumb.vue (2 hunks)
Files skipped from review due to trivial changes (1)
- packages/@core/ui-kit/menu-ui/src/sub-menu.vue
Additional comments not posted (5)
packages/@core/ui-kit/shadcn-ui/src/components/breadcrumb/types.ts (1)
1-4
: LGTM! The type change foricon
enhances flexibility.The modification of the
icon
property to accept bothComponent
andstring
types allows for greater versatility in breadcrumb icon usage.packages/@core/base/typings/src/menu-record.ts (1)
3-4
: LGTM! The type change foricon
enhances flexibility.The modification of the
icon
property to accept bothComponent
andstring
types allows for richer icon representations in the menu system. The import statement forComponent
is correctly added.Also applies to: 49-49
packages/effects/layouts/src/widgets/breadcrumb.vue (1)
33-33
: Verify the impact of breadcrumb logic changes on nested routes.The removal of child route handling simplifies the logic but could affect scenarios with nested routes. Ensure that this change does not negatively impact the user experience.
packages/@core/ui-kit/menu-ui/src/interface/index.ts (2)
64-64
: Enhanced flexibility foricon
property inSubMenuProps
.The
icon
property now accepts aComponent
or astring
, allowing for more dynamic and visually rich menu items. This aligns with the PR objectives to support component types for icons.
83-83
: Enhanced flexibility foricon
property inMenuItemProps
.The
icon
property now accepts aComponent
or astring
, allowing for more dynamic and visually rich menu items. This change is consistent with the PR objectives to support component types for icons.
Description
closes #4134
Type of change
Please delete options that are not relevant.
pnpm-lock.yaml
unless you introduce a new test example.Checklist
pnpm run docs:dev
command.pnpm test
.feat:
,fix:
,perf:
,docs:
, orchore:
.Summary by CodeRabbit
icon
property to accept either a Vue component or a string, enabling more complex icon representations.icon
property to accept both a component and a string.meta
andpath
properties, simplifying the display of breadcrumbs.