refactor: tidy injections of dropdown

This commit is contained in:
三咲智子 2023-01-03 19:58:08 +08:00
parent 4a3cef9a01
commit ef417f3ccf
No known key found for this signature in database
GPG key ID: 69992F2250DFD93E
5 changed files with 14 additions and 12 deletions

View file

@ -1,5 +1,6 @@
<script setup lang="ts">
import { dropdownContextKey } from './ctx'
import { InjectionKeyDropdownContext } from '~/constants/symbols'
defineProps<{
placement?: string
}>()
@ -8,7 +9,7 @@ const dropdown = $ref<any>()
const colorMode = useColorMode()
const hide = () => dropdown.hide()
provide(dropdownContextKey, {
provide(InjectionKeyDropdownContext, {
hide,
})