fix(components): [input-tag] paste multiple delimiters (#21256)

* fix(components): [input-tag] paste multiple delimiters

* chore: refact

* refactor: easier to read & import types

* chore: remove useless convert regex

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

* chore: fix

* chore: fix

* chore: same logic on paste & better tests

* chore: fix edge case

* chore: fix

* chore: add

---------

Co-authored-by: btea <2356281422@qq.com>
This commit is contained in:
Noblet Ouways
2025-07-08 11:02:13 +02:00
committed by GitHub
parent 6c8e4f4feb
commit 8a243036fe
4 changed files with 74 additions and 31 deletions

View File

@@ -137,15 +137,15 @@ input-tag/prefix-suffix
### Events
| Name | Description | Type |
| ---------- | --------------------------------------- | ---------------------------------------- |
| change | triggers when the modelValue change | ^[Function]`(value: string[]) => void` |
| input | triggers when the input value change | ^[Function]`(value: string) => void` |
| add-tag | triggers when a tag is added | ^[Function]`(value: string) => void` |
| remove-tag | triggers when a tag is removed | ^[Function]`(value: string) => void` |
| focus | triggers when InputTag focuses | ^[Function]`(event: FocusEvent) => void` |
| blur | triggers when InputTag blurs | ^[Function]`(event: FocusEvent) => void` |
| clear | triggers when the clear icon is clicked | ^[Function]`() => void` |
| Name | Description | Type |
| ---------- | --------------------------------------- | ------------------------------------------------- |
| change | triggers when the modelValue change | ^[Function]`(value: string[]) => void` |
| input | triggers when the input value change | ^[Function]`(value: string) => void` |
| add-tag | triggers when a tag is added | ^[Function]`(value: string \| string []) => void` |
| remove-tag | triggers when a tag is removed | ^[Function]`(value: string) => void` |
| focus | triggers when InputTag focuses | ^[Function]`(event: FocusEvent) => void` |
| blur | triggers when InputTag blurs | ^[Function]`(event: FocusEvent) => void` |
| clear | triggers when the clear icon is clicked | ^[Function]`() => void` |
### Slots