Commit 1ceafc42 authored by Leopoldthecoder's avatar Leopoldthecoder Committed by cinwell.li

fix remote filtered select value update bug

parent 66636bab
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
- 修复 Menu 组件垂直模式下开启 router 属性会立刻跳转的问题 #295 - 修复 Menu 组件垂直模式下开启 router 属性会立刻跳转的问题 #295
- Checkbox change 事件现在只能被人为的交互操作所触发 - Checkbox change 事件现在只能被人为的交互操作所触发
- 新增 Checkbox checked 属性 - 新增 Checkbox checked 属性
- 修复 Select 远程搜索时使用键盘选择选项无法更新 v-model 的问题
#### 非兼容性更新 #### 非兼容性更新
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
v-model="query" v-model="query"
:debounce="remote ? 300 : 0" :debounce="remote ? 300 : 0"
v-if="filterable" v-if="filterable"
:style="{ width: inputLength + 'px' }" :style="{ width: inputLength + 'px', 'max-width': inputWidth - 42 + 'px' }"
ref="input"> ref="input">
</div> </div>
<el-input <el-input
...@@ -362,7 +362,7 @@ ...@@ -362,7 +362,7 @@
resetInputState(e) { resetInputState(e) {
if (e.keyCode !== 8) this.toggleLastOptionHitState(false); 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() { resetInputHeight() {
...@@ -486,7 +486,7 @@ ...@@ -486,7 +486,7 @@
}, },
onInputChange() { onInputChange() {
if (this.filterable) { if (this.filterable && this.selectedLabel !== this.value) {
this.query = this.selectedLabel; this.query = this.selectedLabel;
} }
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment