pull/6/head
sentsin 2016-11-30 04:24:21 +08:00
parent c1663351cc
commit ebccd2d698
3 changed files with 6 additions and 6 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -91,10 +91,6 @@ Lay.fn.use = function(apps, callback, exports){
var head = doc.getElementsByTagName('head')[0];
apps = typeof apps === 'string' ? [apps] : apps;
if(!apps || apps.length === 0 || layui['layui.all']){
return typeof callback === 'function' && callback.apply(layui, exports), that;
}
//如果页面已经存在jQuery1.7+库且所定义的模块依赖jQuery则不加载内部jquery模块
if(window.jQuery && jQuery.fn.on){
@ -111,6 +107,10 @@ Lay.fn.use = function(apps, callback, exports){
//静态资源host
config.host = config.host || (dir.match(/\/\/([\s\S]+?)\//)||['//'+ location.host +'/'])[0];
if(apps.length === 0 || layui['layui.all']){
return typeof callback === 'function' && callback.apply(layui, exports), that;
}
//加载完毕
function onScriptLoad(e, url){