Skip to content

Commit

Permalink
移除createInjectionKey函数
Browse files Browse the repository at this point in the history
  • Loading branch information
hooray committed Jul 5, 2024
1 parent cfeba93 commit eedeb1b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
3 changes: 1 addition & 2 deletions src/layouts/components/Menu/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { createInjectionKey } from '@/utils/injectionKeys'
import type { Menu } from '#/global'

export interface MenuItem {
Expand Down Expand Up @@ -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[]
Expand Down
5 changes: 0 additions & 5 deletions src/utils/injectionKeys.ts

This file was deleted.

0 comments on commit eedeb1b

Please sign in to comment.