forked from github/dataease
fix:数据源分组名称保持统一
This commit is contained in:
parent
5514c2e77e
commit
17a6983924
@ -141,7 +141,7 @@ export default {
|
||||
if (!(element.type in types)) {
|
||||
types[element.type] = []
|
||||
// newArr.push(...element, ...{ children: types[element.type] })
|
||||
newArr.push({ id: element.type, name: element.type, type: 'folder', children: types[element.type] })
|
||||
newArr.push({ id: element.type, name: this.transTypeToName(element.type), type: 'folder', children: types[element.type] })
|
||||
}
|
||||
types[element.type].push(element)
|
||||
// newArr.children.push({ id: element.id, label: element.name })
|
||||
@ -149,6 +149,14 @@ export default {
|
||||
return newArr
|
||||
},
|
||||
|
||||
transTypeToName(type) {
|
||||
if (type === 'mysql') {
|
||||
return 'MySQL'
|
||||
} else if (type === 'sqlServer') {
|
||||
return 'SQL Server'
|
||||
}
|
||||
},
|
||||
|
||||
addFolder() {
|
||||
this.switchMain('DsForm')
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user