Input: fix prop valueKey doc (#9649)

pull/9654/head
Yao 2018-02-04 14:36:50 +08:00 committed by 杨奕
parent 896cbb6323
commit d8c931274d
3 changed files with 9 additions and 9 deletions

View File

@ -689,7 +689,7 @@ Attribute | Description | Type | Options | Default
|----| ----| ----| ---- | -----| |----| ----| ----| ---- | -----|
|placeholder| the placeholder of Autocomplete| string | — | — | |placeholder| the placeholder of Autocomplete| string | — | — |
|disabled | whether Autocomplete is disabled | boolean | — | false| |disabled | whether Autocomplete is disabled | boolean | — | false|
| valueKey | key name of the input suggestion object for display | string | — | value | | value-key | key name of the input suggestion object for display | string | — | value |
|icon | icon name | string | — | — | |icon | icon name | string | — | — |
|value | binding value | string | — | — | |value | binding value | string | — | — |
| debounce | debounce delay when typing, in milliseconds | number | — | 300 | | debounce | debounce delay when typing, in milliseconds | number | — | 300 |

View File

@ -41,13 +41,13 @@
querySearch(queryString, cb) { querySearch(queryString, cb) {
var links = this.links; var links = this.links;
var results = queryString ? links.filter(this.createStateFilter(queryString)) : links; var results = queryString ? links.filter(this.createStateFilter(queryString)) : links;
cb(results); cb(results);
}, },
querySearchAsync(queryString, cb) { querySearchAsync(queryString, cb) {
var links = this.links; var links = this.links;
var results = queryString ? links.filter(this.createStateFilter(queryString)) : links; var results = queryString ? links.filter(this.createStateFilter(queryString)) : links;
clearTimeout(this.timeout); clearTimeout(this.timeout);
this.timeout = setTimeout(() => { this.timeout = setTimeout(() => {
cb(results); cb(results);
@ -106,17 +106,17 @@
} }
.demo-autocomplete { .demo-autocomplete {
text-align: center; text-align: center;
.sub-title { .sub-title {
margin-bottom: 10px; margin-bottom: 10px;
font-size: 14px; font-size: 14px;
color: #8492a6; color: #8492a6;
} }
.el-col:not(:last-child) { .el-col:not(:last-child) {
border-right: 1px solid rgba(224,230,237,0.50); border-right: 1px solid rgba(224,230,237,0.50);
} }
.el-autocomplete { .el-autocomplete {
text-align: left; text-align: left;
} }
@ -126,7 +126,7 @@
li { li {
line-height: normal; line-height: normal;
padding: 7px *; padding: 7px *;
.name { .name {
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
@ -668,7 +668,7 @@ Atributo | Descripción | Tipo | Opciones | Por defecto
|----| ----| ----| ---- | -----| |----| ----| ----| ---- | -----|
|placeholder| el placeholder del Autocomplete| string | — | — | |placeholder| el placeholder del Autocomplete| string | — | — |
|disabled | si el Autocompete esta deshabilitado | boolean | — | false| |disabled | si el Autocompete esta deshabilitado | boolean | — | false|
| valueKey | nombre del campo del objeto de sugerencia del input para la visualización | string | — | value | | value-key | nombre del campo del objeto de sugerencia del input para la visualización | string | — | value |
|icon | nombre del icono | string | — | — | |icon | nombre del icono | string | — | — |
|value | valor enlazado | string | — | — | |value | valor enlazado | string | — | — |
| debounce | retardo al escribir, en milisegundos | number | — | 300 | | debounce | retardo al escribir, en milisegundos | number | — | 300 |

View File

@ -848,7 +848,7 @@ export default {
|------------- |---------------- |---------------- |---------------------- |-------- | |------------- |---------------- |---------------- |---------------------- |-------- |
| placeholder | 输入框占位文本 | string | — | — | | placeholder | 输入框占位文本 | string | — | — |
| disabled | 禁用 | boolean | — | false | | disabled | 禁用 | boolean | — | false |
| valueKey | 输入建议对象中用于显示的键名 | string | — | value | | value-key | 输入建议对象中用于显示的键名 | string | — | value |
| value | 必填值,输入绑定值 | string | — | — | | value | 必填值,输入绑定值 | string | — | — |
| debounce | 获取输入建议的去抖延时 | number | — | 300 | | debounce | 获取输入建议的去抖延时 | number | — | 300 |
| fetch-suggestions | 返回输入建议的方法,仅当你的输入建议数据 resolve 时,通过调用 callback(data:[]) 来返回它 | Function(queryString, callback) | — | — | | fetch-suggestions | 返回输入建议的方法,仅当你的输入建议数据 resolve 时,通过调用 callback(data:[]) 来返回它 | Function(queryString, callback) | — | — |