diff --git a/yudao-ui-admin/package.json b/yudao-ui-admin/package.json index cb77738e8..965bfe29f 100644 --- a/yudao-ui-admin/package.json +++ b/yudao-ui-admin/package.json @@ -47,7 +47,7 @@ "fuse.js": "6.4.3", "highlight.js": "9.18.5", "js-beautify": "1.13.0", - "js-cookie": "2.2.1", + "js-cookie": "3.0.1", "jsencrypt": "3.0.0-rc.1", "nprogress": "0.2.0", "quill": "1.3.7", diff --git a/yudao-ui-admin/src/utils/index.js b/yudao-ui-admin/src/utils/index.js index 572993750..5061c2228 100644 --- a/yudao-ui-admin/src/utils/index.js +++ b/yudao-ui-admin/src/utils/index.js @@ -420,7 +420,7 @@ export function titleCase(str) { // 下划转驼峰 export function camelCase(str) { - return str.replace(/-[a-z]/g, str1 => str1.substr(-1).toUpperCase()) + return str.replace(/_[a-z]/g, str1 => str1.substr(-1).toUpperCase()) } export function isNumberStr(str) {