调整复选框默认效果跟2.8.0-rc.6一致,微调复选skin的值的细节处理

pull/1197/head
sunxb 2 years ago
parent f267138550
commit d3f112160c

@ -651,12 +651,16 @@ layui.define(['lay', 'layer', 'util'], function(exports){
checks.each(function(index, check){
var othis = $(this);
var skin = othis.attr('lay-skin') || '';
var skin = othis.attr('lay-skin') || 'primary';
check.title || (check.title = othis.attr('lay-text') || ''); // 向下兼容将以前设置在lay-text的值赋给title
var title = (check.title.replace(/\s/g, '') || '').split('|');
var disabled = this.disabled;
if(skin === 'switch') skin = '_'+ skin;
if(skin === 'switch') {
skin = '_'+ skin;
} else if (skin !== 'tag') {
skin = 'primary';
}
var RE_CLASS = CLASS[skin] || CLASS.checkbox;
if(typeof othis.attr('lay-ignore') === 'string') return othis.show();

Loading…
Cancel
Save