瀏覽代碼

camelCase中应该是下划线,而不是横杠

RuoYi 4 年之前
父節點
當前提交
e2a7df4a2c
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      ruoyi-ui/src/utils/index.js

+ 1 - 1
ruoyi-ui/src/utils/index.js

@@ -381,7 +381,7 @@ export function titleCase(str) {
381 381
 
382 382
 // 下划转驼峰
383 383
 export function camelCase(str) {
384
-  return str.replace(/-[a-z]/g, str1 => str1.substr(-1).toUpperCase())
384
+  return str.replace(/_[a-z]/g, str1 => str1.substr(-1).toUpperCase())
385 385
 }
386 386
 
387 387
 export function isNumberStr(str) {