修复表格和下拉菜单一些小问题
This commit is contained in:
parent
618c62a68b
commit
676a3df878
@ -10,7 +10,7 @@ layui.define(['jquery', 'laytpl', 'lay'], function(exports){
|
|||||||
,laytpl = layui.laytpl
|
,laytpl = layui.laytpl
|
||||||
,hint = layui.hint()
|
,hint = layui.hint()
|
||||||
,device = layui.device()
|
,device = layui.device()
|
||||||
,clickOrMousedown = (device.mobile ? 'click' : 'mousedown')
|
,clickOrMousedown = (device.mobile ? 'touchstart' : 'mousedown')
|
||||||
|
|
||||||
//模块名
|
//模块名
|
||||||
,MOD_NAME = 'dropdown'
|
,MOD_NAME = 'dropdown'
|
||||||
|
@ -1957,12 +1957,13 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){
|
|||||||
}
|
}
|
||||||
,update: function(fields, related){ //修改行数据
|
,update: function(fields, related){ //修改行数据
|
||||||
fields = fields || {};
|
fields = fields || {};
|
||||||
|
var trThat = this;
|
||||||
layui.each(fields, function(key, value){
|
layui.each(fields, function(key, value){
|
||||||
var td = tr.children('td[data-field="'+ key +'"]');
|
var td = tr.children('td[data-field="'+ key +'"]');
|
||||||
var cell = td.children(ELEM_CELL); //获取当前修改的列
|
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){
|
that.eachCols(function(i, item3){
|
||||||
|
Loading…
Reference in New Issue
Block a user