-
-
Notifications
You must be signed in to change notification settings - Fork 14.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
feat(components): [tabs] add addIcon slot #12970
Conversation
🧪 Playground Preview: https://element-plus.run/?pr=12970 |
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.
Personally, I think the function is useful, but I think it would be better to get a prop rather than a slot.
How about this?
Do you mean to add a prop similar to This seems to be possible, but in this case, if the user wants to customize the element structure, it seems to be more troublesome. 🤔 |
my opinion From the name addicon, I already got the impression that only icons are available. And since the area is not long, I think it is difficult to use it as a custom area. I'd love to hear more people's opinions! |
I just gave an example, maybe you can customize the text, such as |
* feat(components): [tabs] add addIcon slot * docs: add example * docs: update tabs.md * chore: add version tag
Please make sure these boxes are checked before submitting your PR, thank you!
dev
branch.Description
🤖 Generated by Copilot at f6cca1c
Added a new
addIcon
slot to the Tabs component and updated the documentation accordingly. This slot enables users to customize the appearance of the add button for editable tabs.Related Issue
feat #11795 .
Explanation of Changes
🤖 Generated by Copilot at f6cca1c
addIcon
to the Tabs component to allow customizing the icon of the add button for editable tabs (link, link, link)addIcon
slot in thetabs.tsx
file if it is provided, or fall back to the default plus icon (link)