feat(BasicButton): BasicButton组件支持icon插槽. close #1377

This commit is contained in:
invalid w 2023-10-13 17:26:07 +08:00
parent f5f7952515
commit 5aac032acc

View File

@ -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>