mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
chore(client) rm " "
This commit is contained in:
parent
7e0853d55b
commit
6d411861ae
1 changed files with 15 additions and 9 deletions
|
|
@ -79,34 +79,40 @@ var Util, DOM, CloudFunc, CloudCmd;
|
|||
* @pParams = {name, path, func, dobefore, arg}
|
||||
*/
|
||||
function loadModule(pParams) {
|
||||
var lName, lPath, lFunc, lDoBefore, lSlash, lAfterSlash,
|
||||
isContain;
|
||||
|
||||
if (pParams) {
|
||||
var lName = pParams.name,
|
||||
lPath = pParams.path,
|
||||
lFunc = pParams.func,
|
||||
lDoBefore = pParams.dobefore;
|
||||
lName = pParams.name,
|
||||
lPath = pParams.path,
|
||||
lFunc = pParams.func,
|
||||
lDoBefore = pParams.dobefore;
|
||||
|
||||
if ( Util.isString(pParams) )
|
||||
if (Util.isString(pParams))
|
||||
lPath = pParams;
|
||||
|
||||
if (lPath && !lName) {
|
||||
lName = Util.getStrBigFirst(lPath);
|
||||
lName = Util.removeStr(lName, '.js');
|
||||
|
||||
var lSlash = lName.indexOf('/');
|
||||
lSlash = lName.indexOf('/');
|
||||
if (lSlash > 0) {
|
||||
var lAfterSlash = lName.substr(lSlash);
|
||||
lAfterSlash = lName.substr(lSlash);
|
||||
lName = Util.removeStr(lName, lAfterSlash);
|
||||
}
|
||||
}
|
||||
|
||||
if ( !Util.isContainStr(lPath, '.js') )
|
||||
isContain = Util.isContainStr(lPath, '.js');
|
||||
if (!isContain)
|
||||
lPath += '.js';
|
||||
|
||||
if (!CloudCmd[lName])
|
||||
CloudCmd[lName] = function(pArg) {
|
||||
var path = CloudCmd.LIBDIRCLIENT + lPath;
|
||||
|
||||
Util.exec(lDoBefore);
|
||||
|
||||
return DOM.jsload(CloudCmd.LIBDIRCLIENT + lPath, lFunc ||
|
||||
return DOM.jsload(path, lFunc ||
|
||||
function() {
|
||||
var Proto = CloudCmd[lName];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue