mirror of https://github.com/layui/layui
优化 table 当数据值为 `0,undefined,null` 且开启列模板,编辑单元格会带入模板字符的问题
解决:[#I8JOSW](https://gitee.com/layui/layui/issues/I8JOSW)pull/1431/head
parent
06514f02c4
commit
1d408f0f4a
|
@ -2379,8 +2379,9 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){
|
|||
}
|
||||
return inputElem;
|
||||
}());
|
||||
|
||||
input[0].value = othis.data('content') || data[field] || elemCell.text();
|
||||
input[0].value = function(val) {
|
||||
return (val === undefined || val === null) ? '' : val;
|
||||
}(othis.data('content') || data[field]);
|
||||
othis.find('.'+ELEM_EDIT)[0] || othis.append(input);
|
||||
input.focus();
|
||||
e && layui.stope(e);
|
||||
|
|
Loading…
Reference in New Issue