优化 all 模块代码书写规范

pull/1315/head
贤心 1 year ago
parent 3deca33c1c
commit 5fba5f051b

@ -5,7 +5,8 @@
layui.define(function(){ layui.define(function(){
var mods = [] var mods = []
,builtin = layui.cache.builtin; var builtin = layui.cache.builtin;
layui.each(builtin, function(modName){ layui.each(builtin, function(modName){
(modName === 'all' || modName === 'layui.all') || mods.push(modName); (modName === 'all' || modName === 'layui.all') || mods.push(modName);
}); });
@ -15,12 +16,12 @@ layui.define(function(){
}(), function(exports){ }(), function(exports){
"use strict"; "use strict";
var MOD_NAME = 'all' var MOD_NAME = 'all';
//外部接口 // 外部接口
,all = { var all = {
config: {} config: {},
,time: function(){ time: function(){
var time = new Date().getTime() - layui.cache.startTime; var time = new Date().getTime() - layui.cache.startTime;
delete layui.cache.startTime; delete layui.cache.startTime;
return time; return time;

Loading…
Cancel
Save