InputTag
Used to enter the label.
Basic usage
Basic usage of tag input.
Please input
Status
The input box has two states: disabled and readonly.
Tag1
Tag1
Max tags
Set the maximum number of display labels.
Tag1Tag2Tag33..
Size
Besides default size, tu-input-tag component provides three additional sizes for you to choose among different scenarios. Use attribute size to set additional sizes with mini, small, large.
Please input
Please input
Please input
Please input
InputTag API
InputTag Attributes
Name | Description | Type | Default |
---|---|---|---|
model-value | Bind value | Array | - |
default-value | Default value (uncontrolled state)) | Array | [] |
input-value | The value of the input | String | - |
default-input-value | The default value of the input (uncontrolled state) | String | '' |
placeholder | Placeholder | String | - |
disabled | Whether to disable | Boolean | false |
error | Whether it is an error state | Boolean | false |
readonly | Whether it is read-only mode | Boolean | false |
allow-clear | Whether to allow clear | Boolean | false |
size | The size of the input | String | medium |
max-tag-count | The maximum number of tags displayed, 0 means unlimited | Number | 0 |
retain-input-value | Whether to keep the content of the input box | Boolean | false |
format-tag | Format tag content | Function | - |
unique-value | Whether to create only unique values | Boolean | false |
field-names | Customize fields in TagData | InputTagFieldNames | - |
InputTag Events
Name | Description | Type |
---|---|---|
change | Triggered when the value changes | Function |
input-value-change | Trigger when the input value changes | Function |
press-enter | Triggered when the enter key is pressed | Function |
remove | Triggered when the delete button of the label is clicked | Function |
clear | Triggered when the clear button is clicked | Function |
focus | Triggered when the input box gets focus | Function |
blur | Triggered when the input box loses focus | Function |
InputTag Slots
Name | Description |
---|---|
tag | Display content of tag |
prefix | Prefix |
suffix | Suffix |