diff --git a/src/layui.js b/src/layui.js index 868e21e8..6a7cb73f 100644 --- a/src/layui.js +++ b/src/layui.js @@ -148,7 +148,7 @@ (function poll() { if(++timeout > config.timeout * 1000 / 4){ return error(item + ' is not a valid module', 'error'); - }; + } config.status[item] ? onCallback() : setTimeout(poll, 4); }()); } @@ -221,7 +221,7 @@ (function poll() { if(++timeout > config.timeout * 1000 / 4){ return error(item + ' is not a valid module', 'error'); - }; + } (typeof config.modules[item] === 'string' && config.status[item]) ? onCallback() : setTimeout(poll, 4); @@ -285,7 +285,7 @@ //如果轮询超过指定秒数,则视为请求文件失败或 css 文件不符合规范 if(++timeout > config.timeout * 1000 / delay){ return error(href + ' timeout'); - }; + } //css 加载就绪 if(parseInt(that.getStyle(getLinkElem, 'width')) === 1989){ @@ -671,7 +671,7 @@ } else { //数字 vs 数字 return v1 - v2; } - }; + } /** * 字典序排序 diff --git a/src/modules/rate.js b/src/modules/rate.js index 9c07ae5b..c0a77d44 100644 --- a/src/modules/rate.js +++ b/src/modules/rate.js @@ -87,16 +87,8 @@ layui.define('jquery',function(exports){ + (i>Math.floor(options.value)?ICON_RATE:ICON_RATE_SOLID) + '" '+ style +'>'; - if(options.half){ - if(parseInt(options.value) !== options.value){ - if(i == Math.ceil(options.value)){ - temp = temp + '
  • '; - }else{ - temp = temp + item - } - }else{ - temp = temp + item - } + if(options.half&&parseInt(options.value) !== options.value&&i == Math.ceil(options.value)){ + temp = temp + '
  • '; }else{ temp = temp +item; }