mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-09-21 14:30:00 +08:00
28 lines
617 B
Vue
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>
|