diff --git a/src/layer.js b/src/layer.js index a192ba04..c99f7c64 100644 --- a/src/layer.js +++ b/src/layer.js @@ -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标签加载 @@ -1236,4 +1236,4 @@ window.layui && layui.define ? ( }() ); -}(window); \ No newline at end of file +}(window);