fix:数据源分组名称保持统一

This commit is contained in:
junjie 2021-06-23 18:59:14 +08:00
parent 5514c2e77e
commit 17a6983924

View File

@ -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')
},