固定多级表头

This commit is contained in:
mll
2026-02-12 21:47:53 +08:00
parent aa853f539b
commit f2b5dd2a8d
3 changed files with 19 additions and 6 deletions

View File

@@ -282,7 +282,19 @@ const initTable = async () => {
config.searchType = 'tag'
}
if (item.queryMode == 'NE') config.searchLabel = `${config.label} !=`
tableOption.value.column[item.fieldCode] = config
if(!item.parentFieldCode&&!!item.parentFieldName){
if(tableOption.value.column[item.parentFieldName]){
tableOption.value.column[item.parentFieldName].children.push(config)
}else{
tableOption.value.column[item.parentFieldName]={
children:[config],
label:item.parentFieldName
}
}
}else{
tableOption.value.column[item.fieldCode] = config
}
})
isInit.value = true