Merge pull request #42 from wangyateng/master

添加一个amd条件,避免 define出错
pull/41/merge
贤心 2017-02-25 14:06:36 +08:00 committed by GitHub
commit 896c733fed
1 changed files with 2 additions and 2 deletions

View File

@ -1227,7 +1227,7 @@ window.layui && layui.define ? (
exports('layer', layer);
})
) : (
typeof define === 'function' ? define(['jquery'], function(){ //requirejs加载
(typeof define === 'function' && define.amd) ? define(['jquery'], function(){ //requirejs加载
ready.run(window.jQuery);
return layer;
}) : function(){ //普通script标签加载