mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-06-04 23:30:03 +08:00
Fix tab selection on discovery page (#353)
* Fix: Ensure first tab is selected when no valid tab is active Co-authored-by: jxxghp <jxxghp@163.com> * Fix discover page tab selection logic when no tab is active Co-authored-by: jxxghp <jxxghp@163.com> * Fix tab selection logic in discover page lifecycle hooks Co-authored-by: jxxghp <jxxghp@163.com> * Remove unnecessary onMounted hook in discover page Co-authored-by: jxxghp <jxxghp@163.com> * Move dynamic header tab registration after tabs initialization Co-authored-by: jxxghp <jxxghp@163.com> * Refactor dynamic header tab registration in discover page Co-authored-by: jxxghp <jxxghp@163.com> * Fix tab selection logic in discover page to ensure first tab is selected Co-authored-by: jxxghp <jxxghp@163.com> * Update useDynamicHeaderTab to sync modelValue in tab configuration Co-authored-by: jxxghp <jxxghp@163.com> * Remove auto-tab selection logic from discover page Co-authored-by: jxxghp <jxxghp@163.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
This commit is contained in:
@@ -91,6 +91,8 @@ export function useDynamicHeaderTab() {
|
||||
tabConfig.routePath = route.path
|
||||
// 确保items是最新的
|
||||
tabConfig.items = Array.isArray(config.items) ? config.items : config.items.value
|
||||
// 确保modelValue是最新的
|
||||
tabConfig.modelValue = config.modelValue.value
|
||||
|
||||
if (registerDynamicHeaderTab) {
|
||||
registerDynamicHeaderTab(tabConfig)
|
||||
|
||||
Reference in New Issue
Block a user