mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-07-12 16:01:35 +08:00
优化动态标签页注册逻辑
This commit is contained in:
@@ -128,16 +128,16 @@ onBeforeMount(async () => {
|
||||
await loadOrderConfig()
|
||||
await loadExtraDiscoverSources()
|
||||
sortSubscribeOrder()
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
// 选中第一个标签页
|
||||
if (discoverTabs.value.length > 0) {
|
||||
activeTab.value = discoverTabs.value[0].mediaid_prefix
|
||||
}
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
// 注册动态标签页
|
||||
registerHeaderTab({
|
||||
items: discoverTabItems.value,
|
||||
items: discoverTabItems, // 传递computed值,而不是.value
|
||||
modelValue: activeTab,
|
||||
appendButtons: [
|
||||
{
|
||||
|
||||
@@ -206,7 +206,7 @@ onMounted(async () => {
|
||||
|
||||
// 注册动态标签页
|
||||
registerHeaderTab({
|
||||
items: categoryItems.value,
|
||||
items: categoryItems,
|
||||
modelValue: currentCategory,
|
||||
appendButtons: [
|
||||
{
|
||||
@@ -223,7 +223,7 @@ onMounted(async () => {
|
||||
})
|
||||
|
||||
onActivated(async () => {
|
||||
loadExtraRecommendSources()
|
||||
await loadExtraRecommendSources()
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user