Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Element
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
林焕东
Element
Commits
3377cd08
Commit
3377cd08
authored
Mar 19, 2018
by
杨奕
Committed by
GitHub
Mar 19, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Input: add select method (#10229)
parent
a294c628
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
6 deletions
+33
-6
examples/docs/en-US/input.md
examples/docs/en-US/input.md
+10
-2
examples/docs/es/input.md
examples/docs/es/input.md
+9
-1
examples/docs/zh-CN/input.md
examples/docs/zh-CN/input.md
+7
-1
packages/input/src/input.vue
packages/input/src/input.vue
+2
-2
types/input.d.ts
types/input.d.ts
+5
-0
No files found.
examples/docs/en-US/input.md
View file @
3377cd08
...
...
@@ -684,6 +684,13 @@ Search data from server-side.
| change | triggers when the icon inside Input value change | (value: string
\|
number) |
| clear | triggers when the Input is cleared by the button which generated by the "clearable" attribute | (event: Event) |
### Input Methods
| Method | Description | Parameters |
|------|--------|-------|
| focus | focus the input element | — |
| select | select the text in input element | — |
### Autocomplete Attributes
Attribute | Description | Type | Options | Default
...
...
@@ -718,7 +725,8 @@ Attribute | Description | Type | Options | Default
|----| ----| ----|
|select | triggers when a suggestion is clicked | suggestion being clicked |
### Methods
### Autocomplete Methods
| Method | Description | Parameters |
|------|--------|-------|
| focus | focus the
Input compon
ent | — |
| focus | focus the
input elem
ent | — |
examples/docs/es/input.md
View file @
3377cd08
...
...
@@ -663,6 +663,13 @@ Búsqueda de datos desde el servidor.
| change | se activa cuando cambia el valor de entrada | (value: string
\|
number) |
| clear | se dispara cuando la entrada es borrada por el botón generado por el atributo "clearable". | (event: Event) |
### Input Metodo
| Metodo | Descripción | Parametros |
| ------ | ----------------------------- | ---------- |
| focus | coloca el foco en el elemento | — |
| select | select the text in input element | — |
### Autocomplete Atributos
Atributo | Descripción | Tipo | Opciones | Por defecto
...
...
@@ -695,7 +702,8 @@ Atributo | Descripción | Tipo | Opciones | Por defecto
| ------ | ---------------------------------------- | ---------------------------------------- |
| select | se dispara cuando se hace click a una sugerencia | sugerencia en la que se está haciendo click |
### Metodo
### Autocomplete Metodo
| Metodo | Descripción | Parametros |
| ------ | ----------------------------- | ---------- |
| focus | coloca el foco en el elemento | — |
examples/docs/zh-CN/input.md
View file @
3377cd08
...
...
@@ -841,7 +841,8 @@ export default {
### Input Methods
| 方法名 | 说明 | 参数 |
| ---- | ---- | ---- |
| focus | 使 input 获取焦点 | - |
| focus | 使 input 获取焦点 | — |
| select | 选中 input 中的文字 | — |
### Autocomplete Attributes
...
...
@@ -873,3 +874,8 @@ export default {
| 事件名称 | 说明 | 回调参数 |
|---------|--------|---------|
| select | 点击选中建议项时触发 | 选中建议项 |
### Autocomplete Methods
| 方法名 | 说明 | 参数 |
| ---- | ---- | ---- |
| focus | 使 input 获取焦点 | - |
packages/input/src/input.vue
View file @
3377cd08
...
...
@@ -229,7 +229,7 @@
this
.
dispatch
(
'
ElFormItem
'
,
'
el.form.blur
'
,
[
this
.
currentValue
]);
}
},
inputS
elect
()
{
s
elect
()
{
(
this
.
$refs
.
input
||
this
.
$refs
.
textarea
).
select
();
},
resizeTextarea
()
{
...
...
@@ -291,7 +291,7 @@
},
created
()
{
this
.
$on
(
'
inputSelect
'
,
this
.
inputS
elect
);
this
.
$on
(
'
inputSelect
'
,
this
.
s
elect
);
},
mounted
()
{
...
...
types/input.d.ts
View file @
3377cd08
...
...
@@ -79,4 +79,9 @@ export declare class ElInput extends ElementUIComponent {
* Focus the Input component
*/
focus
():
void
/**
* Select the text in input element
*/
select
():
void
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment