Skip to content

Commit

Permalink
feat(BasicButton): BasicButton组件支持icon插槽. close #1377
Browse files Browse the repository at this point in the history
  • Loading branch information
wangjue666 committed Oct 13, 2023
1 parent f5f7952 commit 5aac032
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/Button/src/BasicButton.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<template>
<Button v-bind="getBindValue" :class="getButtonClass" @click="onClick">
<template #icon>
<slot name="icon"></slot>
</template>
<template #default="data">
<Icon :icon="preIcon" v-if="preIcon" :size="iconSize" />
<slot v-bind="data || {}"></slot>
Expand Down

0 comments on commit 5aac032

Please sign in to comment.