增加系统信息轮询

This commit is contained in:
pixel
2020-10-09 16:15:45 +08:00
parent 63edd741ba
commit 130910308d
3 changed files with 12 additions and 8 deletions

View File

@@ -1,3 +1,4 @@
/* eslint-disable */
export const toUpperCase = (str) => {
if (str[0]) {
return str.replace(str[0], str[0].toUpperCase())
@@ -8,13 +9,13 @@ export const toUpperCase = (str) => {
// 驼峰转换下划线
export const toSQLLine = (str) => {
if (str=="ID") return "ID"
return str.replace(/([A-Z])/g,"_$1").toLowerCase();
}
if (str == "ID") return "ID"
return str.replace(/([A-Z])/g, "_$1").toLowerCase();
}
// 下划线转换驼峰
export const toHump = (name) => {
return name.replace(/\_(\w)/g, function(all, letter){
// 下划线转换驼峰
export const toHump = (name) => {
return name.replace(/\_(\w)/g, function(all, letter) {
return letter.toUpperCase();
});
}