fix remote filtered select value update bug

pull/321/head
Leopoldthecoder 2016-10-11 11:36:33 +08:00 committed by cinwell.li
parent 66636bab56
commit 1ceafc42e1
2 changed files with 4 additions and 3 deletions

View File

@ -19,6 +19,7 @@
- 修复 Menu 组件垂直模式下开启 router 属性会立刻跳转的问题 #295
- Checkbox change 事件现在只能被人为的交互操作所触发
- 新增 Checkbox checked 属性
- 修复 Select 远程搜索时使用键盘选择选项无法更新 v-model 的问题
#### 非兼容性更新

View File

@ -25,7 +25,7 @@
v-model="query"
:debounce="remote ? 300 : 0"
v-if="filterable"
:style="{ width: inputLength + 'px' }"
:style="{ width: inputLength + 'px', 'max-width': inputWidth - 42 + 'px' }"
ref="input">
</div>
<el-input
@ -362,7 +362,7 @@
resetInputState(e) {
if (e.keyCode !== 8) this.toggleLastOptionHitState(false);
this.inputLength = this.$refs.input.value.length * 12 + 20;
this.inputLength = this.$refs.input.value.length * 15 + 20;
},
resetInputHeight() {
@ -486,7 +486,7 @@
},
onInputChange() {
if (this.filterable) {
if (this.filterable && this.selectedLabel !== this.value) {
this.query = this.selectedLabel;
}
},