File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 11import { Item , itemProps } from '../vc-menu' ;
22import { getOptionProps , getListeners } from '../_util/props-util' ;
33import Tooltip from '../tooltip' ;
4+ import { injectExtraPropsKey } from '../vc-menu/FunctionProvider' ;
45function noop ( ) { }
56export default {
67 name : 'MenuItem' ,
@@ -9,6 +10,10 @@ export default {
910 inject : {
1011 getInlineCollapsed : { default : ( ) => noop } ,
1112 layoutSiderContext : { default : ( ) => ( { } ) } ,
13+ injectExtraProps : {
14+ from : injectExtraPropsKey ,
15+ default : ( ) => ( { } ) ,
16+ } ,
1217 } ,
1318 isMenuItem : true ,
1419 methods : {
@@ -18,7 +23,7 @@ export default {
1823 } ,
1924 render ( ) {
2025 const props = getOptionProps ( this ) ;
21- const { level, title, rootPrefixCls } = props ;
26+ const { level, title, rootPrefixCls } = { ... props , ... this . injectExtraProps . $attrs } ;
2227 const { getInlineCollapsed, $slots, $attrs : attrs } = this ;
2328 const inlineCollapsed = getInlineCollapsed ( ) ;
2429 let tooltipTitle = title ;
You can’t perform that action at this time.
0 commit comments