Commit 308ae62c authored by 杨奕's avatar 杨奕 Committed by cinwell.li

Select: fix dropdownUl undefined bug (#2120)

parent b9eed734
......@@ -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;
}
}
}
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