mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-09-23 07:59:59 +08:00
31 lines
669 B
Vue
31 lines
669 B
Vue
<template>
|
|
<component class="tmagic-design-popover" :is="uiComponent.component" v-bind="uiProps">
|
|
<slot></slot>
|
|
|
|
<template #reference>
|
|
<slot name="reference"></slot>
|
|
</template>
|
|
</component>
|
|
</template>
|
|
|
|
<script setup lang="ts" name="TMPopover">
|
|
import { computed } from 'vue';
|
|
|
|
import { getConfig } from './config';
|
|
|
|
const props = defineProps<{
|
|
placement?: string;
|
|
width?: string | number;
|
|
title?: string;
|
|
trigger?: string;
|
|
effect?: string;
|
|
content?: string;
|
|
disabled?: boolean;
|
|
popperClass?: string;
|
|
}>();
|
|
|
|
const uiComponent = getConfig('components').popover;
|
|
|
|
const uiProps = computed(() => uiComponent.props(props));
|
|
</script>
|