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