Merge pull request #1044 from BigTomM/master

feat(table): 新增单元格编辑时textarea标签选项
This commit is contained in:
贤心 2022-06-20 19:30:46 +08:00 committed by GitHub
commit 42e7a85f0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

2
dist/layui.js vendored

File diff suppressed because one or more lines are too long

View File

@ -1705,6 +1705,9 @@ layui.define(['laytpl', 'laypage', 'layer', 'form', 'util'], function(exports){
//显示编辑表单
if(editType){
var input = $('<input class="layui-input '+ ELEM_EDIT +'">');
if(editType === 'textarea') {
input = $('<textarea class="layui-input ' + ELEM_EDIT + '"></textarea>');
}
input[0].value = othis.data('content') || elemCell.text();
othis.find('.'+ELEM_EDIT)[0] || othis.append(input);
input.focus();