Files
八毛钱 5647b3e392 feat(components): [input-tag] add collapse-* prop (#21477)
* feat(components): Add input box label folding function

- Add collapseTags, collapseTagsTooltip, and maxCollapseTags attributes
- Implement the function of tag folding and mouse hovering to display complete content
- Update documentation and sample code

* feat(components): optimize the judgment before out of focus

-New beforeBlur method
-Add input tag list class name to improve the style and layout of tag list
-Add label text wrapping to optimize the display of long text

* feat(docs): 添加标签折叠功能

- 新增 collapse-tags 属性,用于在多选时将标签折叠为文本
- 新增 collapse-tags-tooltip 属性,用于在鼠标悬停时显示折叠标签的完整内容
- 新增 max-collapse-tags 属性,用于设置折叠标签的最大数量

* feat(components): optimize tag display logic

- Add showTagList and collapseTagList calculation properties to control the display of labels
- Modify the label removal logic, and now remove through the label value instead of the index
- Adjust the rendering method of labels to simplify the template structure
- Removed redundant tags text class styles, and directly displayed with tag values

* refactor(components): optimize tags

- Modify the logic of fallback label deletion, and use the index to directly remove the last label
- Reconstruct the tag rendering method and simplify the template structure
- Remove unused CSS classes

* refactor(components): optimize label rendering logic

- Replace the template tag in the template with the el tag component
- Simplify the rendering logic of labels and improve the readability and performance of components

* refactor(components): optimize key binding of tag list

- Change the key of the tag component from item to index

* docs(components): Modify the description of the collapse tags attribute

- Optimize the description of collapse tags attribute

* feat(components): add custom slots for labels

- Add a slot named "tag" in the el tag component

* test(components): add a test case for the collapseTags function

- Test the basic function of the collapseTags attribute
- est the hover effect of the collapseTagsTooltip attribute
- Test the restriction logic of the maxCollapseTags attribute

* Update docs/en-US/component/input-tag.md

Co-authored-by: qiang <qw13131wang@gmail.com>

* docs(components): update documents

- New features introduced in version 2.11.0 have been added to the document

* test(components): remove comments from unit tests

- Removed unnecessary comments in test code

---------

Co-authored-by: qiang <qw13131wang@gmail.com>
2025-08-21 20:22:03 +08:00
..