优化动态标签页注册逻辑

This commit is contained in:
jxxghp
2025-07-05 14:06:00 +08:00
parent 17cf640e23
commit 20dced021d
6 changed files with 51 additions and 21 deletions

View File

@@ -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: [
{

View File

@@ -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>