mirror of https://github.com/ElemeFE/element
Dropdown: fix dropdown组件下的插槽,设置了'#default'属性,不显示下拉框(#22283)
parent
fa18776b4b
commit
f91c327490
|
@ -207,7 +207,7 @@
|
||||||
let { trigger, show, hide, handleClick, splitButton, handleTriggerKeyDown, handleItemKeyDown } = this;
|
let { trigger, show, hide, handleClick, splitButton, handleTriggerKeyDown, handleItemKeyDown } = this;
|
||||||
this.triggerElm = splitButton
|
this.triggerElm = splitButton
|
||||||
? this.$refs.trigger.$el
|
? this.$refs.trigger.$el
|
||||||
: this.$slots.default[0].elm;
|
: this.$refs.default;
|
||||||
|
|
||||||
let dropdownElm = this.dropdownElm;
|
let dropdownElm = this.dropdownElm;
|
||||||
|
|
||||||
|
@ -284,7 +284,9 @@
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div class="el-dropdown" v-clickoutside={hide} aria-disabled={disabled}>
|
<div class="el-dropdown" v-clickoutside={hide} aria-disabled={disabled}>
|
||||||
{triggerElm}
|
<div ref="default">
|
||||||
|
{triggerElm}
|
||||||
|
</div>
|
||||||
{menuElm}
|
{menuElm}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue