Skip to content

Commit

Permalink
Adding dropdown icon slot to Dropdown.vue (#72)
Browse files Browse the repository at this point in the history
Adding a slot to allow for customizing the dropdown button icon for split-button dropdowns
  • Loading branch information
Graham McDonald authored Mar 11, 2022
1 parent 6a92941 commit 1fce6b5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/dropdown/src/dropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -257,14 +257,16 @@
hide();
};
let dropdownButton = this.$slots.dropdownIcon ? this.$slots.dropdownIcon : <i class="el-dropdown__icon el-icon-arrow-down"></i>;
let triggerElm = !splitButton
? this.$slots.default
: (<el-button-group>
<el-button type={type} size={dropdownSize} nativeOn-click={handleMainButtonClick}>
{this.$slots.default}
</el-button>
<el-button ref="trigger" type={type} size={dropdownSize} class="el-dropdown__caret-button">
<i class="el-dropdown__icon el-icon-arrow-down"></i>
{dropdownButton}
</el-button>
</el-button-group>);
Expand Down

0 comments on commit 1fce6b5

Please sign in to comment.