6 Commits

Author SHA1 Message Date
八毛钱
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
Coder Goo
bf0568cacf feat(components): add custom clear icon (#21699)
* feat(components): add custom clear icon function

added `clear-icon` property to Cascader, Input, and InputTag components to customize the clear icon.

* Update docs/en-US/component/cascader.md

Co-authored-by: btea <2356281422@qq.com>

* Update docs/en-US/component/cascader.md

Co-authored-by: btea <2356281422@qq.com>

* feat(components): add custom clear icon use case

* docs(components): reduce cascader clear-icon use case options

* Update packages/components/input-tag/src/input-tag.vue

Co-authored-by: btea <2356281422@qq.com>

* Update packages/components/input/src/input.vue

Co-authored-by: btea <2356281422@qq.com>

---------

Co-authored-by: btea <2356281422@qq.com>
2025-08-15 18:47:30 +02:00
Noblet Ouways
2f17df1209 style(eslint-config): newline before import type (#21036)
* perf: change to import-x

* feat: add rules

* chore: fix rule

* chore: fix

* chore: fix

* chore: fix

* style: `pnpm lint:fix`

* Revert "style: `pnpm lint:fix`"

This reverts commit db0116a288.

* Revert "chore: fix"

This reverts commit 69c82a90c0.

* chore: fix

* style: `pnpm lint:fix`

* fix: lint

* chore: `pnpm format`
2025-06-16 15:37:12 +08:00
qiang
168b5f34ca style(eslint-config): move newline-after-import to global (#21011) 2025-06-12 22:30:23 +08:00
Noblet Ouways
0589201ad4 feat(components): [input-tag] add delimiter (#20532)
* feat(components): [input-tag] add delimiter

* chore: add missing bump version
2025-04-26 07:55:25 +08:00
qiang
d416dd74b0 feat(components): [input-tag] new component (#18885)
* feat(components): [input-tag] add input-tag component

* feat: styles

* test: add test

* docs: add docs

* docs: updata

* docs: uopdata

* docs: updata

* fix: optimize the style when input too long text

* feat: add draggable attribute

* fix: regain focus after dragged

* fix: regain focus on dragend

* refactor: useDragTag

* fix: style of disabled

* refactor: rename event name

* refactor: move useCalcInputWidth to hooks

* feat: add aria-label
2024-11-29 10:50:21 +08:00