mirror of https://github.com/layui/layui
修复 checkbox 的 `title` 属性值出现 `|` 内容时无法显示的问题
parent
f015314ac4
commit
bccda5c5ab
|
@ -672,9 +672,12 @@ layui.define(['lay', 'layer', 'util'], function(exports){
|
|||
var skin = othis.attr('lay-skin') || 'primary';
|
||||
var title = $.trim(check.title || function(){ // 向下兼容 lay-text 属性
|
||||
return check.title = othis.attr('lay-text') || '';
|
||||
}()).split('|');
|
||||
}());
|
||||
var disabled = this.disabled;
|
||||
|
||||
// 若为开关,则对 title 进行分隔解析
|
||||
title = skin === 'switch' ? title.split('|') : [title];
|
||||
|
||||
if(!skins[skin]) skin = 'primary'; // 若非内置风格,则强制为默认风格
|
||||
var RE_CLASS = CLASS[skin] || CLASS.checkbox;
|
||||
|
||||
|
|
Loading…
Reference in New Issue