소스 검색

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