fix: table类型图表逻辑调整;完善一些工具方法;地图切换实现

This commit is contained in:
chenjinsong
2022-03-06 23:26:42 +08:00
parent f4daaa8e75
commit 5427ea0760
11 changed files with 150 additions and 49 deletions

View File

@@ -444,12 +444,18 @@ export function lineToHump (name) {
}
// 下划线转换空格首位大写
export function lineToSpace (name) {
if (_.isEmpty(name)) {
return ''
}
return _.upperFirst(name.replace(/\_(\w)/g, function (all, letter) {
return ` ${letter.toUpperCase()}`
}))
}
// 驼峰转换下划线
export function humpToLine (name) {
if (_.isEmpty(name)) {
return ''
}
return name.replace(/([A-Z])/g, '_$1').toLowerCase()
}
// 搜索功能:对象转字符串