From 9a20a9093287b1835d635398ea900e5dc2ca3484 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Thu, 28 May 2020 21:26:33 +0300 Subject: fixed the remaining issues --- src/components/tab_switcher/tab_switcher.js | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'src/components/tab_switcher/tab_switcher.js') 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 (
{ this.sideTabBar ?

{slot.data.attrs.label}

: '' } - {slot} + {renderSlot}
) - - if (this.renderOnlyFocused) { - return active - ?
{newSlot}
- :
- } - return
{newSlot}
}) return ( -- cgit v1.2.3-70-g09d2