详情页更新为默认显示第一个标签页

This commit is contained in:
jingrow 2025-10-04 16:36:07 +08:00
parent 62093e6ae3
commit 4241293fcd

View File

@ -816,13 +816,9 @@ async function loadMeta() {
canEdit.value = true //
//
if (tabs.value.length > 1) {
activeTab.value = tabs.value.reduce((max, tab) =>
tab.sections.reduce((sum: number, sec: any) => sum + sec.columns.reduce((sum2: number, col: any) => sum2 + col.fields.length, 0), 0) >
tabs.value.find(t => t.key === max).sections.reduce((sum: number, sec: any) => sum + sec.columns.reduce((sum2: number, col: any) => sum2 + col.fields.length, 0), 0)
? tab.key : max
, tabs.value[0].key)
//
if (tabs.value.length > 0) {
activeTab.value = tabs.value[0].key
}
} catch (error) {