mirror of https://github.com/layui/layui
form.val() 赋值 radio 的值为布尔值时无法赋值问题. (#1903)
Co-authored-by: meihangbo <meihangbo@126.com>pull/1923/head
parent
fe05f5f8ab
commit
b3f86d206a
|
@ -117,7 +117,7 @@ layui.define(['lay', 'layer', 'util'], function(exports){
|
||||||
itemElem[0].checked = value;
|
itemElem[0].checked = value;
|
||||||
} else if(type === 'radio') { // 如果为单选框
|
} else if(type === 'radio') { // 如果为单选框
|
||||||
itemElem.each(function(){
|
itemElem.each(function(){
|
||||||
this.checked = this.value == value;
|
this.checked = this.value == value + '';
|
||||||
});
|
});
|
||||||
} else { // 其它类型的表单
|
} else { // 其它类型的表单
|
||||||
itemElem.val(value);
|
itemElem.val(value);
|
||||||
|
|
Loading…
Reference in New Issue