详情页更新为默认显示第一个标签页
This commit is contained in:
parent
62093e6ae3
commit
4241293fcd
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user