aboutsummaryrefslogtreecommitdiff
path: root/src/components/tab_switcher
diff options
context:
space:
mode:
authorTusooa Zhu <tusooa@kazv.moe>2022-03-24 18:01:20 -0400
committerTusooa Zhu <tusooa@kazv.moe>2022-03-24 18:03:13 -0400
commite58422889bbc6857c7f171978bb89da013284507 (patch)
tree376526b3694796eee2d22550386af32b58bcdaac /src/components/tab_switcher
parentaa0b2e07233f4370497ab01e05bb6b913ee6efa5 (diff)
Fix overlapping buttons in Theme settings
Diffstat (limited to 'src/components/tab_switcher')
-rw-r--r--src/components/tab_switcher/tab_switcher.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/components/tab_switcher/tab_switcher.js b/src/components/tab_switcher/tab_switcher.js
index 12aac8e6..d2a7f5c5 100644
--- a/src/components/tab_switcher/tab_switcher.js
+++ b/src/components/tab_switcher/tab_switcher.js
@@ -47,6 +47,12 @@ export default Vue.component('tab-switcher', {
return this.active
}
},
+ isActive () {
+ return tabName => {
+ const isWanted = slot => slot.data && slot.data.attrs['data-tab-name'] === tabName
+ return this.$slots.default.findIndex(isWanted) === this.activeIndex
+ }
+ },
settingsModalVisible () {
return this.settingsModalState === 'visible'
},