<script setup>
// 常用方法：
//   toggle($event) - 切换显示/隐藏状态
//   show($event) - 显示浮窗
//   hide($event) - 隐藏浮窗

import Popover from "primevue/popover";
import {ref} from "vue";

const rootRef = ref()

defineExpose({
	toggle: e => {
		rootRef.value.toggle(e)
	},
	show: e => {
		rootRef.value.show(e)
	},
	hide: e => {
		rootRef.value.hide(e)
	}
})
</script>

<template>
	<Popover ref="rootRef">
		<slot></slot>
	</Popover>
</template>

<style scoped>

</style>