feat: more actions in status card
This commit is contained in:
parent
2422c809e0
commit
e9c9ecefc8
7 changed files with 157 additions and 87 deletions
22
components/common/dropdown/DropdownItem.vue
Normal file
22
components/common/dropdown/DropdownItem.vue
Normal file
|
@ -0,0 +1,22 @@
|
|||
<script setup lang="ts">
|
||||
import { dropdownContextKey } from './ctx'
|
||||
|
||||
defineProps<{
|
||||
icon?: string
|
||||
}>()
|
||||
const emit = defineEmits(['click'])
|
||||
|
||||
const { hide } = inject(dropdownContextKey)!
|
||||
|
||||
const handleClick = (evt: MouseEvent) => {
|
||||
hide()
|
||||
emit('click', evt)
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div flex gap-2 items-center cursor-pointer px4 py3 font-700 hover="bg-active" @click="handleClick">
|
||||
<div v-if="icon" :class="icon" />
|
||||
<span text-15px><slot /></span>
|
||||
</div>
|
||||
</template>
|
Loading…
Add table
Add a link
Reference in a new issue