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
38a13de3
Commit
38a13de3
authored
May 21, 2018
by
杨奕
Committed by
GitHub
May 21, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Autocomplete: add hide-loading (#11260)
parent
54eeb5ce
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
7 deletions
+23
-7
examples/docs/en-US/input.md
examples/docs/en-US/input.md
+1
-0
examples/docs/es/input.md
examples/docs/es/input.md
+3
-0
examples/docs/zh-CN/input.md
examples/docs/zh-CN/input.md
+1
-0
packages/autocomplete/src/autocomplete-suggestions.vue
packages/autocomplete/src/autocomplete-suggestions.vue
+4
-6
packages/autocomplete/src/autocomplete.vue
packages/autocomplete/src/autocomplete.vue
+2
-1
types/autocomplete.d.ts
types/autocomplete.d.ts
+12
-0
No files found.
examples/docs/en-US/input.md
View file @
38a13de3
...
@@ -711,6 +711,7 @@ Attribute | Description | Type | Options | Default
...
@@ -711,6 +711,7 @@ Attribute | Description | Type | Options | Default
| label | label text | string | — | — |
| label | label text | string | — | — |
| prefix-icon | prefix icon class | string | — | — |
| prefix-icon | prefix icon class | string | — | — |
| suffix-icon | suffix icon class | string | — | — |
| suffix-icon | suffix icon class | string | — | — |
| hide-loading | whether to hide the loading icon in remote search | boolean | — | false |
### Autocomplete Slots
### Autocomplete Slots
...
...
examples/docs/es/input.md
View file @
38a13de3
...
@@ -688,6 +688,9 @@ Atributo | Descripción | Tipo | Opciones | Por defecto
...
@@ -688,6 +688,9 @@ Atributo | Descripción | Tipo | Opciones | Por defecto
| name | igual que
`name`
en el input nativo | string | — | — |
| name | igual que
`name`
en el input nativo | string | — | — |
| select-when-unmatched | si se emite un evento
`select`
al pulsar enter cuando no hay coincidencia de Autocomplete | boolean | — | false |
| select-when-unmatched | si se emite un evento
`select`
al pulsar enter cuando no hay coincidencia de Autocomplete | boolean | — | false |
| label | texto de la etiqueta | string | — | — |
| label | texto de la etiqueta | string | — | — |
| prefix-icon | prefix icon class | string | — | — |
| suffix-icon | suffix icon class | string | — | — |
| hide-loading | whether to hide the loading icon in remote search | boolean | — | false |
### Autocomplete Slots
### Autocomplete Slots
...
...
examples/docs/zh-CN/input.md
View file @
38a13de3
...
@@ -863,6 +863,7 @@ export default {
...
@@ -863,6 +863,7 @@ export default {
| label | 输入框关联的label文字 | string | — | — |
| label | 输入框关联的label文字 | string | — | — |
| prefix-icon | 输入框头部图标 | string | — | — |
| prefix-icon | 输入框头部图标 | string | — | — |
| suffix-icon | 输入框尾部图标 | string | — | — |
| suffix-icon | 输入框尾部图标 | string | — | — |
| hide-loading | 是否隐藏远程加载时的加载图标 | boolean | — | false |
### Autocomplete Slots
### Autocomplete Slots
| name | 说明 |
| name | 说明 |
...
...
packages/autocomplete/src/autocomplete-suggestions.vue
View file @
38a13de3
...
@@ -3,16 +3,14 @@
...
@@ -3,16 +3,14 @@
<div
<div
v-show=
"showPopper"
v-show=
"showPopper"
class=
"el-autocomplete-suggestion el-popper"
class=
"el-autocomplete-suggestion el-popper"
:class=
"
{ 'is-loading': parent.loading }"
:class=
"
{ 'is-loading':
!parent.hideLoading
&&
parent.loading }"
:style="{ width: dropdownWidth }"
:style="{ width: dropdownWidth }"
role="region"
role="region">
>
<el-scrollbar
<el-scrollbar
tag=
"ul"
tag=
"ul"
wrap-class=
"el-autocomplete-suggestion__wrap"
wrap-class=
"el-autocomplete-suggestion__wrap"
view-class=
"el-autocomplete-suggestion__list"
view-class=
"el-autocomplete-suggestion__list"
>
>
<li
v-if=
"!parent.hideLoading && parent.loading"
><i
class=
"el-icon-loading"
></i></li>
<li
v-if=
"parent.loading"
><i
class=
"el-icon-loading"
></i></li>
<slot
v-else
>
<slot
v-else
>
</slot>
</slot>
</el-scrollbar>
</el-scrollbar>
...
...
packages/autocomplete/src/autocomplete.vue
View file @
38a13de3
...
@@ -114,7 +114,8 @@
...
@@ -114,7 +114,8 @@
placement
:
{
placement
:
{
type
:
String
,
type
:
String
,
default
:
'
bottom-start
'
default
:
'
bottom-start
'
}
},
hideLoading
:
Boolean
},
},
data
()
{
data
()
{
return
{
return
{
...
...
types/autocomplete.d.ts
View file @
38a13de3
...
@@ -56,6 +56,18 @@ export declare class ElAutocomplete extends ElementUIComponent {
...
@@ -56,6 +56,18 @@ export declare class ElAutocomplete extends ElementUIComponent {
/** Whether show suggestions when input focus */
/** Whether show suggestions when input focus */
triggerOnFocus
:
boolean
triggerOnFocus
:
boolean
/** Whether to emit a `select` event on enter when there is no autocomplete match */
selectWhenUnmatched
:
boolean
/** Prefix icon class */
prefixIcon
:
string
/** Suffix icon class */
suffixIcon
:
string
/** Whether to hide the loading icon in remote search */
hideLoading
:
boolean
/**
/**
* Focus the Input component
* Focus the Input component
*/
*/
...
...
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