fix(components): [model-select] fix css bug#20
fix(components): [model-select] fix css bug#20ttLeslie wants to merge 2 commits intoelement-plus-x:mainfrom
Conversation
WalkthroughA new CSS rule was introduced in the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. ✨ Finishing Touches🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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 using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/components/ModelSelect/index.vue (1)
117-120: Add ellipsis & avoid hard-clippingA fixed
height: 12pxcan cut off text whenever the effective line-height exceeds 12 px (Tailwind’s default fortext-12pxis 16 px).
Also, hidden overflow withoutwhite-space: nowrap+text-overflow: ellipsisleaves users with no visual cue that the name was truncated.Consider:
.model-select-box-text { - overflow: hidden; - height: 12px; + /* keep to one line, show ellipsis, and let line-height define the box height */ + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + line-height: 16px; /* match tailwind default for 12 px font */ }This prevents clipping while still constraining the control’s height and gives a clearer UX.
<img width="2560" height="1239" alt="截图 src="https://github.com/user-attachments/assets/f6ea1eed-b139-4e89-9c53-fd0727de4150" />
Summary by CodeRabbit