From 4fa05ef1dc894c8ffb2d4d4b44621ca27751da0e Mon Sep 17 00:00:00 2001 From: wangyateng Date: Fri, 24 Feb 2017 14:16:39 +0800 Subject: [PATCH] update layer.js add "define.amd" --- src/layer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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);