Skip to content

Commit 09d4935

Browse files
committed
refactor!: 移除createInjectionKey函数
1 parent 1bc1cfe commit 09d4935

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

src/utils/injectionKeys.ts

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/views/components/Menu/types.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { createInjectionKey } from '@/utils/injectionKeys'
2-
31
export interface MenuItem {
42
index: string
53
indexPath: string[]
@@ -30,7 +28,7 @@ export interface MenuInjection {
3028
handleSubMenuClick: (index: string, indexPath: string[]) => void
3129
}
3230

33-
export const rootMenuInjectionKey = createInjectionKey<MenuInjection>('rootMenu')
31+
export const rootMenuInjectionKey = Symbol('rootMenu') as InjectionKey<MenuInjection>
3432

3533
export interface SubMenuProps {
3634
uniqueKey: string[]

0 commit comments

Comments
 (0)