Skip to content

Commit

Permalink
#15 Add space to icon instead of tab title
Browse files Browse the repository at this point in the history
  • Loading branch information
cristian.jora committed Aug 23, 2017
1 parent e7b0ac8 commit 6508b3f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions dev/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
v-model="tabName">
<v-tab v-for="(tab, index) in tabList"
:key="tab.name"
:title="tab.name"
icon="ti-user">
:title="tab.name">
{{tab.name}}
</v-tab>
</vue-tabs>
Expand Down
4 changes: 2 additions & 2 deletions src/components/VueTabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export default{
let titleStyles = {color: this.activeTabColor}
if (position === 'center') titleStyles.color = this.activeTextColor
let simpleTitle = (<span class={`title title_${position}`} style={active ? titleStyles : {}}>
{position === 'center' && this.renderIcon(index)}&nbsp;{title}
{position === 'center' && this.renderIcon(index)}{title}
</span> )

if (tab.$slots.title) return tab.$slots.title
Expand All @@ -123,7 +123,7 @@ export default{
if (this.tabs.length === 0) return
let tab = this.tabs[index]
let {icon} = tab
let simpleIcon = <i class={icon}></i>
let simpleIcon = <i class={icon}>&nbsp;</i>
if (!tab.$slots.title && icon) return simpleIcon
},
renderTabs () {
Expand Down

0 comments on commit 6508b3f

Please sign in to comment.