1.0.9_rls

This commit is contained in:
sentsin
2017-03-01 00:15:02 +08:00
parent d9259ace92
commit c86084bbe8
29 changed files with 53 additions and 41 deletions

View File

@@ -84,7 +84,7 @@ layui.define('jquery', function(exports){
//Tab点击
tabClick: function(e, index, liElem){
var othis = liElem || $(this)
,index = index || othis.index()
,index = index || othis.parent().children('li').index(othis)
,parents = othis.parents('.layui-tab').eq(0)
,item = parents.children('.layui-tab-content').children('.layui-tab-item')
,filter = parents.attr('lay-filter');
@@ -351,7 +351,9 @@ layui.define('jquery', function(exports){
elemBar.css('width', width);
if(othis.attr('lay-showPercent')){
setTimeout(function(){
elemBar.html('<span class="'+ ELEM +'-text">'+ Math.round(elemBar.width()/othis.width()*100) +'%</span>');
var percent = Math.round(elemBar.width()/othis.width()*100);
if(percent > 100) percent = 100;
elemBar.html('<span class="'+ ELEM +'-text">'+ percent +'%</span>');
},350);
}
});

View File

@@ -297,7 +297,7 @@ layui.define('layer', function(exports){
check.checked ? (' '+RE_CLASS[1]) : '') + (disabled ? ' layui-checkbox-disbaled '+DISABLED : '') +'" lay-skin="'+ (skin||'') +'">'
,{
_switch: '<em>'+ ((check.checked ? text[0] : text[1])||'') +'</em><i></i>'
}[skin] || ('<span>'+ (check.title || '勾选') +'</span><i class="layui-icon">'+ (skin ? '&#xe605;' : '&#xe618;') +'</i>')
}[skin] || ((check.title.replace(/\s/g, '') ? ('<span>'+ check.title +'</span>') : '') +'<i class="layui-icon">'+ (skin ? '&#xe605;' : '&#xe618;') +'</i>')
,'</div>'].join(''));
hasRender[0] && hasRender.remove(); //如果已经渲染则Rerender