2022-12-09 19:58:10 +08:00

28 lines
617 B
Vue

<template>
<component class="tmagic-design-tooltip" :is="uiComponent.component" v-bind="uiProps">
<template #content>
<slot name="content"></slot>
</template>
<slot></slot>
</component>
</template>
<script setup lang="ts" name="TMTooltip">
import { computed } from 'vue';
import { getConfig } from './config';
const props = defineProps<{
placement?: string;
disabled?: boolean;
content?: string;
effect?: string;
transition?: string;
offset?: number;
}>();
const uiComponent = getConfig('components').tooltip;
const uiProps = computed(() => uiComponent.props(props));
</script>