Editable input box
Introduction
The editable input box component has an edit state and a non-edit state. In the edit state, users can modify the content.

Configuration items
Category |
Configuration |
Example |
Description |
Content |
Default value |
The default value of the component. |
|
Placeholder content |
The placeholder content. |
||
Label |
The form label. For more information, see Common form properties. |
||
Tooltip |
Set the tooltip content, background color, position, and trigger method. |
||
Extension configuration |
Settings for the component's prefix text, prefix icon, suffix text, suffix icon, and edit icon. |
||
Interaction |
Hidden |
Hides the component. For more information, see Common properties. |
|
Click to enter edit state |
If enabled, click the component to enter the edit state. |
||
Validation |
Form validation. For more information, see Common form properties. |
||
Style |
Margin |
The margin. For more information, see Common properties. |
|
Clear button |
Specifies whether to show the clear button. |
||
CSS style |
Text state content color |
The color of the content in the text state. |
|
Text state hover background color |
The background color of the content when you hover over it in the text state. |
||
Font size |
The font size of the text. |
||
Label font size |
The font size of the label. |
Properties and methods
Name |
Type |
Example |
Description |
value |
string |
|
The current input content. |
labelText |
string |
|
The label text. |
placeholder |
string |
|
The placeholder content. |
editable |
boolean |
|
Specifies whether the component can be clicked to enter the edit state. |
editing |
boolean |
|
Specifies whether the component is in the edit state. |
hidden |
boolean |
|
Specifies whether the component is hidden. |
validationStatus |
boolean |
|
The validation status of the component. |
validationMessage |
string |
|
The validation message of the component. |
blur |
func |
|
Removes focus from the component. |
focus |
func |
|
Sets focus on the component. |
validate |
func |
|
Component Validation |
setValue |
func |
|
Sets the content of the component. |
setEditing |
func |
|
Sets the edit state of the component. |
setHidden |
func |
|
Sets the hidden state of the component. |
clearValue |
func |
|
Clears the `value` of the component. |
clearHidden |
func |
|
Clears the `hidden` value of the component. |
clearValidate |
func |
|
Clears the validation information of the component. |
Event callbacks
Configuration |
Description |
The event triggered after the component's value changes. |
|
The event triggered after the component gains focus. |
|
The event triggered after the component loses focus. |