File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,10 @@ export default {
9
9
type : String ,
10
10
default : ''
11
11
} ,
12
+ tabData : {
13
+ type : Object ,
14
+ default : null
15
+ } ,
12
16
/***
13
17
* Function to execute before tab switch. Return value must be boolean
14
18
* If the return result is false, tab switch is restricted
Original file line number Diff line number Diff line change @@ -116,11 +116,16 @@ export default {
116
116
let { active, title} = tab
117
117
let titleStyles = { color : this . activeTabColor }
118
118
if ( position === 'center' ) titleStyles . color = this . activeTextColor
119
- let simpleTitle = ( < span class = { `title title_${ position } ` } style = { active ? titleStyles : { } } >
120
- { position === 'center' && this . renderIcon ( index ) } { title }
121
- </ span > )
119
+ let simpleTitle = ( < span class = { `title title_${ position } ` } style = { active ? titleStyles : { } } > { position === 'center' && this . renderIcon ( index ) } { title } </ span > )
122
120
123
121
if ( tab . $slots . title ) return tab . $slots . title
122
+ if ( tab . $scopedSlots . title ) return tab . $scopedSlots . title ( {
123
+ active : active ,
124
+ title : title ,
125
+ position : position ,
126
+ icon : tab . icon ,
127
+ data : tab . tabData
128
+ } ) ;
124
129
return simpleTitle
125
130
} ,
126
131
renderIcon ( index ) {
You can’t perform that action at this time.
0 commit comments