修复表格和下拉菜单一些小问题

This commit is contained in:
sunxb 2023-01-12 15:24:10 +08:00
parent 618c62a68b
commit 676a3df878
2 changed files with 3 additions and 2 deletions

View File

@ -10,7 +10,7 @@ layui.define(['jquery', 'laytpl', 'lay'], function(exports){
,laytpl = layui.laytpl
,hint = layui.hint()
,device = layui.device()
,clickOrMousedown = (device.mobile ? 'click' : 'mousedown')
,clickOrMousedown = (device.mobile ? 'touchstart' : 'mousedown')
//模块名
,MOD_NAME = 'dropdown'

View File

@ -1957,12 +1957,13 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){
}
,update: function(fields, related){ //修改行数据
fields = fields || {};
var trThat = this;
layui.each(fields, function(key, value){
var td = tr.children('td[data-field="'+ key +'"]');
var cell = td.children(ELEM_CELL); //获取当前修改的列
// 更新缓存中的数据
if(key in data) data[key] = value;
if(key in data) trThat.data[key] = data[key] = value;
// 更新相应列视图
that.eachCols(function(i, item3){