mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
Fix default tab settings (fix #3817)
This commit is contained in:
parent
868ac40d47
commit
c6ad3cd9bc
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<HomeRedesignBase>
|
||||
<div class="minimal-home">
|
||||
<TabControl class="minimal-home-tabs" :tabs="tabs" />
|
||||
<TabControl class="minimal-home-tabs" :default-tab="defaultTab" :tabs="tabs" />
|
||||
</div>
|
||||
</HomeRedesignBase>
|
||||
</template>
|
||||
@ -35,6 +35,7 @@ export default Vue.extend({
|
||||
data() {
|
||||
return {
|
||||
tabs,
|
||||
defaultTab: minimalHomeOptions.defaultTab,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
@ -68,6 +68,11 @@ export default Vue.extend({
|
||||
return true
|
||||
},
|
||||
},
|
||||
defaultTab: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
link: {
|
||||
type: String,
|
||||
required: false,
|
||||
@ -80,7 +85,8 @@ export default Vue.extend({
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
selectedTab: this.tabs[0] as TabMapping,
|
||||
selectedTab: (this.tabs.find((t: TabMapping) => t.name === this.defaultTab) ??
|
||||
this.tabs[0]) as TabMapping,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user