File tree 1 file changed +6
-1
lines changed
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 1
1
import { Item , itemProps } from '../vc-menu' ;
2
2
import { getOptionProps , getListeners } from '../_util/props-util' ;
3
3
import Tooltip from '../tooltip' ;
4
+ import { injectExtraPropsKey } from '../vc-menu/FunctionProvider' ;
4
5
function noop ( ) { }
5
6
export default {
6
7
name : 'MenuItem' ,
@@ -9,6 +10,10 @@ export default {
9
10
inject : {
10
11
getInlineCollapsed : { default : ( ) => noop } ,
11
12
layoutSiderContext : { default : ( ) => ( { } ) } ,
13
+ injectExtraProps : {
14
+ from : injectExtraPropsKey ,
15
+ default : ( ) => ( { } ) ,
16
+ } ,
12
17
} ,
13
18
isMenuItem : true ,
14
19
methods : {
@@ -18,7 +23,7 @@ export default {
18
23
} ,
19
24
render ( ) {
20
25
const props = getOptionProps ( this ) ;
21
- const { level, title, rootPrefixCls } = props ;
26
+ const { level, title, rootPrefixCls } = { ... props , ... this . injectExtraProps . $attrs } ;
22
27
const { getInlineCollapsed, $slots, $attrs : attrs } = this ;
23
28
const inlineCollapsed = getInlineCollapsed ( ) ;
24
29
let tooltipTitle = title ;
You can’t perform that action at this time.
0 commit comments