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 {
99 type : String ,
1010 default : ''
1111 } ,
12+ tabData : {
13+ type : Object ,
14+ default : null
15+ } ,
1216 /***
1317 * Function to execute before tab switch. Return value must be boolean
1418 * 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 {
116116 let { active, title} = tab
117117 let titleStyles = { color : this . activeTabColor }
118118 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 > )
122120
123121 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+ } ) ;
124129 return simpleTitle
125130 } ,
126131 renderIcon ( index ) {
You can’t perform that action at this time.
0 commit comments