@@ -345,7 +345,7 @@ const TreeNode = {
345
345
class = { classNames ( `${ prefixCls } -switcher` , `${ prefixCls } -switcher-noop` ) }
346
346
>
347
347
{ typeof switcherIcon === 'function'
348
- ? switcherIcon ( { ...this . $props , isLeaf : true } )
348
+ ? switcherIcon ( { ...this . $props , ... this . $props . dataRef , isLeaf : true } )
349
349
: switcherIcon }
350
350
</ span >
351
351
) ;
@@ -358,7 +358,7 @@ const TreeNode = {
358
358
return (
359
359
< span key = "switcher" onClick = { this . onExpand } class = { switcherCls } >
360
360
{ typeof switcherIcon === 'function'
361
- ? switcherIcon ( { ...this . $props , isLeaf : false } )
361
+ ? switcherIcon ( { ...this . $props , ... this . $props . dataRef , isLeaf : false } )
362
362
: switcherIcon }
363
363
</ span >
364
364
) ;
@@ -430,7 +430,9 @@ const TreeNode = {
430
430
const currentIcon = icon || treeIcon ;
431
431
$icon = currentIcon ? (
432
432
< span class = { classNames ( `${ prefixCls } -iconEle` , `${ prefixCls } -icon__customize` ) } >
433
- { typeof currentIcon === 'function' ? currentIcon ( { ...this . $props } , h ) : currentIcon }
433
+ { typeof currentIcon === 'function'
434
+ ? currentIcon ( { ...this . $props , ...this . $props . dataRef } , h )
435
+ : currentIcon }
434
436
</ span >
435
437
) : (
436
438
this . renderIcon ( )
@@ -442,12 +444,14 @@ const TreeNode = {
442
444
const currentTitle = title ;
443
445
let $title = currentTitle ? (
444
446
< span class = { `${ prefixCls } -title` } >
445
- { typeof currentTitle === 'function' ? currentTitle ( { ...this . $props } , h ) : currentTitle }
447
+ { typeof currentTitle === 'function'
448
+ ? currentTitle ( { ...this . $props , ...this . $props . dataRef } , h )
449
+ : currentTitle }
446
450
</ span >
447
451
) : (
448
452
< span class = { `${ prefixCls } -title` } > { defaultTitle } </ span >
449
453
) ;
450
-
454
+
451
455
return (
452
456
< span
453
457
key = "selector"
0 commit comments