diff options
| author | Henry Jameson <me@hjkos.com> | 2020-05-28 21:26:33 +0300 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2020-05-28 21:28:01 +0300 |
| commit | 9a20a9093287b1835d635398ea900e5dc2ca3484 (patch) | |
| tree | 48c37262b1f79048a234cbdb03d3a7ce79579802 /src/components/tab_switcher/tab_switcher.js | |
| parent | 5ffcddd3b9b4b6600e4e51066b9410d7e852df11 (diff) | |
fixed the remaining issues
Diffstat (limited to 'src/components/tab_switcher/tab_switcher.js')
| -rw-r--r-- | src/components/tab_switcher/tab_switcher.js | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/components/tab_switcher/tab_switcher.js b/src/components/tab_switcher/tab_switcher.js index 616f1a19..7891cb78 100644 --- a/src/components/tab_switcher/tab_switcher.js +++ b/src/components/tab_switcher/tab_switcher.js @@ -113,23 +113,20 @@ export default Vue.component('tab-switcher', { if (slot.data.attrs.fullHeight) { classes.push('full-height') } - const newSlot = ( + const renderSlot = (!this.renderOnlyFocused || active) + ? slot + : '' + + return ( <div class={classes}> { this.sideTabBar ? <h1 class="mobile-label">{slot.data.attrs.label}</h1> : '' } - {slot} + {renderSlot} </div> ) - - if (this.renderOnlyFocused) { - return active - ? <div class={classes.join(' ')}>{newSlot}</div> - : <div class={classes.join(' ')}></div> - } - return <div class={classes.join(' ')}>{newSlot}</div> }) return ( |
