mirror of https://github.com/ElemeFE/element
fix multiple remote select's default value issue
parent
4495877dff
commit
5352f31f16
|
@ -13,6 +13,7 @@
|
|||
- 修复 DatePicker 弹出框样式溢出边框 #318
|
||||
- 新增 Input 图标的点击事件 #444
|
||||
- 修复 Loading 关闭后有几率滚动失效的问题
|
||||
- 修复 远程搜索的 Select 不能正确渲染默认初始值的问题
|
||||
|
||||
#### 非兼容性更新
|
||||
|
||||
|
|
|
@ -528,6 +528,14 @@
|
|||
},
|
||||
|
||||
mounted() {
|
||||
if (this.remote && this.multiple && Array.isArray(this.value)) {
|
||||
this.selected = this.options.reduce((prev, curr) => {
|
||||
return this.value.indexOf(curr.value) > -1 ? prev.concat(curr) : prev;
|
||||
}, []);
|
||||
this.$nextTick(() => {
|
||||
this.resetInputHeight();
|
||||
});
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.reference.$el) {
|
||||
this.inputWidth = this.$refs.reference.$el.getBoundingClientRect().width;
|
||||
|
|
Loading…
Reference in New Issue