From 436b52186129e60ba72c20e43d2845bc3f899901 Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期四, 22 八月 2024 11:16:56 +0800 Subject: [PATCH] 取消暂停svg更新 --- src/components/Button/src/BasicButton.vue | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/Button/src/BasicButton.vue b/src/components/Button/src/BasicButton.vue index 19e6dbb..b8cfcaa 100644 --- a/src/components/Button/src/BasicButton.vue +++ b/src/components/Button/src/BasicButton.vue @@ -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> @@ -10,14 +13,14 @@ <script lang="ts" setup> import { Button } from 'ant-design-vue'; - import { computed, unref } from 'vue'; + import { ComponentOptionsMixin, computed, unref } from 'vue'; import Icon from '@/components/Icon/Icon.vue'; import { buttonProps } from './props'; import { useAttrs } from '@vben/hooks'; defineOptions({ name: 'AButton', - extends: Button, + extends: Button as ComponentOptionsMixin, inheritAttrs: false, }); -- Gitblit v1.9.3