layui-table中的处理单元格是否可以编辑的问题
2019-10-29 本文已影响0人
冬至_5b58
// 在数据拿取之后处理当前数据中td上的data-edit的属性
done: function (res, curr,count) {
// window.rootApp.checkData = [];
// window.rootApp.dataCount = res && res.TotalCount; //列表加载完绑定数据
// 当前页面缓存数据
var dataTemp = table.cache[this.id];
// 控件渲染出来的table
var tableElem = this.elem.next();
layui.each(dataTemp, function (index, data) {
if (data.isEdit === false) {
// 关闭修改
tableElem.find('tr[data-index="'+index+'"]').find('td[data-field="province"]').removeAttr('data-edit');
}
});
},