ソースを参照

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) {