refactor(components): [check-tag] use type-based definitions#23424
Conversation
📝 WalkthroughWalkthroughThis PR refactors the check-tag component to introduce a new public Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
commit: |
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/components/check-tag/src/check-tag.vue (1)
18-29: Runtimetypevalidation is dropped with the new interface.
The deprecatedcheckTagPropsobject previously enforced validtypevalues via a runtimevaluesvalidator. Switching todefineProps<CheckTagProps>()uses only the TypeScript interface, which provides compile-time safety but removes the runtime warning for invalid values. Consider reusing the deprecatedcheckTagPropsindefinePropsuntil 3.0.0, or add a custom validator if runtime validation is needed.
🧹 Nitpick comments (1)
packages/components/check-tag/src/check-tag.ts (1)
5-25: KeepCheckTagPropsandcheckTagPropsin sync.
There are now two sources of truth (the interface and the runtime props). Consider deriving the interface fromcheckTagProps(e.g.,ExtractPublicPropTypes) or adding a compile-time assertion so they can’t drift.
|
🧪 Playground Preview: https://element-plus.run/?pr=23424 |
|
@snowbitx Thanks for your contribution! ❤️ |

Please make sure these boxes are checked before submitting your PR, thank you!
devbranch.ref #23399
Summary by CodeRabbit
New Features
Refactor
✏️ Tip: You can customize this high-level summary in your review settings.