@@ -25,6 +25,13 @@ const value11 = ref('')
2525const value12 = ref (' ' )
2626const value13 = ref (' ' )
2727const value14 = ref (' ' )
28+ const value15 = ref (' ' )
29+ const value16 = ref (' ' )
30+ const inputRef = ref ()
31+
32+ const selectAll = () => {
33+ inputRef .value ? .select ()
34+ }
2835< / script>
2936
3037< template>
@@ -69,6 +76,14 @@ const value14 = ref('')
6976 < var - input placeholder= " Textarea" textarea v- model= " value10" / >
7077 < var - input placeholder= " Small Size" size= " small" v- model= " value11" / >
7178 < var - input placeholder= " Removes whitespace from both ends of this string" v- model .trim = " value12" / >
79+ < var - space>
80+ < var - input
81+ ref= " inputRef"
82+ placeholder= " Enter text and click the button to select all"
83+ v- model= " value16"
84+ / >
85+ < var - button type= " primary" @click= " selectAll" > Select All< / var - button>
86+ < / var - space>
7287 < / var - space>
7388< / template>
7489
@@ -104,6 +119,13 @@ const value11 = ref('')
104119const value12 = ref (' ' )
105120const value13 = ref (' ' )
106121const value14 = ref (' ' )
122+ const value15 = ref (' ' )
123+ const value16 = ref (' ' )
124+ const inputRef = ref ()
125+
126+ const selectAll = () => {
127+ inputRef .value ? .select ()
128+ }
107129< / script>
108130
109131< template>
@@ -154,6 +176,14 @@ const value14 = ref('')
154176 < var - input variant= " outlined" placeholder= " Textarea" textarea v- model= " value10" / >
155177 < var - input variant= " outlined" placeholder= " Small Size" size= " small" v- model= " value11" / >
156178 < var - input variant= " outlined" placeholder= " Removes whitespace from both ends of this string" v- model .trim = " value12" / >
179+ < var - space>
180+ < var - input
181+ ref= " inputRef"
182+ placeholder= " Enter text and click the button to select all"
183+ v- model= " value16"
184+ / >
185+ < var - button type= " primary" @click= " selectAll" > Select All< / var - button>
186+ < / var - space>
157187 < / var - space>
158188< / template>
159189
@@ -203,6 +233,7 @@ const value14 = ref('')
203233| --- | --- | --- | --- |
204234| ` focus` | Focus | ` - ` | ` - ` |
205235| ` blur` | Blur | ` - ` | ` - ` |
236+ | ` select` | Select all text in the input | ` - ` | ` - ` |
206237| ` validate` | Trigger validate | ` - ` | ` valid: Promise < boolean> ` |
207238| ` resetValidation` | Clear validate messages | ` - ` | ` - ` |
208239| ` reset` | Clear the value of the binding and validate messages | ` - ` | ` - ` |
@@ -218,6 +249,7 @@ const value14 = ref('')
218249| ` input` | Triggered on input | ` value: string` , ` event : Event ` |
219250| ` change` | Triggered on change | ` value: string` , ` event : Event ` |
220251
252+
221253### Slots
222254
223255| Name | Description | SlotProps |
0 commit comments