Add RightMenu.vue

Signed-off-by: wsg123 <1453416853@qq.com>
This commit is contained in:
wsg123 2024-07-05 16:13:23 +08:00
parent ecdb4eac7b
commit a8cffb4bc3
1 changed files with 26 additions and 0 deletions

26
RightMenu.vue Normal file
View File

@ -0,0 +1,26 @@
<script setup lang="ts">
import { useRightMenu } from '../flowDetail/useRightMenu'
const { visible, x, y, items } = useRightMenu()
</script>
<template>
<div
v-if="visible"
class="rightMenu absolute w-32 bg-white border border-gray-200 leading-8 border-solid"
:style="{ top: y + 'px', left: x + 'px' }"
>
<p
v-for="item in items"
@click="item.click"
class="rightMenuitem flex justify-between px-2 text-[13px]"
:key="item.text"
>
<span>{{ item.text }}</span>
<span v-if="item.keyCode">{{ item.keyCode }}</span>
</p>
</div>
</template>
<style lang="postcss" scoped>
.rightMenuitem:hover {
background-color: #eee;
}
</style>