mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
fix(client) route: strBigFirst -> kebabToCamelCase
This commit is contained in:
parent
2e4c1dfe4d
commit
8249756bcf
2 changed files with 6 additions and 9 deletions
|
|
@ -56,16 +56,15 @@ function CloudCmdProto(Util, DOM) {
|
|||
right: 'asc',
|
||||
};
|
||||
|
||||
log.enable = function() {
|
||||
log.enable = () => {
|
||||
Debug = true;
|
||||
};
|
||||
|
||||
log.disable = function() {
|
||||
log.disable = () => {
|
||||
Debug = false;
|
||||
};
|
||||
|
||||
var getStrBigFirst = Util.getStrBigFirst;
|
||||
var kebabToCamelCase = Util.kebabToCamelCase;
|
||||
const kebabToCamelCase = Util.kebabToCamelCase;
|
||||
|
||||
/**
|
||||
* Функция привязываеться ко всем ссылкам и
|
||||
|
|
@ -238,10 +237,8 @@ function CloudCmdProto(Util, DOM) {
|
|||
if (!path)
|
||||
return;
|
||||
|
||||
let [module] = query;
|
||||
|
||||
module = module.slice(1);
|
||||
module = getStrBigFirst(module);
|
||||
const [kebabModule] = query;
|
||||
const module = kebabToCamelCase(kebabModule.slice(1));
|
||||
|
||||
const file = query[1];
|
||||
const current = DOM.getCurrentByName(file);
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ function UtilProto(exec) {
|
|||
if (!str)
|
||||
throw Error('str could not be empty!');
|
||||
|
||||
var first = str[0].toUpperCase();
|
||||
const first = str[0].toUpperCase();
|
||||
return first + str.slice(1);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue