refactor: tidy injections of dropdown
This commit is contained in:
parent
4a3cef9a01
commit
ef417f3ccf
5 changed files with 14 additions and 12 deletions
|
@ -1,6 +1,4 @@
|
|||
<script setup lang="ts">
|
||||
import { dropdownContextKey } from './ctx'
|
||||
|
||||
const props = defineProps<{
|
||||
text?: string
|
||||
description?: string
|
||||
|
@ -10,7 +8,7 @@ const props = defineProps<{
|
|||
}>()
|
||||
const emit = defineEmits(['click'])
|
||||
|
||||
const { hide } = inject(dropdownContextKey, undefined) || {}
|
||||
const { hide } = useDropdownContext() || {}
|
||||
|
||||
const el = ref<HTMLDivElement>()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue