diff --git a/src/css/layui.css b/src/css/layui.css index 12ba1d30..f4c406b1 100644 --- a/src/css/layui.css +++ b/src/css/layui.css @@ -900,7 +900,7 @@ a cite{font-style: normal; *cursor:pointer;} /* 小表格 */ .layui-table[lay-size="sm"] th, .layui-table[lay-size="sm"] td{padding-top: 5px; padding-right: 10px; padding-bottom: 5px; padding-left: 10px; font-size: 12px;} -.layui-table-view .layui-table[lay-size="sm"] .layui-table-cell{height: 30px; line-height: 20px; padding-top: 5px; padding-right: 5px;} +.layui-table-view .layui-table[lay-size="sm"] .layui-table-cell{height: 30px; line-height: 20px; padding-top: 5px; padding-right: 15px;} /* 数据表格 */ .layui-table[lay-data]{display: none;} diff --git a/src/modules/table.js b/src/modules/table.js index fadb6159..840ad933 100644 --- a/src/modules/table.js +++ b/src/modules/table.js @@ -154,7 +154,7 @@ layui.define(['laytpl', 'laypage', 'form', 'util'], function(exports){ return ''; }() ,'{{# var isSort = !(item2.colGroup) && item2.sort; }}' - ,'' + ,'' ,'
'); + lis.push('
  • '); } }); return lis.join(''); @@ -1721,6 +1761,7 @@ layui.define(['laytpl', 'laypage', 'form', 'util'], function(exports){ var setWidth = dict.ruleWidth + e.clientX - dict.offset[0]; if(setWidth < dict.minWidth) setWidth = dict.minWidth; dict.rule.style.width = setWidth + 'px'; + thisTable.that[thisTable.eventMoveElem.closest('.' + ELEM_VIEW).attr('lay-id')].setGroupWidth(); layer.close(that.tipsIndex); } } @@ -1728,7 +1769,7 @@ layui.define(['laytpl', 'laypage', 'form', 'util'], function(exports){ if(thisTable.eventMoveElem){ dict = {}; _BODY.css('cursor', ''); - that.scrollPatch(); + thisTable.that[thisTable.eventMoveElem.closest('.' + ELEM_VIEW).attr('lay-id')].scrollPatch(); // 清除当前拖拽信息 thisTable.eventMoveElem.removeData(DATA_MOVE_NAME); @@ -1920,11 +1961,12 @@ layui.define(['laytpl', 'laypage', 'form', 'util'], function(exports){ var field = othis.parent().data('field'); var index = othis.parents('tr').eq(0).data('index'); var data = table.cache[that.key][index]; - + var oldValue = data[field]; data[field] = value; // 更新缓存中的值 layui.event.call(this, MOD_NAME, 'edit('+ filter +')', commonMember.call(this, { value: value ,field: field + ,oldValue: oldValue })); }).on('blur', '.'+ELEM_EDIT, function(){ var othis = $(this);