Browse Source

1.0.6

pull/6/head
sentsin 8 years ago
parent
commit
ebccd2d698
  1. 2
      build/lay/dest/layui.all.js
  2. 2
      build/layui.js
  3. 8
      src/layui.js

2
build/lay/dest/layui.all.js

File diff suppressed because one or more lines are too long

2
build/layui.js vendored

File diff suppressed because one or more lines are too long

8
src/layui.js vendored

@ -92,10 +92,6 @@ Lay.fn.use = function(apps, callback, exports){
apps = typeof apps === 'string' ? [apps] : apps; 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模块 //如果页面已经存在jQuery1.7+库且所定义的模块依赖jQuery,则不加载内部jquery模块
if(window.jQuery && jQuery.fn.on){ if(window.jQuery && jQuery.fn.on){
that.each(apps, function(index, item){ that.each(apps, function(index, item){
@ -112,6 +108,10 @@ Lay.fn.use = function(apps, callback, exports){
//静态资源host //静态资源host
config.host = config.host || (dir.match(/\/\/([\s\S]+?)\//)||['//'+ location.host +'/'])[0]; 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){ function onScriptLoad(e, url){
var readyRegExp = navigator.platform === 'PLaySTATION 3' ? /^complete$/ : /^(complete|loaded)$/ var readyRegExp = navigator.platform === 'PLaySTATION 3' ? /^complete$/ : /^(complete|loaded)$/

Loading…
Cancel
Save