refactor!: 移除createInjectionKey函数

This commit is contained in:
Hooray Hu
2024-07-05 17:42:40 +08:00
parent 87819b4b5d
commit 9a7331f32f
2 changed files with 1 additions and 7 deletions
+1 -2
View File
@@ -1,4 +1,3 @@
import { createInjectionKey } from '@/utils/injectionKeys'
import type { Menu } from '#/global'
export interface MenuItem {
@@ -31,7 +30,7 @@ export interface MenuInjection {
handleSubMenuClick: (index: string, indexPath: string[]) => void
}
export const rootMenuInjectionKey = createInjectionKey<MenuInjection>('rootMenu')
export const rootMenuInjectionKey = Symbol('rootMenu') as InjectionKey<MenuInjection>
export interface SubMenuProps {
uniqueKey: string[]
-5
View File
@@ -1,5 +0,0 @@
import type { InjectionKey } from 'vue'
export function createInjectionKey<T>(key: string): InjectionKey<T> {
return key as any
}