fix(design): button 判断默认slot

This commit is contained in:
roymondchen 2023-05-16 16:36:17 +08:00
parent 24604c9d36
commit a97523e800
3 changed files with 5 additions and 3 deletions

View File

@ -1,6 +1,8 @@
<template>
<component class="tmagic-design-button" :is="uiComponent.component" v-bind="uiProps" @click="clickHandler">
<slot></slot>
<template #default v-if="$slots.default">
<slot></slot>
</template>
</component>
</template>

View File

@ -13,7 +13,7 @@ const form = ref<any>();
const props = defineProps<{
model?: any;
labelWidth?: string;
labelWidth?: string | number;
disabled?: boolean;
inline?: boolean;
labelPosition?: string;

View File

@ -13,7 +13,7 @@ import { computed } from 'vue';
import { getConfig } from './config';
const props = defineProps<{
prop?: string;
labelWidth?: string;
labelWidth?: string | number;
rules?: any;
}>();