mirror of https://github.com/ElemeFE/element
Select: fix dropdownUl undefined bug (#2120)
parent
b9eed734e2
commit
308ae62cb3
|
@ -48,6 +48,7 @@
|
|||
:size="size"
|
||||
:disabled="disabled"
|
||||
:readonly="!filterable || multiple"
|
||||
:validate-event="false"
|
||||
@focus="toggleMenu"
|
||||
@click="handleIconClick"
|
||||
@mousedown.native="handleMouseDown"
|
||||
|
@ -223,13 +224,13 @@
|
|||
} else {
|
||||
this.currentPlaceholder = this.cachedPlaceHolder;
|
||||
}
|
||||
this.dispatch('ElFormItem', 'el.form.change', val);
|
||||
}
|
||||
this.setSelected();
|
||||
if (this.filterable && !this.multiple) {
|
||||
this.inputLength = 20;
|
||||
}
|
||||
this.$emit('change', val);
|
||||
this.dispatch('ElFormItem', 'el.form.change', val);
|
||||
},
|
||||
|
||||
query(val) {
|
||||
|
@ -294,8 +295,7 @@
|
|||
}
|
||||
}
|
||||
if (!this.dropdownUl) {
|
||||
let dropdownChildNodes = this.$refs.popper.$el.childNodes;
|
||||
this.dropdownUl = [].filter.call(dropdownChildNodes, item => item.tagName === 'UL')[0];
|
||||
this.dropdownUl = this.$refs.popper.$el.querySelector('.el-select-dropdown__wrap');
|
||||
}
|
||||
if (!this.multiple && this.dropdownUl) {
|
||||
this.setOverflow();
|
||||
|
|
|
@ -33,6 +33,10 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.el-scrollbar.is-empty .el-select-dropdown__list{
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@b select-dropdown__empty {
|
||||
|
@ -53,9 +57,5 @@
|
|||
padding: var(--select-dropdown-padding);
|
||||
margin: 0;
|
||||
box-sizing: border-box;
|
||||
|
||||
@when empty {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue