57 lines
1.5 KiB
Vue
57 lines
1.5 KiB
Vue
<script setup lang="ts">
|
|
import {
|
|
Button,
|
|
Popover,
|
|
PopoverArrow,
|
|
PopoverContent,
|
|
PopoverDialog,
|
|
} from "@heroui-vue/components";
|
|
</script>
|
|
<template>
|
|
<div class="grid grid-cols-3 gap-4">
|
|
<div></div>
|
|
<Popover>
|
|
<Button class="w-full" variant="tertiary">Top</Button>
|
|
<PopoverContent placement="top">
|
|
<PopoverDialog>
|
|
<PopoverArrow></PopoverArrow>
|
|
<p class="text-sm">顶部位置</p>
|
|
</PopoverDialog>
|
|
</PopoverContent>
|
|
</Popover>
|
|
<div></div>
|
|
<Popover>
|
|
<Button class="w-full" variant="tertiary">Left</Button>
|
|
<PopoverContent placement="left">
|
|
<PopoverDialog>
|
|
<PopoverArrow></PopoverArrow>
|
|
<p class="text-sm">左侧位置</p>
|
|
</PopoverDialog>
|
|
</PopoverContent>
|
|
</Popover>
|
|
<div class="flex items-center justify-center">
|
|
<span class="text-sm text-muted">点击按钮</span>
|
|
</div>
|
|
<Popover>
|
|
<Button class="w-full" variant="tertiary">Right</Button>
|
|
<PopoverContent placement="right">
|
|
<PopoverDialog>
|
|
<PopoverArrow></PopoverArrow>
|
|
<p class="text-sm">右侧位置</p>
|
|
</PopoverDialog>
|
|
</PopoverContent>
|
|
</Popover>
|
|
<div></div>
|
|
<Popover>
|
|
<Button class="w-full" variant="tertiary">Bottom</Button>
|
|
<PopoverContent placement="bottom">
|
|
<PopoverDialog>
|
|
<PopoverArrow></PopoverArrow>
|
|
<p class="text-sm">底部位置</p>
|
|
</PopoverDialog>
|
|
</PopoverContent>
|
|
</Popover>
|
|
<div></div>
|
|
</div>
|
|
</template>
|